:root {
  --canvas: #fbfaf6;
  --paper: #ffffff;
  --paper-warm: #fff7eb;
  --ink: #0e1426;
  --ink-2: #283047;
  --muted: #6f7788;
  --line: #e5e7ef;
  --line-strong: #d9deea;
  --blue: #5a76f0;
  --blue-deep: #3756d7;
  --blue-soft: #eef2ff;
  --rust: #b76843;
  --rust-soft: #fff0e5;
  --sage: #1f7a63;
  --sage-soft: #eaf7f2;
  --shadow: 0 22px 60px rgba(14, 20, 38, 0.08);
  --shadow-heavy: 0 38px 100px rgba(14, 20, 38, 0.14);
  --header-height: 86px;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--canvas);
}

:root[data-theme='dark'] {
  --canvas: #0d111d;
  --paper: #141a2a;
  --paper-warm: #241a16;
  --ink: #f6f4ee;
  --ink-2: #d5d9e6;
  --muted: #9aa3b8;
  --line: rgba(226, 231, 244, 0.13);
  --line-strong: rgba(226, 231, 244, 0.22);
  --blue: #8ba2ff;
  --blue-deep: #5d77f0;
  --blue-soft: rgba(139, 162, 255, 0.14);
  --rust: #f0a06f;
  --rust-soft: rgba(240, 160, 111, 0.14);
  --sage: #64d1b0;
  --sage-soft: rgba(100, 209, 176, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-heavy: 0 42px 110px rgba(0, 0, 0, 0.46);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(90, 118, 240, 0.11), transparent 30%),
    radial-gradient(circle at 10% 16%, rgba(183, 104, 67, 0.13), transparent 26%),
    linear-gradient(180deg, #fffdfa 0%, var(--canvas) 54%, #f7f3eb 100%);
}

:root[data-theme='dark'] body {
  background:
    radial-gradient(circle at 78% 12%, rgba(93, 119, 240, 0.2), transparent 31%),
    radial-gradient(circle at 10% 16%, rgba(240, 160, 111, 0.16), transparent 26%),
    radial-gradient(circle at 54% 62%, rgba(100, 209, 176, 0.08), transparent 34%),
    linear-gradient(180deg, #0b0f1a 0%, var(--canvas) 58%, #11121b 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 20, 38, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 20, 38, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 76%);
  pointer-events: none;
}

:root[data-theme='dark'] body::before {
  background-image:
    linear-gradient(rgba(246, 244, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 244, 238, 0.035) 1px, transparent 1px);
}

a { color: inherit; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.92);
  border-bottom: 1px solid rgba(229, 231, 239, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(14, 20, 38, 0.06);
}

:root[data-theme='dark'] .site-header {
  background: rgba(13, 17, 29, 0.94);
  border-bottom-color: rgba(226, 231, 244, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.site-shell {
  position: relative;
  overflow-x: hidden;
  padding-top: var(--header-height);
  padding-bottom: 44px;
}

.site-shell::before,
.site-shell::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.site-shell::before {
  top: 148px;
  right: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(90, 118, 240, 0.16);
  box-shadow: inset 0 0 0 42px rgba(90, 118, 240, 0.035);
}

:root[data-theme='dark'] .site-shell::before {
  border-color: rgba(139, 162, 255, 0.24);
  box-shadow: inset 0 0 0 42px rgba(139, 162, 255, 0.045);
}

.site-shell::after {
  top: 520px;
  left: -160px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(183, 104, 67, 0.14);
  box-shadow: inset 0 0 0 56px rgba(183, 104, 67, 0.035);
}

:root[data-theme='dark'] .site-shell::after {
  border-color: rgba(240, 160, 111, 0.2);
  box-shadow: inset 0 0 0 56px rgba(240, 160, 111, 0.045);
}

.nav,
.hero,
.proof,
.section,
.novel,
.system,
.status,
.final-cta {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

.nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 12px 28px rgba(14, 20, 38, 0.1);
}

:root[data-theme='dark'] .brand-logo {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.brand strong,
.brand small { display: block; }

.brand strong {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(14, 20, 38, 0.04);
  backdrop-filter: blur(18px);
}

:root[data-theme='dark'] .nav-links,
:root[data-theme='dark'] .subject-ribbon span,
:root[data-theme='dark'] .button-secondary {
  background: rgba(20, 26, 42, 0.72);
}

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

.theme-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(14, 20, 38, 0.05);
}

:root[data-theme='dark'] .theme-toggle {
  background: rgba(20, 26, 42, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -4px 0 var(--canvas);
}

:root[data-theme='dark'] .theme-toggle__icon {
  background: #f6d27b;
  box-shadow: 0 0 18px rgba(246, 210, 123, 0.32);
}

.nav-links a,
.nav-cta {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

:root[data-theme='dark'] .nav-cta,
:root[data-theme='dark'] .button-primary,
:root[data-theme='dark'] .avatar {
  color: #0d111d;
  background: #f6f4ee;
}

.nav-links a:hover,
.nav-links-btn:hover {
  color: var(--rust);
  background: var(--rust-soft);
}

.nav-links-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  color: var(--ink-2);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nav-feedback {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(14, 20, 38, 0.05);
}

:root[data-theme='dark'] .nav-feedback {
  background: rgba(20, 26, 42, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

@media (min-width: 961px) {
  .nav-feedback {
    display: none;
  }
}

.nav-cta,
button.nav-cta {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(14, 20, 38, 0.16);
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.button[type='button'] {
  border: none;
  cursor: pointer;
}

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
  align-items: center;
  gap: clamp(34px, 6vw, 74px);
  padding: 36px 0 78px;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 790px;
  margin-top: 18px;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.92;
}

h2 {
  margin-top: 12px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.98;
}

.hero-copy p {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.72;
}

.kicker {
  display: inline-flex;
  color: var(--rust);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subject-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.subject-ribbon span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(14, 20, 38, 0.04);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

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

.button-primary {
  color: #fff;
  border-color: transparent;
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(14, 20, 38, 0.2);
}

.button-secondary {
  color: var(--rust);
  background: rgba(255, 255, 255, 0.72);
}

.app-preview {
  justify-self: end;
  width: min(100%, 470px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 248, 0.78)),
    var(--paper);
  box-shadow: var(--shadow-heavy);
  position: relative;
  overflow: hidden;
}

:root[data-theme='dark'] .app-preview {
  background:
    linear-gradient(180deg, rgba(20, 26, 42, 0.94), rgba(14, 18, 30, 0.84)),
    var(--paper);
}

.app-preview::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 64px;
  background:
    linear-gradient(180deg, rgba(90, 118, 240, 0.07), transparent 34%),
    rgba(250, 251, 253, 0.86);
  border-right: 1px solid var(--line);
}

:root[data-theme='dark'] .app-preview::before {
  background:
    linear-gradient(180deg, rgba(139, 162, 255, 0.08), transparent 34%),
    rgba(12, 16, 28, 0.72);
}

.app-preview::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 7px;
  height: 118px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rust), rgba(183, 104, 67, 0.08));
  opacity: 0.78;
}

.preview-rail {
  position: absolute;
  left: 22px;
  top: 24px;
  z-index: 2;
  display: grid;
  gap: 16px;
}

.rail-dot {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 8px 20px rgba(14, 20, 38, 0.06);
}

:root[data-theme='dark'] .rail-dot {
  background: #171d2f;
}

.rail-dot.active {
  background: var(--rust-soft);
  border-color: rgba(183, 104, 67, 0.3);
}

.phone-topbar,
.metric-row,
.focus-card,
.coach-card,
.heatmap {
  position: relative;
  z-index: 1;
  margin-left: 62px;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
}

.phone-topbar span,
.metric-row span,
.coach-card span,
.heatmap-head span {
  display: block;
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.phone-topbar strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -0.05em;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 14px;
}

.metric-row article,
.focus-card,
.coach-card,
.heatmap,
.proof article,
.feature,
.novel,
.system,
.status,
.final-cta {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 54px rgba(14, 20, 38, 0.05);
}

:root[data-theme='dark'] .metric-row article,
:root[data-theme='dark'] .focus-card,
:root[data-theme='dark'] .heatmap,
:root[data-theme='dark'] .proof article,
:root[data-theme='dark'] .feature,
:root[data-theme='dark'] .novel,
:root[data-theme='dark'] .system,
:root[data-theme='dark'] .status,
:root[data-theme='dark'] .final-cta {
  background: rgba(20, 26, 42, 0.76);
}

.metric-row article {
  padding: 13px 12px;
  border-radius: 15px;
}

.metric-row strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.focus-card {
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(90, 118, 240, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.88);
}

:root[data-theme='dark'] .focus-card {
  background:
    radial-gradient(circle at top right, rgba(139, 162, 255, 0.13), transparent 34%),
    rgba(20, 26, 42, 0.86);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--rust);
  background: var(--rust-soft);
  font-size: 12px;
  font-weight: 800;
}

.focus-card h2 {
  margin-top: 17px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.055em;
}

.focus-card p,
.coach-card p {
  margin: 11px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.concept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.concept-list span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--ink-2);
  background: #f5f7fb;
  font-size: 12px;
  font-weight: 800;
}

:root[data-theme='dark'] .concept-list span {
  background: rgba(246, 244, 238, 0.08);
}

.coach-card {
  margin-top: 12px;
  padding: 15px;
  border-radius: 18px;
  background: var(--paper-warm);
  border-color: #efd9c6;
}

:root[data-theme='dark'] .coach-card {
  background: rgba(240, 160, 111, 0.12);
  border-color: rgba(240, 160, 111, 0.22);
}

.heatmap {
  margin-top: 12px;
  padding: 15px;
  border-radius: 18px;
}

.heatmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.heatmap-head strong {
  font-size: 14px;
  letter-spacing: -0.03em;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.heatmap-grid i {
  aspect-ratio: 1;
  border-radius: 5px;
  background: #eef1f6;
}

:root[data-theme='dark'] .heatmap-grid i {
  background: rgba(246, 244, 238, 0.08);
}

.heatmap-grid i.warm { background: #dfe6ff; }

.heatmap-grid i.hot { background: var(--blue); }

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 0 92px;
}

.proof article {
  padding: 24px;
  border-radius: 20px;
}

.proof strong {
  display: block;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.proof span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.section { padding: 0 0 92px; }

.section-heading { max-width: 780px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.feature {
  min-height: 262px;
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
  position: relative;
  overflow: hidden;
}

:root[data-theme='dark'] .feature {
  background:
    linear-gradient(180deg, rgba(20, 26, 42, 0.86), rgba(16, 21, 34, 0.78));
}

.feature::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: var(--blue-soft);
  opacity: 0.55;
}

.feature:nth-child(even)::after { background: var(--rust-soft); }

.feature-icon,
.timeline article span {
  color: var(--rust);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
}

.feature h3,
.timeline h3 {
  margin: 44px 0 10px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.045em;
  position: relative;
  z-index: 1;
}

.feature p,
.novel-copy p,
.novel-grid span,
.timeline p,
.status li {
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.66;
  position: relative;
  z-index: 1;
}

.novel,
.system,
.status,
.final-cta {
  margin-bottom: 92px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 28px;
  scroll-margin-top: var(--header-height);
}

.novel {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 42px;
  background:
    radial-gradient(circle at top left, rgba(90, 118, 240, 0.1), transparent 35%),
    rgba(255, 255, 255, 0.72);
}

:root[data-theme='dark'] .novel {
  background:
    radial-gradient(circle at top left, rgba(139, 162, 255, 0.13), transparent 35%),
    rgba(20, 26, 42, 0.72);
}

.novel-copy p { margin-top: 21px; }

.novel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-content: center;
}

.novel-grid article {
  min-height: 162px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  position: relative;
}

:root[data-theme='dark'] .novel-grid article,
:root[data-theme='dark'] .timeline article,
:root[data-theme='dark'] .status li {
  background: rgba(14, 18, 30, 0.58);
}

.novel-grid article::before {
  content: '';
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--rust);
}

.novel-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.025em;
}

.novel-grid span {
  display: block;
  font-size: 13.5px;
}

.system,
.status {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
}

.timeline {
  display: grid;
  gap: 12px;
  align-content: center;
}

.timeline article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 42px rgba(14, 20, 38, 0.04);
}

