/* Corgi Go website. Mobile first: the base rules are the phone layout, min-width queries add room.
   Colours come from the game and the store banners (sky blue, grass green, cream, ink, corgi orange). */

:root {
  color-scheme: light;
  --ink: #2B2118;          /* text, outlines */
  --ink-soft: #5A4B3E;     /* secondary text, 7.6:1 on cream */
  --cream: #FFF7EC;        /* page */
  --card: #FFFFFF;
  --sky: #E2F3FB;          /* alternate band */
  --sky-deep: #1E9AE0;
  --grass: #4FA84A;
  --orange: #F0892A;       /* decoration only */
  --orange-text: #A84B0B;  /* orange that passes 4.5:1 on cream and white */
  --yellow: #FFD84A;       /* buttons, ink text on it is 12:1 */
  --line: #E8D9C4;
  --radius: 18px;
  --gutter: 16px;
  --display: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

img, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; max-width: 62ch; }

a { color: var(--orange-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

/* Skip link: hidden until focused by keyboard. */
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--yellow); color: var(--ink); font-weight: 700; padding: 12px 18px; border: 3px solid var(--ink); border-radius: 999px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); text-decoration: none; font: 700 1.35rem/1 var(--display); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 999px; }
.nav a:hover { background: var(--sky); color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--orange); }

/* Hero */
.hero { padding-block: 0 40px; }
.hero-art { margin: 0; background: var(--sky); }
.hero-art img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.hero-text { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 24px;
  font: 600 1.1rem/1.2 var(--display); text-decoration: none; color: var(--ink);
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink);
}
.button:hover { color: var(--ink); filter: brightness(1.04); }
.button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.button.secondary { background: var(--card); }
.button svg { width: 22px; height: 22px; flex: none; }
.soon {
  display: inline-flex; align-items: center; min-height: 52px; padding: 10px 20px; border: 2px dashed var(--ink-soft);
  border-radius: 999px; color: var(--ink-soft); font: 600 1.05rem/1.2 var(--display);
}
@media (prefers-reduced-motion: reduce) { .button:active { transform: none; } }

/* Sections */
section { scroll-margin-top: 16px; }
.band { padding-block: 48px; }
.band.alt { background: var(--sky); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

/* Feature cards: one column on phones, two on tablets, four on desktops. */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 20px; }
.feature { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; }
.feature img { width: 112px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); }
.feature div { display: flex; flex-direction: column; gap: 6px; }

/* World section */
.world { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.world figure { margin: 0; }
.world .banner { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; border-radius: var(--radius); border: 3px solid var(--ink); }
.world .text { display: flex; flex-direction: column; gap: 14px; }
.ticks { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

/* Screenshot strip: swipe on phones, wraps into a grid on wide screens. */
.shots { list-style: none; margin: 0; padding: 4px 4px 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.shots li { scroll-snap-align: start; }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shots img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; border: 3px solid var(--ink); background: var(--sky); }
.shots figcaption { font-size: 0.95rem; color: var(--ink-soft); }
.scroll-hint { font-size: 0.95rem; color: var(--ink-soft); }

/* Trailer */
.trailer { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.trailer video { width: min(100%, 360px); aspect-ratio: 9 / 16; border-radius: 22px; border: 3px solid var(--ink); background: var(--ink); }
.trailer .text { display: flex; flex-direction: column; gap: 14px; }

/* Facts list for parents */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.facts li { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.facts strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }

/* FAQ: plain headings and answers, readable by people, screen readers and search crawlers alike. */
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.faq h3 { font-size: 1.2rem; margin-top: 16px; }
.faq h3:first-child { margin-top: 0; }

/* Long text pages (privacy) */
.doc { padding-block: 40px 56px; }
.doc .wrap { max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.doc h2 { font-size: 1.5rem; margin-top: 18px; }
.doc ul { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.doc .meta { color: var(--ink-soft); }
.doc .summary { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }

/* Footer */
.site-footer { background: var(--ink); color: #FFF7EC; padding-block: 32px calc(32px + env(safe-area-inset-bottom)); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.site-footer a { color: var(--yellow); }
.site-footer a:hover { color: #FFFFFF; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 48px; }
.site-footer small { font-size: 0.9rem; color: #E9DCCB; }

/* Tablet */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .features { grid-template-columns: 1fr 1fr; }
  .shots { grid-auto-columns: 34%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .trailer { grid-template-columns: auto 1fr; }
}

/* Desktop */
@media (min-width: 960px) {
  .band { padding-block: 72px; }
  .hero-text { padding-top: 40px; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 1fr; align-content: start; padding: 16px; }
  .feature img { width: 100%; }
  .world { grid-template-columns: 1.25fr 1fr; gap: 40px; }
  .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; scroll-snap-type: none; }
  .scroll-hint { display: none; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

/* Very wide screens: keep the banner from getting taller than the screen. */
@media (min-width: 1400px) {
  .hero-art img { max-height: 620px; }
}
