/*
 * Design Read: marketing page for adult newcomers preparing for a government test. Trust-first,
 * accessibility-critical, calm. Dials 3 / 2 / 4. Same tokens as the app: one teal accent on cool
 * neutrals, system fonts, one radius rule (controls 12, containers 16, language tags full pill).
 * Motion: hover and press feedback only; everything is off under prefers-reduced-motion.
 */
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-muted: #edeff1;
  --border: #d5d9de;
  --text: #16181b;
  --text-secondary: #545a62;
  --accent: #0f766e;
  --on-accent: #ffffff;
  --accent-soft: #e0f2ef;
  --focus: #0f766e;
  --shadow: 0 1px 2px rgb(22 24 27 / 6%), 0 8px 24px rgb(15 118 110 / 8%);
  --radius-control: 12px;
  --radius-container: 16px;
  --gutter: 20px;
  --max: 1120px;
  --nav-h: 64px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --surface: #181b1e;
    --surface-muted: #22262a;
    --border: #33383e;
    --text: #eceef0;
    --text-secondary: #a3a9b0;
    --accent: #4fb8a8;
    --on-accent: #0f1113;
    --accent-soft: #123b37;
    --focus: #4fb8a8;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: var(--radius-control);
  z-index: 100;
}
.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Navigation: one line, 64px */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-links {
  display: none;
  gap: 24px;
  margin-inline-start: auto;
  list-style: none;
  padding: 0;
  margin-block: 0;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-start: auto;
}
.lang-switch {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 4px;
  white-space: nowrap;
}
.lang-switch:hover {
  color: var(--text);
}

/* Buttons: controls use radius 12 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-quiet {
  color: var(--text);
  border-color: var(--border);
  background: transparent;
}
.btn-quiet:hover {
  background: var(--surface-muted);
}
.btn-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

/* Hero: fits the first viewport, headline max two lines at desktop */
.hero {
  padding-block: 40px 56px;
}
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.125rem, 6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 16ch;
}
.hero p {
  margin: 20px 0 0;
  font-size: 1.1875rem;
  color: var(--text-secondary);
  max-width: 34rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.shot {
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  overflow: hidden;
}
.hero .shot {
  width: min(100%, 300px);
  justify-self: center;
}

/* Sections */
.section {
  padding-block: clamp(56px, 8vw, 96px);
}
.section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 22ch;
}
.lede {
  margin: 16px 0 0;
  color: var(--text-secondary);
  max-width: 65ch;
}

/* Plain two-by-two facts: spacing and a top rule, no cards */
.facts {
  display: grid;
  gap: 28px 48px;
  margin: 40px 0 0;
  padding: 0;
}
.facts div {
  border-top: 2px solid var(--accent);
  padding-top: 16px;
}
.facts dt {
  font-weight: 700;
  font-size: 1.125rem;
}
.facts dd {
  margin: 8px 0 0;
  color: var(--text-secondary);
}

