/*
 * Fruit Quest — orchard styling.
 *
 * The palette is the key art's: apple red, mango yellow, leaf green, sky blue,
 * and the wooden sign the title sits on. Light mode is a sunny cream; dark mode
 * is the same orchard after sunset — deep green-black, not grey — so the fruit
 * colours still read as fruit against it.
 *
 * Every rule after the colour-mode block is written once against tokens and
 * never branches. Neither does the MARKUP: the server does not know which mode
 * the visitor is in, so a theme that rendered different elements per mode would
 * be guessing, and wrong for the first frame.
 */

/* -------------------------------------------------------------------------
 * Colour modes — three blocks, and the order of them is the whole mechanism.
 *
 *   1. `:root`                     — LIGHT, the base. Applies when nothing else does.
 *   2. `prefers-color-scheme: dark` — the OS speaking, honoured only while the
 *                                     visitor has not explicitly chosen light.
 *   3. `[data-theme="dark"]`       — an explicit choice, which beats the OS.
 *
 * The dark tokens are written twice, in 2 and 3, and there is no way around it:
 * plain CSS cannot name a block of declarations and apply it under two different
 * conditions. Keep the two lists identical — build.mjs refuses to build when
 * they drift.
 * ---------------------------------------------------------------------- */

:root {
  /* Mode-independent. The accent gets three tokens rather than one, because a
     single green cannot be legible in both roles: leaf green carries a BUTTON
     but is too light to be small TEXT on cream.
       --fq-accent      the colour of accent surfaces (buttons, rules, marks)
       --fq-on-accent   what sits on top of one
       --fq-accent-text accent used as text on the page; darker in light mode */
  --fq-accent: #4caf3a;
  --fq-on-accent: #ffffff;

  /* The fruit. Same in both modes — an apple is red at night too. */
  --fq-apple: #e63946;
  --fq-mango: #f7b733;
  --fq-sky: #4fb3e8;
  --fq-wood: #8b5a2b;
  --fq-leaf: #4caf3a;

  --fq-radius: 22px;
  --fq-radius-sm: 14px;
  --fq-radius-lg: 30px;

  /* ---- Rhythm ---- one band height for the whole site. */
  --fq-band: clamp(48px, 5.5vw, 88px);
  --fq-band-sm: clamp(28px, 3vw, 44px);
  --fq-head-gap: clamp(26px, 2.8vw, 40px);
  --fq-gap-card: clamp(32px, 3.6vw, 56px);

  /* ---- LIGHT (base) ---- */
  --fq-bg: #fff8e8;
  --fq-surface: #ffffff;
  --fq-panel: #fff1cf;
  --fq-panel-2: #ffe7b3;
  --fq-tint: #f2f8e6;
  --fq-line: #eadbb8;
  --fq-ink: #2b2416;
  --fq-muted: #6e5f47;
  --fq-shadow: 0 18px 44px rgba(90, 60, 10, 0.12);
  /* #4caf3a is ~2.6:1 on white — a surface, not a text colour. This is the
     same hue taken down to ~5.5:1. */
  --fq-accent-text: #2e7d22;
  --fq-accent-soft: #e4f4dc;
  --fq-sky-soft: #dff1fb;
  --fq-mango-soft: #fff0c8;
  --fq-apple-soft: #fde1e3;
  --fq-hero-a: #dff1fb;
  --fq-hero-b: #fff8e8;
}

/* ---- DARK, from the OS, while no explicit light choice is in force ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fq-bg: #101a10;
    --fq-surface: #172317;
    --fq-panel: #1f2e1e;
    --fq-panel-2: #283b26;
    --fq-tint: #142014;
    --fq-line: #2e402c;
    --fq-ink: #f3eedd;
    --fq-muted: #a9b59c;
    --fq-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --fq-accent-text: #8be07a;
    --fq-accent-soft: #1e3a1a;
    --fq-sky-soft: #14303f;
    --fq-mango-soft: #3d2f0f;
    --fq-apple-soft: #3f1a1e;
    --fq-hero-a: #14303f;
    --fq-hero-b: #101a10;
  }
}

/* ---- DARK, chosen explicitly. Must match the block above. ---- */
:root[data-theme="dark"] {
  --fq-bg: #101a10;
  --fq-surface: #172317;
  --fq-panel: #1f2e1e;
  --fq-panel-2: #283b26;
  --fq-tint: #142014;
  --fq-line: #2e402c;
  --fq-ink: #f3eedd;
  --fq-muted: #a9b59c;
  --fq-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --fq-accent-text: #8be07a;
  --fq-accent-soft: #1e3a1a;
  --fq-sky-soft: #14303f;
  --fq-mango-soft: #3d2f0f;
  --fq-apple-soft: #3f1a1e;
  --fq-hero-a: #14303f;
  --fq-hero-b: #101a10;
}

