@font-face {
  font-family: "Fira Sans Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/FiraSansCondensed-ExtraBold.woff") format("woff"),
    url("assets/fonts/FiraSansCondensed-ExtraBold.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --ink: #111;
  --button-bg: #191919;
  --muted: #68686e;
  --tertiary: #68686e;
  --card-shadow: 0 12px 40px rgba(33, 34, 36, 0.07), 0 2px 8px rgba(33, 34, 36, 0.03);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --system-font: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: #fff;
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  font-family: var(--system-font);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #f9e690; color: #111; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.desktop-break { display: none; }

.site-header {
  position: sticky;
  top: 20px;
  z-index: 20;
  width: calc(100% - 80px);
  min-height: 52px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  isolation: isolate;
}

.site-header::before {
  position: absolute;
  inset: -10px -14px;
  z-index: -1;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(33, 34, 36, 0.05);
  opacity: 0;
  transition: opacity 240ms ease;
  content: "";
  pointer-events: none;
}

@supports (backdrop-filter: blur(16px)) {
  .site-header::before {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
  }
}

.page-scrolled .site-header::before { opacity: 1; }

.brand {
  font-family: "Fira Sans Condensed", "Arial Narrow", var(--system-font);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  font-synthesis: none;
}

.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.header-downloads { display: flex; gap: 10px; }
.contact-link, .community-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-underline-offset: 5px;
}
.community-link { gap: 7px; }
.community-link svg { flex-shrink: 0; }
.language-picker {
  position: relative;
  z-index: 2;
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
}
.language-picker summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:focus-visible { outline: 3px solid #265ccc; outline-offset: 5px; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 6px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; }
.language-menu a:hover, .language-menu a[aria-current="page"] { background: #f3f3f3; }

.app-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: calc(100% - 32px);
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: var(--button-bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  color: #fff;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 180ms ease;
}

.app-button span, .app-button img { position: relative; z-index: 1; }
.app-button img { flex: 0 0 auto; object-fit: contain; }

a:focus-visible {
  outline: 3px solid #265ccc;
  outline-offset: 5px;
}

.app-button--small { min-width: 160px; min-height: 50px; gap: 12px; font-size: 17px; }
.app-button--small img { width: 14px; height: 18px; }
.app-button--small .google-play-icon { width: 18px; height: 18px; }
.header-downloads .app-button { background: transparent; color: #1b1b1b; border-color: #1b1b1b; box-shadow: none; }
.header-downloads .app-button img { filter: brightness(0); }
.app-button--large { min-width: 220px; min-height: 66px; gap: 16px; font-size: 21px; }
.app-button--large img { width: 19px; height: 24px; }
.app-button--large .google-play-icon { width: 24px; height: 24px; }
.download-actions { display: flex; justify-content: center; gap: 14px; width: min(560px, calc(100% - 40px)); }
.download-actions .app-button { flex: 1 1 0; max-width: none; }
.download-actions:has(> .app-button[hidden]) { width: min(220px, calc(100% - 32px)); }

.hero, .features-section, .language-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero { padding-top: clamp(72px, 8vw, 112px); }
.hero h1, .features-section h2, .language-section h2 {
  width: calc(100% - 64px);
  margin: 0;
  color: var(--ink);
  font-family: var(--system-font);
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 { max-width: 1040px; }
.hero > .download-actions { margin-top: 48px; }
/* Figma 784:15787 / 650:9864: preserve the artwork and optical text offsets as one scaled unit. */
.stats { --stat-scale: 1.25; width: calc(100% - 40px); margin-top: 44px; display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; }
.stat { flex: 0 0 auto; width: calc(154.6152px * var(--stat-scale)); height: calc(59.6519px * var(--stat-scale)); }
.stat-artwork { position: relative; width: 154.6152px; height: 59.6519px; transform: scale(var(--stat-scale)); transform-origin: top left; }
.laurel { position: absolute; top: 3.194px; }
.laurel--left { left: 0; }
.laurel--right { left: 128.3208px; }
.stat-copy { color: var(--ink); font-family: var(--system-font); text-align: center; font-variation-settings: "wdth" 100; }
.stat-kicker, .stat-label { position: absolute; left: 22.3585px; width: 110.7264px; font-size: 13.841px; font-weight: 400; line-height: 15.97px; letter-spacing: -0.0852px; white-space: nowrap; }
.stat-kicker { top: 0; }
.stat-label { top: 43.6518px; }
.stat-value { position: absolute; left: 12.9707px; top: 14.9702px; width: 127.7612px; font-size: 23.423px; font-weight: 700; line-height: 29.811px; letter-spacing: -0.2768px; white-space: nowrap; }
.stat-plus { position: absolute; left: 95.751px; top: -0.4478px; width: 13px; font-size: 18.42px; line-height: 29.811px; }
.stat--questions .stat-kicker { color: var(--muted); font-size: 10.84px; font-weight: 510; letter-spacing: 0.91px; }
.stat--trust .stat-value { left: 15.9704px; top: 15.9702px; }

.hero-media {
  position: relative;
  width: min(1216px, calc(100% - 64px));
  aspect-ratio: 1216 / 1300;
  margin-top: 64px;
  overflow: hidden;
  border-radius: 48px;
  background: #fafafa;
  isolation: isolate;
  transform: translateY(calc(var(--hero-lift, 0) * -1px));
  transition: transform 500ms var(--spring);
}

.mockup-lights {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
}

.mockup-light {
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
}

.mockup-light::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--light-color), transparent);
  filter: blur(clamp(20px, 5vw, 64px));
  content: "";
}

.mockup-light--yellow { --light-color: #ffed8a; top: -4%; left: -16%; opacity: 0.32; }
.mockup-light--green { --light-color: #b4dd9c; top: 28%; right: -16%; opacity: 0.23; }
.mockup-light--coral { --light-color: #ed645d; top: 50%; left: -5%; opacity: 0.14; }

@media (prefers-reduced-motion: no-preference) {
  .mockup-light { will-change: transform; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
  .mockup-light--yellow { animation-name: mockup-yellow; animation-duration: 40s; animation-delay: -4s; }
  .mockup-light--green { animation-name: mockup-green; animation-duration: 48s; animation-delay: -19s; }
  .mockup-light--coral { animation-name: mockup-coral; animation-duration: 56s; animation-delay: -38s; }
}

/* Percentages keep each path proportional to the mockup on any screen. */
@keyframes mockup-yellow {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(76%, 38%, 0); }
  66% { transform: translate3d(14%, 76%, 0); }
}

@keyframes mockup-green {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(-76%, 14%, 0); }
  66% { transform: translate3d(-12%, -40%, 0); }
}

@keyframes mockup-coral {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(76%, -54%, 0); }
  66% { transform: translate3d(8%, -70%, 0); }
}

.phone-screen, .hand-phone {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.phone-screen {
  top: -0.31%;
  left: 49.29%;
  width: 60.53%;
  transform: translateX(-50%);
}

.hand-phone {
  z-index: 2;
  top: -13.23%;
  left: 57.94%;
  width: 80.26%;
  transform: translateX(-50%);
}

.features-section, .language-section { padding-top: clamp(72px, 9vw, 120px); }
.features-section h2, .language-section h2 { max-width: 960px; font-size: clamp(34px, 4.6vw, 60px); }

.feature-grid {
  width: min(864px, calc(100% - 64px));
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.exam-widget, .mini-widget {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 28px;
  box-shadow: var(--card-shadow);
}

.exam-widget {
  display: flex;
  flex-direction: column;
  min-height: 424px;
  padding: 24px 20px 28px;
}

.widget-title { position: relative; z-index: 2; padding: 0 4px; }
.widget-title h3, .mini-widget h3 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }
.widget-title p, .mini-widget p { margin: 6px 0 0; color: var(--muted); font-size: 17px; line-height: 1.35; }
.gauge { position: absolute; top: 4px; right: 10px; width: 48.3%; aspect-ratio: 1; }
.gauge-knob { position: absolute; top: 9.1%; left: 80.3%; width: 5%; aspect-ratio: 1; }

.metric-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 76px;
}

.metric { min-width: 0; padding: 16px 18px; border-radius: 18px; background: #f7f6fb; }
.metric strong { display: block; font-size: 36px; font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; }
.metric span { display: block; margin-top: 5px; color: #65636d; font-size: 14px; line-height: 1.4; }

.mini-widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mini-widget { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 16px 20px 22px; min-height: 204px; }
.mini-widget h3 { font-size: 19px; }
.mini-widget p { font-size: 16px; }
.mini-widget .danger { color: #a51414; }
.mini-icon { object-fit: contain; width: 68px; height: 68px; margin: 0 0 16px -8px; }
.mini-icon--favorite, .mini-icon--mistakes { width: 75px; margin-left: -10px; }

.language-section > .download-actions { margin-top: 56px; }
.language-name { white-space: nowrap; }
.language-flag { display: inline-block; margin-inline-end: 0.12em; font-size: 0.86em; }
.site-footer {
  width: min(960px, calc(100% - 40px));
  margin: 88px auto 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 8px;
  color: var(--tertiary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px; text-underline-offset: 4px; }
.site-footer > span { color: #777; }

/* Content is visible by default; JavaScript only opts offscreen items into reveals. */
[data-reveal] {
  opacity: 1;
  translate: 0 0;
  transition: opacity 650ms var(--spring), translate 650ms var(--spring);
}

[data-reveal].reveal-pending { opacity: 0; translate: 0 18px; }
[data-reveal].is-visible, [data-reveal]:focus-within { opacity: 1; translate: 0 0; }

.app-button[data-reveal] {
  transition: opacity 650ms var(--spring), translate 650ms var(--spring), background-color 180ms ease;
}
.hero-media[data-reveal] {
  transition: opacity 650ms var(--spring), translate 650ms var(--spring), transform 500ms var(--spring);
}
[data-reveal]:focus-within { transition: none; }

@media (hover: hover) and (pointer: fine) {
  .contact-link:hover, .community-link:hover, .site-footer a:hover { color: #111; text-decoration: underline; }
  .language-picker:hover { background: #f5f5f5; }
  .app-button:hover { background: #000; }
  .header-downloads .app-button:hover { background: #f5f5f5; box-shadow: none; }
}

@media (max-width: 920px) {
  .site-header { width: calc(100% - 48px); gap: 16px; }
  .brand { font-size: 24px; }
  .nav-links { gap: 16px; }
  .contact-link, .community-link { font-size: 15px; }
  .app-button--small { min-width: 136px; min-height: 46px; gap: 10px; font-size: 15px; padding: 0 16px; }
  .hero h1 { max-width: 760px; }
  .stats { gap: 28px; }
  .hero-media { width: calc(100% - 40px); border-radius: 36px; }
  .feature-grid { width: min(440px, calc(100% - 48px)); grid-template-columns: minmax(0, 1fr); margin-top: 56px; }
  .exam-widget { min-height: 400px; }
  .mini-widget { min-height: 200px; }
}

@media (max-width: 800px) {
  html { scroll-padding-top: 24px; }
  .site-header { position: relative; top: auto; width: calc(100% - 40px); margin-top: 20px; grid-template-columns: 1fr auto; gap: 12px 8px; }
  .site-header::before { display: none; }
  .language-picker { grid-column: 2; grid-row: 1; }
  .nav-links { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; width: 100%; flex-wrap: wrap; gap: 8px 16px; }
  .header-downloads { margin-left: auto; }
  .header-downloads .app-button { min-width: 0; max-width: none; }
}

@media (max-width: 620px) {
  .brand { font-size: 24px; }
  .hero { padding-top: 48px; }
  .hero h1, .features-section h2, .language-section h2 { width: calc(100% - 40px); font-size: clamp(29px, 8vw, 42px); line-height: 1.13; letter-spacing: -0.03em; }
  .hero > .download-actions { margin-top: 36px; }
  .download-actions { width: min(420px, calc(100% - 32px)); gap: 10px; }
  .app-button--large { min-width: 0; min-height: 58px; gap: 10px; padding: 0 12px; font-size: 16px; }
  .app-button--large img { width: 16px; height: 20px; }
  .app-button--large .google-play-icon { width: 20px; height: 20px; }
  .stats { --stat-scale: 1; width: calc(100% - 32px); margin-top: 32px; gap: 12px; }
  .hero-media { width: calc(100% - 24px); margin-top: 48px; border-radius: 28px; }
  .feature-grid { width: min(440px, calc(100% - 32px)); margin-top: 40px; gap: 12px; }
  .exam-widget { min-height: 340px; padding: 20px 16px 24px; border-radius: 24px; }
  .widget-title { padding: 0 2px; }
  .widget-title h3, .mini-widget h3 { font-size: 17px; }
  .widget-title p { font-size: 15px; }
  .metric-grid { padding-top: 60px; gap: 8px; }
  .metric { padding: 12px 14px; border-radius: 14px; }
  .metric strong { font-size: 30px; }
  .metric span { font-size: 12px; }
  .mini-widgets { gap: 12px; }
  .mini-widget { min-height: 174px; padding: 16px; border-radius: 24px; }
  .mini-widget p { font-size: 14px; }
  .mini-icon { width: 60px; height: 60px; margin-bottom: 12px; }
  .mini-icon--favorite, .mini-icon--mistakes { width: 66px; }
  .language-section > .download-actions { margin-top: 40px; }
  .site-footer { margin-top: 64px; margin-bottom: 24px; gap: 0 12px; font-size: 14px; }
  .site-footer a { justify-content: center; }
  .site-footer > span { display: none; }
}

@media (max-width: 360px) {
  .site-header { width: calc(100% - 32px); }
  .brand { font-size: 21px; }
  .nav-links { column-gap: 12px; }
  .contact-link, .community-link { font-size: 14px; }
  .header-downloads .app-button { padding: 0 12px; }
  .app-button--small { font-size: 14px; }
  .app-button--large { gap: 8px; font-size: 15px; }
  .app-button--large .google-play-icon { width: 18px; height: 18px; }
  .hero h1, .features-section h2, .language-section h2 { width: calc(100% - 32px); }
  .stats { --stat-scale: 0.9; width: calc(100% - 32px); gap: 8px; }
  .feature-grid { width: calc(100% - 24px); }
  .exam-widget { padding: 18px 12px 20px; }
  .mini-widget { padding: 14px; }
  .mini-widget h3 { font-size: 16px; }
  .mini-widget p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-reveal].reveal-pending { opacity: 1; translate: none; }
  .hero-media, .app-button, .app-button:hover, .app-button:active { transform: none; }
  .phone-screen, .hand-phone { transform: translateX(-50%); }
}

@media (forced-colors: active) {
  .mockup-lights { display: none; }
  .app-button, .exam-widget, .mini-widget { border: 1px solid ButtonText; }
  a:focus-visible, .language-picker:focus-within { outline-color: Highlight; }
}

@media print {
  .site-header { position: static; }
  .mockup-lights { display: none; }
  [data-reveal], [data-reveal].reveal-pending { opacity: 1; translate: none; }
  .hero-media, .app-button { transform: none; }
  .phone-screen, .hand-phone { transform: translateX(-50%); }
  .exam-widget, .mini-widget { break-inside: avoid; }
}
