/* Pixelripper hub styles: calm editorial look. Self-hosted fonts only (SIL OFL, see fonts/OFL.txt),
   so the strict CSP (font-src 'self') holds. Fraunces for headings, Outfit for text and UI. */
@font-face { font-family: 'Fraunces'; font-weight: 400 650; font-display: swap; src: url('../fonts/fraunces.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 400 700; font-display: swap; src: url('../fonts/outfit.woff2') format('woff2'); }

:root {
  --paper: #f7f4ee;      /* warm off-white page */
  --card: #ffffff;
  --ink: #15202e;        /* deep ink: headings, body */
  --ink-2: #4a5566;      /* secondary text (7.3:1 on paper) */
  --line: #e3ddd2;
  --accent: #1d5e5a;     /* muted sea green: links, focus (7.2:1 on paper) */
  --accent-soft: #e4efec;
  --warm: #8a5a1f;       /* notices (5.9:1 on paper) */
  --shadow: 0 1px 2px rgba(21,32,46,.05), 0 8px 24px -12px rgba(21,32,46,.18);
  --radius: 16px;
  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --text: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.65; background: var(--paper); min-height: 100vh; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 26px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand__mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); position: relative; flex: none; }
.brand__mark::after { content: ''; position: absolute; left: 5px; right: 5px; bottom: 5px; height: 5px; border-radius: 3px; background: #7fb5ad; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; font-size: .97rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 560; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.05; margin: 0 0 18px; max-width: 18ch; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 1.3rem; line-height: 1.25; margin: 0; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; margin: 0 0 14px; }
.lede { color: var(--ink-2); font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 58ch; margin: 0; }
.small { font-size: .92rem; color: var(--ink-2); }
.status-ok { color: var(--accent); font-weight: 600; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 88px) 0 clamp(24px, 4vw, 40px); }
.hero.doc { max-width: 760px; }
.hero__links { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 0; }

/* Buttons: calm, one shape */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem var(--text); border-radius: 999px; padding: 12px 24px; min-height: 46px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary, .btn-play { background: var(--ink); color: #fff; }
.btn-primary:hover, .btn-play:hover { background: #26354a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: #cfc7b9; }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 36px); margin: 20px 0; box-shadow: var(--shadow); }

/* Home: game grid */
.games-section { padding: 8px 0 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head .small { margin: 0; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 28px); }
@media (max-width: 680px) { .game-grid { grid-template-columns: 1fr; } }
.game-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.game-card:not(.game-card--soon):hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(21,32,46,.06), 0 16px 36px -16px rgba(21,32,46,.28); }
.game-card__media { display: block; position: relative; aspect-ratio: 4 / 3; background: #0f1b22; margin: 10px 10px 0; border-radius: 10px; overflow: hidden; line-height: 0; }
.game-card__media picture { display: block; width: 100%; height: 100%; }
.game-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-card--soon .game-card__media img { filter: saturate(.75); opacity: .9; }
.badge { position: absolute; top: 12px; left: 12px; line-height: 1; background: rgba(247,244,238,.95); color: var(--ink); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 8px 11px; border-radius: 999px; }
.game-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card__tag { margin: 0; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.game-card__title a { color: inherit; text-decoration: none; }
.game-card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.game-card__blurb { margin: 0; color: var(--ink-2); }
.game-card__foot { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }
.game-card__foot p { margin: 0; }
.game-card__foot .btn-play { padding: 10px 26px; min-height: 44px; }
.game-card__note { margin: 0; font-size: .85rem; }
.game-card__soon { margin: auto 0 0; padding-top: 12px; font-style: italic; }
.pass-note { margin: 22px 0 0; text-align: center; }
.noads-link { font-weight: 600; white-space: nowrap; }
.noads-more { display: block; margin-top: 4px; }

/* Older single play-card markup (kept working if used) */
.play-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; }
@media (max-width: 640px) { .play-card { grid-template-columns: 1fr; } }
.play-card img { width: 160px; max-width: 40vw; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.play-card picture { display: block; line-height: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 0; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features li { padding: 24px 24px 24px 0; color: var(--ink-2); font-size: .97rem; }
.features li + li { border-left: 1px solid var(--line); padding-left: 24px; }
@media (max-width: 720px) { .features li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }
.features strong { color: var(--ink); display: block; font-family: var(--display); font-weight: 560; font-size: 1.15rem; margin-bottom: 4px; }
.teasers:empty { display: none; }
.teasers { margin: 14px 0 0; }
.teasers .teaser { margin: 0; text-align: center; }

/* Landing ad slot: below the games, clearly labelled, well away from any button. */
.ad-slot { margin: 56px auto 40px; max-width: 728px; }
.ad-slot__label { display: block; text-align: center; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.ad-slot__body { min-height: 0; }
.ad-slot--preview .ad-slot__body { min-height: 90px; border: 1px dashed #cfc7b9; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); font-size: .85rem; }
.ad-slot--preview .ad-slot__body::after { content: 'Ad slot preview (layout only, no ad code loaded)'; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 88px); padding: 28px 0 48px; color: var(--ink-2); font-size: .92rem; }
.site-foot nav { display: flex; gap: 6px 22px; flex-wrap: wrap; margin-bottom: 10px; }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0; }

/* Long-form pages (parents, privacy, terms, about, unlock) */
main > .card.doc, main > section.doc:not(.hero) { max-width: 820px; }
.doc h2 { margin-top: 0; }
.doc h2 ~ h2, .doc h3 { margin-top: 28px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--accent); }
.doc strong { font-weight: 600; }
.draft-banner { background: #fbf3e4; border: 1px solid #ecd7b2; color: var(--warm); border-radius: 12px; padding: 12px 16px; font-size: .92rem; }

/* Parental gate / purchase */
.gate input { font: 600 1.2rem var(--text); padding: 10px 12px; border-radius: 10px; border: 1px solid #cfc7b9; background: #fff; color: var(--ink); width: 10ch; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.row .btn { min-width: 150px; }
.hold-btn { position: relative; overflow: hidden; }
.hold-btn .fill { position: absolute; inset: 0; width: 0; background: rgba(29,94,90,.18); transition: width linear; }
.code { font: 600 1.25rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; }
.code-input { width: 18ch; font: 500 1rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border-radius: 10px; border: 1px solid #cfc7b9; background: #fff; color: var(--ink); }
textarea.code-input { width: 22ch; resize: vertical; line-height: 1.5; }
/* Remove-ads options on /parents/: equal cards, equal buttons. No "best value" badge, no highlight. */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 18px 0 10px; }
.option { border: 1px solid var(--line); background: #fbfaf7; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.option h3 { font-size: 1.15rem; margin: 0; }
.option p { margin: 0; color: var(--ink-2); }
.option .option__price { color: var(--ink); font-weight: 600; margin-top: auto; padding-top: 8px; }
.option .btn { width: 100%; margin-top: 10px; }
.restore { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-top: 10px; }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .site-head { padding: 18px 0; }
  .nav { gap: 2px 14px; font-size: .9rem; }
  .hero__links .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