/* -------------------------------------------------------------------------
 * Base
 * ---------------------------------------------------------------------- */

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

.fq {
  min-height: 100vh;
  background: var(--fq-bg);
  color: var(--fq-ink);
  /* A rounded face where one is installed (Nunito, Quicksand), the system face
     otherwise. Nothing is downloaded: a children's site should not spend a
     reader's first second on a webfont. `ui-rounded` / SF Pro Rounded is
     deliberately NOT in the list: it has no precomposed Vietnamese glyphs, so
     "quyền" renders with its tone mark floating beside the letter. */
  font-family: "Nunito", "Quicksand", "Varela Round", "Segoe UI", system-ui, -apple-system,
    "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* `:where()` so a plain class like `.fq__store` can recolour a link — `.fq a`
   at (0,1,1) would silently beat every (0,1,0) rule below it. */
:where(.fq) a {
  color: inherit;
  text-decoration: none;
}

.fq img,
.fq svg {
  display: block;
  max-width: 100%;
}

.fq button,
.fq input,
.fq textarea,
.fq select {
  font: inherit;
}

/* `:where()` because this is a RESET, and a reset must never outrank the rules
   that come after it. */
:where(.fq) :where(h1, h2, h3, h4, p, ul, ol, dl, figure) {
  margin: 0;
}

.fq h1,
.fq h2,
.fq h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

.fq h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.fq h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.fq h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.fq__container {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

/* The reading column. Centred: this theme's page heads are centred too, so a
   centred column shares their axis. */
.fq__measure {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
}

.fq__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--fq-accent-soft);
  padding: 6px 14px;
  color: var(--fq-accent-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fq__lead {
  color: var(--fq-muted);
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.6;
}

.fq__empty {
  color: var(--fq-muted);
  text-align: center;
}

.fq__skip {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-200%);
  border-radius: var(--fq-radius-sm);
  background: var(--fq-accent);
  color: var(--fq-on-accent);
  padding: 10px 18px;
  font-weight: 700;
}

.fq__skip:focus {
  transform: translateY(0);
}

.fq :focus-visible {
  outline: 3px solid var(--fq-sky);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------
 * Buttons and links
 *
 * "Juicy" buttons: a pill with a darker bottom edge, so it looks pressable to a
 * reader who has only ever seen buttons in games. The edge is a box-shadow so
 * the pill keeps its size; on :active it collapses and the pill drops 2px.
 * ---------------------------------------------------------------------- */

.fq__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--fq-accent);
  color: var(--fq-on-accent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--fq-accent) 70%, #000);
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.fq__button:hover {
  filter: brightness(1.06);
}

.fq__button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--fq-accent) 70%, #000);
}

.fq__button--small {
  padding: 10px 18px;
  font-size: 14.5px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--fq-accent) 70%, #000);
}

.fq__button--ghost {
  background: var(--fq-surface);
  color: var(--fq-accent-text);
  box-shadow: inset 0 0 0 2px var(--fq-line), 0 4px 0 var(--fq-line);
}

.fq__button--ghost:hover {
  filter: none;
  box-shadow: inset 0 0 0 2px var(--fq-accent), 0 4px 0 var(--fq-line);
}

.fq__button--ghost:active {
  box-shadow: inset 0 0 0 2px var(--fq-accent), 0 1px 0 var(--fq-line);
}

.fq__text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fq-accent-text);
  font-weight: 800;
}

.fq__text-link span {
  transition: transform 0.15s ease;
}

.fq__text-link:hover span {
  transform: translateX(3px);
}

