/* ─────────────────────────────────────────────────────────────────────
   Studio Nexaura — v2 minimalist styles
   Direction: clean, fonctional, generous whitespace, less ornament.
   Typography: Geist as primary, Instrument Serif used very sparingly.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --bg: #FAFAF7;
  --bg-2: #F2F1EC;
  --surface: #FFFFFF;
  --ink: #0F0F0E;
  --ink-2: #2A2A28;
  --muted: #75736D;
  --muted-2: #B5B2A7;
  --line: #0F0F0E14;
  --line-2: #0F0F0E08;
  --accent: #1B4DFF;
  --accent-2: #E8EEFF;
  --accent-ink: #FFFFFF;
  --pos: #0B7A4B;
  --pos-bg: #E1F5EC;
  --warn: #B45309;

  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15,15,14,.04), 0 0 0 1px rgba(15,15,14,.05);
  --shadow: 0 1px 2px rgba(15,15,14,.04), 0 8px 24px -8px rgba(15,15,14,.08);
  --shadow-lg: 0 1px 2px rgba(15,15,14,.04), 0 24px 48px -16px rgba(15,15,14,.18);
}

[data-palette="sage"] {
  --bg: #F6F5EF;
  --bg-2: #ECEBE0;
  --surface: #FFFFFF;
  --ink: #131613;
  --ink-2: #2B302B;
  --muted: #717266;
  --line: #1316130F;
  --accent: #2F6A3C;
  --accent-2: #E0EEDF;
}

[data-palette="ink"] {
  --bg: #0E0F12;
  --bg-2: #15171C;
  --surface: #1A1D24;
  --ink: #F2F2EE;
  --ink-2: #DCDCD6;
  --muted: #7E8189;
  --muted-2: #4A4D55;
  --line: #F2F2EE1F;
  --line-2: #F2F2EE0A;
  --accent: #B6FF3D;
  --accent-2: #1F2A0F;
  --accent-ink: #0E0F12;
}

/* ────────── reset ────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01';
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ────────── type system ────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.h-display {
  font-family: var(--sans);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
  font-size: clamp(44px, 6.6vw, 96px);
  text-wrap: balance;
}
.h-1 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.028em;
  font-size: clamp(36px, 4.4vw, 60px);
  text-wrap: balance;
}
.h-2 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-size: clamp(26px, 2.6vw, 36px);
  text-wrap: balance;
}
.h-3 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.012em;
  font-size: 18px;
}
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; }
.mono { font-family: var(--mono); letter-spacing: -.005em; }
.lead {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 62ch;
}
p { margin: 0; text-wrap: pretty; }

/* ────────── layout ────────── */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.shell-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .shell, .shell-narrow { padding: 0 20px; } }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section.dense { padding: 48px 0; }
.section.first { padding-top: 56px; }
.bordered-top { border-top: 1px solid var(--line); }
.bordered-bottom { border-bottom: 1px solid var(--line); }

/* ────────── buttons ────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -.005em;
  transition: transform .12s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 8px 24px -8px color-mix(in oklab, var(--accent) 50%, transparent); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); padding: 8px 0; }
.btn-quiet:hover { color: var(--accent); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-arrow { width: 14px; height: 14px; display: inline-flex; transition: transform .15s ease; }
.btn:hover .btn-arrow { transform: translateX(2px); }

/* ────────── chip / pill ────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.chip-pos { background: var(--pos-bg); color: var(--pos); border-color: transparent; }
.chip-accent { background: var(--accent-2); color: var(--accent); border-color: transparent; }

/* ────────── card ────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card-flat { background: var(--bg-2); }
.card:hover { border-color: color-mix(in oklab, var(--ink) 20%, var(--line)); }

/* ────────── nav ────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.brand-mark {
  width: 26px; height: 26px;
  background: var(--ink); color: var(--bg);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; letter-spacing: -.02em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--ink-2); position: relative; padding: 4px 0; }
.nav-links a.btn { padding: 9px 16px; }
.nav-links a.btn-ink { color: var(--bg); }
.nav-links a.btn-primary { color: var(--accent-ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); border-radius: 2px;
}
@media (max-width: 760px) { .nav-links a:not(.cta) { display: none; } }

/* ────────── footer ────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a { color: var(--ink-2); font-size: 14px; }
.footer a:hover { color: var(--accent); }

/* ────────── form ────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}
.field textarea { resize: vertical; min-height: 100px; }

/* ────────── visual primitives (browser, phone, charts) ────────── */
.browser {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.browser-bar .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2);
}
.browser-url {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.browser-body { padding: 24px; min-height: 220px; }

.phone {
  background: var(--ink);
  border-radius: 28px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  width: 220px;
  aspect-ratio: 9/19;
}
.phone-screen {
  background: var(--surface);
  border-radius: 22px;
  height: 100%;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-statusbar {
  display: flex; justify-content: space-between; padding: 10px 18px 6px;
  font-family: var(--mono); font-size: 10px; color: var(--ink);
}

/* ────────── stat tile ────────── */
.stat {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat-num { font-size: 32px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.stat-label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.stat-delta { font-family: var(--mono); font-size: 11px; color: var(--pos); display: inline-flex; gap: 4px; align-items: center; }

/* ────────── divider ────────── */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ────────── photo placeholder (kept for portraits) ────────── */
.photo {
  position: relative;
  background: linear-gradient(135deg, var(--bg-2), color-mix(in oklab, var(--ink) 8%, var(--bg-2)));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
}
.photo::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 24px, color-mix(in oklab, var(--ink) 6%, transparent) 24px 25px);
  pointer-events: none;
  opacity: .4;
}
.photo-portrait { aspect-ratio: 4/5; }
.photo-square { aspect-ratio: 1/1; }
.photo-tall { aspect-ratio: 3/4; }

/* ────────── grid system tokens ────────── */
.grid { display: grid; }
.flex { display: flex; }
.col { flex-direction: column; }
.wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-40 { gap: 40px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.full-w { width: 100%; }
.relative { position: relative; }

/* ────────── reveal on scroll ────────── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ────────── density tweaks ────────── */
[data-density="cozy"] .section { padding: 72px 0; }
[data-density="airy"]  .section { padding: 128px 0; }
[data-density="cozy"] .card { padding: 18px; }
[data-density="airy"] .card { padding: 32px; }

/* ────────── texture: dotted grid background ────────── */
.dot-grid {
  background-image: radial-gradient(color-mix(in oklab, var(--ink) 22%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
}
.dot-grid-fade {
  background-image: radial-gradient(color-mix(in oklab, var(--ink) 18%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ────────── decorative panel ────────── */
.panel-accent {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 70%, var(--ink)));
  color: var(--accent-ink);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.panel-accent::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}

/* huge ghost numeral */
.ghost-number {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(120px, 14vw, 240px);
  letter-spacing: -.06em;
  line-height: .85;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in oklab, var(--ink) 18%, transparent);
}

/* tilted card */
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(2deg); }
.tilt-l-strong { transform: rotate(-6deg); }
.tilt-r-strong { transform: rotate(5deg); }

/* responsive grid collapses */
@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .grid-2-1, .grid-1-2, .grid-1-1-1 { grid-template-columns: 1fr !important; gap: 32px !important; }
  .pricing-grid { grid-template-columns: 1fr !important; }
}
