/* ─────────────────────────────────────────────────────────────
   Kino Automations — design tokens
   Warm light gray + mint + pastel lavender.
   Editorial serif (Instrument Serif) + clean sans + mono labels.
   ───────────────────────────────────────────────────────────── */

:root {
  /* palette — set dynamically by App via inline style on <html> */
  --bg: #ECECEC;
  --bg-soft: #F4F3F0;
  --ink: #161616;
  --ink-soft: #4A4A48;
  --ink-mute: #8A8985;
  --rule: rgba(22,22,22,0.10);
  --mint: #9FE3D0;
  --mint-deep: #6BC9B0;
  --lav: #E8D5F2;
  --warm: #F5E5D8;

  /* density */
  --pad: clamp(20px, 2.4vw, 36px);
  --gutter: clamp(20px, 4vw, 72px);
  --section-y: clamp(80px, 10vw, 160px);

  /* typography */
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* fluid type */
  --t-mono: 11px;
  --t-body: clamp(15px, 1.05vw, 17px);
  --t-lead: clamp(18px, 1.4vw, 22px);
  --t-h3: clamp(22px, 1.8vw, 28px);
  --t-h2: clamp(40px, 5.4vw, 84px);
  --t-display: clamp(56px, 10vw, 168px);
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

::selection { background: var(--mint); color: var(--ink); }

/* density variants */
html[data-density="compact"] { --pad: clamp(16px, 1.6vw, 24px); --gutter: clamp(16px, 2.4vw, 40px); --section-y: clamp(56px, 6vw, 100px); }
html[data-density="comfy"]   { --pad: clamp(28px, 3.4vw, 56px); --gutter: clamp(28px, 5vw, 96px); --section-y: clamp(120px, 14vw, 220px); }

/* dark mode */
html[data-dark="1"] {
  --bg: #161514;
  --bg-soft: #1F1E1C;
  --ink: #F2EFEA;
  --ink-soft: #C8C4BC;
  --ink-mute: #7A7770;
  --rule: rgba(242,239,234,0.10);
}

/* ── layout helpers ────────────────────────────────────────── */
.wrap { width: 100%; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 0.95; }
.italic { font-style: italic; }

/* ── nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 0.5px solid var(--rule);
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; color: var(--ink); text-decoration: none; }
.nav .brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); position: relative; }
.nav .brand-mark::after { content: ''; position: absolute; inset: 5px 5px 0 5px; background: var(--ink); border-radius: 999px 999px 0 0; }
.nav-links { display: flex; gap: clamp(16px, 2.4vw, 32px); }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 13px;
  position: relative; padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav-links a:hover::after { transform: scaleX(1); }

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  cursor: pointer; transition: transform .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn.mint:hover { background: var(--mint-deep); border-color: var(--mint-deep); }
.btn .arr { display: inline-block; width: 16px; height: 1px; background: currentColor; position: relative; transition: width .2s ease; }
.btn .arr::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .arr { width: 24px; }

/* ── section frame ────────────────────────────────────────── */
section { padding-block: var(--section-y); padding-inline: var(--gutter); position: relative; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head .num { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.16em; }
.section-head .rule { flex: 1; height: 1px; background: var(--rule); }
.section-head h2 { font-family: var(--serif); font-size: var(--t-h2); margin: 0; line-height: 0.95; letter-spacing: -0.02em; }

/* ── pill ─────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-soft); border: 0.5px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-deep); }

/* ── focus ────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: 3px; border-radius: 4px; }