.fq__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}

.fq__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The store badges: black in light mode, as the stores draw them; a lifted
   panel in dark mode, where a black pill on black-green would vanish. */
.fq__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.fq__store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: var(--fq-radius-sm);
  background: var(--fq-ink);
  color: var(--fq-bg);
  padding: 8px 18px 8px 14px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.15;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.fq__store .fq__icon {
  width: 26px;
  height: 26px;
}

.fq__store:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.fq__store small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.fq__store--soon {
  background: var(--fq-panel);
  color: var(--fq-muted);
  box-shadow: inset 0 0 0 2px var(--fq-line);
  cursor: default;
}

.fq__store--soon:hover {
  transform: none;
  filter: none;
}

/**
 * The header's "Get the game" points at `#get`, the hero's row of badges. When
 * it is the target the two badges wobble for a couple of seconds — a child on
 * the other side of the phone sees where to look. `scroll-margin-top` keeps the
 * row clear of the sticky header, with the headline still in view above it.
 */
.fq__stores:target {
  scroll-margin-top: 140px;
}

.fq__stores:target .fq__store {
  animation: fq-wobble 0.7s ease-in-out 0.2s 3;
  transform-origin: 50% 80%;
}

.fq__stores:target .fq__store:nth-child(2) {
  animation-delay: 0.35s;
}

@keyframes fq-wobble {
  0%,
  100% {
    transform: rotate(0) scale(1);
  }

  20% {
    transform: rotate(-5deg) scale(1.06);
  }

  40% {
    transform: rotate(5deg) scale(1.06);
  }

  60% {
    transform: rotate(-3deg) scale(1.04);
  }

  80% {
    transform: rotate(3deg) scale(1.02);
  }
}

.fq__stores--compact {
  margin-top: 0;
}

.fq__stores--compact .fq__store {
  min-height: 44px;
  padding: 6px 14px 6px 12px;
  font-size: 14px;
}

/* -------------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------------- */

.fq__header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 2px solid var(--fq-line);
  background: color-mix(in srgb, var(--fq-bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.fq__header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 20px;
}

.fq__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.fq__brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.fq__brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--fq-apple), var(--fq-mango));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--fq-apple) 35%, transparent);
}

.fq__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.fq__brand-text strong {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.fq__brand-text small {
  color: var(--fq-muted);
  font-size: 12px;
  font-weight: 600;
}

.fq__nav {
  margin-inline-start: auto;
}

.fq__nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}

.fq__nav a {
  display: block;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--fq-muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.fq__nav a:hover {
  background: var(--fq-panel);
  color: var(--fq-ink);
}

.fq__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.fq__nav + .fq__header-actions {
  margin-inline-start: 0;
}

/* The mobile menu control. The checkbox is the state and the label is the
   button. The input is moved off-screen rather than `display: none`, because a
   hidden input is not focusable and the menu would be unreachable by keyboard. */
.fq__nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.fq__nav-btn {
  display: none;
  place-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--fq-line);
  border-radius: 12px;
  background: var(--fq-surface);
  cursor: pointer;
  flex-direction: column;
  flex-shrink: 0;
}

.fq__nav-btn i {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--fq-ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.fq__nav-check:checked ~ .fq__header-actions .fq__nav-btn i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.fq__nav-check:checked ~ .fq__header-actions .fq__nav-btn i:nth-child(2) {
  opacity: 0;
}

.fq__nav-check:checked ~ .fq__header-actions .fq__nav-btn i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.fq__nav-check:focus-visible ~ .fq__header-actions .fq__nav-btn {
  outline: 3px solid var(--fq-sky);
  outline-offset: 2px;
}

.fq__icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--fq-line);
  border-radius: 50%;
  background: var(--fq-surface);
  color: var(--fq-muted);
  font-size: 17px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.fq__icon-btn:hover {
  border-color: var(--fq-accent);
  color: var(--fq-ink);
}

.fq__lang {
  position: relative;
}

