/* ThisWay Studios — site styles. Brand tokens are documented in _docs/brand.md. */
:root {
  --ink: #1d1b3a;
  --ink-2: #2b2852;
  --ink-soft: #5b587a;
  --gold: #faad1c;
  --gold-deep: #c27a00;
  --sea: #1fb5b0;
  --sea-deep: #0f7f7c;
  --coral: #ff6b5b;
  --coral-deep: #d9442f;
  --sand: #f6d79a;
  --cream: #fff4e0;
  --paper: #fffaf2;
  --line: #efe2c6;
  --white: #ffffff;

  --font-display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1120px;
  --gutter: 24px;
  --radius: 20px;
  --radius-lg: 28px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

a { color: var(--sea-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 999px; z-index: 10;
}
.skip-link:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: var(--cream); border-bottom: 1px solid #2c2952; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 42px; height: 42px; }
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; line-height: 1;
  color: var(--cream); white-space: nowrap;
}
.wordmark .way { color: var(--gold); }
.wordmark .studios {
  font-weight: 500; font-size: .62em; letter-spacing: .18em; text-transform: uppercase;
  margin-left: .35em; opacity: .85; vertical-align: .18em;
}
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--cream); text-decoration: none; font-weight: 500; font-size: 1rem;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover { background: var(--ink-2); color: var(--white); }
.nav a[aria-current="page"] { background: var(--ink-2); color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1;
  padding: 16px 26px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-deep); }
