/* ============================================================
   IOSA — Design tokens
   Design read: premium institutional dental clinic, editorial/
   cinematic language, cold-clinical palette (porcelain + ink +
   single emerald accent). Locked for the whole site.
   ============================================================ */

:root {
  /* ---- color: locked palette, one accent only ---- */
  --porcelain: #f5f7f7;
  --porcelain-dim: #eef1f1;
  --ink: #12181a;
  --ink-soft: #4a5658;
  --ink-faint: #7c8a8c;
  --line: #dbe3e3;
  --line-strong: #c3cdcd;
  --white: #ffffff;

  --emerald: #0b6b52;
  --emerald-deep: #084d3c;
  --emerald-tint: #e4f1ec;
  --emerald-line: #bcdccf;

  /* dark inversions, used only on the dedicated dark sections (hero, footer) */
  --ink-950: #0b1011;
  --ink-900: #10171a;
  --ink-800: #182225;
  --porcelain-on-dark: #eef2f2;
  --ink-soft-on-dark: #a9b7b9;

  /* ---- type ---- */
  --font-display: 'Cabinet Grotesk', 'General Sans', -apple-system, sans-serif;
  --font-body: 'General Sans', -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ---- spacing (art-gallery density) ---- */
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 12vw, 176px);
  --section-y-tight: clamp(56px, 8vw, 112px);
  --max-w: 1320px;

  /* ---- radius: one soft system, locked ---- */
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* ---- shadow: tinted to ink, never pure black ---- */
  --shadow-sm: 0 2px 10px rgba(18, 24, 26, 0.06);
  --shadow-md: 0 12px 36px rgba(18, 24, 26, 0.10);
  --shadow-lg: 0 24px 64px rgba(18, 24, 26, 0.16);

  /* ---- easing ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }
html {
  background: var(--porcelain);
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--emerald-deep);
}

/* ---- buttons: one shape system (pill), one accent ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out), background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--emerald); color: var(--white); }
.btn-primary:hover { background: var(--emerald-deep); transform: translateY(-2px); }
.btn-ghost-dark { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-ghost-light { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost-light:hover { border-color: var(--emerald); color: var(--emerald-deep); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---- reveal primitives (JS toggles .is-visible; CSS handles the motion) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}

::selection { background: var(--emerald); color: var(--white); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }
