/* ============================================================
   SYNQ LANDING — "SOLITUDE" REDESIGN
   Fonts: Fraunces (display) · Literata (body) · Martian Mono (labels)
   ============================================================ */

/* ── ROOT TOKENS ──────────────────────────────────────────── */
:root {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Literata", Georgia, serif;
  --font-mono:    "Martian Mono", "Courier New", monospace;

  --page-max:    1300px;
  --gutter:      clamp(20px, 4vw, 64px);
  --section-gap: clamp(80px, 10vw, 148px);

  --radius-sm: 7px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t:         400ms var(--ease-out);
}

/* ── THEMES ───────────────────────────────────────────────── */

/* WARM — dark amber (original) */
body[data-theme="warm"] {
  --bg:              #14100e;
  --bg-alt:          #1b1512;
  --surface:         rgba(27,21,18,0.82);
  --surface-hi:      rgba(33,25,21,0.92);
  --border:          rgba(198,169,106,0.18);
  --border-hi:       rgba(198,169,106,0.34);
  --text:            #f5e9d6;
  --text-muted:      rgba(245,233,214,0.68);
  --text-faint:      rgba(245,233,214,0.42);
  --accent:          #c6a96a;
  --accent-dim:      rgba(198,169,106,0.18);
  --btn-bg:          #c6a96a;
  --btn-text:        #1a1512;
  --btn-ghost-bd:    rgba(198,169,106,0.28);
  --mark-color:      rgba(198,169,106,0.06);
  --kbd-bg:          rgba(198,169,106,0.10);
  --kbd-bd:          rgba(198,169,106,0.28);
  --card-tilt:       -1.4deg;
  --card-tilt-alt:   1.0deg;
}

/* BLUE — light sky blue (original) */
body[data-theme="blue"] {
  --bg:              #eef3fb;
  --bg-alt:          #f8fbff;
  --surface:         rgba(255,255,255,0.72);
  --surface-hi:      rgba(255,255,255,0.90);
  --border:          rgba(143,174,220,0.28);
  --border-hi:       rgba(143,174,220,0.56);
  --text:            #1c2a3a;
  --text-muted:      rgba(28,42,58,0.70);
  --text-faint:      rgba(28,42,58,0.44);
  --accent:          #8faedc;
  --accent-dim:      rgba(157,187,232,0.20);
  --btn-bg:          #1c2a3a;
  --btn-text:        #f4f8ff;
  --btn-ghost-bd:    rgba(28,42,58,0.22);
  --mark-color:      rgba(28,42,58,0.04);
  --kbd-bg:          rgba(143,174,220,0.12);
  --kbd-bd:          rgba(143,174,220,0.40);
  --card-tilt:       -1.4deg;
  --card-tilt-alt:   1.0deg;
}

/* GREY — soft greyscale light (original) */
body[data-theme="grey"] {
  --bg:              #e4e2de;
  --bg-alt:          #f8f7f4;
  --surface:         rgba(248,247,244,0.76);
  --surface-hi:      rgba(255,255,255,0.92);
  --border:          rgba(112,112,112,0.20);
  --border-hi:       rgba(112,112,112,0.38);
  --text:            #1f1f1f;
  --text-muted:      rgba(31,31,31,0.68);
  --text-faint:      rgba(31,31,31,0.46);
  --accent:          #767676;
  --accent-dim:      rgba(118,118,118,0.14);
  --btn-bg:          #1f1f1f;
  --btn-text:        #f5f4f1;
  --btn-ghost-bd:    rgba(31,31,31,0.22);
  --mark-color:      rgba(31,31,31,0.04);
  --kbd-bg:          rgba(112,112,112,0.10);
  --kbd-bd:          rgba(112,112,112,0.30);
  --card-tilt:       -1.4deg;
  --card-tilt-alt:   1.0deg;
}

/* ── BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.72;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t), color var(--t);
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ── PAGE SHELL ───────────────────────────────────────────── */
.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: clip;
}

/* Grain texture overlay */
.page-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  z-index: -1;
}

/* ── HEADER & NAV ─────────────────────────────────────────── */
.site-header {
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background var(--t), border-color var(--t);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--page-max);
  margin-inline: auto;
  height: 56px;
}

.brand { display: inline-flex; align-items: center; }

.brand-logo {
  width: 78px;
  height: auto;
  transition: filter var(--t), opacity var(--t);
}

body[data-theme="warm"] .brand-logo {
  filter: brightness(0) invert(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    background-color var(--t),
    border-color var(--t),
    color var(--t),
    transform 140ms ease,
    opacity 180ms ease;
}

.button:hover  { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
  transition: background var(--t), border-color var(--t), color var(--t), transform 140ms ease, opacity 180ms ease;
}
.button-primary:hover { opacity: 0.86; }

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--btn-ghost-bd);
}
.button-ghost:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
}

/* ── THEME TOGGLE (nav) ───────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  transition: background var(--t), border-color var(--t);
}

.theme-toggle:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
}

.theme-toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: background var(--t);
}

.theme-toggle-track {
  display: flex;
  align-items: center;
  position: relative;
}

/* Hide all labels by default, show only the active one */
.theme-toggle-label {
  display: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--t);
}

body[data-theme="warm"] .theme-toggle-label:nth-child(1) { display: block; }
body[data-theme="blue"] .theme-toggle-label:nth-child(2) { display: block; }
body[data-theme="grey"] .theme-toggle-label:nth-child(3) { display: block; }

/* ── FLOATING THEME TOGGLE ────────────────────────────────── */
.floating-theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hi);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity var(--t),
    transform var(--t),
    background var(--t),
    border-color var(--t),
    color var(--t);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

body.show-floating-toggle .floating-theme-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-theme-toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: background var(--t);
}

.floating-theme-toggle-text {
  transition: color var(--t);
}

/* ── SECTION COMMON ───────────────────────────────────────── */
main section {
  position: relative;
  padding-block: var(--section-gap);
  padding-inline: var(--gutter);
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  border-top: 1px solid var(--border);
  transition: border-color var(--t);
}

/* First section (hero) has no top border */
main section:first-child { border-top: none; }

/* Large decorative section number — sits behind content */
.section-mark {
  position: absolute;
  top: calc(var(--section-gap) - 16px);
  left: var(--gutter);
  font-family: var(--font-display);
  font-size: clamp(100px, 15vw, 220px);
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--mark-color);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: color var(--t);
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw + 10px, 62px);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 1.2rem;
  position: relative;
  z-index: 1;
  transition: color var(--t);
}

.section-headline em {
  font-style: italic;
  font-variation-settings: "opsz" 72;
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(64px, 10vh, 120px);
  padding-bottom: clamp(64px, 8vh, 100px);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 3.5vw, 52px);
}

.eyebrow-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--t);
}

.eyebrow-sep {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--border-hi);
  transition: background var(--t);
}

.hero-headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(62px, 10vw + 6px, 156px);
  line-height: 1.0;
  letter-spacing: -0.038em;
  position: relative;
  z-index: 1;
  transition: color var(--t);
}

.hl-line   { display: block; }
.hl-indent { padding-left: clamp(36px, 7vw, 112px); }

.hero-tagline {
  margin: clamp(20px, 2.5vw, 36px) 0 0;
  font-size: clamp(17px, 1.8vw, 22px);
  font-style: italic;
  font-variation-settings: "opsz" 24;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 480px;
  position: relative;
  z-index: 1;
  transition: color var(--t);
}

.hero-tagline em { font-style: italic; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 3.5vw, 48px);
  position: relative;
  z-index: 1;
}

/* ── PHILOSOPHY ───────────────────────────────────────────── */
.philosophy-body {
  max-width: 740px;
  margin-left: auto;
  padding-left: clamp(0px, 6vw, 80px);
  position: relative;
  z-index: 1;
}

.philosophy-text {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-muted);
  line-height: 1.75;
  transition: color var(--t);
}

.philosophy-text p { margin: 0 0 1rem; }
.philosophy-text p:last-child { margin-bottom: 0; }

/* ── SCREENS ──────────────────────────────────────────────── */
.screens-header {
  max-width: 580px;
  margin-bottom: clamp(36px, 5vw, 64px);
  position: relative;
  z-index: 1;
}

.screens-sub {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  margin: 0;
  transition: color var(--t);
}

/* Screenshot card frame */
.screen-frame {
  position: relative;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transform: rotate(var(--card-tilt));
  box-shadow: 0 28px 70px rgba(0,0,0,0.28);
  transition:
    border-color var(--t),
    background var(--t),
    box-shadow var(--t);
}

body[data-theme="blue"] .screen-frame {
  box-shadow: 0 28px 70px rgba(0,0,0,0.10);
}

.screen-frame-alt {
  transform: rotate(var(--card-tilt-alt));
}

.screen-frame-command {
  transform: rotate(calc(var(--card-tilt) * 0.6));
}

.card-label {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
  transition: color var(--t), background var(--t), border-color var(--t);
}

.product-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* Theme-aware screenshot stack */
.theme-screenshot-stack { position: relative; }

.theme-screenshot {
  transition: opacity 0.32s ease;
}

.theme-screenshot-warm { opacity: 1; }

.theme-screenshot-blue,
.theme-screenshot-grey {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-theme="blue"] .theme-screenshot-warm { opacity: 0; }
body[data-theme="blue"] .theme-screenshot-blue  { opacity: 1; }

body[data-theme="grey"] .theme-screenshot-warm  { opacity: 0; }
body[data-theme="grey"] .theme-screenshot-grey  { opacity: 1; }

/* ── TASKS ────────────────────────────────────────────────── */
.tasks-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.tasks-copy p {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  margin: 0;
  transition: color var(--t);
}

@media (max-width: 760px) {
  .tasks-body {
    grid-template-columns: 1fr;
  }
}

/* ── COMMAND FEATURE ──────────────────────────────────────── */
.command-feature {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.command-copy { position: relative; z-index: 1; }

.kbd-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-bd);
  border-bottom-width: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  transition: background var(--t), border-color var(--t), color var(--t);
}

.kbd-plus {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  transition: color var(--t);
}

.command-copy p {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  margin: 0;
  transition: color var(--t);
}

.command-visual { position: relative; z-index: 1; }

@media (max-width: 760px) {
  .command-feature {
    grid-template-columns: 1fr;
  }
}

/* ── INSIDE / FEATURES ────────────────────────────────────── */
.inside-header {
  max-width: 560px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.inside-header p {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  margin: 0;
  transition: color var(--t);
}

.inside-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t);
}

.inside-card {
  padding: clamp(24px, 3.5vw, 44px);
  background: var(--surface);
  transition: background var(--t);
  position: relative;
  overflow: hidden;
}

.inside-card:hover { background: var(--surface-hi); }

.inside-card:nth-child(2) { border-left: 1px solid var(--border); }
.inside-card:nth-child(3) { border-top:  1px solid var(--border); }
.inside-card:nth-child(4) {
  border-top:  1px solid var(--border);
  border-left: 1px solid var(--border);
}

/* Decorative Roman numeral */
.inside-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 88px);
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--mark-color);
  margin-bottom: 16px;
  user-select: none;
  transition: color var(--t);
}

.inside-card:hover .inside-num {
  color: var(--accent-dim);
}

.inside-card h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 400;
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  line-height: 1.2;
}

.inside-card p {
  color: var(--text-muted);
  font-size: clamp(13.5px, 1.2vw, 15.5px);
  line-height: 1.65;
  margin: 0;
  transition: color var(--t);
}

@media (max-width: 580px) {
  .inside-grid { grid-template-columns: 1fr; }
  .inside-card:nth-child(2) { border-left: none; border-top: 1px solid var(--border); }
  .inside-card:nth-child(4) { border-left: none; }
}

/* ── STORY ────────────────────────────────────────────────── */
.story-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.story-text {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.78;
  transition: color var(--t);
}

.story-text p { margin: 0 0 1.2rem; }
.story-text p:last-child { margin-bottom: 0; }

/* Pull quote */
.story-pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 30px) !important;
  font-variation-settings: "opsz" 36 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 1.6rem 0 0 !important;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  transition: color var(--t), border-color var(--t);
}

@media (max-width: 760px) {
  .story-body { grid-template-columns: 1fr; }
}

/* ── MARQUEE / EXPERIENCE ─────────────────────────────────── */
.experience {
  padding-block: clamp(28px, 3.5vw, 44px) !important;
  padding-inline: 0 !important;
  max-width: none !important;
  overflow: hidden;
}

.marquee-track {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right, transparent, #000 12%, #000 88%, transparent
  );
  mask-image: linear-gradient(
    to right, transparent, #000 12%, #000 88%, transparent
  );
}

.marquee-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-inner span {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 38px);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 48;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--t);
}

.mdot {
  font-style: normal !important;
  font-size: 18px !important;
  color: var(--accent) !important;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── FINAL CTA ────────────────────────────────────────────── */
.final-cta {
  text-align: center;
  padding-block: clamp(96px, 13vw, 168px) !important;
}

.final-line {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 80px);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.032em;
  line-height: 1.1;
  margin: 0 0 clamp(28px, 3.5vw, 48px);
  transition: color var(--t);
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ── REVEAL ANIMATION ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.68s var(--ease-out),
    transform 0.68s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── MODALS ───────────────────────────────────────────────── */
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}

.modal-shell.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

body[data-theme="blue"] .modal-backdrop,
body[data-theme="grey"] .modal-backdrop {
  background: rgba(0,0,0,0.28);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border-hi);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 36px 90px rgba(0,0,0,0.48);
  transform: translateY(14px);
  transition:
    transform var(--t),
    background var(--t),
    border-color var(--t),
    box-shadow var(--t);
}

.modal-shell.is-open .modal-panel {
  transform: translateY(0);
}

body[data-theme="blue"] .modal-panel,
body[data-theme="grey"] .modal-panel {
  box-shadow: 0 36px 90px rgba(0,0,0,0.14);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  transition: background var(--t), color var(--t), border-color var(--t);
}

.modal-close:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.modal-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 400;
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  padding-right: 36px;
  line-height: 1.2;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 24px;
  transition: color var(--t);
}

.modal-screen-hidden { display: none; }

/* ── WAITLIST FORM ────────────────────────────────────────── */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--t);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  outline: none;
  resize: vertical;
  transition: background var(--t), border-color var(--t), color var(--t);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

/* ── CUSTOM SCROLLBARS ────────────────────────────────────── */
.modal-panel,
textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}

.modal-panel::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 5px;
}

.modal-panel::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
  background: transparent;
}

.modal-panel::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 99px;
  transition: background var(--t);
}

.modal-panel::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* ── CUSTOM SELECT ────────────────────────────────────────── */
.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;
}

.custom-select { position: relative; }

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hi);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  gap: 10px;
  transition: background var(--t), border-color var(--t), color var(--t);
}

.custom-select-trigger:hover {
  background: var(--surface-hi);
}

.custom-select.is-open .custom-select-trigger {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Chevron arrow */
.custom-select-arrow {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform 200ms var(--ease-out), color var(--t);
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(-135deg) translate(-1px, -2px);
  color: var(--accent);
}

/* Dropdown list — fixed-positioned by JS to escape modal overflow */
.custom-select-dropdown {
  position: fixed;
  z-index: 9999;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin: 0;
  list-style: none;
  box-shadow: 0 10px 32px rgba(0,0,0,0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

body[data-theme="blue"] .custom-select-dropdown,
body[data-theme="grey"] .custom-select-dropdown {
  box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}

.custom-select.is-open .custom-select-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-option {
  padding: 9px 12px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.custom-select-option:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.custom-select-option.is-selected {
  color: var(--accent);
  background: var(--accent-dim);
}

.modal-error {
  color: #e07070;
  font-size: 12.5px;
  min-height: 18px;
  margin: 0;
  font-family: var(--font-mono);
}

/* ── BETA MODAL ───────────────────────────────────────────── */
.beta-modal-panel {
  max-width: 380px;
  text-align: center;
}

.beta-access-flow { padding-top: 8px; }

.beta-countdown {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 82px);
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 10px;
}

.beta-separator {
  font-size: 0.55em;
  color: var(--text-muted);
  align-self: flex-start;
  padding-top: 0.18em;
  transition: color var(--t);
}

.beta-ready-hidden { display: none; }

.beta-ready-text {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 18px;
  transition: color var(--t);
}

.beta-access-button {
  font-size: 14px;
  padding: 11px 26px;
}

/* Confetti decoration */
.beta-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.beta-confetti {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
}

.beta-celebrate .beta-confetti {
  animation: confetti 0.85s var(--ease-out) forwards;
}

.beta-confetti-1 { top: 18%; left: 10%;  animation-delay: 0ms;   }
.beta-confetti-2 { top: 28%; right: 14%; animation-delay: 55ms;  }
.beta-confetti-3 { top: 12%; left: 52%;  animation-delay: 110ms; }
.beta-confetti-4 { bottom: 22%; left: 18%;  animation-delay: 28ms;  background: var(--text-muted); }
.beta-confetti-5 { bottom: 28%; right: 18%; animation-delay: 85ms;  background: var(--text-faint); }
.beta-confetti-6 { top: 38%; left: 32%;  animation-delay: 140ms; }

@keyframes confetti {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg) scale(0); }
  45%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-90px) rotate(195deg) scale(1.6); }
}

/* ── SCROLL LOCK ──────────────────────────────────────────── */
body.modal-open { overflow: hidden; }

/* ── RESPONSIVE OVERRIDES ─────────────────────────────────── */
@media (max-width: 900px) {
  .section-mark { display: none; }

  .philosophy-body {
    padding-left: 0;
    max-width: none;
  }

  .story-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* Hide ghost button in nav on small screens */
  .nav-actions .button-ghost { display: none; }

  .command-feature,
  .tasks-body {
    grid-template-columns: 1fr;
  }

  .inside-grid {
    grid-template-columns: 1fr;
  }

  .inside-card:nth-child(n) {
    border-left: none !important;
  }

  .inside-card:nth-child(n+2) {
    border-top: 1px solid var(--border) !important;
  }

  /* Reduce screen-frame tilt on mobile */
  .screen-frame,
  .screen-frame-alt,
  .screen-frame-command {
    transform: none;
  }
}
