/* PolyForge landing page
   Palette from the logo cube and the KayKit store stage. */

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --floor: #263236;      /* checker light */
  --floor-2: #1f292c;    /* checker dark */
  --panel: #2e3b3f;
  --honey: #f9af3b;      /* cube top */
  --clay: #b27052;       /* cube left */
  --ember: #5f2c1f;      /* cube right */
  --ink: #3a2117;        /* outlines and sticker text */
  --cream: #f3e9d8;
  --frame: #dcae6e;      /* store frame */
  --muted: #b3bcba;
  --grass: #93c158;
  --soil: #8a5c3b;

  --display: "Fredoka", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Segoe UI", sans-serif;
  --radius-lg: 22px;
  --radius-md: 14px;
  --press: 0 5px 0 var(--ink);
  --wrap: min(1360px, 100% - 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--cream);
  font: 400 1.125rem/1.6 var(--body);
  background-color: var(--floor);
  /* the KayKit stage floor */
  background-image: conic-gradient(var(--floor-2) 0 25%, var(--floor) 0 50%, var(--floor-2) 0 75%, var(--floor) 0);
  background-size: 128px 128px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
p { margin: 0; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 30;
  background: var(--honey); color: var(--ink); padding: .6rem 1rem; border-radius: 10px;
  font-weight: 800; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Sticker type: thick brown stroke and a hard drop, like the titles on my store covers. */
h1, h2 {
  -webkit-text-stroke: .16em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 .09em 0 var(--ink);
}

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; transition: background-color .25s ease, box-shadow .25s ease; }
.topbar.is-stuck { background: rgba(28, 37, 40, .97); box-shadow: 0 3px 0 var(--ink); }
.topbar-inner {
  width: var(--wrap); margin: 0 auto; padding: .9rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-word { font: 700 1.7rem/1 var(--display); color: var(--honey); letter-spacing: -.01em; }
.brand-word span { color: var(--cream); }

/* flat version of the logo cube, three faces */
.brand-cube, .step-cube { position: relative; width: 34px; height: 38px; flex: none; display: inline-block; }
.brand-cube i, .step-cube i { position: absolute; inset: 0; display: block; }
.brand-cube i:nth-child(1), .step-cube i:nth-child(1) { background: var(--honey); clip-path: polygon(50% 0, 100% 27%, 50% 54%, 0 27%); }
.brand-cube i:nth-child(2), .step-cube i:nth-child(2) { background: var(--clay);  clip-path: polygon(0 27%, 50% 54%, 50% 100%, 0 73%); }
.brand-cube i:nth-child(3), .step-cube i:nth-child(3) { background: var(--ember); clip-path: polygon(50% 54%, 100% 27%, 100% 73%, 50% 100%); }
.brand-cube.small { width: 22px; height: 25px; }

.topbar nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { text-decoration: none; font-weight: 800; padding: .45rem .8rem; border-radius: 10px; }
.topbar nav a:hover { background: rgba(243, 233, 216, .08); }
.topbar nav .nav-cta { background: var(--cream); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin-left: .35rem; }
.topbar nav .nav-cta:hover { background: #fff6e8; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1.12rem/1 var(--display); text-decoration: none;
  padding: 1rem 1.4rem; border-radius: var(--radius-md);
  border: 3px solid var(--ink); box-shadow: var(--press);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-honey { background: var(--honey); color: var(--ink); }
.btn-honey:hover { background: #ffbd52; }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: #fff6e8; }

/* ---------- hero ---------- */
.hero {
  width: var(--wrap); margin: 0 auto;
  min-height: min(860px, 92vh);
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 1.5rem;
  padding: 1.5rem 0 2rem;
}
.hello {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 1.05rem/1 var(--display); color: var(--ink);
  background: var(--cream); border: 3px solid var(--ink); border-radius: 99px;
  padding: .5rem .95rem .5rem .6rem; box-shadow: 0 4px 0 var(--ink);
  margin-bottom: 1.5rem; rotate: -2deg;
}
.wave {
  width: 18px; height: 18px; border-radius: 5px; background: var(--honey);
  box-shadow: 3px 3px 0 var(--clay); transform-origin: 70% 90%;
  animation: wave 1.4s ease-in-out 2.2s 2 both;
}
@keyframes wave { 0%, 100% { rotate: 0deg; } 25% { rotate: -22deg; } 75% { rotate: 18deg; } }

.hero h1 { font-size: clamp(3rem, 6.2vw, 6rem); font-weight: 700; color: var(--cream); max-width: 11ch; }
.lede { margin-top: 1.6rem; max-width: 42ch; font-size: 1.32rem; color: #dfe3df; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.facts { list-style: none; padding: 0; margin: 2.1rem 0 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.facts li {
  font: 500 .98rem/1 var(--display); color: var(--frame);
  padding: .5rem .75rem; border: 2px solid rgba(220, 174, 110, .45); border-radius: 10px;
}
.facts b { color: var(--honey); font-weight: 700; margin-right: .2rem; }

/* The 3D stage. Pure CSS cuboids, built by main.js */
.stage-wrap { position: relative; display: grid; place-items: center; min-height: 660px; }
.stage {
  --s: 1.5;
  width: 760px; max-width: 100%; height: 640px; position: relative;
  display: grid; place-items: center;
  cursor: grab; touch-action: pan-y; user-select: none;
  border-radius: 28px;
}
.stage:active { cursor: grabbing; }
.scene {
  position: relative; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: translateY(70px) scale(var(--s)) rotateX(var(--rx, -30deg)) rotateY(var(--ry, 45deg));
}
.scene * { transform-style: preserve-3d; }
.obj, .face, .shadow { position: absolute; left: 0; top: 0; }
/* sharp, faceted edges like the real models; a thin light line on top faces reads as a bevel */
.face {
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 12, 8, .14);
}
.f-top { box-shadow: inset 0 0 0 1px rgba(20, 12, 8, .1), inset 0 2px 0 rgba(255, 255, 255, .28), inset 2px 0 0 rgba(255, 255, 255, .16); }
.gable { clip-path: polygon(0 100%, 50% 0, 100% 100%); border-radius: 0; box-shadow: none; }
.shadow { border-radius: 50%; background: radial-gradient(closest-side, rgba(8, 14, 16, .5), rgba(8, 14, 16, 0)); }

/* water tops shimmer slowly, one wave across the tiles */
.water .f-top { animation: shimmer 3.6s ease-in-out infinite alternate; animation-delay: var(--wd, 0s); }
@keyframes shimmer { to { background-color: #66bcc6; } }

.stage-hint {
  position: absolute; bottom: .2rem; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap;
  font: 500 .92rem/1 var(--display); color: var(--muted); opacity: 0; transition: opacity .6s ease;
}
.is-ready .stage-hint { opacity: .8; }

/* The page-load moment: the island rises tile by tile, props drop in, the cube lands and floats. */
.is-building .grow { animation: grow .55s cubic-bezier(.3, 1.45, .55, 1) both; animation-delay: var(--d); }
@keyframes grow { from { scale: 1 .02; visibility: hidden; } 1% { visibility: visible; } }
.is-building .drop { animation: drop .9s cubic-bezier(.5, 0, .5, 1) both; animation-delay: var(--d, .7s); }
@keyframes drop {
  /* no opacity here: opacity < 1 flattens preserve-3d and the cuboids collapse to one face */
  0% { translate: 0 -380px 0; scale: 1 1; visibility: hidden; }
  1% { visibility: visible; }
  55% { translate: 0 0 0; scale: 1 1; }
  64% { translate: 0 0 0; scale: 1.1 .84; }
  78% { translate: 0 -20px 0; scale: .97 1.05; }
  90% { translate: 0 0 0; scale: 1.02 .97; }
  100% { translate: 0 0 0; scale: 1 1; }
}
.is-ready .float { animation: bob 4.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0 0; } 50% { translate: 0 -9px 0; } }
.shadow { animation: shade 4.2s ease-in-out infinite; animation-play-state: paused; }
.is-ready .shadow { animation-play-state: running; }
@keyframes shade { 50% { scale: .86; } }

.sparks { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute; left: 50%; top: 45%; width: var(--w); height: var(--h);
  background: var(--c); border-radius: 3px;
  animation: spark 1.05s cubic-bezier(.15, .75, .3, 1) forwards;
}
@keyframes spark {
  from { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  80% { opacity: 1; }
  to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--rot)); opacity: 0; }
}

/* ---------- ledge: the side of a Groundwork tile, grass on top, soil dripping below ---------- */
.ledge {
  height: 58px; margin-top: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='58'%3E%3Crect width='120' height='16' fill='%2393c158'/%3E%3Crect width='120' height='4' fill='%23a9d36c'/%3E%3Cpath d='M0 16h120v20l-8 6-9-4-10 12-9-9-8 5-11-8-9 10-10-7-9 4-10-9-9 11-8-6-10 3z' fill='%238a5c3b'/%3E%3Cpath d='M0 33l10-3 8 6 9-11 10 9 9-4 10 7 9-10 11 8 8-5 9 9 10-12 9 4 8-6v6l-8 6-9-4-10 12-9-9-8 5-11-8-9 10-10-7-9 4-10-9-9 11-8-6-10 3z' fill='%236a4229'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 58px;
  filter: drop-shadow(0 5px 0 rgba(10, 16, 18, .35));
}

/* above the footer the ground continues, so no checker shows between the drips */
.ledge-solid { background-color: #6a4229; filter: none; }

/* ---------- sections ---------- */
.section { width: var(--wrap); margin: 0 auto; padding: 6.5rem 0 1rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 2rem; margin-bottom: 2.2rem; }
.section h2 { font-size: clamp(2.4rem, 4.8vw, 4.2rem); font-weight: 700; color: var(--honey); }
.section-head p { color: var(--muted); max-width: 44ch; }

/* ---------- packs ---------- */
.packs { padding-top: 3.5rem; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.pack-lead { grid-column: span 2; }

.pack > a {
  --lift: 0px;
  display: flex; flex-direction: column; height: 100%; text-decoration: none;
  background: var(--frame);
  border: 3px solid var(--ink); border-radius: var(--radius-lg);
  padding: 9px; box-shadow: 0 6px 0 var(--ink);
  transform: perspective(900px) translateY(var(--lift)) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .18s ease, box-shadow .18s ease;
}
.pack > a:hover { --lift: -5px; box-shadow: 0 11px 0 var(--ink); }
.pack > a:active { --lift: 3px; box-shadow: 0 3px 0 var(--ink); }

.pack-shot {
  position: relative; margin: 0; flex: 1; min-height: 0;
  border-radius: 13px; overflow: hidden; border: 3px solid var(--ink);
  aspect-ratio: 16 / 10; background: var(--floor-2);
}
.pack-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .5s ease; }
.pack-shot .alt { opacity: 0; transition: opacity .35s ease, scale .5s ease; }
.pack > a:hover .alt, .pack > a:focus-visible .alt { opacity: 1; }
.pack > a:hover .pack-shot img { scale: 1.04; }

.sticker {
  position: absolute; left: .7rem; bottom: .7rem;
  font: 600 1.15rem/1 var(--display); color: var(--ink);
  background: var(--cream); padding: .5rem .75rem; border-radius: 11px;
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.pack-lead .sticker { font-size: 1.7rem; padding: .6rem .95rem; }

/* round stamp with the model count, slightly crooked like a price sticker */
.stamp {
  position: absolute; right: .7rem; top: .7rem;
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: var(--honey); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font: 600 .72rem/1 var(--display); rotate: 8deg;
  transition: rotate .25s ease;
}
.stamp b { display: block; font-size: 1.45rem; line-height: 1; margin-bottom: .1rem; }
.pack > a:hover .stamp { rotate: -6deg; }
.pack-lead .stamp { width: 92px; height: 92px; font-size: .85rem; }
.pack-lead .stamp b { font-size: 1.9rem; }

.pack-meta { display: flex; gap: 1rem; align-items: start; justify-content: space-between; padding: .85rem .4rem .3rem; color: var(--ink); }
.pack-meta p { font-weight: 700; line-height: 1.45; font-size: .98rem; }
.chip {
  flex: none; font: 600 .9rem/1 var(--display); color: var(--cream);
  background: var(--ember); padding: .45rem .65rem; border-radius: 9px;
}

.older { margin-top: 3.8rem; }
.older-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.older h3 { font-size: 1.6rem; font-weight: 600; }
.older-head p { color: var(--muted); }
.older-strip {
  list-style: none; margin: 0; padding: .3rem .2rem 1.2rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: var(--frame) transparent;
}
.older-strip li { scroll-snap-align: start; }
.older-strip a {
  display: block; text-decoration: none; background: var(--panel); border-radius: 14px; padding: 6px;
  border: 2px solid rgba(220, 174, 110, .35); transition: border-color .15s ease, translate .15s ease;
}
.older-strip a:hover { border-color: var(--frame); translate: 0 -3px; }
.older-strip img { border-radius: 9px; aspect-ratio: 315 / 250; object-fit: cover; width: 100%; }
.older-strip span { display: block; font: 500 .98rem/1.2 var(--display); padding: .55rem .3rem .25rem; }

/* ---------- process ---------- */
.process h2 { margin-bottom: 2.4rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: step; position: relative; }
.steps::before {  /* dotted path linking the steps */
  content: ""; position: absolute; left: 6%; right: 6%; top: 36px; height: 0;
  border-top: 4px dotted rgba(249, 175, 59, .55);
}
.step {
  position: relative; counter-increment: step;
  background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: 0 5px 0 var(--ink); padding: 1.3rem 1.3rem 1.5rem;
}
.step-cube { width: 46px; height: 52px; margin-bottom: .9rem; }
.step h3 { font-size: 1.45rem; font-weight: 600; margin-bottom: .45rem; display: flex; align-items: baseline; gap: .5rem; }
.step h3::before { content: counter(step); color: var(--honey); font-weight: 700; }
.step p { color: #d6dbd8; font-size: .98rem; }

/* ---------- trailers ---------- */
.trailer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.7rem; }
.trailer {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  border: 3px solid var(--ink); background: var(--floor-2); overflow: hidden;
  box-shadow: 0 0 0 6px var(--frame), 0 0 0 9px var(--ink), 0 14px 0 var(--ink);
  margin: 9px;
}
.trailer-play {
  position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center;
  border: 0; padding: 0; margin: 0; background: none; color: inherit; font: inherit;
}
.trailer-play:focus-visible { outline: 3px solid var(--honey); outline-offset: -6px; }
.trailer-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.78); transition: filter .2s ease, scale .4s ease; }
.trailer-play:hover img { filter: brightness(.92); scale: 1.03; }
.play-badge {
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  background: var(--honey); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  transition: transform .15s ease;
}
.play-badge::after {
  content: ""; position: absolute; left: 31px; top: 23px;
  border-left: 26px solid var(--ink); border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.trailer-play:hover .play-badge { transform: scale(1.08) rotate(-6deg); }
.trailer-title {
  position: absolute; left: 1rem; bottom: 1rem; font: 600 1.05rem/1.2 var(--display); text-align: left;
  background: var(--cream); color: var(--ink); padding: .45rem .7rem; border-radius: 10px; border: 3px solid var(--ink);
}
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.more-link { margin-top: 1.6rem; }
.more-link a { font-weight: 800; color: var(--honey); text-underline-offset: 4px; }

/* ---------- discord ---------- */
.discord { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.discord-copy > p { margin-top: 1rem; max-width: 48ch; color: #dfe3df; font-size: 1.12rem; }
.perks { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: .8rem; max-width: 56ch; }
.perks li { padding-left: 1.6rem; position: relative; color: #dfe3df; }
.perks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 3px;
  background: var(--honey); box-shadow: 3px 3px 0 var(--clay);
}
.perks strong { color: var(--cream); }

.server-wrap { position: relative; justify-self: center; width: 100%; max-width: 380px; padding: 0 0 2rem; }
.server {
  background: #1b2427; border-radius: var(--radius-lg); padding: 1.1rem 1rem 1.2rem;
  border: 3px solid var(--ink); box-shadow: 0 0 0 7px var(--frame), 0 0 0 10px var(--ink), 0 16px 0 var(--ink);
  font-size: .98rem; rotate: 1.5deg;
}
.server-head {
  display: flex; align-items: center; gap: .6rem; font: 600 1.05rem/1.2 var(--display);
  padding: .2rem .4rem .9rem; border-bottom: 2px solid rgba(243, 233, 216, .08); margin-bottom: .6rem;
}
.server-cat { font: 600 .85rem/1 var(--display); color: var(--muted); padding: .9rem .5rem .35rem; }
.ch { padding: .28rem .6rem; border-radius: 7px; color: #c7cdca; }
.ch::before { content: "#"; margin-right: .45rem; color: #7d8986; font-weight: 700; }
.ch.live { background: rgba(249, 175, 59, .14); color: var(--cream); display: flex; }
.ch.live::after {
  content: "new"; margin-left: auto; font: 600 .75rem/1 var(--display); background: var(--honey); color: var(--ink);
  padding: .25rem .45rem; border-radius: 6px; align-self: center;
}
.server-roles { display: flex; flex-wrap: wrap; gap: .4rem; padding: 1rem .4rem 0; }
.server-roles span {
  font: 500 .82rem/1 var(--display); padding: .35rem .55rem; border-radius: 99px;
  background: rgba(243, 233, 216, .08); color: var(--cream);
}
.toast {
  position: absolute; left: -2.2rem; bottom: 0; width: 290px;
  display: flex; gap: .7rem; align-items: center;
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink); padding: .75rem .9rem;
  rotate: -3deg; opacity: 0; translate: 0 26px; scale: .9;
}
.toast b { font: 600 .9rem/1 var(--display); color: var(--clay); }
.toast p { font-weight: 800; font-size: .95rem; line-height: 1.3; margin-top: .2rem; }
.in-view .toast { animation: toast .6s cubic-bezier(.3, 1.5, .5, 1) .35s forwards; }
@keyframes toast { to { opacity: 1; translate: 0 0; scale: 1; } }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.2rem; align-items: start; padding-bottom: 5rem; }
.about-card {
  background: var(--cream); color: var(--ink); border-radius: var(--radius-lg);
  border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); padding: 2rem 2rem 2.2rem;
}
.about-card h2 { margin-bottom: 1.1rem; }
.about-card p { font-weight: 600; max-width: 60ch; }
.about-card p + p { margin-top: .9rem; }

.socials { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.social {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 1rem;
  text-decoration: none; padding: .9rem 1.1rem; border-radius: var(--radius-md);
  background: var(--panel); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.social::before {  /* small cube face as the platform marker */
  content: ""; grid-row: span 2; width: 18px; height: 18px; border-radius: 4px;
  background: var(--m); box-shadow: 4px 4px 0 var(--m2);
}
.social:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.social:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.social-name { font: 600 1.25rem/1.1 var(--display); }
.social-sub { color: var(--muted); font-size: .95rem; }
.social.itch { --m: #fa5c5c; --m2: #a8383b; }
.social.yt { --m: var(--honey); --m2: var(--clay); }
.social.tt { --m: #7fd4cf; --m2: #3f8984; }
.social.dc { --m: #8f9cf4; --m2: #525ea8; }

/* ---------- footer ---------- */
.footer {
  background: #6a4229; color: #f0dcc6;
  padding: 1.4rem max(1.25rem, (100% - 1180px) / 2) 2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 700;
}
.ledge + .footer { margin-top: -1px; }
.footer a { color: #f0dcc6; }
.footer a:hover { color: #fff; }

/* ---------- legal and 404 ---------- */
.legal { width: min(760px, 100% - 2.5rem); margin: 2.5rem auto 4rem; background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--radius-lg); box-shadow: 0 6px 0 var(--ink); padding: 2rem; }
.legal h1 { font-size: 2.4rem; color: var(--honey); margin-bottom: 1.2rem; }
.legal h2 { font-size: 1.5rem; color: var(--honey); margin: 1.8rem 0 .6rem; }
.legal p, .legal li { font-weight: 600; }
.legal p + p { margin-top: .7rem; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: .5rem; }
  .stage-wrap { order: -1; min-height: 430px; }
  .stage { --s: .95; height: 430px; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .discord, .about { grid-template-columns: 1fr; }
  .server-wrap { justify-self: start; margin-left: 2.4rem; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; background-size: 96px 96px; }
  .topbar nav a:not(.nav-cta) { display: none; }
  .topbar nav .nav-cta { font-size: .9rem; padding: .4rem .6rem; }
  .brand-word { font-size: 1.45rem; }
  .stage { --s: .66; width: 100%; height: 320px; }
  .stage-wrap { min-height: 330px; }
  .pack-grid, .trailer-grid, .steps { grid-template-columns: 1fr; }
  .pack-lead { grid-column: auto; }
  .pack-lead .sticker { font-size: 1.2rem; }
  .pack-lead .stamp, .stamp { width: 64px; height: 64px; font-size: .68rem; }
  .pack-lead .stamp b, .stamp b { font-size: 1.25rem; }
  .pack-meta { flex-direction: column; gap: .5rem; }
  .section { padding-top: 4rem; }
  .about-card { padding: 1.5rem; }
  .server-wrap { margin-left: 1.6rem; max-width: calc(100% - 1.6rem); }
  .toast { left: -1.6rem; width: min(290px, 100%); }
  .trailer-play { place-items: start end; padding: .9rem; }
  .play-badge { width: 58px; height: 58px; }
  .play-badge::after { left: 21px; top: 15px; border-left-width: 19px; border-top-width: 11px; border-bottom-width: 11px; }
  .trailer-title { font-size: .95rem; left: .7rem; bottom: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ---------- motion, round two ---------- */
.is-building .dropspin { animation: dropspin 1.15s cubic-bezier(.45, 0, .4, 1) both; animation-delay: var(--d); }
@keyframes dropspin {
  0% { translate: 0 -460px 0; rotate: y 0deg; scale: 1 1; visibility: hidden; }
  1% { visibility: visible; }
  52% { translate: 0 0 0; rotate: y 360deg; scale: 1 1; }
  62% { translate: 0 0 0; rotate: y 360deg; scale: 1.14 .8; }
  76% { translate: 0 -26px 0; rotate: y 360deg; scale: .95 1.07; }
  88% { translate: 0 0 0; scale: 1.03 .97; }
  100% { translate: 0 0 0; rotate: y 360deg; scale: 1 1; }
}

/* the ring is a flat leaf element, so fading it does not flatten the 3D scene */
.ring {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  border: 5px solid var(--honey); box-shadow: 0 0 0 3px rgba(243, 233, 216, .5);
  opacity: 0; scale: .2;
}
.is-building .ring { animation: ring .9s cubic-bezier(.2, .7, .3, 1) both; animation-delay: var(--d); }
@keyframes ring { 0% { opacity: 0; scale: .2; } 10% { opacity: 1; } 100% { opacity: 0; scale: 3.4; } }

.cloud { animation: drift var(--dur, 30s) linear infinite; animation-delay: var(--cd, 0s); }
@keyframes drift {
  0% { translate: -330px 0 0; scale: .01; }
  12% { scale: 1; }
  88% { scale: 1; }
  100% { translate: 330px 0 0; scale: .01; }
}

/* cards drop onto the page with a little squash, like props onto the island */
.js .pack:not(.landed), .js .step:not(.landed), .js .social:not(.landed), .js .older-strip li:not(.landed) { opacity: 0; }
.landed { animation: land .75s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--i, 0s); transform-origin: 50% 100%; }
@keyframes land {
  0% { opacity: 0; translate: 0 -70px; scale: .96 1.04; }
  45% { opacity: 1; translate: 0 0; scale: 1.03 .95; }
  70% { scale: .99 1.02; }
  100% { opacity: 1; translate: 0 0; scale: 1 1; }
}

.facts .fact-ai { background: var(--honey); color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 600; }

@media (min-width: 981px) and (max-width: 1280px) {
  .stage { --s: 1.25; width: 640px; height: 560px; }
  .stage-wrap { min-height: 580px; }
}

/* ---------- island life: windmill, campfire, jumping fish ---------- */
.late { visibility: hidden; }
.is-ready .late { visibility: visible; }
.sails { animation: sails 7s linear infinite; }
@keyframes sails { to { rotate: z 360deg; } }
.flame { animation: flicker .9s ease-in-out infinite alternate; transform-origin: 0 0; }
.flame > .obj:nth-child(2) { animation: flicker .6s ease-in-out infinite alternate-reverse; }
@keyframes flicker { 0% { scale: 1 1; } 50% { scale: .85 1.2; } 100% { scale: 1.1 .9; } }
.is-building .flame { visibility: hidden; }
.is-ready .flame { visibility: visible; }
.fish-body { visibility: hidden; animation: fish 6s ease-in-out 3s infinite; }
@keyframes fish {
  0%, 74% { visibility: hidden; translate: -22px 0 0; rotate: z -40deg; }
  75% { visibility: visible; translate: -22px 0 0; rotate: z -40deg; }
  87% { translate: 0 -46px 0; rotate: z 0deg; }
  99% { visibility: visible; translate: 22px 0 0; rotate: z 40deg; }
  100% { visibility: hidden; translate: 22px 0 0; }
}

/* ---------- theme filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: -.6rem 0 1.8rem; }
.chip-btn {
  font: 600 1rem/1 var(--display); padding: .65rem 1rem; border-radius: 99px; cursor: pointer;
  background: var(--panel); color: var(--cream); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s ease, background-color .12s ease;
}
.chip-btn:hover { transform: translateY(-2px); }
.chip-btn[aria-pressed="true"] { background: var(--honey); color: var(--ink); }
.pack-grid.is-filtered .pack-lead { grid-column: auto; }
.pack-grid.is-filtered .pack-lead .sticker { font-size: 1.15rem; padding: .5rem .75rem; }
.filter-empty { color: var(--muted); margin: -.6rem 0 1.6rem; }
.pack[hidden], .older-strip li[hidden] { display: none; }

/* ---------- footer, round two ---------- */
.footer { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem 3rem; padding-top: 2.4rem; padding-bottom: 1.6rem; }
.footer .brand-word { color: var(--honey); }
.foot-brand p { margin-top: .8rem; max-width: 34ch; font-weight: 600; color: #f0dcc6; }
.foot-col { display: flex; flex-direction: column; gap: .45rem; }
.foot-col h2 { font: 600 1rem/1 var(--display); color: var(--honey); -webkit-text-stroke: 0; text-shadow: none; margin-bottom: .3rem; }
.foot-col a { text-decoration: none; font-weight: 700; width: fit-content; }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-base { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 2px solid rgba(240, 220, 198, .2); font-weight: 600; }
@media (max-width: 640px) { .footer { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
