/* hohmanngames.com: layout and components. Colours, type and spacing come from tokens.css. */
:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 24px); background: var(--bg); }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--text-base);
       line-height: var(--leading-body); font-weight: var(--weight-regular); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: var(--weight-semibold); line-height: var(--leading-tight); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--text-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h4); line-height: 1.25; }
p { margin: 0; }
.display { font-size: clamp(2.75rem, 6.2vw, 4.25rem); line-height: 1.02; letter-spacing: -0.025em; }
.lead { font-size: var(--text-lead); font-weight: var(--weight-light); color: var(--text-muted); max-width: 34em; }
.small { font-size: var(--text-sm); color: var(--text-muted); }
.kicker { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: var(--tracking-label);
          text-transform: uppercase; color: var(--accent-text); }
.placeholder { color: var(--text-muted); font-style: italic; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 10; padding: 10px 16px; border-radius: var(--radius-pill);
        background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.container { width: 100%; max-width: calc(var(--content-max) + 2 * var(--space-6)); margin-inline: auto; padding-inline: var(--space-6); }
.narrow { max-width: calc(720px + 2 * var(--space-6)); }
.hero-copy.narrow { max-width: 760px; padding: 0; }
.section { padding-block: clamp(var(--space-8), 10vw, var(--space-10)); }
.section-tight { padding-top: 0; }
.section + .section { padding-top: 0; }
.section-top0 { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-5); margin-bottom: var(--space-6); }

/* header */
.site-header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: var(--space-5);
               max-width: calc(var(--content-max) + 2 * var(--space-6)); margin-inline: auto; padding: var(--space-5) var(--space-6); }
.home-link { display: block; line-height: 0; border-radius: 4px; }
.home-link img { width: 168px; height: auto; }
.site-header nav { display: flex; gap: var(--space-6); }
.nav-link { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: var(--tracking-label); text-transform: uppercase;
            color: var(--text-muted); text-decoration: none; padding-block: var(--space-2); }
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

/* buttons */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-6); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-5);
       border-radius: var(--radius-pill); border: 0; font: inherit; font-size: 1rem; font-weight: var(--weight-semibold);
       text-decoration: none; cursor: pointer; transition: transform var(--duration-fast) var(--ease-transfer); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-link { color: var(--accent-text); font-weight: var(--weight-semibold); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }

/* motifs */
.transfer { display: block; width: 100%; height: 100%; }
.orbit { fill: none; stroke: var(--orbit); stroke-width: 1.6; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.motif { fill: var(--motif); }
.depart { fill: none; stroke: var(--motif); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal 1.6s var(--ease-transfer) 0.25s both; }
  @keyframes reveal { from { transform: scale(0); } to { transform: scale(1); } }
}

/* heroes */
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-home .hero-art { left: 38%; }
.hero-home .hero-shot { position: relative; }
.hero-game .hero-art { bottom: auto; height: 560px; left: 22%; }
.hero-game .container { position: relative; }
.hero-home { padding-block: var(--space-7) clamp(var(--space-8), 11vw, 144px); }
.hero-grid { position: relative; display: grid; grid-template-columns: 5fr 6fr; gap: clamp(var(--space-6), 5vw, var(--space-8)); align-items: center; }
.hero-copy .lead { margin-top: var(--space-5); }
.hero-copy .kicker { margin-bottom: var(--space-4); }
.tag { display: inline-block; vertical-align: middle; margin-left: 0.35em; padding: 4px 10px; border: 1px solid var(--control-border);
       border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 400; line-height: 1.4;
       letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); position: relative; top: -0.5em; }
.hero-game { padding-block: var(--space-7) var(--space-8); }
.hero-wide { margin-top: var(--space-8); }
.hero-studio { padding-block: var(--space-9) var(--space-9); }
.hero-studio .hero-copy { position: relative; }
.hero-studio .hero-art { left: 50%; }
.studio-prose > h2, .studio-prose > p { max-width: 640px; }
.hero-plain { padding-block: var(--space-8) var(--space-7); }
.hero-plain .lead { margin-top: var(--space-4); }

/* screenshot frames */
.shot { margin: 0; position: relative; display: flex; align-items: flex-end; padding: var(--space-4); background: var(--surface);
        border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.shot figcaption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.shot.has-img { padding: 0; background: #2A1F14; }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.video-toggle { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
                background: rgba(13, 33, 64, 0.72); color: var(--hg-starlight); display: grid; place-items: center; }
.video-toggle::before { content: ""; width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; box-sizing: border-box; }
.video-toggle[aria-pressed="true"]::before { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }
.triptych { margin: var(--space-6) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.triptych .small { margin-top: var(--space-2); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.depth-shot { width: 100%; max-width: 440px; justify-self: center; }

/* home */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(var(--space-5), 4vw, var(--space-7)); }
.pillar h3 { margin-top: var(--space-5); }
.pillar p { margin-top: var(--space-3); color: var(--text-muted); }
.post-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6);
             display: flex; flex-direction: column; gap: var(--space-3); }
.post-card h3 a, .post-row h2 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover, .post-row h2 a:hover { text-decoration: underline; }
.post-card p:last-child { color: var(--text-muted); }
.band { background: var(--bg-deep); padding-block: var(--space-8); }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); }
.band-inner p { font-size: var(--text-lead); font-weight: var(--weight-light); max-width: 40em; }