/* Bento: exactly three cells, each with a different surface */
.bento {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.tile {
  border-radius: var(--radius-container);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}
.tile h3 {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.tile p {
  margin: 8px 0 0;
  max-width: 44ch;
}
.tile .shot {
  width: min(100%, 240px);
  border-radius: 24px;
}
.tile-big {
  background: var(--accent-soft);
}
.tile-big p {
  color: var(--text);
}
.tile-plain {
  background: var(--surface);
  border: 1px solid var(--border);
}
.tile-plain p {
  color: var(--text-secondary);
}
.tile-accent {
  background: var(--accent);
  color: var(--on-accent);
}
.tile-accent .shot {
  border-color: transparent;
}

/* Languages: native names as pills (the one pill use on the page) */
.split {
  display: grid;
  gap: 40px;
  align-items: center;
}
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.langs li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.note {
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 60ch;
}
.split .shot {
  width: min(100%, 280px);
  justify-self: center;
}

/* Price: two panels, the paid one carries the accent */
.price-grid {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.panel {
  border-radius: var(--radius-container);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 28px;
}
.panel-full {
  border: 2px solid var(--accent);
}
.panel h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}
.panel ul {
  margin: 0;
  padding-inline-start: 1.25rem;
  display: grid;
  gap: 10px;
}
.panel li::marker {
  color: var(--accent);
}

/* FAQ: native details, readable measure */
.faq {
  margin-top: 32px;
  max-width: 760px;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-child {
  border-top: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  inset-inline-end: 8px;
  top: 14px;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
}
.faq details[open] summary::after {
  content: '-';
}
.faq details p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* Download band */
.band {
  background: var(--accent-soft);
  border-radius: var(--radius-container);
  padding: clamp(28px, 5vw, 56px);
}
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 8px 22px;
  border-radius: var(--radius-control);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}
.store small {
  font-weight: 400;
  font-size: 0.8125rem;
}
.store[aria-disabled='true'] {
  cursor: default;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding-block: 40px 56px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
footer p {
  margin: 0 0 20px;
  max-width: 70ch;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Legal pages */
.legal {
  padding-block: 48px 72px;
  max-width: 760px;
}
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.legal h2 {
  margin: 36px 0 8px;
  font-size: 1.25rem;
}
.legal p {
  margin: 0 0 12px;
}
.legal .muted {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Small phones: the hero carries the same call to action, so the nav keeps only the wordmark and the language link */
@media (max-width: 559px) {
  .nav .btn-small {
    display: none;
  }
  .brand {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

/* Tablet and up */
@media (min-width: 760px) {
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .price-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 32px;
  }
  .nav-links {
    display: flex;
  }
  .nav-actions {
    margin-inline-start: 0;
  }
  .hero {
    padding-block: 56px 80px;
  }
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }
  .hero .shot {
    width: min(100%, 320px);
    justify-self: end;
  }
  .bento {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
  }
  .tile-big {
    grid-column: 1 / span 7;
    grid-row: 1 / span 2;
    justify-content: space-between;
  }
  .tile-big .shot {
    align-self: center;
    width: min(100%, 260px);
  }
  .tile-plain {
    grid-column: 8 / span 5;
    grid-row: 1;
  }
  .tile-accent {
    grid-column: 8 / span 5;
    grid-row: 2;
  }
  .tile-plain,
  .tile-accent {
    flex-direction: row;
    align-items: flex-start;
  }
  .tile-plain .shot,
  .tile-accent .shot {
    width: 120px;
    height: 200px;
    flex: none;
    border-radius: 18px;
  }
  .tile-plain .shot img,
  .tile-accent .shot img {
    height: 100%;
    object-fit: cover;
    object-position: top;
  }
  .split {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
  }
}

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

.shot-empty { aspect-ratio: 9 / 19.5; }

/* Apps menu: a native <details> disclosure, no script */
.menu {
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding: 8px 4px;
  white-space: nowrap;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-start: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.menu[open] summary,
.menu summary:hover {
  color: var(--text);
}
.menu-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-container);
  box-shadow: var(--shadow);
}
.menu-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  color: var(--text);
  text-decoration: none;
}
.menu-list a:hover {
  background: var(--surface-muted);
}
.menu-list span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Studio landing */
.hero-studio {
  padding-block: 72px 56px;
}
.hero-studio h1 {
  max-width: 18ch;
}
.app-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 16px;
}
.app-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-container);
  color: var(--text);
  text-decoration: none;
}
.app-card:hover {
  box-shadow: var(--shadow);
}
.app-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.02em;
}
.app-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.app-body strong {
  font-size: 1.1875rem;
}
.app-body span {
  color: var(--text-secondary);
}
.app-body small {
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.app-more {
  margin-inline-start: auto;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.contact-email {
  align-self: center;
  color: var(--text-secondary);
}
@media (max-width: 559px) {
  .app-card {
    flex-wrap: wrap;
  }
  .app-more {
    margin-inline-start: 0;
  }
}
