/* Shepstone Labs — homepage styles.
   Values are lifted 1:1 from design/Shepstone Labs v2.dc.html. No border radius anywhere. */

:root {
  --ink: #102426;
  --raised: #142c2f;
  --panel: #0f2224;
  --deep: #0c1c1e;
  --shadow: #0a1719;
  --line: #375052;
  --line-strong: #4b6466;
  --cream: #f5f1df;
  --body: #c6d5cc;
  --muted: #b4c6bd;
  --status: #b6cfbd;
  --tag: #93a99f;
  --accent: #f4ad70;
  --accent-hover: #ffbf87;

  --mono: 'Space Mono', monospace;
  --sans: 'IBM Plex Sans', Arial, sans-serif;
  --gutter: clamp(1.375rem, 4vw, 2.75rem);
  /* Page width: 85rem as designed, but on very wide monitors grow with the screen (90%, up to 137.5rem)
     so the text keeps a laptop-like left margin and stays balanced against the hero scene. */
  --page-max: max(1360px, min(90vw, 2200px));
}

/* The whole site scales on large screens: every size is in rem, and the root font size grows from
   16px (100%, or the visitor's own setting) up to 1.5x. It only grows when the window is both wide
   (beyond 1440px) and tall (beyond 900px), so a wide-but-short browser window isn't oversized. */
html { font-size: clamp(100%, min(1.1111vw, 1.7778vh), 150%); scroll-behavior: smooth; background: var(--ink); }
/* Laptops/desktops: also scale DOWN on short windows, by up to 10% (the same as 90% browser zoom),
   e.g. a 1536x730 laptop browser window. The design was drawn for ~900px-tall windows. */
@media (min-width: 1024px) { html { font-size: clamp(90%, min(1.1111vw, 1.7778vh), 150%); } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 12 18' shape-rendering='crispEdges'%3E%3Cpath d='M1 1V15H3V14H4V13H5V15H6V17H8V15H7V13H6V12H10V11H9V10H8V9H7V8H6V7H5V6H4V5H3V4H2V2Z' fill='%23f5f1df' stroke='%23102426' stroke-width='1'/%3E%3C/svg%3E") 2 2, auto;
}
a { color: inherit; text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--accent); } }
a:focus-visible, button:focus-visible { outline: 0.1875rem solid var(--accent); outline-offset: 0.375rem; }
::selection { background: var(--accent); color: var(--ink); }
*, *::before, *::after { box-sizing: border-box; }

