/* cardgame-md site: a print shop on a green cutting mat. */
:root {
  --mat: #1d4a3c;
  --mat-deep: #163a2f;
  --mat-line: rgba(236, 245, 238, .07);
  --mat-line-strong: rgba(236, 245, 238, .14);
  --paper: #f6f2e7;
  --ink: #14201b;
  --ink-soft: #4a564f;
  --cream: #ecf3ee;
  --knife: #ffcf3a;
  --reg: #e5484d;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font: 400 18px/1.55 var(--text); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--knife); outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--knife); color: var(--ink); padding: 10px 14px; font-weight: 600; }
.skip:focus { left: 12px; }

/* The cutting mat: a 5 mm and 25 mm grid on deep green. */
.mat {
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  color: var(--cream);
}
.paper { background: var(--paper); color: var(--ink); }

/* Header */
.top { background: var(--mat-deep); color: var(--cream); border-bottom: 1px solid var(--mat-line-strong); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.mark { width: 18px; height: 24px; border-radius: 3px; background: var(--paper); box-shadow: inset 0 0 0 3px var(--paper), inset 0 -9px 0 3px var(--knife); transform: rotate(-8deg); flex: none; }
.nav { display: flex; gap: 6px 22px; list-style: none; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 15px; opacity: .85; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow, .kicker { font: 500 13px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--knife); margin-bottom: 18px; }
.hero h1 { font: 800 clamp(40px, 5.6vw, 72px)/.98 var(--display); letter-spacing: -.035em; max-width: 13ch; }
.lede { font-size: 20px; line-height: 1.5; margin-top: 22px; max-width: 34em; color: #d4e2d9; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-block; font: 700 16px/1 var(--text); text-decoration: none; background: var(--knife); color: var(--ink); padding: 15px 22px; border-radius: 8px; box-shadow: 0 3px 0 #b8901a; }
.btn:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(236,245,238,.5); }
.hero-art { position: relative; height: 480px; }
.hcard { position: absolute; display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 3px rgba(0,0,0,.25), 0 24px 50px rgba(0,0,0,.42); transition: transform .2s ease; }
.hcard img { width: 100%; }
.hcard.h1 { width: 218px; left: 4%; top: 64px; transform: rotate(-9deg); }
.hcard.h2 { width: 238px; left: 31%; top: 6px; transform: rotate(2deg); z-index: 2; }
.hcard.h3 { width: 238px; right: 0; top: 96px; transform: rotate(10deg); z-index: 3; }
.hcard:hover { transform: rotate(0) translateY(-8px); z-index: 4; }
.crop { position: absolute; width: 34px; height: 34px; border-color: var(--knife); border-style: solid; }
.crop.c1 { left: 0; top: 30px; border-width: 2px 0 0 2px; }
.crop.c2 { right: -10px; bottom: 6px; border-width: 0 2px 2px 0; }
.ruler { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background:
  linear-gradient(90deg, rgba(236,245,238,.55) 1px, transparent 1px) 0 0 / 100px 30px no-repeat repeat,
  linear-gradient(90deg, rgba(236,245,238,.55) 1px, transparent 1px) 0 100% / 100px 18px repeat-x,
  linear-gradient(90deg, rgba(236,245,238,.35) 1px, transparent 1px) 0 100% / 20px 10px repeat-x,
  var(--mat-deep); border-top: 1px solid var(--mat-line-strong); }

/* Sections */
section.paper, section.mat:not(.hero) { padding: 88px 0; }
.kicker { color: #9b6b12; margin-bottom: 12px; }
.mat .kicker { color: var(--knife); }
h2 { font: 800 clamp(32px, 4vw, 50px)/1.02 var(--display); letter-spacing: -.03em; max-width: 20ch; }
.section-lede { margin-top: 14px; color: var(--ink-soft); max-width: 40em; }
h3 { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 44px; }
.steps li { position: relative; background: #fffdf7; border: 1px solid #e2dccb; border-radius: 14px; padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.num { position: absolute; top: -18px; left: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--knife); display: grid; place-items: center; font: 800 18px/1 var(--display); }
.steps p { color: var(--ink-soft); font-size: 17px; }
.snip { margin-top: auto; background: var(--mat-deep); color: #d9eadf; border-radius: 10px; padding: 14px 16px; font: 500 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.thumb { margin-top: auto; display: block; border-radius: 8px; overflow: hidden; border: 1px solid #ddd6c4; box-shadow: 0 10px 24px rgba(20,32,27,.14); max-height: 230px; }

.kit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 28px; margin-top: 44px; align-items: start; }
.kit-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.kit-grid figure { background: rgba(10, 28, 22, .55); border: 1px solid var(--mat-line-strong); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.kit-grid img { border-radius: 6px; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.kit-grid figcaption { font-size: 16px; color: #c7d8cd; }
.kit-grid figcaption b { display: block; color: var(--cream); font: 700 20px/1.2 var(--display); margin-bottom: 4px; }
.k-box img { aspect-ratio: 3 / 2; height: auto; object-fit: cover; object-position: center 45%; width: 100%; }

.themes { display: grid; gap: 34px; margin-top: 40px; }
.theme { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 34px; border-bottom: 1px dashed #cfc7b2; }
.theme:last-child { border-bottom: 0; }
.theme a { display: block; }
.theme img { filter: drop-shadow(0 12px 18px rgba(20,32,27,.2)); }
.theme figcaption { font-size: 17px; color: var(--ink-soft); }
.theme figcaption b { display: block; font: 700 28px/1.1 var(--mono); color: var(--ink); margin-bottom: 6px; letter-spacing: -.02em; }
.theme figcaption span { display: block; margin-top: 8px; font-size: 15px; color: #7b6a45; }

.games { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 40px; }
.games li { display: flex; gap: 18px; align-items: center; background: rgba(10, 28, 22, .55); border: 1px solid var(--mat-line-strong); border-radius: 14px; padding: 16px; }
.games img { width: 84px; border-radius: 6px; flex: none; box-shadow: 0 8px 18px rgba(0,0,0,.35); }
.games p { font-size: 15px; color: #c7d8cd; margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.links a { color: var(--knife); font-weight: 600; text-underline-offset: 3px; }

.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 40px; }
.install > div { background: #fffdf7; border: 1px solid #e2dccb; border-radius: 14px; padding: 22px; min-width: 0; }
.install h3 { font-size: 18px; margin-bottom: 12px; }
.install pre { background: var(--ink); color: #e9f1ec; border-radius: 10px; padding: 14px 16px; font: 500 13.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.note { margin-top: 20px; color: var(--ink-soft); font-size: 16px; }

.foot { padding: 40px 0; }
.foot-row { display: grid; gap: 10px; font-size: 15px; color: #c7d8cd; }
.foot a { color: var(--knife); text-underline-offset: 3px; }
.foot .wordmark { color: var(--cream); margin-bottom: 6px; }

/* 404 */
.lost { min-height: 62vh; padding: 96px 0; }
.lost h1 { font: 800 clamp(38px, 6vw, 64px)/1 var(--display); letter-spacing: -.03em; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 400px; max-width: 560px; width: 100%; margin-inline: auto; }
  .steps, .install { grid-template-columns: 1fr; gap: 34px; }
  .kit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .theme { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .hero { padding: 48px 0 80px; }
  .hero-art { height: 300px; }
  .hcard.h1 { width: 132px; top: 50px; }
  .hcard.h2 { width: 146px; left: 28%; }
  .hcard.h3 { width: 146px; top: 74px; }
  .kit-grid { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr; }
  section.paper, section.mat:not(.hero) { padding: 64px 0; }
  .nav { gap: 4px 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hcard, .btn { transition: none; } }
