/* =============================================
   SALON BOOKING SaaS — MAIN.CSS
   Design System: Tokens, Reset, Typography
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Fraunces:opsz,wght@9..144,300..700&display=swap');

/* ── CSS Custom Properties ─────────────────── */
:root {
  /* Primary Terracotta Brand Colors */
  --color-primary:      #C1622D;
  --color-primary-dark: #A44F22;
  --color-primary-glow: rgba(193, 98, 45, 0.12);
  --color-secondary:    #E07A5F;
  --color-accent:       #16A34A;
  --color-warning:      #D97706;
  --color-danger:       #E11D48;
  --color-info:         #0284C7;

  /* Backgrounds */
  --bg-base:    #FAF6F1;
  --bg-surface: #FFFFFF;
  --bg-card:    #FFFFFF;
  --bg-card-hover: #F8F4EE;
  --bg-elevated:#FFFFFF;
  --bg-overlay: rgba(43, 36, 32, 0.55);

  /* Borders */
  --border-subtle: rgba(43, 36, 32, 0.07);
  --border-default: #ECE2D8;
  --border-strong: rgba(43, 36, 32, 0.20);
  --border-primary: rgba(193, 98, 45, 0.35);

  /* Text */
  --text-primary:   #2B2420;
  --text-secondary: #756A61;
  --text-muted:     #A89E94;
  --text-inverse:   #FFFFFF;

  /* Typography */
  --font-heading: 'Outfit', 'Fraunces', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-serif:   'Fraunces', Georgia, serif;

  /* Spacing (8pt grid) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 6px rgba(43,36,32,0.05);
  --shadow-md:  0 4px 14px rgba(43,36,32,0.08);
  --shadow-lg:  0 10px 28px rgba(43,36,32,0.12);
  --shadow-primary: 0 4px 16px rgba(193, 98, 45, 0.30);
  --shadow-glow: 0 0 20px rgba(193, 98, 45, 0.15);

  /* Transitions */
  --transition-fast:   150ms ease-out;
  --transition-base:   220ms ease-out;
  --transition-slow:   350ms ease-out;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;

  /* Sidebar width */
  --sidebar-w: 260px;

  /* ── Terracotta Landing Design Tokens ──────── */
  --terracotta:        #C1622D;
  --terracotta-dark:   #A44F22;
  --terracotta-soft:   #F3E3D6;
  --terracotta-border: rgba(193, 98, 45, 0.25);
  --terracotta-glow:   rgba(193, 98, 45, 0.12);

  /* Warm neutral palette (landing page) */
  --cream-bg:           #FAF6F1;
  --cream-card:         #FFFFFF;
  --warm-line:          #ECE2D8;
  --warm-text-primary:  #2B2420;
  --warm-text-secondary:#756A61;
  --warm-text-muted:    #A89E94;

  /* Warm shadows */
  --shadow-warm-sm: 0 2px 8px rgba(43,36,32,0.07);
  --shadow-warm-md: 0 4px 16px rgba(43,36,32,0.10);
  --shadow-warm-lg: 0 8px 32px rgba(43,36,32,0.14);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-primary); }

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

/* ── Typography Scale ───────────────────────── */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-5xl  { font-size: 3rem; }

.font-light  { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 800; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--color-primary); }
.text-success   { color: var(--color-accent); }
.text-danger    { color: var(--color-danger); }
.text-warning   { color: var(--color-warning); }

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Layout Utilities ───────────────────────── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }

.grid { display: grid; }

.hidden { display: none !important; }
.visible { display: block; }

/* ── Spacing ────────────────────────────────── */
.p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.p-8  { padding: var(--sp-8); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Container ──────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-sm {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ── Selection ──────────────────────────────── */
::selection {
  background: var(--color-primary-glow);
  color: var(--text-primary);
}

/* ── Page Transition ────────────────────────── */
#app {
  min-height: 100vh;
}

.page-enter {
  animation: pageEnter 0.3s ease-out forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Background Gradient Blobs ──────────────── */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-blobs::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  animation: blobMove1 20s ease-in-out infinite alternate;
}

.bg-blobs::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244,114,182,0.06) 0%, transparent 70%);
  animation: blobMove2 25s ease-in-out infinite alternate;
}

@keyframes blobMove1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.2); }
}

@keyframes blobMove2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, -80px) scale(1.15); }
}