.skip {
  position: absolute; left: 0.75rem; top: -3.75rem; z-index: 50;
  padding: 0.75rem 1rem; background: var(--accent); color: var(--ink);
  font: 700 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.skip:focus { top: 0.75rem; color: var(--ink); }

.wrap { max-width: var(--page-max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
section[id] { scroll-margin-top: 5rem; }

/* ---------- Type ---------- */
.kicker { font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.label { font: 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.h2 { font: 700 clamp(1.75rem, 3vw, 2.625rem)/1.1 var(--mono); letter-spacing: -0.045em; margin: 1.125rem 0 0; }
.h3 { font: 700 clamp(1.375rem, 2vw, 1.75rem)/1.2 var(--mono); letter-spacing: -0.04em; margin: 0.75rem 0 1rem; }
.copy { font-size: 1rem; line-height: 1.75; color: var(--muted); margin: 0; }
.lead { font-size: clamp(1rem, 1.2vw, 1.125rem); line-height: 1.75; color: var(--body); margin: 0 0 1.375rem; }
.section-head { display: flex; flex-direction: column; gap: 1rem; }
.section-head > p { font-size: 1rem; line-height: 1.7; color: var(--muted); margin: 0; max-width: 32.5rem; }

/* ---------- Pixel bits ---------- */
.seg { display: flex; height: 0.25rem; }
.seg > span { width: 0.5rem; }
.seg > .a40 { width: 2.5rem; }
.seg > .a16 { width: 1rem; }
.seg > .a24 { width: 1.5rem; }
.seg > .on { background: var(--accent); }
.seg > .rest { flex: 1; margin-left: 0.5rem; background: var(--line); width: auto; }

.status {
  display: flex; align-items: center; gap: 0.5625rem; flex: none;
  font: 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--status);
}
.status::before { content: ""; width: 0.375rem; height: 0.375rem; background: var(--accent); flex: none; }
.tag { font: 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 1.625rem;
  padding: 1.0625rem 1.375rem; border: 0; cursor: pointer;
  background: var(--accent); color: var(--ink);
  font: 700 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0.25rem 0.25rem 0 var(--shadow);
  transition: transform .14s steps(2), box-shadow .14s steps(2), background .14s;
}
@media (hover: hover) { .btn:hover { background: var(--accent-hover); color: var(--ink); transform: translate(-0.125rem, -0.125rem); box-shadow: 0.375rem 0.375rem 0 var(--shadow); } }
.btn:active { transform: translate(0.25rem, 0.25rem); box-shadow: 0 0 0 var(--shadow); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn svg { flex: none; }

.tlink {
  display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.5625rem 0;
  color: var(--accent); font: 700 0.75rem/1 var(--mono);
  border-bottom: 1px solid var(--line);
  transition: gap .15s steps(2), border-color .15s;
}
@media (hover: hover) { .tlink:hover { gap: 1.25rem; border-color: var(--accent); } }
.tlink--hero { gap: 0.625rem; border-bottom-color: var(--line-strong); }
@media (hover: hover) { .tlink--hero:hover { gap: 1rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; height: 5rem;
  transform: translateY(var(--navy, 0%));
  transition: transform .42s cubic-bezier(.22, .8, .24, 1), background .2s;
  will-change: transform;
  background: rgba(16, 36, 38, calc(var(--navbg, 0) * 0.94));
  border-bottom: 1px solid rgba(55, 80, 82, var(--navbg, 0));
}
.site-header nav { max-width: var(--page-max); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font: 700 1.3125rem/1 var(--mono); letter-spacing: -0.06em; color: var(--cream); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.125rem); font-size: 0.8125rem; font-weight: 500; }
.nav-links .hello { color: var(--accent); }

.menu-btn {
  display: none; align-items: center; gap: 0.625rem; min-height: 2.75rem; padding: 0 0.875rem;
  background: transparent; border: 1px solid var(--line-strong); color: var(--cream);
  font: 700 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.menu-btn .bars { display: flex; flex-direction: column; gap: 0.1875rem; }
.menu-btn .bars span { width: 0.875rem; height: 0.125rem; background: var(--accent); }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  padding: 5rem var(--gutter) 1.75rem; background: var(--ink);
  border-bottom: 1px solid var(--line); box-shadow: 0 0.75rem 0 rgba(6, 20, 23, 0.5);
  display: flex; flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem;
  border-bottom: 1px solid var(--line);
  font: 700 1.375rem/1 var(--mono); letter-spacing: -0.03em; color: var(--cream);
}
.mobile-menu a.hello { color: var(--accent); }

@media (max-width: 759px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 37.5rem; margin-top: -5rem; }
.hero-stage { position: sticky; top: 0; height: 100%; overflow: hidden; background: #1e4547; isolation: isolate; }
.hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(16,36,38,0.84) 0%, rgba(16,36,38,0.62) 26%, rgba(16,36,38,0.22) 48%, rgba(16,36,38,0) 64%),
              linear-gradient(0deg, #102426 0%, rgba(16,36,38,0) 22%);
}
.hero-inner { position: relative; padding-top: clamp(5.5rem, 14vh, 11.875rem); }
.hero h1 {
  font: 700 clamp(2.375rem, min(6vw, 8.5vh), 5.25rem)/0.98 var(--mono);
  letter-spacing: -0.05em; word-spacing: -0.32em; text-transform: uppercase;
  margin: clamp(0.875rem, 3vh, 1.5rem) 0 clamp(1rem, 3.4vh, 1.75rem); color: var(--cream);
}
.hero h1 span { display: block; }
.hero h1 .acc { color: var(--accent); }
.hero-lead { font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.7; max-width: 27.5rem; color: var(--body); margin: 0 0 clamp(1.25rem, 4vh, 2.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.hero-sig { display: flex; align-items: center; gap: 0.625rem; margin-top: 2.125rem; font: 0.75rem/1.6 var(--mono); color: var(--muted); }
.hero-sig::before { content: ""; width: 0.375rem; height: 0.375rem; background: var(--accent); flex: none; }

.hero-lines {
  position: absolute; right: clamp(1.375rem, 3vw, 2.75rem); bottom: clamp(1.75rem, 5vh, 3rem);
  width: min(21.25rem, 70vw); height: 2.75rem;
  font: 0.6875rem/1.8 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #dbe6dc; text-align: right;
}
.hero-lines > div { position: absolute; right: 0; bottom: 0; }
.hero-lines .l1 { opacity: var(--b1, 1); }
.hero-lines .l2 { opacity: var(--b2, 0); }
.hero-lines .l3 { opacity: var(--b3, 0); color: var(--accent); }

@media (max-width: 759px) {
  .hero-veil { background: linear-gradient(180deg, rgba(16,36,38,0.96) 0%, rgba(16,36,38,0.9) 42%, rgba(16,36,38,0.4) 62%, rgba(16,36,38,0) 76%, #102426 100%); }
  .hero-lines { display: none; }
}

/* ---------- Idea statement ---------- */
.idea { padding-top: clamp(3.5rem, 8vh, 5.5rem); padding-bottom: clamp(3.5rem, 8vh, 5.5rem); }
.idea p {
  font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.75rem); line-height: 1.22; letter-spacing: -0.025em;
  max-width: 66.25rem; margin: 1.875rem 0 0; color: var(--cream); text-wrap: pretty;
}
.idea .acc { color: var(--accent); }

/* ---------- 01 / Work ---------- */
.work { padding-bottom: clamp(3.5rem, 8vh, 5.5rem); }
.work > .section-head { padding-top: 2.5rem; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem); }
.work .grid-2 { margin-top: clamp(1.75rem, 4vh, 2.5rem); }
.path-icon { display: block; margin: 0 0 1.25rem; }
.path .h3 { margin-top: 0; }
.path p.copy { margin-bottom: 1.75rem; max-width: 27.5rem; }

/* ---------- 02 / Workbench band ---------- */
.band { position: relative; isolation: isolate; background: var(--raised); }
.band-edge { position: absolute; left: 0; width: 100%; height: 2rem; display: block; }
.band-edge--top { top: -1.9375rem; }
.band-edge--bottom { bottom: -1.9375rem; transform: scale(-1, -1); }
.band .scene { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; }
.workbench-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,44,47,0.96) 0%, rgba(20,44,47,0.92) 60%, rgba(20,44,47,0.6) 72%, rgba(20,44,47,0) 84%); }
.workbench-inner { padding-top: clamp(4rem, 8vh, 5.5rem); padding-bottom: clamp(21.25rem, 38vh, 26.25rem); }
.projects { margin-top: clamp(2rem, 4vh, 3rem); border-top: 1px solid var(--line); }
.project {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: clamp(1.125rem, 3vw, 2.5rem); row-gap: 0.875rem;
  position: relative; padding: clamp(1.375rem, 2.4vw, 2rem) 0; border-bottom: 1px solid var(--line);
  transition: background .2s steps(3), padding .2s steps(3);
}
@media (hover: hover) { .project:hover { background: rgba(244, 173, 112, 0.06); padding-left: 1rem; } }
.project h3 { flex: 1 1 16.25rem; margin: 0; font: 700 clamp(1.5rem, 2.8vw, 2.25rem)/1.1 var(--mono); letter-spacing: -0.05em; }
.project-body { flex: 2 1 22.5rem; display: flex; flex-direction: column; gap: 0.875rem; }
.project-body p { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--muted); max-width: 35rem; text-wrap: pretty; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem 1.75rem; }
.footnote { font-size: 0.875rem; line-height: 1.7; color: var(--muted); margin: 1.625rem 0 0; }

/* ---------- 03 / Greenhouse ---------- */
.side { padding-top: clamp(4rem, 8vh, 5.5rem); padding-bottom: clamp(4rem, 8vh, 5.5rem); }
.side .grid-2 { gap: clamp(2.25rem, 5vw, 4.5rem); }
.side-intro { font-size: 1.0625rem; line-height: 1.75; color: var(--body); margin: 0; max-width: 27.5rem; }
.side .h2 { margin-bottom: 1.25rem; }
.games-list { border-top: 1px solid var(--line); }
.games-list > a { color: inherit; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.games-list .name { font: 700 clamp(1.125rem, 1.6vw, 1.375rem)/1.2 var(--mono); letter-spacing: -0.03em; }
.panel {
  position: relative; margin-top: clamp(2.5rem, 5vh, 3.75rem); padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--raised); box-shadow: 0.375rem 0.375rem 0 var(--shadow);
  }
.panel > .seg { position: absolute; left: 0; top: 0; width: 100%; }
.panel .copy { max-width: 32.5rem; }
.panel .h3 { margin-top: 0; }
.side .panel { max-width: 46rem; }
.panel .tlink { margin-top: 1.5rem; }

/* ---------- 04 / About ---------- */
.about {
  padding-top: clamp(4rem, 8vh, 5.5rem); padding-bottom: clamp(3.5rem, 8vh, 5.5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: clamp(2.25rem, 5vw, 4.5rem);
}
.about .h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); letter-spacing: -0.05em; text-wrap: balance; }
.portrait { position: relative; margin: 2.75rem 0 0; max-width: 23.75rem; }
.portrait::before { content: ""; position: absolute; inset: 0; transform: translate(0.625rem, 0.625rem); background: var(--accent); }
.portrait img { position: relative; display: block; width: 100%; height: auto; background: #173033; border: 0.25rem solid var(--ink); }
.namecard { display: flex; align-items: center; gap: 0.875rem; margin-top: 1.875rem; }
.namecard::before { content: ""; width: 0.75rem; height: 0.75rem; background: var(--accent); flex: none; }
.namecard .n { font: 700 0.9375rem/1.3 var(--mono); color: var(--accent); }
.namecard .r { font: 0.6875rem/1.6 var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.about-body { padding-top: clamp(0px, 3vw, 2.25rem); }
.about-body .lead:last-of-type { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; background: #0d1d20; }
.contact .scene { position: absolute; inset: 0; z-index: -3; display: block; width: 100%; height: 100%; }
.contact-veil { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, #102426 0%, rgba(16,36,38,0.85) 26%, rgba(16,36,38,0.3) 55%, rgba(16,36,38,0) 70%); }
.contact-inner {
  padding-top: clamp(4rem, 9vh, 6.5rem); padding-bottom: clamp(15rem, 34vh, 22.5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr));
  gap: 3rem clamp(2.25rem, 5vw, 4.5rem); align-items: start;
}
.contact h2 { font: 700 clamp(1.875rem, 3.8vw, 3.25rem)/1.06 var(--mono); letter-spacing: -0.05em; margin: 1.125rem 0; }
.contact-lead { font-size: 1rem; line-height: 1.7; color: var(--body); margin: 0; max-width: 27.5rem; }
.direct { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: 27.5rem; }
.direct .label { margin-bottom: 0.625rem; }
.direct a { font: 700 1rem/1.4 var(--mono); color: var(--accent); border-bottom: 1px solid var(--accent); }

.form {
  display: flex; flex-direction: column; gap: 1.125rem; padding: clamp(1.5rem, 3vw, 2.25rem);
  background: rgba(16, 36, 38, 0.9); border: 1px solid var(--line); box-shadow: 0.375rem 0.375rem 0 rgba(6, 20, 23, 0.7);
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field > span { font: 700 0.6875rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 0; color: var(--cream);
  font: 400 0.9375rem/1.4 var(--sans); padding: 0.875rem; outline: none; width: 100%;
  transition: border-color .15s steps(2);
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #e2846a; }
.field .err { font: 0.75rem/1.4 var(--mono); color: #f0a08a; text-transform: none; letter-spacing: 0; font-weight: 400; }
.field .err:empty { display: none; }
.hp { position: absolute; left: -624.9375rem; width: 1px; height: 1px; overflow: hidden; }
.form .btn { align-self: flex-start; }
.form-msg { margin: 0; font-size: 0.9375rem; line-height: 1.7; color: var(--body); }
.form-msg a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.form-msg:empty { display: none; }
.form-done { display: flex; flex-direction: column; gap: 0.75rem; }
.form-done h3 { margin: 0; font: 700 clamp(1.375rem, 2vw, 1.75rem)/1.2 var(--mono); letter-spacing: -0.04em; }
.form-done p { margin: 0; font-size: 1rem; line-height: 1.7; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); border-top: 1px solid #23383a; }
.site-footer .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 1.875rem; font: 0.75rem/1.6 var(--mono); color: var(--muted); }
.site-footer .mail { color: var(--cream); }
.site-footer .after { display: flex; align-items: center; gap: 0.875rem; }
.site-footer .after a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tlink, .project, .site-header { transition: none; }
}

/* ======================================================================
   Games page ("The greenhouse.") — design/Shepstone Labs Games.dc.html
   ====================================================================== */
.nav-links a[aria-current="page"] { display: flex; align-items: center; gap: 0.5rem; }
.nav-links a[aria-current="page"]::before { content: ""; width: 0.375rem; height: 0.375rem; background: var(--accent); }

.hero--games .hero-veil {
  background: linear-gradient(90deg, rgba(16,36,38,0.95) 0%, rgba(16,36,38,0.82) 30%, rgba(16,36,38,0.35) 55%, rgba(16,36,38,0) 74%),
              linear-gradient(0deg, #102426 0%, rgba(16,36,38,0) 20%);
}
.hero--games .hero-inner { padding-top: clamp(5.5rem, 14vh, 12.5rem); }
.hero--games .hero-lead { max-width: 28.75rem; }
@media (max-width: 759px) {
  .hero--games .hero-veil { background: linear-gradient(180deg, rgba(16,36,38,0.96) 0%, rgba(16,36,38,0.9) 42%, rgba(16,36,38,0.4) 62%, rgba(16,36,38,0) 76%, #102426 100%); }
}

.building { padding-top: clamp(3.5rem, 8vh, 5.5rem); padding-bottom: clamp(3.5rem, 8vh, 5.5rem); }
.building .section-head > p, .restored .section-head > p { max-width: 27.5rem; }
.building .grid-2 { margin-top: clamp(2.25rem, 5vh, 3.5rem); }

.game-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.game .game-head { margin-top: 2rem; }
.game-head h3 { margin: 0; font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--mono); letter-spacing: -0.05em; }
.game-cat { margin-top: 0.625rem; font: 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tag); }
.game-desc { font-size: 1rem; line-height: 1.75; color: var(--muted); margin: 1.125rem 0 1.625rem; max-width: 28.75rem; }
.status--accent { color: var(--accent); }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1rem; margin: 0; padding: 1.125rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec dt { font: 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0.375rem 0 0; font-size: 0.9375rem; color: var(--cream); }

.next { font-size: 0.9375rem; line-height: 1.7; color: var(--body); margin: 1.125rem 0 0; }
.next b { font: 700 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.next a, .inline-link { color: var(--accent); border-bottom: 1px solid var(--accent); }

.restored-inner { padding-top: clamp(4rem, 8vh, 5.5rem); padding-bottom: clamp(4rem, 8vh, 5.5rem); }
.classic { margin-top: clamp(2.25rem, 5vh, 3.5rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22.5rem), 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.classic img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.classic .game-head h3 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); }
.classic .game-desc { max-width: none; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 1.125rem; font: 0.75rem/1.6 var(--mono); color: var(--body); }
.controls b { letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
kbd { font: inherit; padding: 0.125rem 0.375rem; border: 1px solid var(--line-strong); background: var(--ink); }
.classic .hero-actions { margin: 1.5rem 0; }
.controls--caption { margin-top: 0.75rem; color: var(--muted); }

.vault { position: relative; margin-top: clamp(2.75rem, 6vh, 4rem); padding: clamp(1.75rem, 4vw, 3rem); background: var(--ink); box-shadow: 0.375rem 0.375rem 0 var(--shadow); }
.vault > .seg { position: absolute; left: 0; top: 0; width: 100%; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23.75rem), 1fr)); gap: 1.75rem clamp(2rem, 5vw, 4.5rem); }
.vault .game-head { justify-content: flex-start; }
.vault .game-head h3 { font: 700 clamp(1.375rem, 2vw, 1.75rem)/1.2 var(--mono); letter-spacing: -0.04em; }
.vault .game-desc { margin-bottom: 0; max-width: none; }
.vault .next { margin-bottom: 1.5rem; }

.why { padding-top: clamp(4.5rem, 9vh, 6.25rem); padding-bottom: clamp(3.5rem, 8vh, 5.5rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: clamp(2.25rem, 5vw, 4.5rem); }
.why .h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); letter-spacing: -0.05em; }
.why .copy { line-height: 1.75; }

.back { background: var(--raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.back .wrap { padding-top: clamp(2rem, 4vh, 3rem); padding-bottom: clamp(2rem, 4vh, 3rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; }
.back p { font-size: 1.0625rem; line-height: 1.7; color: var(--body); margin: 0.75rem 0 0; }
.site-footer .mail--accent { color: var(--accent); }

/* ---------- The hidden door (homepage hero) ----------
   The workshop door links to /portal/. Nothing announces it: the cursor turns to a pointing
   finger over the door and the doorway warms very slightly. Everything layered over the scene
   lets clicks through, except the hero's own links. */
.hero-veil, .hero-inner, .hero-lines { pointer-events: none; }
.hero-inner a, .hero-inner .hero-lead, .hero-inner h1, .hero-inner .kicker { pointer-events: auto; }
.hero-inner .kicker, .hero-inner h1 { width: fit-content; }
.door-link { cursor: pointer; }
.door-link rect { transition: fill .3s steps(3); }
@media (hover: hover) { .door-link:hover rect:not(.door-hit) { fill: rgba(255, 211, 143, 0.14); } }
.door-link .door-hit { display: none; }

/* Comfortable line length for longer prose, whatever the page width (matters on very wide screens). */
.about-body, .why > div:last-child { max-width: 42.5rem; }

/* Hero scene placement by screen size (overrides the scene's built-in sizing).
   Phones: a smaller scene anchored to the bottom, so the house sits below the text, not behind it.
   760–1199px: the house moves a little right, clear of the buttons. */
@media (max-width: 759px) {
  .hero { min-height: 50rem; } /* short phones: room for the text above the house (scroll a little to see it) */
  .hero-stage > svg {
    width: max(100%, 1008px) !important;
    left: clamp(calc(100% - max(100%, 1008px)), calc(60% - 0.708 * max(100%, 1008px)), 0px) !important;
  }
}
@media (min-width: 760px) and (max-width: 1199px) {
  .hero-stage > svg {
    left: clamp(calc(100% - max(100%, 180vh, 1008px, calc(170vw - 900px))), calc(66% - 0.708 * max(100%, 180vh, 1008px, calc(170vw - 900px))), 0px) !important;
  }
}

/* ---------- Project details pop-ups ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.project-open { position: absolute; inset: 0; width: 100%; padding: 0; background: transparent; border: 0; cursor: pointer; }
.project-open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.project-more { margin-left: auto; font: 700 0.75rem/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); transition: color .15s steps(2); }
@media (hover: hover) { .project:hover .project-more { color: var(--accent); } }
.project:focus-within .project-more { color: var(--accent); }

.info {
  width: min(32rem, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 4rem); max-height: calc(100svh - 4rem); overflow: auto; overscroll-behavior: contain;
  padding: clamp(1.5rem, 3vw, 2rem); margin: auto;
  background: var(--raised); color: var(--cream); border: 1px solid var(--line); box-shadow: 0.375rem 0.375rem 0 var(--shadow);
}
.info::backdrop { background: rgba(6, 20, 23, 0.55); }
.info[open] { animation: info-in .24s steps(4) both; }
@keyframes info-in { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
.info > .seg { position: absolute; left: 0; right: 0; top: 0; }
.info-close {
  position: absolute; top: 0.75rem; right: 0.75rem; width: 2.75rem; height: 2.75rem;
  background: transparent; border: 1px solid var(--line); color: var(--cream); font: 700 1.25rem/1 var(--mono); cursor: pointer;
}
@media (hover: hover) { .info-close:hover { border-color: var(--accent); color: var(--accent); } }
.info-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0.5rem 3.25rem 0.875rem 0; }
.info-head h3 { margin: 0; font: 700 clamp(1.5rem, 2.4vw, 1.875rem)/1.1 var(--mono); letter-spacing: -0.05em; }
.info-desc { margin: 0 0 1.25rem; font-size: 1rem; line-height: 1.7; color: var(--body); }
.info-actions { margin-top: 1.25rem; }
.info-note { margin: 1rem 0 0; font-size: 0.875rem; color: var(--muted); }

/* ---------- Phones: calmer, more readable small text ---------- */
@media (max-width: 759px) {
  .label, .tag, .status, .spec dt, .field > span, .namecard .r, .game-cat {
    font-size: 0.8125rem; letter-spacing: 0.08em; color: #c3d3ca;
  }
  .spec { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
  .workbench-inner { padding-bottom: clamp(12rem, 30vh, 16rem); }
  .project-more { margin-left: 0; flex-basis: 100%; }
  .info::backdrop { background: rgba(6, 20, 23, 0.7); }
}
@media (prefers-reduced-motion: reduce) { .info[open] { animation: none; } }

.nw { white-space: nowrap; }

/* ---------- Touch screens (phones, tablets) ----------
   Everything here is scoped to coarse pointers or phone widths, so mouse/trackpad screens are untouched. */
@media (pointer: coarse) {
  /* Tablets in landscape (1024px+) keep full-size text: the 90% short-window floor is meant for laptops. */
  html { font-size: clamp(100%, min(1.1111vw, 1.7778vh), 150%); }
  /* iOS Safari zooms the page when a field with text under 16px gets focus. */
  .field input, .field textarea { font-size: max(16px, 1rem); }
  /* Small text links get a larger, invisible tap area (nothing moves). */
  .tlink, .logo, .nav-links a, .direct a, .next a, .inline-link, .form-msg a, .site-footer a, .portal-links a, .portal-links button, .signin-note a { position: relative; }
  .tlink::after, .logo::after, .nav-links a::after, .direct a::after, .next a::after, .inline-link::after, .form-msg a::after,
  .site-footer a::after, .portal-links a::after, .portal-links button::after, .signin-note a::after { content: ""; position: absolute; inset: -0.875rem -0.5rem; }
  /* The hidden door: a slightly bigger (still invisible) target for fingers. */
  .door-link .door-hit { display: inline; }
  /* No page scrolling behind an open project pop-up. */
  html:has(dialog[open]) { overflow: hidden; }
}
@media (max-width: 759px) {
  .controls { font-size: 0.8125rem; }
  /* Open mobile menu: the page behind it stays put (main.js toggles the class). */
  html.menu-open { overflow: hidden; }
}