.fq__lang > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border: 2px solid var(--fq-line);
  border-radius: 999px;
  background: var(--fq-surface);
  padding: 6px 14px;
  color: var(--fq-muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.fq__lang > summary::-webkit-details-marker {
  display: none;
}

.fq__lang > summary i {
  width: 0;
  height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
}

/* Anchored to the END edge on a wide screen (last thing in the header) and to
   the START edge below the wrap point, where the switcher becomes the first
   thing in the actions row and an end-anchored panel would leave the viewport. */
.fq__lang ul {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 172px;
  max-width: min(260px, calc(100vw - 32px));
  border: 2px solid var(--fq-line);
  border-radius: var(--fq-radius-sm);
  background: var(--fq-surface);
  box-shadow: var(--fq-shadow);
  padding: 6px;
  list-style: none;
}

.fq__lang a {
  display: block;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14.5px;
  font-weight: 700;
}

.fq__lang a:hover,
.fq__lang a[aria-current="page"] {
  background: var(--fq-accent-soft);
  color: var(--fq-accent-text);
}

/* -------------------------------------------------------------------------
 * Sections
 * ---------------------------------------------------------------------- */

.fq__section {
  position: relative;
  padding-block: var(--fq-band);
}

.fq__section--alt {
  background: var(--fq-surface);
}

.fq__section--tint {
  background: var(--fq-tint);
}

/* A scalloped top edge on the tinted bands — the one flourish, and it is a
   gradient, not an image. */
.fq__section--alt::before,
.fq__section--tint::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
  background: radial-gradient(circle at 12px 0, transparent 11px, var(--fq-surface) 12px);
  background-size: 24px 12px;
  pointer-events: none;
}

.fq__section--tint::before {
  background: radial-gradient(circle at 12px 0, transparent 11px, var(--fq-tint) 12px);
  background-size: 24px 12px;
}

/* Rhythm between blocks. Every band pads both sides, so two plain bands in a
   row would stack two gaps (and a notice between them, three). The block that
   FOLLOWS a plain band, a notice or the CTA drops its top padding, so the
   visible gap between neighbours is always one band. Backed bands (alt, tint)
   keep both sides — their colour edge is the boundary — and a notice card gets
   the smaller card gap on both sides. */
.fq__section--plain + .fq__section--plain,
.fq__section--plain + .fq__cta,
.fq__section--plain + .fq__notice,
.fq__cta + .fq__section--plain,
.fq__cta + .fq__notice,
.fq__notice + .fq__notice {
  padding-top: 0;
}

/* The page head fades into the page background, so a plain band right after
   it only needs the small gap. */
.fq__page-head + .fq__section--plain {
  padding-top: var(--fq-band-sm);
}

.fq__section--plain:has(+ .fq__notice),
.fq__cta:has(+ .fq__notice) {
  padding-bottom: var(--fq-gap-card);
}

.fq__notice + .fq__section--plain,
.fq__notice + .fq__cta {
  padding-top: calc(var(--fq-gap-card) - var(--fq-band-sm));
}

/* Japanese headings: no breaks inside a word. Long titles carry a zero-width
   space after the 。 so they still wrap at a sentence edge. */
.fq:lang(ja) h1,
.fq:lang(ja) h2 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.fq__section-head {
  margin-bottom: var(--fq-head-gap);
  max-width: 60ch;
}

.fq__section-head--center {
  margin-inline: auto;
  text-align: center;
}

.fq__section-head .fq__lead {
  margin-top: 14px;
}

.fq__grid {
  display: grid;
  gap: 22px;
}

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

/* Contact cards centre themselves: with the App Store link unset there are two,
   and two cards hugging the left of a three-column grid look like a third fell
   off. */
.fq__grid--contact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  justify-content: center;
}

.fq__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid var(--fq-line);
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
  padding: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.fq__card p {
  color: var(--fq-muted);
  font-size: 15.5px;
}

a.fq__card:hover {
  transform: translateY(-3px);
  border-color: var(--fq-accent);
  box-shadow: var(--fq-shadow);
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */

.fq__hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--fq-hero-a), var(--fq-hero-b));
  padding-block: clamp(44px, 6vw, 96px) clamp(56px, 7vw, 110px);
}

/* Rolling hills along the bottom of the hero: two overlapping ellipses of the
   tint colour, so the key art sits on grass rather than floating on a gradient. */
