:root {
  --gradient-top: #bee6f4;
  /* Solid equivalent of body gradient’s top stop (72% --gradient-top over --soft-surface). */
  --page-top-blend: #d0eaf2;
  --gradient-middle: #ffead6;
  --gradient-bottom: #c9e9a8;
  --soft-surface: #fff6ec;
  --card-border: #e6d7c4;
  --progress-track: #e7d9c8;
  --muted: #6e6258;
  --ink: #1c1a17;
  --math: #e8843a;
  --logic: #e86a7a;
  --reading: #5ab8e8;
  --science: #7ccba0;
  --success: #4fb77a;
  --sun: #f2c64a;
  --blue-ui: #3f73d8;
  --shadow: 0 20px 48px rgba(126, 92, 51, 0.18);
  --font-rounded: "SF Pro Rounded", ui-rounded, "Arial Rounded MT Bold", "Avenir Next Rounded", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-family: var(--font-rounded);
  background: var(--soft-surface);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Safari chrome + overscroll — same hex as theme-color in index.html. */
  background-color: var(--page-top-blend);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(190, 230, 244, 0.72), rgba(255, 234, 214, 0.76) 42%, rgba(201, 233, 168, 0.56)),
    var(--soft-surface);
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 50%;
  width: min(calc(100% - 32px), 1120px);
  min-height: 68px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 32px);
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  font-family: var(--font-rounded);
  font-size: 1.15rem;
  font-weight: 900;
}

.brand img {
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(232, 132, 58, 0.22);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(14px, 3vw, 28px);
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 22px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: rgba(255, 246, 236, 0.92);
}

.site-nav .nav-cta {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--math), var(--logic));
  box-shadow: 0 12px 24px rgba(232, 132, 58, 0.22);
}

.site-nav a.nav-cta:hover,
.site-nav a.nav-cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #db7831, #dd5c6d);
}

.site-nav a.nav-cta:focus-visible {
  outline: 2px solid var(--blue-ui);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  padding: 132px max(24px, calc((100vw - 1160px) / 2)) 72px;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 38%;
  content: "";
  background: linear-gradient(0deg, rgba(255, 246, 236, 0.98), rgba(255, 246, 236, 0));
}

.hero-scene {
  position: absolute;
  inset: auto -8% 0 auto;
  z-index: -3;
  width: min(86vw, 1000px);
  opacity: 0.18;
  filter: saturate(1.05);
}

.hero-content {
  min-height: calc(92svh - 204px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(30px, 6vw, 92px);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--math);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  margin: 10px 0 18px;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: clamp(4.7rem, 13vw, 11.5rem);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 6px 0 rgba(255, 255, 255, 0.72);
}

#hero-title {
  text-shadow: none;
}

h2 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 0.96;
  font-weight: 1000;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.02;
  font-weight: 1000;
  letter-spacing: 0;
}

.hero-subtitle,
.section-heading p,
.active-feature p,
.final-cta p,
.outcomes p {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.36rem);
  line-height: 1.5;
}

.hero-subtitle {
  max-width: 600px;
  margin: 28px 0 0;
  color: #514940;
  font-weight: 650;
}

.app-store-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  font-weight: 900;
  text-decoration: none;
  gap: 12px;
  padding: 8px 24px 9px 20px;
  color: #fff;
  background: linear-gradient(135deg, #111, #302924);
  box-shadow: 0 18px 34px rgba(28, 26, 23, 0.24);
}

.app-store-button small {
  display: block;
  margin-bottom: 1px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.apple-mark {
  width: 22px;
  height: 28px;
  flex-shrink: 0;
  color: #fff;
}

.hero-phones {
  position: relative;
  min-height: 612px;
}

.phone-frame {
  overflow: hidden;
  border: 10px solid #1c1a17;
  border-radius: 46px;
  background: #fff;
  box-shadow: var(--shadow);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-front,
.phone-back {
  position: absolute;
  width: min(52vw, 297px);
  aspect-ratio: 1179 / 2400;
}

.phone-front {
  right: 4%;
  top: 5%;
  transform: rotate(5deg);
}

.phone-back {
  left: 0;
  bottom: 0;
  transform: rotate(-7deg);
  opacity: 0.92;
}

.peanut-badge {
  position: absolute;
  right: -22px;
  bottom: 74px;
  width: min(31vw, 171px);
  transform: rotate(-9deg);
  filter: drop-shadow(0 18px 28px rgba(96, 65, 33, 0.18));
}

.feature-strip,
.showcase,
.outcomes,
.testimonial-section,
.final-cta,
footer {
  width: min(calc(100% - 48px), 1160px);
  margin-inline: auto;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -28px;
  position: relative;
  z-index: 2;
}

.feature-strip article {
  min-height: 154px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--accent), transparent 82%));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent), transparent 82%);
  text-align: center;
}

.feature-strip img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.feature-strip span {
  font-size: 1rem;
  font-weight: 950;
}

.showcase,
.testimonial-section {
  padding: 64px 0 0;
}

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

.section-heading h2,
.outcomes-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.005em;
}

.section-heading p {
  margin: 22px 0 0;
}

.screenshot-carousel {
  display: grid;
  gap: 20px;
  margin-top: 42px;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.carousel-track {
  display: flex;
  transform: translateX(0);
  transition: transform 360ms ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.screenshot-carousel .carousel-slide {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(260px, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(20px, 5vw, 54px);
  background: transparent;
}

.feature-phone {
  aspect-ratio: 1179 / 2400;
  border-width: 9px;
  border-radius: 42px;
}

.active-feature {
  display: grid;
  gap: 18px;
}

.slide-kicker {
  width: fit-content;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent), #1c1a17 18%);
  background: color-mix(in srgb, var(--accent), white 84%);
  font-size: 0.84rem;
  font-weight: 950;
}

.active-feature p {
  margin: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.carousel-button,
.carousel-dots button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.carousel-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--math), var(--logic));
  box-shadow: 0 12px 24px rgba(232, 132, 58, 0.22);
}

.carousel-button span {
  display: block;
  margin-top: -3px;
  font-size: 2.35rem;
  line-height: 1;
  font-weight: 700;
}

.carousel-dots {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.76);
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: var(--progress-track);
}

.carousel-dots button.is-active {
  width: 34px;
  background: var(--math);
}

.outcomes {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) 1fr;
  align-items: end;
  gap: 40px;
  padding: 110px 0 0;
}

.outcome-carousel {
  display: grid;
  gap: 20px;
}

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

.outcome-carousel .outcome-grid {
  padding: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.outcome-grid article {
  margin: 0;
  padding: 24px;
  border-radius: 16px;
}

.metric {
  display: block;
  margin-bottom: 10px;
  color: var(--math);
  font-size: clamp(1.28rem, 2vw, 1.75rem);
  line-height: 1.08;
  font-weight: 1000;
}

.outcome-grid p {
  margin: 0;
  font-size: 1rem;
}

.review-carousel {
  display: grid;
  gap: 20px;
  margin-top: 38px;
}

.review-viewport {
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.review-slide {
  margin: 0;
  min-height: 280px;
  display: grid;
  align-content: center;
  padding: clamp(28px, 5vw, 54px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

blockquote {
  margin: 0;
  color: #332c26;
  font-size: 1.15rem;
  line-height: 1.55;
  font-weight: 750;
}

figcaption {
  margin-top: 22px;
  color: var(--muted);
  font-weight: 850;
}

.final-cta {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 26px;
  align-items: center;
  margin-top: 72px;
  padding: clamp(24px, 5vw, 44px);
  background: transparent;
  border: none;
  box-shadow: none;
}

.final-cta h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.final-cta p {
  max-width: 640px;
  margin: 18px 0 0;
}

.cta-character {
  align-self: start;
  max-height: 160px;
  object-fit: contain;
}

footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 34px 0 48px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@media (max-width: 960px) {
  .site-header {
    width: min(calc(100% - 24px), 720px);
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
  }

  /* Phones use rotate + float animations that paint outside their box; keep the grid
     top-aligned and shorten the stacked column min-height so handsets don't vertically
     center the pair beside a tall headline. Margin/padding clears bleed over the title. */
  .outcomes,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
    gap: clamp(36px, 9vw, 56px);
  }

  .hero-phones {
    min-height: 468px;
    max-width: 620px;
    width: 100%;
    margin-top: clamp(40px, 11vw, 72px);
    margin-inline: auto;
    padding-top: clamp(20px, 5vw, 36px);
  }

  .phone-front,
  .phone-back {
    width: min(45vw, 243px);
  }

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

  .feature-strip {
    margin-top: 24px;
  }

  .screenshot-carousel .carousel-slide {
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  }

  .final-cta {
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 680px) {
  .site-header {
    top: 10px;
    min-height: 62px;
    border-radius: 26px;
  }

  .brand span {
    font-size: 1rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .site-nav .nav-cta {
    min-height: 42px;
    padding-inline: 14px;
  }

  .hero,
  .outcomes {
    padding-top: 86px;
  }

  .showcase,
  .testimonial-section {
    padding-top: 48px;
  }

  .hero {
    padding-inline: 20px;
    padding-bottom: 44px;
  }

  .hero-subtitle {
    margin-top: 20px;
  }

  .app-store-button {
    width: 100%;
  }

  .hero-phones {
    min-height: 420px;
    margin-top: clamp(48px, 13vw, 80px);
    padding-top: clamp(24px, 6vw, 40px);
  }

  .phone-front,
  .phone-back {
    width: min(52vw, 207px);
  }

  .peanut-badge {
    bottom: 34px;
    right: 0;
    width: 126px;
  }

  .feature-strip,
  .showcase,
  .outcomes,
  .testimonial-section,
  .final-cta,
  footer {
    width: min(calc(100% - 32px), 520px);
  }

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

  .outcome-grid,
  .screenshot-carousel .carousel-slide {
    grid-template-columns: 1fr;
  }

  .feature-strip article {
    min-height: 0;
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    align-content: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    text-align: left;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent), transparent 84%);
  }

  .feature-strip img {
    width: 44px;
    height: 44px;
  }

  .feature-strip span {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .screenshot-carousel .carousel-slide {
    justify-items: center;
  }

  .feature-phone {
    width: min(100%, 290px);
  }

  .carousel-controls {
    gap: 10px;
  }

  .carousel-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
  }

  .carousel-dots {
    gap: 8px;
    padding: 0 12px;
  }

  .active-feature {
    text-align: center;
  }

  .cta-character {
    max-height: 132px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .hero-phones {
    margin-top: clamp(52px, 15vw, 88px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .phone-front {
    animation: floatPhone 6s ease-in-out infinite;
  }

  .phone-back {
    animation: floatPhoneBack 7s ease-in-out infinite;
  }
}

@keyframes floatPhone {
  0%,
  100% {
    transform: translateY(0) rotate(5deg);
  }
  50% {
    transform: translateY(-12px) rotate(4deg);
  }
}

@keyframes floatPhoneBack {
  0%,
  100% {
    transform: translateY(0) rotate(-7deg);
  }
  50% {
    transform: translateY(10px) rotate(-6deg);
  }
}
