/* Local, variable typeface; no external requests. */
@font-face {
  font-family: Nunito;
  src: url("assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #202b46;
  --muted: #59647a;
  --blue: #4266aa;
  --blue-dark: #34548f;
  --paper: #f8faff;
  --line: #e2e7f0;
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Nunito, ui-rounded, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure { margin: 0; }
strong { font-weight: 800; }
::selection { background: #fbd888; color: var(--ink); }
:focus-visible { outline: 3px solid #a32959; outline-offset: 6px; }
.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 12px 20px; background: white; border: 2px solid var(--blue); border-radius: 12px; transform: translateY(-160%); z-index: 20; }
.skip-link:focus { transform: translateY(0); }

/* Header and shared actions */
.header { min-height: 104px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 25px; font-weight: 900; letter-spacing: -.8px; }
.brand img { border-radius: 13px; }
.brand-dot { color: #d94258; }
.header nav { display: flex; align-items: center; gap: 34px; font-size: 15px; font-weight: 800; }
.nav-link, .footer nav a { transition: color .2s; }
.nav-link:hover, .footer nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 56px; padding: 15px 24px; border-radius: 16px; background: var(--blue); color: #fff; font-weight: 900; font-size: 17px; box-shadow: 0 5px 0 var(--blue-dark), 0 10px 22px #4266aa18; transition: background .2s, transform .2s, box-shadow .2s; }
.button:hover { background: var(--blue-dark); transform: translateY(-3px); box-shadow: 0 7px 0 #284675, 0 14px 25px #4266aa24; }
.button:active { transform: translateY(2px); box-shadow: 0 2px 0 #284675; }
.button-small { min-height: 44px; padding: 11px 20px; border-radius: 12px; font-size: 14px; box-shadow: 0 3px 0 var(--blue-dark); }
.button-primary { margin-top: 29px; padding: 16px 24px; min-width: 275px; justify-content: flex-start; }
.button-primary small { display: block; font-size: 12px; font-weight: 600; margin-top: 1px; }
.button-arrow { margin-left: auto; font-size: 24px; }
.apple-icon { width: 26px; height: 30px; flex-shrink: 0; fill: currentColor; }

/* First screen: real App Store artwork with a playful math frame. */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; min-height: 730px; padding-block: 42px 76px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 900; letter-spacing: 1.9px; color: var(--blue-dark); }
.eyebrow-mark { color: #c13b52; font-size: 22px; }
h1 { font-size: clamp(58px, 6.2vw, 86px); line-height: 1.04; font-weight: 900; letter-spacing: -3.8px; margin: 21px 0 25px; }
h1 > span { color: var(--blue); }
.hero-description { font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 430px; }
.hero-description strong { color: var(--ink); }
.hero-note { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 22px; }
.hero-note span { color: #218355; }
.hero-art { position: relative; height: 610px; isolation: isolate; }
.art-orbit { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #e2ebff, #edf2fc 65%); left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; }
.art-orbit::after { content: ""; position: absolute; inset: -24px; border: 1px dashed #bbcbe4; border-radius: inherit; }
.hero-screen { position: absolute; width: 245px; border-radius: 24px; box-shadow: 0 25px 45px #263a6526, 0 2px 4px #263a6510; }
.screen-front { left: 34px; top: 23px; transform: rotate(-9deg); }
.screen-back { right: 20px; top: 62px; transform: rotate(9deg); width: 232px; }
.math-tile { position: absolute; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; font-size: 49px; font-weight: 800; line-height: 1; box-shadow: 0 8px 0 #0000000b, 0 12px 22px #253b5e0c; z-index: 2; }
.tile-plus { background: #ffdc89; color: #936112; left: 6px; bottom: 40px; transform: rotate(-13deg); }
.tile-times { background: #f9bdc7; color: #a42f49; right: 5px; top: 7px; transform: rotate(12deg); }
.tile-divide { width: 52px; height: 52px; font-size: 35px; border-radius: 15px; background: #bce8d4; color: #24694d; right: 15px; bottom: 83px; transform: rotate(-10deg); }
.aha-note { position: absolute; bottom: 0; left: 135px; padding: 15px 24px 15px 51px; font-size: 15px; line-height: 1.5; background: white; border: 1px solid #e6ebf4; border-radius: 18px; box-shadow: 0 12px 30px #263a6512; transform: rotate(-4deg); }
.aha-note > span { position: absolute; top: 20px; left: 17px; font-size: 27px; color: #d99120; }

/* A slim visual pause between the hero and benefits. */
.math-ribbon { background: #eef3fd; border-block: 1px solid #e2e9f5; }
.math-ribbon .wrap { display: flex; justify-content: space-between; align-items: center; padding-block: 23px; font-size: 13px; font-weight: 900; letter-spacing: 3px; color: #465c80; }
.ribbon-symbol { color: #a3b5d4; font-size: 25px; letter-spacing: 0; }
.section-space { padding-block: 104px; }
.section-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 42px; }
h2 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -1.8px; line-height: 1.12; font-weight: 900; margin-top: 16px; }
h2 span { color: var(--blue); }
.section-heading > p, .gallery-heading-aside > p { font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 340px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature-card { display: flex; flex-direction: column; padding: 28px 24px 24px; border-radius: var(--radius); min-height: 320px; transition: transform .25s; }
.feature-card:hover { transform: translateY(-5px); }
.feature-blue { background: #e7eefc; }
.feature-yellow { background: #fff0ce; }
.feature-mint { background: #e1f2e9; }
.feature-pink { background: #fbe7eb; }
.feature-card h3 { font-size: 22px; font-weight: 900; letter-spacing: -.6px; line-height: 1.25; margin: 22px 0 13px; }
.feature-card p { font-size: 15px; line-height: 1.65; color: #4e5a70; margin-bottom: 25px; }
.feature-label { font-size: 10px; letter-spacing: 1.25px; font-weight: 900; margin-top: auto; color: #4c5870; }
.feature-icon { width: 64px; height: 57px; color: var(--blue-dark); }
.equation-icon { display: grid; grid-template-columns: repeat(3, 23px); gap: 4px; width: 77px; transform: rotate(-6deg); }
.equation-icon span { display: grid; place-items: center; border-radius: 5px; background: #fff; font-size: 17px; font-weight: 900; }
.equation-icon span:last-child { background: #bce8d4; }
.level-icon { display: flex; align-items: end; gap: 6px; padding: 7px 0; }
.level-icon i { display: block; width: 12px; height: 15px; background: #ac791b; border-radius: 4px; }
.level-icon i:nth-child(2) { height: 25px; background: #bb8628; }
.level-icon i:nth-child(3) { height: 35px; background: #c99839; }
.level-icon i:nth-child(4) { height: 45px; background: #daa644; }
.calendar-icon { margin-top: 5px; height: 49px; width: 50px; border: 3px solid #347b5c; border-radius: 10px; position: relative; display: grid; place-items: center; color: #347b5c; font-size: 25px; }
.calendar-icon::before { content: ""; position: absolute; height: 3px; width: 100%; background: #347b5c; top: 9px; }
.calendar-icon::after { content: ""; position: absolute; width: 23px; height: 8px; top: -8px; border-inline: 3px solid #347b5c; }
.calendar-icon span { margin-top: 7px; }
.brain-icon { color: #a84461; }
.brain-icon svg { width: 58px; height: 58px; }
.features-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 34px; font-size: 15px; color: var(--muted); }
.text-link { color: var(--blue-dark); font-weight: 900; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Native horizontal scrolling: no carousel dependency. */
.screenshots { background: #fff; border-block: 1px solid var(--line); }
.gallery-heading-aside { display: flex; align-items: end; gap: 20px; }
.gallery-controls { display: none; gap: 8px; }
.gallery-controls.is-ready { display: flex; }
.gallery-controls button { width: 44px; height: 44px; border: 1px solid #d7dfec; border-radius: 50%; background: #f8faff; color: var(--blue-dark); font-size: 23px; cursor: pointer; transition: background .2s, transform .2s; }
.gallery-controls button:hover { background: #e7eefc; transform: translateY(-2px); }
.gallery-controls button:disabled { opacity: .4; cursor: default; transform: none; }
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 25px; scrollbar-width: thin; scrollbar-color: #bbcbe4 #f0f3f9; }
.gallery figure { flex: 0 0 calc((100% - 88px) / 5); min-width: 0; scroll-snap-align: start; }
.gallery img { border-radius: 21px; box-shadow: 0 8px 18px #253b5e10; }
figcaption { margin-top: 18px; display: flex; gap: 8px; font-size: 12px; font-weight: 800; line-height: 1.5; }
figcaption > span { color: var(--blue); font-size: 10px; padding-top: 2px; }
.swipe-note { display: none; color: var(--muted); font-size: 12px; margin-top: 15px; }

/* Final download and compact footer */
.download-section { padding-block: 96px; }
.download-card { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 56px 28px 64px; border-radius: 36px; background: linear-gradient(115deg, #e4edff, #eef3ff 50%, #e4edff); }
.download-icon { margin: 0 auto 25px; border-radius: 23px; box-shadow: 0 10px 24px #263a651a; transform: rotate(-6deg); }
.download-card .eyebrow { justify-content: center; }
.download-card h2 { font-size: clamp(38px, 5vw, 64px); margin-block: 16px; }
.download-card > p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.7; }
.button-download { margin-top: 30px; font-size: 16px; }
.download-decoration { position: absolute; inset: 0; z-index: -1; }
.download-decoration span { position: absolute; font-weight: 800; color: #cad8f0; font-size: 145px; }
.download-decoration span:nth-child(1) { left: 7%; top: 12%; transform: rotate(-13deg); }
.download-decoration span:nth-child(2) { right: 8%; bottom: 8%; transform: rotate(12deg); }
.download-decoration span:nth-child(3) { left: 13%; bottom: 0; font-size: 100px; transform: rotate(10deg); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 0 42px; font-size: 12px; color: var(--muted); }
.footer-brand { font-size: 21px; color: var(--ink); }
.footer-brand img { border-radius: 10px; }
.footer > div > p { margin-top: 10px; }
.footer nav { display: flex; gap: 25px; font-size: 13px; font-weight: 800; }
.sticky-cta { display: none; }

/* Responsive composition */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: enter .65s ease-out both; }
  .hero-art { animation: enter .85s ease-out both; }
  .tile-times { animation: float 6s ease-in-out infinite; }
}
@keyframes enter { from { translate: 0 16px; } to { translate: 0 0; } }
@keyframes float { 50% { translate: 0 -10px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feature-card, .download-card { animation: enter linear both; animation-timeline: view(); animation-range: entry 0% entry 25%; }
  }
}
@media (max-width: 1100px) {
  .hero { min-height: 660px; }
  .hero-art { height: 550px; }
  .hero-screen { width: 210px; }
  .screen-back { width: 200px; right: 35px; }
  .screen-front { left: 15px; }
  .art-orbit { width: 400px; height: 400px; }
  .aha-note { left: 65px; bottom: 5px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card { min-height: 285px; padding: 28px; }
  .feature-card h3 { margin-top: 20px; }
  .gallery figure { flex-basis: calc((100% - 44px) / 3); }
  .gallery-heading-aside { flex-direction: column; align-items: start; }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .header { min-height: 82px; gap: 10px; }
  .brand { font-size: 22px; gap: 9px; }
  .brand img { width: 42px; height: 42px; border-radius: 12px; }
  .header .nav-link { display: none; }
  .header nav { gap: 0; }
  .button-small { padding: 10px 15px; font-size: 13px; min-height: 42px; gap: 8px; }
  .hero { display: flex; flex-direction: column; padding-block: 24px 37px; gap: 25px; }
  .hero-copy { width: 100%; text-align: center; }
  .hero .eyebrow { justify-content: center; font-size: 10px; letter-spacing: 1.5px; }
  h1 { font-size: clamp(43px, 9.9vw, 68px); line-height: 1.07; letter-spacing: -2px; margin: 16px 0 20px; }
  .desktop-break { display: none; }
  .hero-description { margin-inline: auto; font-size: 16px; line-height: 1.65; max-width: 390px; }
  .button-primary { margin-top: 23px; min-width: 275px; text-align: left; }
  .hero-note { justify-content: center; margin-top: 18px; font-size: 12px; }
  .hero-art { width: min(100%, 440px); height: 450px; }
  .hero-screen { width: 176px; border-radius: 18px; }
  .screen-front { top: 22px; left: calc(50% - 165px); }
  .screen-back { top: 43px; right: calc(50% - 161px); width: 163px; }
  .art-orbit { width: 300px; height: 300px; }
  .art-orbit::after { inset: -8px; }
  .math-tile { width: 49px; height: 49px; border-radius: 14px; font-size: 34px; }
  .tile-plus { left: 4px; bottom: 28px; }
  .tile-times { right: 4px; top: 5px; }
  .tile-divide { right: 2px; bottom: 48px; width: 37px; height: 37px; font-size: 28px; border-radius: 11px; }
  .aha-note { left: 50%; bottom: 0; transform: translateX(-50%) rotate(-4deg); white-space: nowrap; font-size: 12px; padding: 12px 16px 12px 43px; }
  .aha-note > span { top: 15px; left: 13px; font-size: 23px; }
  .math-ribbon .wrap { font-size: 9px; letter-spacing: 1.4px; padding-block: 17px; }
  .ribbon-symbol { font-size: 18px; }
  .section-space { padding-block: 64px; }
  .section-heading { display: block; margin-bottom: 28px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.5px; }
  h2 { font-size: 36px; letter-spacing: -1.1px; margin-top: 13px; }
  .section-heading > p, .gallery-heading-aside > p { margin-top: 18px; font-size: 15px; }
  .feature-grid { gap: 14px; }
  .feature-card { padding: 22px 19px; border-radius: 22px; min-height: 315px; }
  .feature-card h3 { font-size: 20px; }
  .feature-card p { font-size: 14px; line-height: 1.6; }
  .feature-label { font-size: 9px; letter-spacing: .8px; }
  .features-cta { text-align: center; font-size: 14px; margin-top: 25px; }
  .gallery-heading-aside { flex-direction: row; justify-content: space-between; align-items: end; gap: 12px; }
  .gallery-heading-aside > p { max-width: 255px; }
  .gallery-controls button { width: 36px; height: 36px; font-size: 20px; }
  .gallery { gap: 18px; padding-bottom: 20px; }
  .gallery figure { flex-basis: 64%; max-width: 270px; }
  .gallery img { border-radius: 20px; }
  figcaption { font-size: 12px; margin-top: 15px; }
  .swipe-note { display: flex; align-items: center; gap: 9px; }
  .swipe-note span { font-size: 19px; }
  .download-section { padding-block: 56px; }
  .download-card { padding: 38px 20px 44px; border-radius: 28px; }
  .download-icon { width: 72px; height: 72px; border-radius: 20px; }
  .download-card h2 { font-size: 40px; }
  .download-card > p:not(.eyebrow) { font-size: 15px; }
  .download-card .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .button-download { font-size: 14px; gap: 10px; padding: 14px 17px; }
  .button-download .apple-icon { width: 22px; }
  .download-decoration span { font-size: 80px; opacity: .6; }
  .download-decoration span:nth-child(1) { left: 0; top: 0; }
  .download-decoration span:nth-child(2) { right: 0; bottom: 0; }
  .download-decoration span:nth-child(3) { display: none; }
  .footer { flex-wrap: wrap; gap: 24px; padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .footer > div { width: 100%; }
  .footer nav { gap: 20px; }
  .footer-brand img { width: 36px; height: 36px; }
  .sticky-cta { display: block; position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; padding: 12px 20px calc(15px + env(safe-area-inset-bottom)); background: #f8faffed; border-top: 1px solid #dbe3f0; backdrop-filter: blur(10px); transition: translate .2s; }
  .sticky-cta .button { display: flex; width: 100%; min-height: 48px; padding-block: 12px; font-size: 15px; }
  .sticky-cta.is-hidden { translate: 0 110%; visibility: hidden; }
}
@media (max-width: 479px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 26px; }
  .feature-card h3 { font-size: 23px; margin-top: 18px; }
  .feature-card p { font-size: 15px; margin-bottom: 20px; }
  .gallery-heading-aside > p { max-width: 220px; }
  .gallery-controls { gap: 5px; }
  .footer { gap: 20px; }
  .copyright { width: 100%; }
}
@media (max-width: 359px) {
  .wrap { width: calc(100% - 32px); }
  .brand { font-size: 19px; }
  .brand img { width: 36px; height: 36px; }
  .button-small { padding-inline: 12px; }
  h1 { font-size: 40px; }
  .hero-description { font-size: 15px; }
  .hero-art { height: 410px; }
  .hero-screen { width: 137px; }
  .screen-front { left: calc(50% - 120px); }
  .screen-back { width: 130px; right: calc(50% - 124px); }
  .art-orbit { width: 255px; height: 255px; }
  h2 { font-size: 32px; }
  .gallery-controls { display: none !important; }
  .button-download { font-size: 12px; padding-inline: 13px; gap: 8px; }
  .download-card h2 { font-size: 35px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