.fq__hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: auto -20% -60px;
  height: 140px;
  border-radius: 50%;
  background: var(--fq-accent-soft);
  pointer-events: none;
}

.fq__hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 4.5vw, 64px);
}

.fq__hero-copy h1 {
  margin-bottom: 18px;
  max-width: 14ch;
}

.fq__hero-copy .fq__lead {
  max-width: 46ch;
}

.fq__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  list-style: none;
  padding: 0;
}

.fq__badges li {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 800;
}

.fq__badges li:nth-child(3n + 1) {
  background: var(--fq-apple-soft);
  color: var(--fq-apple);
}

.fq__badges li:nth-child(3n + 2) {
  background: var(--fq-mango-soft);
  color: color-mix(in srgb, var(--fq-mango) 60%, var(--fq-ink));
}

.fq__badges li:nth-child(3n) {
  background: var(--fq-sky-soft);
  color: color-mix(in srgb, var(--fq-sky) 55%, var(--fq-ink));
}

.fq__hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
}

.fq__hero-art img {
  width: 100%;
  border-radius: var(--fq-radius-lg);
  box-shadow: var(--fq-shadow);
  transform: rotate(-2deg);
}

/* Three fruit floating around the art, each on its own slow bob. Decorative,
   `aria-hidden`, and switched off under reduced motion. */
.fq__float {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--fq-surface);
  box-shadow: var(--fq-shadow);
  animation: fq-bob 4s ease-in-out infinite;
}

.fq__float .fq__icon {
  width: 34px;
  height: 34px;
  stroke-width: 2;
}

.fq__float--apple {
  top: -18px;
  left: -22px;
  color: var(--fq-apple);
}

.fq__float--mango {
  right: -24px;
  top: 34%;
  color: var(--fq-mango);
  animation-delay: -1.4s;
}

.fq__float--coconut {
  bottom: -14px;
  left: 18%;
  color: var(--fq-wood);
  animation-delay: -2.6s;
}

@keyframes fq-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* -------------------------------------------------------------------------
 * Features
 * ---------------------------------------------------------------------- */

.fq__feature-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
}

.fq__feature-icon .fq__icon {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.fq__feature-icon--1 {
  background: var(--fq-apple);
}

.fq__feature-icon--2 {
  background: var(--fq-mango);
}

.fq__feature-icon--3 {
  background: var(--fq-leaf);
}

.fq__feature-icon--4 {
  background: var(--fq-sky);
}

/* -------------------------------------------------------------------------
 * Gallery
 * ---------------------------------------------------------------------- */

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

.fq__shot-frame {
  border-radius: 18px;
  background: var(--fq-ink);
  padding: 8px;
  box-shadow: var(--fq-shadow);
}

.fq__shot-frame img {
  width: 100%;
  aspect-ratio: 2778 / 1284;
  object-fit: cover;
  border-radius: 12px;
}

.fq__shot figcaption {
  margin-top: 12px;
  color: var(--fq-muted);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}

/* -------------------------------------------------------------------------
 * Steps
 * ---------------------------------------------------------------------- */

.fq__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
  padding: 0;
  counter-reset: fq-step;
}

.fq__step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
  border: 2px solid var(--fq-line);
  padding: 24px;
}

.fq__step p {
  margin-top: 6px;
  color: var(--fq-muted);
  font-size: 15px;
}

.fq__step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fq-mango);
  color: var(--fq-ink);
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--fq-mango) 70%, #000);
}

/* -------------------------------------------------------------------------
 * FAQ
 * ---------------------------------------------------------------------- */

.fq__faq {
  display: grid;
  gap: 12px;
}

.fq__faq details {
  border: 2px solid var(--fq-line);
  border-radius: var(--fq-radius-sm);
  background: var(--fq-surface);
}

.fq__faq details[open] {
  border-color: var(--fq-accent);
}

.fq__faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.fq__faq summary::-webkit-details-marker {
  display: none;
}

.fq__faq summary i {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fq-accent-soft);
}

.fq__faq summary i::before,
.fq__faq summary i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--fq-accent-text);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease;
}

.fq__faq summary i::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.fq__faq details[open] summary i::after {
  transform: translate(-50%, -50%) rotate(0);
}