/* game page */
.journey { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(var(--space-7), 8vw, var(--space-9)); }
.stage { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(var(--space-6), 5vw, var(--space-8)); align-items: center; }
.stage:nth-child(2) { grid-template-columns: 5fr 7fr; margin-left: 4%; }
.stage:nth-child(2) .stage-shot { order: 2; }
.stage:nth-child(3) { margin-left: 8%; }
.stage-num { font-size: 4.5rem; font-weight: var(--weight-light); line-height: 1; color: var(--motif); }
.stage-copy h3 { font-size: var(--text-h3); margin-top: var(--space-3); }
.stage-copy p:last-child { margin-top: var(--space-4); color: var(--text-muted); max-width: 32em; }
.depth { display: grid; grid-template-columns: 6fr 5fr; gap: var(--space-8); align-items: center; }
.depth .lead { margin-top: var(--space-5); }
.band-depth { padding-block: clamp(var(--space-8), 9vw, var(--space-9)); }
.radar { width: 100%; max-width: 420px; justify-self: center; overflow: visible; }
.radar-grid { fill: none; stroke: var(--orbit); stroke-width: 1; opacity: 0.45; }
.radar-shape { fill: var(--motif); fill-opacity: 0.16; stroke: var(--motif); stroke-width: 2; stroke-linejoin: round; }
.radar-label { font-family: var(--font-mono); font-size: 12px; fill: var(--text-muted); }
.gallery { margin-top: var(--space-6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-8); }
.two-col h2 { font-size: var(--text-h3); margin-bottom: var(--space-4); }
.two-col p { color: var(--text-muted); max-width: 34em; }
.faq { margin: 0; }
.faq dt { font-weight: var(--weight-semibold); margin-top: var(--space-5); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: var(--space-1) 0 0; color: var(--text-muted); }

/* devlog */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { padding-block: var(--space-6); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-3); }
.post-row h2 { font-size: var(--text-h3); }
.post-row p:last-child { color: var(--text-muted); }
.post-head { padding-block: var(--space-7) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.post-head .back { align-self: flex-start; }
.prose { padding-bottom: var(--space-9); }
.prose > p, .prose li { max-width: 66ch; }
.prose p + p { margin-top: var(--space-4); }
.prose h2 { font-size: var(--text-h4); line-height: 1.25; margin: var(--space-7) 0 var(--space-4); }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: var(--space-4) 0; padding-left: 1.2em; }
.prose li + li { margin-top: var(--space-2); }
.post-cta { margin-top: var(--space-7); padding: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.post-cta .cta-row { margin-top: var(--space-4); }
.chart { margin: var(--space-6) 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); max-width: 60ch; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-tick, .chart-axis { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); }
.chart-line { fill: none; stroke: var(--motif); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--motif); }

/* sign-up */
.signup { border-top: 1px solid var(--border); padding-block: clamp(var(--space-8), 9vw, var(--space-9)); }
.signup-inner { display: grid; grid-template-columns: 5fr 6fr; gap: var(--space-8); align-items: start; }
.signup .lead { margin-top: var(--space-4); }
.signup-form { display: flex; flex-direction: column; gap: var(--space-3); }
.field-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); }
.field-row { display: flex; gap: var(--space-3); }
.field-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-5); border-radius: var(--radius-pill);
                   border: 1.5px solid var(--control-border); background: var(--bg-deep); color: var(--text); font: inherit; }
.field-row input::placeholder { color: var(--text-muted); opacity: 0.8; }
.consent { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 0.9375rem; color: var(--text-muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.form-error { color: var(--accent-text); font-weight: 600; }
.signup-done { grid-column: 2; }
.signup-done .lead { margin-top: var(--space-3); }

/* footer */
.site-footer { background: var(--bg-deep); padding-block: var(--space-7); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5) var(--space-7); align-items: center; }
.footer-inner img { width: 140px; height: auto; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-inner nav a, .footer-mail { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; }
.footer-inner nav a:hover, .footer-mail:hover { color: var(--text); text-decoration: underline; }
.footer-inner .small { grid-column: 1 / -1; }

/* logos follow the theme: white letters on dark grounds, deep blue letters on light */
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }
.footer-logo { line-height: 0; }

/* preview-only: one page visible at a time */
.view[hidden] { display: none; }

@media (max-width: 900px) {
  .hero-grid, .pillars, .post-cards, .stage, .stage:nth-child(2), .depth, .two-col, .signup-inner { grid-template-columns: 1fr; }
  .stage:nth-child(2), .stage:nth-child(3) { margin-left: 0; }
  .stage:nth-child(2) .stage-shot { order: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .triptych { grid-template-columns: 1fr; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .signup-done { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-home { padding-bottom: var(--space-8); }
  .hero-home .hero-art, .hero-game .hero-art { display: none; }
  .hero-studio .hero-art { left: 0; opacity: 0.5; }
}
@media (max-width: 560px) {
  .container, .site-header { padding-inline: var(--space-5); }
  .site-header { flex-wrap: wrap; }
  .home-link img { width: 140px; }
  .site-header nav { gap: var(--space-5); }
  .field-row { flex-direction: column; }
  .section-head { flex-direction: column; }
  .tag { top: 0; margin: var(--space-3) 0 0; display: table; }
}
