/* smooshvalley.com: tokens from the Smoosh Valley brand standards */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("fonts/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("fonts/fredoka-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #5a3a28;
  --muted: #7a5a4c;
  --cream: #fff4e2;
  --cream-2: #fbe9d0;
  --orange: #b5541f;
  --orange-text: #9c4518;
  --orange-lip: #8f4219;
  --white: #ffffff;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 5.6vw, 80px);
  --section-y: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 clamp(17px, 1.2vw, 19px)/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); padding: 12px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

/* Buttons: 48px tall at least, roomy padding */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border-radius: 999px; font: 700 18px/1.15 var(--display); text-decoration: none; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn:active { transform: translateY(3px); }
.btn-orange { background: var(--orange); color: var(--white); box-shadow: 0 4px 0 var(--orange-lip); }
.btn-orange:active { box-shadow: 0 1px 0 var(--orange-lip); }
.btn-soft { background: var(--white); color: var(--ink); box-shadow: 0 4px 0 #e8d4b8, inset 0 0 0 2px #f0dcc0; }
.btn-lg { min-height: 60px; padding: 16px 36px; font-size: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 16px; }

/* Nav: always on top, from the first frame to the footer */
.nav { position: fixed; z-index: 60; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(1100px, calc(100% - 24px));
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 22px;
  background: rgba(255, 244, 226, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 8px 28px rgba(90, 58, 40, .14); }
.nav-logo { display: flex; align-items: center; min-height: 48px; margin-right: auto; }
.nav-logo img { width: 92px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 16px; }
.nav-links a:hover { background: rgba(255, 255, 255, .7); }
.nav-cta { min-height: 48px; padding: 10px 22px; font-size: 16px; }
.nav-menu { display: none; }
@media (max-width: 760px) {
  .nav-logo img { width: 76px; }
  .nav-cta { padding: 10px 18px; }
  .nav-menu { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 48px; height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .8); cursor: pointer; }
  .nav-menu span { display: block; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .2s; }
  .nav-menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav-links { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 8px; border-radius: 20px; background: var(--cream); box-shadow: 0 14px 30px rgba(90, 58, 40, .18); }
  .nav-links.open { display: flex; }
  .nav-links a { min-height: 54px; font-size: 18px; }
}

/* The fly-in */
.fly { position: relative; height: 400vh; background: #f7e6f0; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.layer { position: absolute; inset: 0; will-change: transform, opacity; }
.layer img { width: 100%; height: 100%; object-fit: cover; }
.l2, .l4, .l5, .l3, .whiteout { opacity: 0; }
.whiteout { background: radial-gradient(ellipse at 50% 50%, #fffaf6 30%, #fbeaf2 100%); }
.l4 { transform-origin: 16% 54%; }
.beat { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); width: min(92vw, 900px); text-align: center; pointer-events: none; }
.b1 { top: 12svh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-wordmark { width: min(520px, 78vw); filter: drop-shadow(0 12px 24px rgba(90, 58, 40, .22)); animation: bob 4s ease-in-out infinite; }
.hero-tag { font: 700 clamp(20px, 2vw, 24px)/1.3 var(--body); background: rgba(255, 244, 226, .82); padding: 10px 22px; border-radius: 999px; }
.hero-hint { position: absolute; z-index: 6; bottom: max(30px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-weight: 700; color: var(--muted); background: rgba(255, 244, 226, .78); padding: 8px 16px; border-radius: 999px; }
.line { font: 700 clamp(24px, 2.6vw, 34px)/1.25 var(--display); background: rgba(255, 244, 226, .82); padding: 14px 26px; border-radius: 26px; display: inline-block; }
.b2, .b3, .b4 { top: 40svh; opacity: 0; }
.b4 { top: 14svh; }
.b5 { bottom: 7svh; top: auto; opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.starter-cards { display: flex; gap: clamp(10px, 2vw, 24px); justify-content: center; }
.starter { width: clamp(100px, 22vw, 200px); background: var(--white); border-radius: 26px; padding: clamp(12px, 2vw, 22px) 10px; box-shadow: 0 6px 0 #ead6bd, 0 18px 36px rgba(90, 58, 40, .18); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.starter img { width: 70%; }
.starter .trait { font: 700 14px/1 var(--body); color: var(--orange-text); }
.starter h2 { font: 700 clamp(20px, 2.2vw, 30px)/1.1 var(--display); }
.pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -100%) scale(0); transform-origin: 50% 100%;
  font: 700 clamp(14px, 1.4vw, 20px)/1 var(--display); white-space: nowrap; background: var(--white); padding: 10px 16px; border-radius: 999px; box-shadow: 0 5px 0 #ead6bd, 0 10px 24px rgba(90, 58, 40, .2); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: var(--white); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.progress { position: absolute; z-index: 6; left: 50%; bottom: 14px; width: 120px; height: 4px; transform: translateX(-50%); background: rgba(90, 58, 40, .15); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (max-width: 699px) {
  .fly { height: 300vh; }
  .l1 img { object-position: 74% 50%; }
  .l4 img, .l2 img { object-position: 30% 50%; }
  .pin:nth-child(2) { --x: 34% !important; }
  .pin:nth-child(3) { --x: 70% !important; --y: 42% !important; }
  .pin:nth-child(4) { --x: 78% !important; --y: 26% !important; }
  .b1 { top: 16svh; }
}

/* Sections */
.section { padding: var(--section-y) 0; position: relative; }
.h2 { font: 700 clamp(40px, 4.6vw, 56px)/1.05 var(--display); }
.h2-small { font: 700 clamp(34px, 3.6vw, 44px)/1.1 var(--display); }
.sub { margin-top: 12px; font-size: clamp(19px, 1.6vw, 22px); color: var(--muted); }
.sub.narrow { max-width: 34em; margin-inline: auto; }
.aside { margin-top: 32px; color: var(--muted); font-size: 19px; }

.game-card { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; background: var(--white); border-radius: 32px; overflow: hidden; box-shadow: 0 8px 0 #ead6bd, 0 30px 60px rgba(90, 58, 40, .12); }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-copy { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.game-logo { width: min(360px, 90%); }
.game-text { font-size: clamp(19px, 1.5vw, 22px); }
.game-soon { font-weight: 700; color: var(--muted); }
@media (max-width: 880px) { .game-card { grid-template-columns: 1fr; } .game-art { aspect-ratio: 16 / 10; } }

.places { background: var(--cream-2); }
.place-grid { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); }
.place { background: var(--white); border-radius: 28px; overflow: hidden; box-shadow: 0 6px 0 #ead6bd; }
.place img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.place:hover img { transform: scale(1.04); }
.place div { padding: 20px clamp(20px, 2.4vw, 32px) 26px; }
.place h3 { font: 700 clamp(24px, 2.2vw, 30px)/1.1 var(--display); }
.place p { margin-top: 6px; color: var(--muted); }
@media (max-width: 700px) { .place-grid { grid-template-columns: 1fr; } }

.friend-row { list-style: none; padding: 0; margin: clamp(32px, 4vw, 56px) 0 12px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.friend { width: 100%; min-height: 48px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 22px; font: 700 18px/1.1 var(--display); color: var(--ink); }
.friend img { width: min(110px, 100%); transition: transform .35s var(--spring); }
.friend:hover img, .friend.squish img { transform: scale(1.12, .9) translateY(4px); }
.says { min-height: 2.6em; margin: 8px 0 24px; font: 700 20px/1.3 var(--display); color: var(--orange-text); }
@media (max-width: 860px) { .friend-row { grid-template-columns: repeat(4, 1fr); } }

.playtest { padding-top: 0; }
.play-card { text-align: center; background: var(--white); border-radius: 36px; padding: clamp(40px, 6vw, 80px) clamp(24px, 6vw, 96px); box-shadow: 0 8px 0 #ead6bd, 0 30px 60px rgba(90, 58, 40, .12); display: flex; flex-direction: column; align-items: center; gap: 20px; }
.play-card p { max-width: 32em; font-size: clamp(19px, 1.5vw, 21px); }

.footer { background: var(--ink); color: var(--cream); padding: clamp(56px, 7vw, 88px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-wordmark { width: 220px; }
.footer-col { display: flex; flex-direction: column; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-label { font-weight: 700; opacity: .75; margin-bottom: 4px; }
.footer-legal { margin-top: 48px; font-size: 15px; opacity: .9; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Reduced motion: no fly-in. The first frame is a still hero, then the sections. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fly { height: auto; }
  .stage { position: relative; height: 100svh; }
  .b2, .b3, .b4, .b5, .pins, .progress, .hero-hint { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Privacy and support pages */
.legal-top{position:sticky;top:0;z-index:5;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.legal-top .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:72px}
.legal-top a{display:inline-flex;align-items:center;min-height:48px}
.legal-back{font-weight:700;text-decoration:none}
.legal{max-width:calc(720px + 2 * var(--gutter));margin:0 auto;padding:clamp(40px,7vw,88px) var(--gutter) clamp(56px,8vw,104px)}
.legal h1{margin:0 0 12px}
.legal .updated{margin:0 0 40px;opacity:.85;font-size:15px}
.legal h2{margin:48px 0 12px}
.legal p,.legal li{font-size:clamp(17px,1.2vw,19px);line-height:1.65;margin:0 0 14px}
.legal ul{padding-left:1.2em;margin:0 0 14px}
.legal a{text-underline-offset:3px}
.legal-foot{padding:32px 0;font-size:14px}
.legal-foot .wrap{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center;justify-content:space-between}
.legal-foot a{display:inline-flex;align-items:center;min-height:44px;color:inherit}
.legal-top{background:var(--white)}.legal h1,.legal h2{font-family:var(--display);font-weight:700}.legal h1{font-size:clamp(38px,5vw,56px);line-height:1.1}.legal h2{font-size:clamp(24px,2.6vw,30px)}.legal a{color:var(--orange-text)}.legal-foot{background:var(--cream-2);color:var(--ink)}