.fq__faq-answer {
  padding: 0 20px 18px;
  color: var(--fq-muted);
  font-size: 15.5px;
}

/* -------------------------------------------------------------------------
 * Contact cards
 * ---------------------------------------------------------------------- */

.fq__contact {
  color: inherit;
}

.fq__contact-value {
  color: var(--fq-accent-text);
  font-size: 15px;
  word-break: break-word;
}

.fq__contact-note {
  margin-top: 22px;
  color: var(--fq-muted);
  font-size: 14.5px;
  text-align: center;
}

/* -------------------------------------------------------------------------
 * Notice
 * ---------------------------------------------------------------------- */

.fq__notice {
  padding-block: var(--fq-band-sm);
}

.fq__notice-inner {
  display: flex;
  gap: 18px;
  border: 2px solid var(--fq-line);
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
  padding: 24px 26px;
}

.fq__notice-inner h2 {
  font-size: 21px;
}

.fq__notice-inner p {
  margin-top: 8px;
  color: var(--fq-muted);
  font-size: 15.5px;
}

.fq__notice-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
}

.fq__notice-mark .fq__icon {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.fq__notice--info .fq__notice-inner {
  background: var(--fq-sky-soft);
  border-color: color-mix(in srgb, var(--fq-sky) 40%, var(--fq-line));
}

.fq__notice--info .fq__notice-mark {
  background: var(--fq-sky);
}

.fq__notice--good .fq__notice-inner {
  background: var(--fq-accent-soft);
  border-color: color-mix(in srgb, var(--fq-accent) 40%, var(--fq-line));
}

.fq__notice--good .fq__notice-mark {
  background: var(--fq-accent);
}

.fq__notice--warn .fq__notice-inner {
  background: var(--fq-mango-soft);
  border-color: color-mix(in srgb, var(--fq-mango) 50%, var(--fq-line));
}

.fq__notice--warn .fq__notice-mark {
  background: var(--fq-mango);
  color: var(--fq-ink);
}

.fq__notice-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  list-style: none;
  padding: 0;
}

.fq__notice-list li {
  display: flex;
  flex-direction: column;
  font-size: 15px;
}

.fq__notice-list strong {
  font-weight: 800;
}

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

/* -------------------------------------------------------------------------
 * CTA band
 * ---------------------------------------------------------------------- */

.fq__cta {
  padding-block: var(--fq-band);
}

.fq__cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: var(--fq-radius-lg);
  background: linear-gradient(135deg, var(--fq-mango), var(--fq-apple));
  color: #fff;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--fq-shadow);
}

.fq__cta-inner .fq__eyebrow {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.fq__cta-inner .fq__lead {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.fq__cta-actions {
  flex-shrink: 0;
}

.fq__cta-inner .fq__stores {
  margin-top: 0;
}

.fq__cta-inner .fq__store {
  background: var(--fq-ink);
  color: var(--fq-bg);
}

.fq__cta-inner .fq__actions {
  margin-top: 14px;
}

.fq__cta-inner .fq__button {
  background: #fff;
  color: var(--fq-apple);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.fq__cta-inner .fq__button--ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 4px 0 rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------------------------------
 * Pages, posts and prose
 * ---------------------------------------------------------------------- */

.fq__page-head {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--fq-hero-a), var(--fq-bg));
  padding-block: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 56px);
  text-align: center;
}

.fq__page-head > .fq__measure {
  position: relative;
  z-index: 1;
}

.fq__page-head--image .fq__page-head-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.fq__page-head h1 {
  max-width: 22ch;
  margin-inline: auto;
}

.fq__page-head .fq__lead {
  margin-top: 16px;
}

.fq__updated {
  display: inline-block;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--fq-surface);
  border: 2px solid var(--fq-line);
  padding: 6px 14px;
  color: var(--fq-muted);
  font-size: 13.5px;
  font-weight: 700;
}

/* The "in short" box on a legal page. It sits flush under the head and the
   prose follows without a full band gap: the summary is the opening of the
   document, not a section of its own. */
.fq__section--summary {
  padding-block: 0 8px;
}

