:root {
  --background: #f8faff;
  --surface: #ffffff;
  --surface-strong: #eef3ff;
  --text: #11182f;
  --muted: #667085;
  --outline: #dfe6f6;
  --primary: #5967f2;
  --primary-dark: #3f4ecf;
  --mint: #50bf86;
  --cyan: #44b7d4;
  --orange: #ff8a3d;
  --danger: #e45151;
  --shadow: 0 20px 50px rgba(32, 42, 86, 0.12);
  --soft-shadow: 0 10px 30px rgba(32, 42, 86, 0.08);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(223, 230, 246, 0.82);
  background: rgba(248, 250, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(89, 103, 242, 0.22);
}

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

.site-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--primary-dark);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(760px, calc(100svh - 38px));
  padding: clamp(64px, 9vw, 112px) clamp(18px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #f8faff;
}

.scene-grid {
  position: absolute;
  inset: 0;
  opacity: 0.56;
  background-image:
    linear-gradient(rgba(89, 103, 242, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 103, 242, 0.10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.86) 54%, transparent 100%);
}

.math-tile {
  position: absolute;
  padding: 10px 14px;
  border: 1px solid rgba(89, 103, 242, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  color: var(--primary-dark);
  font-weight: 800;
}

.tile-a {
  top: 18%;
  right: 36%;
}

.tile-b {
  top: 26%;
  right: 7%;
  color: var(--cyan);
}

.tile-c {
  right: 32%;
  bottom: 18%;
  color: var(--orange);
}

.tile-d {
  right: 4%;
  bottom: 32%;
  color: var(--mint);
}

.phone-preview {
  position: absolute;
  top: 50%;
  right: clamp(18px, 7vw, 96px);
  width: min(350px, 34vw);
  min-width: 286px;
  transform: translateY(-50%) rotate(3deg);
  border: 10px solid #101525;
  border-radius: 34px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(17, 24, 47, 0.28);
  padding: 18px;
}

.phone-preview::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 82px;
  height: 8px;
  border-radius: 999px;
  background: #101525;
  transform: translateX(-50%);
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 16px;
}

.phone-top img {
  width: 42px;
  height: 42px;
  border-radius: 9px;
}

.phone-top span,
.question-panel span,
.question-panel small,
.setup-summary span,
.setup-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.phone-top strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.question-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #f6f8ff;
}

.question-panel strong {
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: 0;
}

.answer-box {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(80, 191, 134, 0.13);
  color: var(--mint);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.keypad span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.hero-content {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 8.5vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 28px;
  color: #344054;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.hero-actions,
.support-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.primary-button {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 12px 24px rgba(89, 103, 242, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--primary-dark);
  outline: none;
}

.secondary-button {
  border-color: var(--outline);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(89, 103, 242, 0.35);
  color: var(--primary-dark);
  outline: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 120px));
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
}

.hero-stats div {
  padding: 14px;
  border: 1px solid rgba(223, 230, 246, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.hero-stats dt {
  color: var(--primary-dark);
  font-size: 1.8rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.section {
  padding: clamp(66px, 9vw, 110px) clamp(18px, 5vw, 54px);
}

.section-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.76fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.training-band,
.support-section {
  background: var(--surface);
}

.section p {
  color: var(--muted);
  font-size: 1.04rem;
}

.setup-panel,
.privacy-list,
.policy-summary {
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.setup-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.segmented-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segment {
  min-height: 44px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #f9fbff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
}

.segment:hover,
.segment:focus-visible,
.segment.is-active {
  border-color: rgba(89, 103, 242, 0.34);
  background: rgba(89, 103, 242, 0.11);
  color: var(--primary-dark);
  outline: none;
}

.setup-summary {
  padding: 18px;
  border-radius: 8px;
  background: #f6f8ff;
}

.setup-summary strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.feature-card {
  padding: 18px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.feature-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  color: var(--surface);
  font-weight: 900;
}

.mark-primary {
  background: var(--primary);
}

.mark-orange {
  background: var(--orange);
}

.mark-mint {
  background: var(--mint);
}

.mark-cyan {
  background: var(--cyan);
}

.challenge-table {
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.challenge-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.7fr 1.4fr;
  gap: 14px;
  padding: 15px 18px;
  border-top: 1px solid var(--outline);
  color: var(--muted);
}

.challenge-row:first-child {
  border-top: 0;
}

.challenge-row span:first-child {
  color: var(--text);
  font-weight: 850;
}

.challenge-head {
  background: #f6f8ff;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.privacy-band {
  background: #eef9fb;
}

.privacy-list {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.privacy-list div {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-bottom: 1px solid var(--outline);
}

.privacy-list strong {
  color: var(--text);
}

.privacy-list span {
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  padding: 18px;
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  background: #f6f8ff;
  outline: none;
}

.support-inner {
  justify-content: space-between;
}

.support-inner p {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 5vw, 54px);
  border-top: 1px solid var(--outline);
  background: var(--text);
  color: var(--surface);
  font-size: 0.94rem;
}

.site-footer a {
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

.policy-hero {
  padding: clamp(64px, 10vw, 120px) clamp(18px, 5vw, 54px) clamp(44px, 7vw, 72px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, #eef3ff, #edfdf7 52%, #fff5ec);
}

.policy-hero h1 {
  max-width: 15ch;
  margin-bottom: 12px;
}

.policy-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 700;
}

.policy-content {
  padding: clamp(42px, 8vw, 86px) clamp(18px, 5vw, 54px);
}

.policy-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 760px);
  gap: 28px;
  align-items: start;
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.policy-summary {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.policy-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.policy-summary p {
  margin-bottom: 6px;
  color: var(--muted);
}

.policy-document {
  display: grid;
  gap: 14px;
}

.policy-document section {
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.policy-document h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.policy-document p {
  margin-bottom: 0;
  color: var(--muted);
}

.policy-document a {
  color: var(--primary-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero {
    padding-top: 58px;
    padding-bottom: 34px;
  }

  .hero-content {
    max-width: 560px;
  }

  .phone-preview {
    right: -34px;
    opacity: 0.28;
    transform: translateY(-46%) rotate(2deg);
  }

  .math-tile {
    display: none;
  }

  .two-column,
  .policy-layout {
    grid-template-columns: 1fr;
  }

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

  .policy-summary {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 66px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--outline);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
  }

  .hero {
    align-items: start;
    min-height: auto;
    padding-top: 48px;
  }

  .phone-preview {
    top: 70%;
    right: -164px;
    width: 290px;
    min-width: 0;
    opacity: 0.10;
  }

  h1 {
    font-size: clamp(3.1rem, 18vw, 5.4rem);
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    gap: 8px;
  }

  .hero-stats div {
    padding: 12px 10px;
  }

  .hero-stats dt {
    font-size: 1.45rem;
  }

  .hero-stats dd {
    font-size: 0.76rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .segmented-group,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .challenge-table {
    overflow-x: auto;
  }

  .challenge-row {
    min-width: 640px;
  }

  .support-inner {
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
