/* Cut Deck Studio — site styles. Studio look: light, cut-paper shapes. Game pages add their own accent. */
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("fonts/LilitaOne.woff2") format("woff2"); font-display: swap; }

:root {
  --paper: #f6f7fb;
  --white: #ffffff;
  --ink: #221a35;
  --ink-soft: #57516b;
  --line: #e2e3ee;
  --tomato: #ff5e4d;
  --sun: #ffc22e;
  --leaf: #2fb86a;
  --sky: #3a8df5;
  --grape: #8b5cf6;
  --head: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: #2463c9; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -.005em; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font: 600 1.45rem/1 var(--head); color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.mark { position: relative; width: 2rem; height: 2rem; flex: none; }
.mark i { position: absolute; width: 1.25rem; height: 1.25rem; border-radius: .35rem; }
.mark i:nth-child(1) { background: var(--sky); left: 0; top: .75rem; transform: rotate(-10deg); }
.mark i:nth-child(2) { background: var(--sun); left: .38rem; top: .38rem; transform: rotate(6deg); }
.mark i:nth-child(3) { background: var(--tomato); left: .75rem; top: 0; transform: rotate(-4deg); }
.site-nav { display: flex; gap: 1.5rem; font: 600 1.05rem var(--head); }
.site-nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--sun); }

/* Home hero */
.hero { padding: 2.5rem 0 4rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; margin: 0 0 1.25rem; }
.lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 36ch; margin: 0 0 1.75rem; }

/* Cut-paper collage: flat shapes with a hard paper shadow */
.collage { position: relative; height: 24em; font-size: 16px; }
.shape { position: absolute; filter: drop-shadow(.35rem .45rem 0 rgba(34, 26, 53, .14)); }
.s-sun { width: 9em; height: 9em; border-radius: 50%; background: var(--sun); left: 52%; top: 4%; }
.s-sky { width: 10em; height: 10em; border-radius: 1.6em; background: var(--sky); left: 14%; top: 22%; transform: rotate(-12deg); }
.s-tomato { width: 0; height: 0; left: 46%; top: 46%; border-left: 5.5em solid transparent; border-right: 5.5em solid transparent; border-bottom: 9.5em solid var(--tomato); transform: rotate(14deg); }
.s-leaf { width: 12em; height: 4.2em; border-radius: 2.1em; background: var(--leaf); left: 6%; top: 72%; transform: rotate(8deg); }
.s-grape { width: 5.5em; height: 5.5em; border-radius: 1em; background: var(--grape); left: 78%; top: 58%; transform: rotate(22deg); }
.s-dot { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--tomato); left: 34%; top: 6%; }

@media (prefers-reduced-motion: no-preference) {
  .collage .shape { animation: drop .8s cubic-bezier(.2, .9, .3, 1.25) both; }
  .collage .s-sky { animation-delay: .05s; }
  .collage .s-sun { animation-delay: .15s; }
  .collage .s-tomato { animation-delay: .25s; }
  .collage .s-leaf { animation-delay: .35s; }
  .collage .s-grape { animation-delay: .45s; }
  .collage .s-dot { animation-delay: .55s; }
  @keyframes drop { from { opacity: 0; translate: 0 -3rem; } to { opacity: 1; translate: 0 0; } }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 1.1rem/1 var(--head); text-decoration: none;
  background: var(--ink); color: #fff; padding: .95rem 1.4rem; border-radius: .9rem;
}
.btn:hover { background: #3a2f55; color: #fff; }
.btn.light { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.light:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem var(--head); padding: .7rem 1.05rem; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); }
.pill::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--leaf); }

/* Sections */
.band { padding: 4rem 0; }
.band.white { background: var(--white); border-block: 1px solid var(--line); }
.band h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 1rem; }
.band p { max-width: var(--measure); }
.band .intro { color: var(--ink-soft); margin-top: 0; }

