/* Infera design kit: Onyx — quiet luxury — deep charcoal, warm gold, a serif that feels couture
   Reference the tokens everywhere (var(--brand), var(--fg)…); never hard-code hex. Dark mode is automatic and
   also honours <html data-theme="dark"> / "light" if you add a theme switch. */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --elevated: #ffffff;
  --fg: #1a1714;
  --muted: #6b6258;
  --line: #e7e1d8;
  --brand: #1a1714;
  --brand-contrast: #faf8f5;
  --accent: #b08d4f;
  --radius: 10px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  --shadow-2: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-3: 0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 200ms;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #131110;
  --surface: #1c1917;
  --elevated: #231f1c;
  --fg: #f3efe9;
  --muted: #a69b8d;
  --line: #332e29;
  --brand: #e9c893;
  --brand-contrast: #131110;
  --accent: #d6ad67;
    --shadow-1: 0 1px 2px rgba(0,0,0,.3);
    --shadow-2: 0 6px 18px rgba(0,0,0,.4);
    --shadow-3: 0 16px 40px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #131110;
  --surface: #1c1917;
  --elevated: #231f1c;
  --fg: #f3efe9;
  --muted: #a69b8d;
  --line: #332e29;
  --brand: #e9c893;
  --brand-contrast: #131110;
  --accent: #d6ad67;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .4em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .85; }
p { color: var(--fg); }
small, .muted { color: var(--muted); }
hr { border: none; border-top: 1px solid var(--line); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Depth & surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.elev-2 { box-shadow: var(--shadow-2); }
.elev-3 { box-shadow: var(--shadow-3); }

/* Buttons that already read premium — restrained, with a smooth press */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: var(--radius);
  font: 600 .95rem/1 var(--font-body); cursor: pointer; border: 1px solid transparent; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-1); }
.btn-primary:hover { box-shadow: var(--shadow-2); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }

/* Premium focus ring — visible for keyboard, quiet for mouse */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: calc(var(--radius) / 2);
}

/* Motion: a tasteful reveal-on-scroll with zero JavaScript (respects reduced-motion). Add class="reveal" to
   sections; they fade/rise in as they enter the viewport. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: infera-reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  @keyframes infera-reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  .hover-lift { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
  .hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
}
