/* Wondercrafted — shared styles. No external fonts, scripts or trackers. */
:root {
  --paper: #fbf6ec;
  --paper-2: #f4ecdc;
  --card: #fffdf8;
  --ink: #2a2520;
  --ink-soft: #645a50;
  --line: #e6dccb;
  --brand: #e2623d;
  --brand-ink: #b8461f;
  --sky: #cfe8f2;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(60, 40, 20, .06), 0 10px 30px -12px rgba(60, 40, 20, .22);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: var(--brand);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1815;
    --paper-2: #231f1b;
    --card: #2a2521;
    --ink: #f3ece1;
    --ink-soft: #b8ab9b;
    --line: #3b342d;
    --brand: #f07a52;
    --brand-ink: #ff9d7a;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 12px 30px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--round); line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--round); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }

/* Home hero */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 800; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.pills li { background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.icon-stack { position: relative; aspect-ratio: 1; max-width: 440px; margin-inline: auto; width: 100%; }
.icon-stack::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--sky), transparent 70%); opacity: .8; }
.icon-stack img { position: absolute; width: 46%; border-radius: 22.5%; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2,.8,.2,1.2); }
.icon-stack img:nth-child(1) { left: 4%; top: 6%; transform: rotate(-8deg); }
.icon-stack img:nth-child(2) { right: 4%; top: 2%; transform: rotate(7deg); }
.icon-stack img:nth-child(3) { left: 10%; bottom: 2%; transform: rotate(5deg); }
.icon-stack img:nth-child(4) { right: 8%; bottom: 8%; transform: rotate(-6deg); }
.icon-stack img:hover { transform: rotate(0) scale(1.05); z-index: 2; }

/* Sections */
section { scroll-margin-top: 16px; }
.section { padding: 72px 0; }
.section.alt { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
.section-head p { color: var(--ink-soft); margin: 0; max-width: 46ch; }

/* Game cards */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.game-card { --accent: var(--brand); position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(60,40,20,.06), 0 22px 40px -18px rgba(60,40,20,.35); }
.game-card .shot { aspect-ratio: 16 / 9; overflow: hidden; background: var(--accent); }
.game-card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.game-card:hover .shot img { transform: scale(1.03); }
.game-card .body { display: grid; grid-template-columns: 64px 1fr; gap: 6px 16px; padding: 20px 22px 24px; align-items: start; }
.game-card .app-icon { grid-row: span 2; width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow); }
.game-card h3 { font-size: 1.45rem; font-weight: 800; }
.game-card .tag { font-size: .86rem; color: var(--ink-soft); font-weight: 600; }
.game-card p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--ink-soft); }
.game-card .card-link { color: inherit; text-decoration: none; }
.game-card .card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.game-card:has(.card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.game-card .card-link:focus-visible { outline: none; }
.game-card .card-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; min-height: 40px; }
.game-card .more { font-weight: 700; color: var(--accent); }
.game-card .store-badge { position: relative; z-index: 2; margin-left: auto; }
.game-card .store-badge img { height: 40px; }
.game-card .more::after { content: " →"; }
.status { position: absolute; top: 14px; left: 14px; background: rgba(255,253,248,.94); color: #2a2520; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; letter-spacing: .02em; }

/* Promise */
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.promise li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.promise .em { font-size: 1.8rem; line-height: 1; display: block; margin-bottom: 12px; }
.promise h3 { font-size: 1.15rem; margin-bottom: 6px; }
.promise p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 16px; }
.about p { font-size: 1.08rem; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.contact-card dl { margin: 0; }
.contact-card dt { font-weight: 700; margin-top: 14px; }
.contact-card dd { margin: 2px 0 0; color: var(--ink-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn[aria-disabled="true"] { background: var(--ink); color: var(--paper); cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.store-badge { display: inline-flex; border-radius: 10px; }
.store-badge img { height: 50px; width: auto; }
.store-badge:hover { filter: brightness(1.15); }

/* Game page */
.game-hero { padding: 36px 0 56px; }
.game-hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.game-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.game-hero h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 800; margin-bottom: 10px; color: var(--accent-ink, var(--ink)); }
.game-hero .tagline { font-family: var(--round); font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; }
.game-hero .lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 46ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.meta li { font-size: .88rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.hero-shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--accent); }
.hero-shot.portrait { max-width: 340px; margin-inline: auto; border-radius: 34px; border: 8px solid #1d1a17; }
.hero-shot figcaption, .caption { font-size: .82rem; color: var(--ink-soft); text-align: center; margin-top: 10px; }

.gallery { --edge: max(20px, (100% - 1120px) / 2); display: flex; gap: 18px; overflow-x: auto; padding: 6px var(--edge) 22px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); }
.gallery figure { flex: none; margin: 0; scroll-snap-align: start; }
.gallery img { border-radius: 18px; box-shadow: var(--shadow); height: clamp(220px, 34vw, 380px); width: auto; background: var(--paper-2); }
.gallery.portrait img { height: clamp(380px, 52vw, 560px); border-radius: 26px; }
.gallery figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 10px; font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.features h3 { font-size: 1.15rem; margin-bottom: 6px; }
.features p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.callout { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 26px 28px; }
.callout h2 { font-size: 1.5rem; margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; }
.subnav a { display: inline-block; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink-soft); border: 1px solid var(--line); background: var(--card); }
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Click-to-play video */
.video-section { padding-top: 24px; }
.video { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video .play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s ease; }
.video .play svg { width: 38px; height: 38px; fill: #fff; margin-left: 4px; }
a.video:hover .play { transform: scale(1.08); }

/* Document pages (support / privacy) */
.doc { padding: 24px 0 72px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 6px; }
.doc .updated { color: var(--ink-soft); font-size: .92rem; margin-bottom: 28px; }
.doc h2 { font-size: 1.35rem; margin: 34px 0 10px; }
.doc ul { padding-left: 1.3rem; }
.doc li { margin: .35em 0; }
.doc .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 20px 0; }
.doc .card h2 { margin-top: 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-soft); font-size: .93rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: start; }
.site-foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .logo { font-size: 1.05rem; }
.site-foot .logo svg { width: 24px; height: 24px; }

/* Per-game accents */
.t-hopperwild { --accent: #3d9a52; --accent-ink: #2f7c41; }
.t-vroomvale { --accent: #e5871b; --accent-ink: #c46d0b; }
.t-wonderrails { --accent: #2f6b46; --accent-ink: #285c3c; }
.t-honksmashmoo { --accent: #e0443a; --accent-ink: #c0352c; }
@media (prefers-color-scheme: dark) {
  .t-hopperwild { --accent-ink: #79d08b; }
  .t-vroomvale { --accent-ink: #ffb655; }
  .t-wonderrails { --accent: #3f8a5c; --accent-ink: #9fd6b1; }
  .t-honksmashmoo { --accent-ink: #ff8a80; }
}

@media (max-width: 900px) {
  .hero .wrap, .game-hero .wrap, .about { grid-template-columns: 1fr; gap: 36px; }
  .icon-stack { max-width: 340px; }
  .promise { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .narrow { width: calc(100% - 32px); }
  .hero { padding: 16px 0 48px; }
  .section { padding: 52px 0; }
  .games, .promise, .features { grid-template-columns: 1fr; }
  .nav a { padding: 6px 10px; }
  .gallery { --edge: 16px; }
}
