/* worldpuzzle.app - tokens mirror the app's DESIGN.md (Palette in Theme.swift). */
:root {
  --navy: #1B2442;
  --navy-deep: #11172D;
  --paper: #FAF6EF;
  --card: #FFFFFF;
  --ink-2: #5D6A86;
  --line: #E8E3DA;
  --coral: #F6573F;
  --coral-deep: #CB3620;
  --gold: #F5B533;
  --display: "Fraunces", "New York", Georgia, "Times New Roman", serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px;
  --measure: 38rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--navy); font: 17px/1.55 var(--text); }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--coral-deep); text-underline-offset: 3px; }
a:focus-visible, .cta:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-variation-settings: "SOFT" 100; line-height: 1.08; margin: 0; }

/* Top bar sits over the navy hero */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: var(--s5) max(var(--s5), env(safe-area-inset-left)); color: #fff; }
.brand { display: flex; align-items: center; gap: var(--s3); color: #fff; text-decoration: none; font: 600 18px var(--display); }
.brand img { border-radius: 8px; }
.bar nav { display: flex; gap: var(--s5); }
.bar nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 15px; }
.bar nav a:hover { color: #fff; }

/* Hero: the painting assembles behind a phone playing real gameplay */
.hero { position: relative; overflow: hidden; background: var(--navy-deep); color: #fff; min-height: min(100svh, 940px);
  display: grid; align-items: center; padding: 104px var(--s5) var(--s10); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(17,23,45,.92) 0%, rgba(17,23,45,.55) 55%, rgba(17,23,45,.25) 100%); }
[dir="rtl"] .hero::after { background: linear-gradient(270deg, rgba(17,23,45,.92) 0%, rgba(17,23,45,.55) 55%, rgba(17,23,45,.25) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s10); align-items: center; }
.hero h1 { font-size: clamp(56px, 9vw, 112px); font-weight: 750; letter-spacing: -.02em; }
.lede { font: 500 clamp(22px, 2.6vw, 30px)/1.25 var(--display); margin: var(--s5) 0 var(--s3); max-width: 22ch; }
.sub { color: rgba(255,255,255,.78); max-width: var(--measure); margin: 0 0 var(--s7); }

.cta { display: inline-flex; align-items: center; min-height: 52px; padding: 0 var(--s6); border-radius: 999px;
  background: var(--coral); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
.cta:hover { background: #E84A32; }
.cta-soon { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; cursor: default; }
.band-paper .cta-soon, .pass .cta-soon { border-color: var(--navy); color: var(--navy); }

/* Phone frame around real screens and video */
.phone { width: min(340px, 78vw); margin: 0 auto; padding: 10px; border-radius: 48px; background: #0E0F14;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 0 0 2px #3A3D4A; }
.phone img, .phone video { width: 100%; height: auto; border-radius: 38px; }
.phone-hero { transform: rotate(-2deg); }

/* Content bands */
main { display: block; }
.band { padding: var(--s10) var(--s5); max-width: 1120px; margin: 0 auto; }
.band h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; max-width: 18ch; }
.section-lede { color: var(--ink-2); max-width: var(--measure); margin: var(--s4) 0 var(--s8); }

/* Postcards: tilted polaroids, like the app's Complete screen */
.postcards { list-style: none; padding: var(--s4) 0 var(--s6); margin: 0 auto; display: flex; gap: var(--s5);
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.card { flex: 0 0 200px; scroll-snap-align: center; background: var(--card); padding: var(--s3) var(--s3) var(--s4);
  border-radius: 8px; box-shadow: 0 12px 28px rgba(27,36,66,.16); }
.card:nth-child(odd) { transform: rotate(-2deg); }
.card:nth-child(even) { transform: rotate(1.5deg) translateY(var(--s3)); }
.card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.card-place { display: block; margin-top: var(--s3); font: 600 18px var(--display); }
.card-country { display: block; color: var(--ink-2); font-size: 14px; }

/* Screen + copy */
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--s10); align-items: center; }
.split-flip .phone { order: 2; }
.split-copy p { max-width: var(--measure); color: var(--ink-2); }
.split-copy h2 { margin-bottom: var(--s6); }
.facts { margin: 0; display: grid; gap: var(--s5); }
.facts dt { font: 600 21px var(--display); }
.facts dd { margin: var(--s1) 0 0; color: var(--ink-2); max-width: var(--measure); }

/* World Pass */
.pass { text-align: start; }
.pass p { max-width: var(--measure); color: var(--ink-2); }
.pass h2 { margin-bottom: var(--s5); }
.ticks { list-style: none; padding: 0; margin: var(--s5) 0; display: grid; gap: var(--s2); }
.ticks li { padding-inline-start: var(--s7); position: relative; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 4px #FCE3A6; }
.small { font-size: 14px; color: var(--ink-2); }
.pass .cta { margin-top: var(--s5); }

/* Localized pages: store description as prose */
.prose { max-width: 44rem; }
.prose p { margin: 0 0 var(--s5); }

/* Legal pages */
.legal { max-width: 44rem; margin: 0 auto; padding: 136px var(--s5) var(--s10); }
.legal h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: var(--s3); }
.legal h2 { font-size: 26px; margin: var(--s8) 0 var(--s3); }
.legal h3 { font: 600 19px var(--text); margin: var(--s6) 0 var(--s2); }
.legal p, .legal li { color: #2E3752; }
body:has(.legal) .bar { position: absolute; color: var(--navy); background: var(--navy); }

/* Footer */
.foot { background: var(--navy); color: rgba(255,255,255,.8); padding: var(--s9) var(--s5) var(--s8); }
.foot-row { max-width: 1120px; margin: 0 auto var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.foot a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-meta a { font-size: 15px; font-weight: 600; }
.foot-note { max-width: 1120px; margin: 0 auto; font-size: 13px; color: rgba(255,255,255,.6); }

@media (max-width: 860px) {
  .hero { padding-top: 96px; min-height: auto; }
  .hero-inner, .split { grid-template-columns: 1fr; gap: var(--s8); }
  .hero-copy { text-align: start; }
  .split-flip .phone { order: 0; }
  .phone-hero { width: min(280px, 70vw); }
  .bar nav { gap: var(--s4); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-hero { transform: none; }
  * { scroll-behavior: auto; }
}