.fq__summary {
  border: 2px solid color-mix(in srgb, var(--fq-accent) 45%, var(--fq-line));
  border-radius: var(--fq-radius);
  background: var(--fq-accent-soft);
  padding: 22px 26px;
}

.fq__summary h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fq-accent-text);
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fq__summary h2 .fq__icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.fq__summary ul {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-inline-start: 22px;
  font-size: 16px;
  font-weight: 600;
}

.fq__summary li::marker {
  color: var(--fq-accent-text);
}

.fq__section--summary + .fq__section--prose {
  padding-top: var(--fq-band-sm);
}

.fq__post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--fq-muted);
  font-size: 13.5px;
  font-weight: 700;
}

.fq__post-meta > * + *::before {
  content: "·";
  margin-inline-end: 18px;
  color: var(--fq-line);
}

.fq__post-card-date {
  color: var(--fq-muted);
  font-size: 13px;
  font-weight: 700;
}

.fq__post-card h3 a:hover {
  color: var(--fq-accent-text);
}

.fq__post-card .fq__text-link {
  margin-top: auto;
}

.fq__prose {
  font-size: 16.5px;
}

.fq__prose > div > * + * {
  margin-top: 18px;
}

.fq__prose h2 {
  margin-top: 44px;
  font-size: 26px;
}

/* The band above already spaces a heading that opens the prose. */
.fq__prose > div > :first-child {
  margin-top: 0;
}

.fq__prose h3 {
  margin-top: 30px;
  font-size: 19px;
}

.fq__prose p,
.fq__prose li {
  color: var(--fq-muted);
}

.fq__prose strong {
  color: var(--fq-ink);
}

.fq__prose ul,
.fq__prose ol {
  padding-inline-start: 24px;
}

.fq__prose li + li {
  margin-top: 8px;
}

.fq__prose li::marker {
  color: var(--fq-accent-text);
  font-weight: 800;
}

