/* Spinwood landing page. Layout: full-bleed animated workshop hero, then stacked wooden "shelves" of content in one centered column. */
:root {
  --ink: #2b170b;
  --cream: #fff3dc;
  --paper: #f2d6a8;
  --bark: #24140a;
  --plank: #3a2414;
  --edge: #8a5a2e;
  --red: #e2453c; --red-d: #9e2a22;
  --gold: #ffd24a;
  --violet: #b38bff;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bark); color: var(--cream); font-family: var(--body); font-weight: 600; line-height: 1.5; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* hero */
.hero { position: relative; height: min(88vh, 760px); min-height: 520px; overflow: hidden; }
#heroCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy { position: absolute; left: 0; right: 0; top: 0; padding-top: clamp(28px, 7vh, 70px); text-align: center; pointer-events: none; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; background: rgba(36,20,10,.7); padding: 6px 12px; border-radius: 999px; }
.logo { font-family: var(--display); font-weight: 400; font-size: clamp(64px, 17vw, 132px); line-height: .9; margin: 10px 0 0; color: var(--cream); text-shadow: 0 6px 0 #5a2e12, 0 10px 30px rgba(0,0,0,.45); letter-spacing: .01em; }
.sub { font-family: var(--display); font-weight: 400; font-size: clamp(20px, 5vw, 30px); margin: 4px 0 0; color: var(--gold); text-shadow: 0 3px 0 #5a2e12; }
.hero-cta { position: absolute; left: 0; right: 0; bottom: clamp(20px, 5vh, 46px); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 0 16px; }
.btn { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; text-decoration: none; border-radius: 16px; padding: 13px 34px; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; }
.btn.play { background: var(--red); color: #fff; box-shadow: 0 6px 0 var(--red-d), 0 12px 30px rgba(0,0,0,.4); font-size: 30px; padding: 14px 46px; }
.btn.play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-d); }
.btn.ghost { background: rgba(36,20,10,.72); color: var(--cream); box-shadow: inset 0 0 0 2.5px var(--edge); }
.biome-tag { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); top: 12px; font-size: 12px; font-weight: 800; background: rgba(36,20,10,.6); padding: 5px 10px; border-radius: 999px; }

/* sections */
section { padding-block: 44px 8px; }
.shelf-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 3px solid var(--plank); padding-bottom: 8px; margin-bottom: 18px; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 6vw, 40px); margin: 0; line-height: 1.05; text-wrap: balance; }
.shelf-title p { margin: 0; font-size: 14px; opacity: .7; max-width: 42ch; }

/* your wizard */
.me { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; background: linear-gradient(180deg, #4a2c16, #3a2212); border: 3px solid var(--edge); border-radius: 22px; padding: 16px; }
.me canvas { display: block; }
.me-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; min-width: 0; }
.stat small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.stat b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.xpbar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: rgba(0,0,0,.4); overflow: hidden; border: 1.5px solid var(--edge); }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #9a6bdf, #d9c2ff); }
@media (max-width: 520px) { .me { grid-template-columns: 1fr; justify-items: center; text-align: center; } .me-stats { width: 100%; } }

/* scores */
.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.score-wrap { overflow-x: auto; background: #2e1a0c; border: 3px solid var(--plank); border-radius: 18px; }
.scores th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; font-weight: 800; padding: 12px 12px 8px; }
.scores td { padding: 9px 12px; border-top: 1.5px solid rgba(138,90,46,.3); white-space: nowrap; }
.scores td.rank { font-family: var(--display); font-size: 20px; width: 44px; color: var(--paper); }
.scores tr:nth-child(1) td.rank { color: var(--gold); } .scores tr:nth-child(2) td.rank { color: #dfe6f0; } .scores tr:nth-child(3) td.rank { color: #e8a36a; }
.scores td.nm { font-family: var(--display); font-size: 19px; }
.scores td.sc { font-family: var(--display); font-size: 21px; text-align: right; }
.scores th.r { text-align: right; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,210,74,.18); color: var(--gold); margin-left: 6px; vertical-align: 2px; }
.badge.heat { background: rgba(255,106,61,.2); color: #ffb347; }
.dim { opacity: .65; font-size: 13px; }
.empty { text-align: center; padding: 30px 16px; }
.empty b { font-family: var(--display); font-weight: 400; font-size: 22px; display: block; }
.note { font-size: 13px; opacity: .6; margin-top: 10px; }
@media (max-width: 560px) { .scores .hide-sm { display: none; } }

/* how to */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.step { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 16px 18px 18px; box-shadow: 0 6px 0 #a8794a; display: grid; gap: 6px; align-content: start; }
.step canvas { width: 100%; height: 110px; display: block; border-radius: 12px; background: #3a2414; }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 23px; margin: 6px 0 0; line-height: 1.1; }
.step p { margin: 0; font-size: 15px; line-height: 1.45; }

/* biomes */
.biomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.biome { border-radius: 18px; overflow: hidden; background: #2e1a0c; border: 2.5px solid var(--plank); display: grid; }
.biome canvas { width: 100%; height: 96px; display: block; }
.biome div { padding: 10px 14px 14px; display: grid; gap: 3px; }
.biome small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ac); font-weight: 800; }
.biome b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; }
.biome p { margin: 0; font-size: 13.5px; line-height: 1.4; opacity: .85; }

/* wizards */
.wizards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.wz { text-align: center; background: linear-gradient(180deg, #4a2c16, #2e1a0c); border: 2.5px solid var(--plank); border-radius: 18px; padding: 10px 10px 14px; position: relative; }
.wz canvas { margin: 0 auto; display: block; }
.wz b { font-family: var(--display); font-weight: 400; font-size: 20px; display: block; }
.wz small { display: block; font-size: 12px; opacity: .7; }
.wz p { margin: 6px 0 0; font-size: 13px; line-height: 1.35; }
.wz.locked canvas { filter: brightness(0) opacity(.55); }
.wz .lv { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; }

/* extras */
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.extra { background: #2e1a0c; border: 2.5px solid var(--plank); border-radius: 18px; padding: 14px 16px; }
.extra b { font-family: var(--display); font-weight: 400; font-size: 20px; display: block; color: var(--gold); }
.extra p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; opacity: .9; }

.final { text-align: center; padding-block: 50px 30px; }
.final p { opacity: .75; }
footer { text-align: center; font-size: 13px; opacity: .55; padding-block: 24px 40px; }

@media (max-width: 520px) {
  .hero-cta { gap: 8px; }
  .hero-cta .btn.play { font-size: 24px; padding: 12px 26px; }
  .hero-cta .btn.ghost { font-size: 18px; padding: 12px 16px; }
}
.tabs { display: inline-flex; gap: 4px; background: #2e1a0c; border: 2.5px solid var(--plank); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.tabs button { font: inherit; font-weight: 800; font-size: 14px; color: var(--cream); background: transparent; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--ink); }
.score-wrap.empty + .score-wrap { margin-top: 12px; }
