/* Gnome Bloom landing page (Hope, board task 165, 2026-12-03). Colours are the game's own palette (art bible 1.9 and
   the screen map); two typefaces, both SIL OFL and self-hosted: Fredoka (display) and Nunito Sans (text). */
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/fredoka-semibold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunitosans-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunitosans-extrabold.woff') format('woff'); font-weight: 800; font-display: swap; }

:root {
  /* colour: the game's palette, nothing new */
  --deep-green: #081D17;     /* text on cream, keylines, footer */
  --action-green: #2E7D57;   /* the ribbon, the sign's paint */
  --keyline: #163D2C;        /* the logo's backing */
  --cream: #FEF2CA;          /* plaques, text on green */
  --cream-shade: #F0D7A6;
  --sky-high: #2A7DC4;
  --sky-low: #BCE2F2;
  --ink-shadow: rgba(36, 11, 4, .28);
  /* type */
  --font-display: 'Fredoka', 'Nunito Sans', system-ui, sans-serif;
  --font-text: 'Nunito Sans', system-ui, sans-serif;
  /* space: 8-point steps */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;
  /* shape */
  --r-plaque: 14px; --r-ribbon: 8px;
  --edge: 3px;
  /* motion (Hope's contract): one easing, the entrance band, a 32 px rise */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-entrance: 1.2s;
  --rise: 32px;
  --stagger: .12s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--sky-low); color: var(--deep-green); font-family: var(--font-text); font-weight: 700; -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }

/* ---------- the hero: the app's title screen as a page (mobile first: one column) ---------- */
.hero { position: relative; isolation: isolate; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  padding: max(var(--s3), env(safe-area-inset-top)) var(--s2) 0; }
.plate { position: absolute; inset: 0; z-index: -1; }
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }

.brand { width: min(88vw, 460px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.emblem { width: 17%; margin-bottom: -3%; position: relative; z-index: 1; filter: drop-shadow(2px 3px 0 var(--ink-shadow)); }
.name { width: 100%; line-height: 0; }
.name .word { width: 100%; height: auto; overflow: visible; }
.ribbon { margin-top: var(--s1); font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 0.8rem + 1.1vw, 1.6rem); line-height: 1.2;
  color: var(--cream); background: var(--action-green); padding: 0.32em 1.1em 0.38em; border: 2.5px solid var(--cream); border-radius: var(--r-ribbon);
  box-shadow: 0 0 0 2.5px var(--deep-green), 2px 3px 0 2.5px var(--ink-shadow); }

.soon { width: min(96vw, 640px); margin-top: var(--s2); display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.sign { position: relative; width: 100%; aspect-ratio: 16 / 11; }
.sign-poster, .sign-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.sign-poster { object-fit: contain; }
.js .sign-poster { visibility: hidden; }            /* the 3D sign enters itself; the poster is the fallback */
.js.no-gl .sign-poster { visibility: visible; }
.no-gl .sign-3d, html:not(.js) .sign-3d { display: none; }
.platforms { width: max-content; max-width: min(calc(100vw - 32px), 680px); margin-top: -4%; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 0.85rem + 0.9vw, 1.55rem); line-height: 1.25; text-align: center;
  color: var(--deep-green); background: var(--cream); padding: 0.45em 1.1em 0.5em; border: var(--edge) solid var(--action-green); border-radius: var(--r-plaque);
  box-shadow: 0 4px 0 #C9B07A, 2px 6px 10px var(--ink-shadow); }

.gnomes { width: 100vw; max-width: 600px; height: auto; align-self: flex-end; margin: auto calc(-1 * var(--s2)) 0 0; padding-top: var(--s2); position: relative; z-index: 1; }

/* ---------- landscape screens: logo top left, the sign where Play stands, the gnomes on the right (01 Start) ---------- */
@media (min-width: 900px) and (min-aspect-ratio: 1 / 1) {
  .hero { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); grid-template-rows: auto 1fr; align-items: start;
    padding: clamp(24px, 3.2vw, 56px) clamp(24px, 3.6vw, 64px) 0; }
  .brand { grid-column: 1; grid-row: 1; width: clamp(280px, min(33vw, 52svh), 600px); justify-self: start; }   /* short laptop screens: the logo and the sign share the height */
  .soon { grid-column: 1; grid-row: 2; align-self: end; justify-self: center; width: clamp(320px, min(47vw, calc((100svh - 330px) * 1.25)), 880px); margin: 0 0 clamp(16px, 4vh, 56px); }
  .gnomes { position: absolute; right: 0; bottom: 3.5vh; width: min(50vw, 1000px); max-width: none; margin: 0; padding: 0; }
}

/* ---------- footer: one line, never hidden ---------- */
.foot { background: var(--deep-green); color: var(--cream); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2);
  padding: var(--s3) max(var(--s3), env(safe-area-inset-right)) max(var(--s3), env(safe-area-inset-bottom)) max(var(--s3), env(safe-area-inset-left)); font-size: 1rem; }
.foot-icon { width: 48px; height: 48px; border-radius: 11px; }
.foot-line { flex: 1 1 18rem; }
.foot-copy { white-space: nowrap; }

/* ---------- one entrance (the sign makes its own); text is in the page from the start ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }
.js .brand, .js .platforms, .js .gnomes { animation: rise var(--dur-entrance) var(--ease) both; }
.js .brand { animation-delay: 0s; }
.js .gnomes { animation-delay: var(--stagger); }
.js .platforms { animation-delay: calc(var(--stagger) * 4); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