.timeline h3 {
  margin: 10px 0 6px;
  font-size: 17px;
}

.status {
  background: rgba(255, 255, 255, 0.7);
}

:root[data-theme='dark'] .status {
  background: rgba(20, 26, 42, 0.72);
}

.status ul {
  display: grid;
  gap: 14px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.final-cta {
  margin-bottom: 0;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(90, 118, 240, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.72);
}

:root[data-theme='dark'] .final-cta {
  background:
    radial-gradient(circle at top, rgba(139, 162, 255, 0.14), transparent 42%),
    rgba(20, 26, 42, 0.74);
}

.final-cta h2 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.final-cta__actions .button {
  margin-top: 0;
}

.site-footer {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto 36px;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(14, 20, 38, 0.04);
}

:root[data-theme='dark'] .site-footer {
  background: rgba(20, 26, 42, 0.72);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-footer__link {
  padding: 0;
  border: none;
  color: var(--rust);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.site-footer__link:hover {
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

.contact-modal {
  width: min(100% - 32px, 440px);
  max-height: min(88vh, 680px);
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.contact-modal::backdrop {
  background: rgba(14, 20, 38, 0.55);
  backdrop-filter: blur(8px);
}

:root[data-theme='dark'] .contact-modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.contact-modal__panel {
  width: 100%;
  max-height: min(88vh, 680px);
  overflow: auto;
  padding: 32px 30px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-heavy);
  animation: modal-rise 0.24s ease;
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.contact-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.contact-modal__close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(14, 20, 38, 0.04);
}

.contact-modal__title {
  margin: 0 36px 0 0;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.contact-modal__lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.contact-modal__fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.contact-form {
  display: grid;
  gap: 22px;
  margin-top: 24px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.label-optional {
  color: var(--muted);
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 44px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.form-field textarea {
  min-height: 128px;
  padding: 12px 14px;
  line-height: 1.55;
  resize: vertical;
}

:root[data-theme='dark'] .form-field input,
:root[data-theme='dark'] .form-field select,
:root[data-theme='dark'] .form-field textarea {
  background: rgba(14, 18, 30, 0.72);
}

.form-field input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.form-field select {
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% + 2px),
    calc(100% - 16px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.contact-submit {
  width: 100%;
  margin-top: 4px;
  border: none;
  cursor: pointer;
}

.contact-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.form-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.form-status--success {
  color: var(--sage);
  background: var(--sage-soft);
  border: 1px solid rgba(31, 122, 99, 0.18);
}

.form-status--error {
  color: var(--rust);
  background: var(--rust-soft);
  border: 1px solid rgba(183, 104, 67, 0.22);
}

@media (max-width: 960px) {
  .nav-links { display: none; }

  .hero,
  .novel,
  .system,
  .status {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 34px;
    padding-top: 24px;
  }

  .app-preview {
    justify-self: stretch;
    width: 100%;
  }

  .feature-grid,
  .novel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav,
  .hero,
  .proof,
  .section,
  .novel,
  .system,
  .status,
  .final-cta {
    width: min(100% - 28px, 1140px);
  }

  .contact-modal {
    padding: 14px;
  }

  .contact-modal__panel {
    padding: 26px 22px 18px;
  }

  :root {
    --header-height: 76px;
  }

  .nav-actions { gap: 8px; }

  .theme-toggle__text { display: none; }

  .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand small { display: none; }

  h1 { font-size: clamp(44px, 14vw, 62px); }

  h2 { font-size: clamp(34px, 10vw, 44px); }

  .actions,
  .button,
  .final-cta__actions .button { width: 100%; }

  .site-footer {
    width: min(100% - 28px, 1140px);
    flex-direction: column;
    align-items: flex-start;
  }

  .proof,
  .feature-grid,
  .novel-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .app-preview::before,
  .preview-rail { display: none; }

  .phone-topbar,
  .metric-row,
  .focus-card,
  .coach-card,
  .heatmap { margin-left: 0; }

  .feature { min-height: 0; }

  .feature h3 { margin-top: 28px; }
}