.btn-primary:hover { color: var(--ink); transform: translateY(2px); box-shadow: 0 3px 0 var(--gold-deep); }
.btn-ghost { border-color: rgba(255, 244, 224, .5); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); color: var(--white); }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: 0 5px 0 #0c0b1c; }
.btn-ink:hover { color: var(--white); transform: translateY(2px); box-shadow: 0 3px 0 #0c0b1c; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(250, 173, 28, .16), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(31, 181, 176, .18), transparent 45%),
    var(--ink);
  color: var(--cream);
  padding: 56px 0 96px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.hero h1 { color: var(--white); }
.hero h1 .hl { color: var(--gold); }
.hero .lede { font-size: 1.2rem; color: #e9e3d4; max-width: 34em; margin-bottom: 30px; }

.postcard {
  position: relative; background: var(--cream); padding: 14px 14px 18px; border-radius: 22px;
  transform: rotate(2.5deg); box-shadow: 0 24px 50px rgba(0, 0, 0, .35);
}
.postcard img { border-radius: 12px; width: 100%; }
.postcard figcaption {
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.05rem;
  padding: 12px 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.sticker {
  position: absolute; top: -18px; left: -18px; transform: rotate(-10deg);
  background: var(--coral); color: var(--white); font-family: var(--font-display); font-weight: 600;
  font-size: .95rem; padding: 10px 16px; border-radius: 999px; box-shadow: 0 4px 0 var(--coral-deep);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-cream { background: var(--cream); }
.section-ink { background: var(--ink); color: var(--cream); }
.section-ink h2 { color: var(--white); }
.section-head { max-width: 40em; margin-bottom: 44px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-ink .section-head p { color: #d9d3c4; }
.kicker {
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sea-deep); margin-bottom: 10px; display: block;
}
.section-ink .kicker { color: var(--gold); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.card p { color: var(--ink-soft); margin: 0; }
.icon-badge {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
}
.icon-badge svg { width: 28px; height: 28px; }
.bg-gold { background: #fff0cf; color: var(--gold-deep); }
.bg-sea { background: #d8f4f2; color: var(--sea-deep); }
.bg-coral { background: #ffe1dc; color: var(--coral-deep); }

/* Feature game block */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.feature-art { background: #bfe9fb; display: flex; align-items: center; }
.feature-art img { width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: 44px; }
.game-title {
  font-family: var(--font-display); font-weight: 700; color: #e39a2e; letter-spacing: .01em;
  text-shadow: 0 3px 0 #b5701b;
  margin: 0 0 6px;
}
.feature .game-title { font-size: 2.6rem; }
.tagline { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--sea-deep); margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 28px; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); box-shadow: inset 0 0 0 4px #fff0cf;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
  font-size: .85rem; font-weight: 700; letter-spacing: .02em; padding: 6px 12px; border-radius: 999px;
  background: var(--cream); color: var(--ink); border: 1.5px solid var(--line);
}
.pill-soon { background: var(--ink); color: var(--gold); border-color: var(--ink); }

/* Split / about strip */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.split-even { grid-template-columns: 1fr 1fr; }
.quote-card {
  background: var(--ink); color: var(--cream); border-radius: var(--radius-lg); padding: 36px;
  font-family: var(--font-display); font-size: 1.4rem; line-height: 1.35; font-weight: 500;
}
.quote-card .hl { color: var(--gold); }

/* Contact band */
.cta-band {
  background: var(--gold); border-radius: var(--radius-lg); padding: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; font-size: 1.1rem; }

/* ---------- Game page ---------- */
.game-hero { background: linear-gradient(#6fcdf5, #d9f3ff 70%); padding: 56px 0 0; overflow: hidden; }
.game-hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: end; }
.game-hero .game-title { font-size: clamp(3rem, 7vw, 5rem); color: #f3b547; text-shadow: 0 4px 0 #b5701b, 0 10px 24px rgba(0,0,0,.12); }
.game-hero .tagline { font-size: 1.5rem; color: var(--ink); }
.game-hero-copy { padding-bottom: 64px; }
.game-hero-copy p { color: var(--ink-2); max-width: 30em; }
.game-hero-art img { margin-bottom: -4px; border-radius: 28px 28px 0 0; border: 6px solid var(--cream); border-bottom: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--white); border-radius: var(--radius); padding: 28px; border: 2px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--gold); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  margin-bottom: 16px;
}
.step p { color: var(--ink-soft); margin: 0; }

.beaches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.beach { border-radius: var(--radius); padding: 20px 18px; color: var(--ink); min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.beach h3 { font-size: 1.1rem; margin: 0 0 4px; }
.beach p { font-size: .9rem; margin: 0; opacity: .85; }
.beach-city   { background: linear-gradient(160deg, #8fd8ff, #f6d79a); }
.beach-jungle { background: linear-gradient(160deg, #3fd1c4, #ffc9b0); }
.beach-forest { background: linear-gradient(160deg, #7cc8a5, #f4e2bb); }
.beach-arctic { background: linear-gradient(160deg, #c7e6ff, #eef4f8); }
.beach-desert { background: linear-gradient(160deg, #ffb36b, #f9dc8e); }
.night-note {
  margin-top: 18px; background: var(--ink); color: var(--cream); border-radius: var(--radius); padding: 20px 24px;
  display: flex; gap: 14px; align-items: center;
}
.night-note strong { color: var(--gold); font-family: var(--font-display); font-weight: 600; }

.ralph { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; }
.ralph-art { background: var(--cream); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }

/* ---------- Prose pages (privacy, terms, support) ---------- */
.page-head { background: var(--ink); color: var(--cream); padding: 56px 0 64px; }
.page-head h1 { color: var(--white); font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin-bottom: 10px; }
.page-head p { color: #d9d3c4; font-size: 1.15rem; margin: 0; max-width: 38em; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .meta { color: var(--ink-soft); font-size: .95rem; }
.note {
  background: var(--cream); border-left: 5px solid var(--gold); border-radius: 12px; padding: 16px 20px; margin: 24px 0;
}

.faq details { background: var(--white); border: 2px solid var(--line); border-radius: 16px; padding: 4px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1.5px solid var(--line); margin-bottom: 12px; }
.faq details p { color: var(--ink-soft); }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 56px; }
.contact-card h2 { font-size: 1.4rem; margin-bottom: 6px; }
.contact-card .email { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; word-break: break-word; }


/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc9b9; padding: 56px 0 36px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.site-footer h4 { font-family: var(--font-display); color: var(--white); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cfc9b9; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-base { border-top: 1px solid #34315c; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .split-even, .feature, .game-hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-bottom: 72px; }
  .postcard { max-width: 560px; margin: 12px auto 0; }
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .beaches { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .game-hero-copy { padding-bottom: 8px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 14px; }
  .nav { margin-left: -14px; }
  .section { padding: 64px 0; }
  .cards, .steps, .contact-grid { grid-template-columns: 1fr; }
  .feature-body, .cta-band { padding: 28px; }
  .ralph { grid-template-columns: 1fr; }
  .ralph-art { max-width: 200px; }
  .sticker { left: 8px; }
  .postcard { transform: rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
