/* ==========================================================================
   Lumen Dental — Design Tokens
   Light, warm, editorial. Serif display + neutral sans body.
   ========================================================================== */

/* Шрифты подключаются через ../css/fonts.css (self-hosted woff2 в /assets/fonts/). */

:root {
  /* ---- Color: Surfaces (warm off-whites, never pure #fff) ---- */
  --surface-travertine: #FAF7F2;   /* primary page bg */
  --surface-linen:      #F4EFE8;   /* secondary bg, stripes */
  --surface-paper:      #FFFFFF;   /* cards, inputs */
  --surface-ink:        #3D342A;   /* warm cocoa - dark footer, dark sections */
  --surface-ink-2:      #594E40;   /* warm taupe - raised dark */

  /* ---- Color: Ink (warm near-blacks, never #000) ---- */
  --ink-1: #1C1A17;   /* primary text */
  --ink-2: #57524A;   /* secondary text */
  --ink-3: #8C857A;   /* tertiary, captions, placeholders */
  --ink-4: #BDB6AB;   /* disabled, dividers on dark */
  --ink-inv: #FAF7F2; /* text on dark surfaces */

  /* ---- Color: Accent ---- */
  --teal-50:  #EAF2F0;
  --teal-100: #D2E3DF;
  --teal-300: #88B4AC;
  --teal-500: #3F7D74;   /* brand accent */
  --teal-700: #2E5A54;
  --teal-900: #1E3B37;

  /* ---- Color: Warm accent (invoices, subtle emphasis) ---- */
  --amber-100: #F4E7D3;
  --amber-500: #C2864A;
  --amber-700: #8E5F31;

  /* ---- Color: Semantic ---- */
  --success: #5C8A6E;
  --success-bg: #E8F0EA;
  --warning: #C2864A;
  --warning-bg: #F6EADA;
  --danger:  #A8554A;
  --danger-bg: #F3DEDA;
  --info:    #3F7D74;
  --info-bg: #E8F0EE;

  /* ---- Color: Borders + hairlines ---- */
  --border-1: rgba(28, 26, 23, 0.08);   /* default border on light */
  --border-2: rgba(28, 26, 23, 0.14);   /* stronger, hover */
  --border-inv-1: rgba(255, 255, 255, 0.10);
  --border-inv-2: rgba(255, 255, 255, 0.18);

  /* ---- Typography: Families ---- */
  --font-display: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --font-body:    'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* ---- Typography: Scale ---- */
  --fs-micro: 11px;
  --fs-xs:    12px;
  --fs-sm:    14px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    22px;
  --fs-xl:    28px;
  --fs-2xl:   36px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   80px;

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-body:  1.6;
  --lh-loose: 1.8;

  /* ---- Spacing (4px base) ---- */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* ---- Radii ---- */
  --r-xs:   2px;     /* inputs */
  --r-sm:   6px;     /* buttons */
  --r-md:   12px;    /* cards */
  --r-lg:   24px;    /* modals, sheets */
  --r-pill: 999px;   /* pills, avatars */

  /* ---- Shadows (warm-tinted) ---- */
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(28, 26, 23, 0.12);
  --shadow-lg: 0 24px 48px -16px rgba(28, 26, 23, 0.18);

  /* ---- Motion ---- */
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   360ms;
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in:    cubic-bezier(0.4, 0, 0.6, 1);
  --ease-inout: cubic-bezier(0.45, 0, 0.2, 1);

  /* ---- Layout ---- */
  --page-max: 1240px;
  --nav-h-desktop: 72px;
  --nav-h-mobile:  56px;
}

/* ==========================================================================
   Semantic element styles — use these on raw HTML tags when possible.
   ========================================================================== */

html, body {
  background: var(--surface-travertine);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display / headings — serif */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, var(--fs-5xl));
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 0 0 var(--sp-5);
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, var(--fs-3xl));
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-5);
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-4);
}
h4, .h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  margin: 0 0 var(--sp-3);
}

p, .body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink-1);
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
  max-width: 62ch;
}

.lead {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

small, .caption {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.5;
}

code, kbd, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

a {
  color: var(--teal-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness var(--dur-fast) var(--ease-out);
}
a:hover { text-decoration-thickness: 2px; }

hr {
  border: 0;
  border-top: 1px solid var(--border-1);
  margin: var(--sp-7) 0;
}

::selection { background: var(--teal-100); color: var(--ink-1); }

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 2px;
}