.fq__prose a {
  color: var(--fq-accent-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.fq__prose code {
  border-radius: 6px;
  background: var(--fq-panel);
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.fq__prose blockquote {
  border-inline-start: 4px solid var(--fq-mango);
  margin: 0;
  padding-inline-start: 20px;
  color: var(--fq-ink);
}

.fq__prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.fq__prose th,
.fq__prose td {
  border-bottom: 1px solid var(--fq-line);
  padding: 10px 12px;
  text-align: start;
  vertical-align: top;
}

.fq__prose th {
  color: var(--fq-ink);
  font-weight: 800;
}

.fq__prose img {
  border-radius: var(--fq-radius-sm);
}

.fq__figure img {
  width: 100%;
  border-radius: var(--fq-radius);
  box-shadow: var(--fq-shadow);
}

.fq__figure figcaption {
  margin-top: 12px;
  color: var(--fq-muted);
  font-size: 14px;
  text-align: center;
}

.fq__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.fq__pager a {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 2px solid var(--fq-line);
  border-radius: 50%;
  padding-inline: 8px;
  font-weight: 800;
}

.fq__pager a[aria-current="page"] {
  border-color: var(--fq-accent);
  background: var(--fq-accent);
  color: var(--fq-on-accent);
}

/* -------------------------------------------------------------------------
 * State screens (404 / 500)
 * ---------------------------------------------------------------------- */

.fq__state {
  padding-block: clamp(64px, 10vw, 140px);
  text-align: center;
}

.fq__state p {
  margin-top: 16px;
  color: var(--fq-muted);
  font-size: 17px;
}

.fq__state .fq__actions {
  justify-content: center;
}

.fq__state-art {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: var(--fq-apple-soft);
  padding: 12px 24px 12px 16px;
  color: var(--fq-apple);
  font-size: 22px;
  font-weight: 900;
}

.fq__state-art .fq__icon {
  width: 36px;
  height: 36px;
  stroke-width: 2;
  transform: rotate(-20deg);
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.fq__footer {
  border-top: 2px solid var(--fq-line);
  background: var(--fq-surface);
  padding-block: 60px 32px;
}

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

.fq__footer-about p {
  margin-top: 16px;
  max-width: 42ch;
  color: var(--fq-muted);
  font-size: 14.5px;
}

.fq__footer-build {
  font-weight: 800;
}

.fq__footer-col h2 {
  margin-bottom: 16px;
  color: var(--fq-muted);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fq__footer-col ul {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.fq__footer-col a {
  color: var(--fq-muted);
  font-size: 15px;
  font-weight: 700;
}

.fq__footer-col a:hover {
  color: var(--fq-accent-text);
}

.fq__footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.fq__footer-contact .fq__stores {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Outranks `.fq__footer-col a`, which would otherwise grey the badge text. */
.fq__footer-col .fq__store {
  color: var(--fq-bg);
}

.fq__footer-col .fq__store--soon {
  color: var(--fq-muted);
}

.fq__footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}

.fq__footer-mail .fq__icon {
  width: 20px;
  height: 20px;
}

.fq__footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 26px;
  border-top: 2px solid var(--fq-line);
  padding-top: 22px;
  color: var(--fq-muted);
  font-size: 13.5px;
  font-weight: 600;
}

.fq__footer-bottom div {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.fq__footer-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
}

.fq__builtwith {
  opacity: 0.75;
}

.fq__footer-bottom a:hover {
  color: var(--fq-accent-text);
}

/* -------------------------------------------------------------------------
 * Responsive — one breakpoint per thing that actually breaks.
 * ---------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .fq__hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .fq__hero-copy h1,
  .fq__hero-copy .fq__lead {
    margin-inline: auto;
  }

  .fq__hero-copy .fq__badges,
  .fq__hero-copy .fq__stores,
  .fq__hero-copy .fq__actions {
    justify-content: center;
  }

  .fq__hero-art {
    width: min(100%, 420px);
  }

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

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

  /* The header splits into two bands: brand + controls, then the nav. */
  .fq__header-inner {
    flex-wrap: wrap;
    gap: 12px 14px;
    padding-block: 12px;
  }

  .fq__brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .fq__header-actions {
    margin-inline-start: auto;
  }

  .fq__nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }

  .fq__nav ul {
    flex-wrap: wrap;
    gap: 2px 4px;
  }

  .fq__lang ul {
    inset-inline-start: 0;
    inset-inline-end: auto;
  }
}

@media (max-width: 860px) {
  .fq__container,
  .fq__measure {
    width: calc(100% - 32px);
  }

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

  .fq__cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .fq__cta-actions {
    width: 100%;
  }
}

@media (max-width: 700px) {
  /**
   * The nav becomes a disclosure under the hamburger. Above this width every
   * label fits on the second header band; below it, five labels wrap onto
   * three rows and push the page down, so the row is hidden until asked for.
   */
  .fq__nav {
    display: none;
    padding-bottom: 6px;
  }

  .fq__nav-check:checked ~ .fq__nav {
    display: block;
  }

  .fq__nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .fq__nav a {
    padding: 12px 14px;
    font-size: 16px;
  }

  .fq__nav-btn {
    display: grid;
  }

  .fq__brand-text small {
    display: none;
  }

  /* The header "Get" button gives way to the hamburger on a phone; the store
     buttons in the hero are one thumb-scroll away. */
  .fq__header-actions .fq__button--small {
    display: none;
  }

  .fq__grid--3,
  .fq__gallery,
  .fq__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .fq__stores {
    width: 100%;
  }

  .fq__store {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .fq__notice-inner {
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .fq__footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .fq__footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .fq__float {
    width: 52px;
    height: 52px;
  }

  .fq__float--apple {
    left: -6px;
  }

  .fq__float--mango {
    right: -6px;
  }

  .fq__float .fq__icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 420px) {
  .fq h1 {
    font-size: 32px;
  }

  .fq__store {
    flex-basis: 100%;
  }

  .fq__card,
  .fq__step,
  .fq__summary {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fq *,
  .fq *::before,
  .fq *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fq__float,
  .fq__stores:target .fq__store {
    animation: none;
  }
}

@media print {
  .fq__header,
  .fq__footer,
  .fq__skip,
  .fq__float,
  .fq__stores {
    display: none !important;
  }

  .fq {
    background: #fff;
    color: #000;
  }

  .fq__page-head {
    background: none;
  }
}