/* Game grid */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.75rem; margin-top: 2rem; }
.game { background: var(--white); border-radius: 1.4rem; overflow: hidden; box-shadow: 0 0 0 1px var(--line), .4rem .5rem 0 rgba(34,26,53,.06); display: flex; flex-direction: column; }
.game .art { aspect-ratio: 1024 / 500; background: #2b2216; }
.game .art img { width: 100%; height: 100%; object-fit: cover; }
.game .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.game h3 { font-size: 1.6rem; margin: 0; }
.game p { margin: 0; color: var(--ink-soft); }
.game .meta { font: 600 .95rem var(--head); color: #1f8a4e; }
.game .body .btn { align-self: flex-start; margin-top: auto; }
.game.next { background: transparent; box-shadow: none; border: 3px dashed #c9cadb; justify-content: center; align-items: center; text-align: center; padding: 2rem; min-height: 18rem; }
.game.next .mini { display: flex; gap: .5rem; margin-bottom: 1rem; }
.game.next .mini i { width: 1.6rem; height: 1.6rem; border-radius: .4rem; background: #d9dae7; }
.game.next .mini i:nth-child(2) { border-radius: 50%; }

/* Game page (Brickling) — the only place that uses the game's own look */
.game-hero { padding: 1rem 0 4rem; }
.game-hero .panel {
  position: relative; overflow: hidden; border-radius: 2rem; padding: clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(circle at 75% 30%, #3f7a3a, #1d3b24 70%); color: #fff;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center;
}
.game-hero h1 { font-family: "Lilita One", var(--head); font-weight: 400; font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1; margin: 0 0 1rem; text-shadow: 0 .07em 0 #2a1d40; }
.game-hero p { font-size: 1.2rem; color: #e5f1df; max-width: 34ch; margin: 0 0 1.5rem; }
.game-hero .pill { background: rgba(255,255,255,.12); box-shadow: none; color: #fff; }
.game-hero .btn.light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.game-hero .btn.light:hover { box-shadow: inset 0 0 0 2px #fff; }
.game-hero :focus-visible { outline-color: var(--sun); }
.stage { position: relative; height: 22em; font-size: 16px; }
.stage img { position: absolute; filter: drop-shadow(0 .6rem .8rem rgba(0,0,0,.35)); }
.stage .hero-sprite { width: 14em; left: 0; bottom: 0; }
.stage .b1 { width: 6.5em; right: 30%; top: 0; transform: rotate(-8deg); }
.stage .b2 { width: 6em; right: 4%; top: 12%; transform: rotate(10deg); }
.stage .b3 { width: 5.5em; right: 20%; top: 40%; transform: rotate(4deg); }
.stage .b4 { width: 6em; right: 0; top: 58%; transform: rotate(-6deg); }
@media (prefers-reduced-motion: no-preference) {
  .stage .hero-sprite { animation: hop 3.2s ease-in-out infinite; }
  @keyframes hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.6rem; } }
}

.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(13rem, 15rem);
  gap: 1.25rem; overflow-x: auto; padding: .5rem .25rem 1.5rem; scroll-snap-type: x mandatory;
}
.rail figure { margin: 0; scroll-snap-align: start; }
.rail img { border-radius: 1rem; box-shadow: 0 .6rem 1.4rem rgba(34,26,53,.18); width: 100%; }
.rail figcaption { font: 600 1rem var(--head); color: var(--ink-soft); padding-top: .6rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 2.5rem; margin-top: 1rem; }
.facts h3 { font-size: 1.3rem; line-height: 1.2; margin: 0 0 .35rem; }
.facts p { margin: 0; color: var(--ink-soft); }

/* Document pages */
.sheet {
  background: var(--white); border-radius: 1.4rem; padding: clamp(1.5rem, 5vw, 3.5rem);
  margin: 1rem auto 4rem; max-width: 52rem; box-shadow: 0 0 0 1px var(--line);
}
.sheet h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 .5rem; }
.sheet h2 { font-size: 1.5rem; line-height: 1.2; margin: 2.25rem 0 .6rem; }
.sheet h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.5rem 0 .4rem; }
.sheet p, .sheet li { max-width: var(--measure); line-height: 1.7; }
.sheet ul, .sheet ol { padding-left: 1.3rem; }
.sheet li + li { margin-top: .35rem; }
.sheet .meta { color: var(--ink-soft); font-size: 1rem; margin: 0 0 1.75rem; }
.sheet .note { background: #fff6dc; border-radius: .8rem; padding: 1rem 1.25rem; }
.sheet address { font-style: normal; }

/* Footer */
.site-footer { background: var(--ink); color: #cfcbe0; padding: 2.5rem 0; font-size: 1rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font: 600 1.1rem var(--head); color: #fff; margin: 0 0 .5rem; }
.site-footer p, .site-footer ul { margin: 0; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: .3rem; }
.site-footer a { color: #fff; }
.site-footer address { font-style: normal; }
.site-footer :focus-visible { outline-color: var(--sun); }

@media (max-width: 860px) {
  .hero .wrap, .game-hero .panel { grid-template-columns: 1fr; }
  .collage { order: -1; font-size: 11px; }
  .stage { font-size: 11px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .site-nav { gap: 1rem; } }

/* Tiny Tools page: sky-blue panel and a big rounded icon instead of Brickling's cavern */
.game-hero.tt .panel { background: linear-gradient(135deg, #2f8fe6 0%, #57b8ff 60%, #8fd4ff 100%); }
.game-hero.tt h1 { font-family: var(--head); font-weight: 700; text-shadow: 0 .07em 0 #164a86; }
.game-hero.tt p { color: #f2f8ff; }
.stage .tt-icon { width: 17em; height: 17em; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-4deg); border-radius: 3.6em; }
@media (prefers-reduced-motion: no-preference) { .stage .tt-icon { animation: none; } }

/* Support form (24 Nov) */
.support-form { display: grid; gap: 1rem; max-width: 46rem; margin: 1.5rem 0 1rem; background: var(--white); border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; }
.support-form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.support-form label { display: grid; gap: .35rem; font-weight: 600; color: var(--ink); }
.support-form .opt { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.support-form input, .support-form select, .support-form textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: .6rem; padding: .7rem .8rem; min-height: 44px; box-sizing: border-box; width: 100%; }
.support-form input:focus, .support-form select:focus, .support-form textarea:focus { outline: none; border-color: var(--sky); }
.support-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.support-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; color: var(--ink-soft); }
