/* Chris Hartounias — workshop theme */
:root {
  --bench: #1E3A32;        /* machinist green */
  --bench-deep: #142923;
  --paper: #EEF0EC;        /* steel paper */
  --paper-2: #E2E6E0;
  --ink: #15201C;
  --ink-soft: #46544E;
  --brass: #B8862B;
  --brass-text: #7F5A12;   /* brass dark enough for text on paper */
  --mint: #A9CDB9;
  --line: rgba(21, 32, 28, 0.14);
  --line-dark: rgba(238, 240, 236, 0.16);

  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.3rem);
  --step-4: clamp(3.2rem, 2rem + 6.4vw, 8.4rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-optical-sizing: auto;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { line-height: 1.05; font-weight: 750; letter-spacing: -0.02em; }
a { color: var(--brass-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* --- Header --- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  color: var(--paper);
}
.site-header.on-paper { position: relative; color: var(--ink); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.mark { color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; font-stretch: 80%; letter-spacing: -0.01em; }
.nav-toggle {
  display: none; background: none; border: 1px solid currentColor; color: inherit;
  font: inherit; font-size: var(--step--1); padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.nav { display: flex; gap: clamp(16px, 2.4vw, 34px); }
.nav a { color: inherit; text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current="page"] { border-bottom-color: var(--brass); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 68px; right: var(--gutter); left: var(--gutter);
    flex-direction: column; gap: 0; background: var(--ink); color: var(--paper);
    border-radius: var(--radius); padding: 8px 18px; box-shadow: 0 18px 40px rgba(0,0,0,0.3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
  .nav a:last-child { border-bottom: 0; }
}

/* --- Hero (the bench) --- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--bench);
  /* pegboard */
  background-image: radial-gradient(circle at center, var(--bench-deep) 2.4px, transparent 3px);
  background-size: 30px 30px;
  background-position: 15px 15px;
  color: var(--paper);
  padding: 120px 0 72px;
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center; gap: clamp(16px, 3vw, 40px);
}
.hero-name {
  font-size: var(--step-4); font-weight: 800; font-stretch: 75%;
  line-height: 0.86; letter-spacing: -0.035em; margin-bottom: 28px;
}
.hero-name span { display: block; }
.hero-name span + span { color: var(--mint); }
.hero-lede { font-size: var(--step-1); max-width: 34ch; line-height: 1.45; color: #DDE3DD; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: var(--step-0);
  padding: 13px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: #CB9733; }
.btn-ghost { border-color: rgba(238,240,236,0.5); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--bench); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.workpiece { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; justify-self: end; }
.workpiece canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; touch-action: pan-y; }
.workpiece canvas:active { cursor: grabbing; }
.workpiece-hint {
  position: absolute; bottom: 4px; right: 0; font-size: var(--step--1); color: var(--mint);
  opacity: 0; transition: opacity .6s;
}
.workpiece.ready .workpiece-hint { opacity: .85; }

@media (max-width: 820px) {
  .hero { padding: 104px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .workpiece { max-width: 340px; justify-self: center; margin-top: 8px; order: 2; }
}

/* --- Page header for inner pages --- */
.page-head { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: var(--step-3); font-stretch: 80%; max-width: 18ch; }
.page-head p { margin-top: 18px; font-size: var(--step-1); color: var(--ink-soft); max-width: 52ch; }

/* --- Bench index: rows of work --- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-title { font-size: var(--step-3); font-stretch: 80%; margin-bottom: clamp(24px, 4vw, 44px); }
.row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(20px, 4vw, 56px); padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: var(--step-2); font-stretch: 85%; margin-bottom: 12px; }
.row p { color: var(--ink-soft); max-width: 40ch; }
.row .row-link { display: inline-block; margin-top: 16px; font-weight: 650; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } }

.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.strip > * { flex: 0 0 auto; scroll-snap-align: start; }
.strip img { border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); }
.strip a { display: block; }
.strip .w-site { width: clamp(220px, 28vw, 330px); }
.strip .w-site img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.strip .w-tall { width: clamp(130px, 14vw, 170px); }
.strip .w-tall img { aspect-ratio: 3 / 4; object-fit: cover; }
.strip .w-game { width: clamp(220px, 26vw, 300px); }
.strip .w-game img { aspect-ratio: 63 / 50; object-fit: cover; }

.search-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; align-content: start; }
@media (max-width: 480px) { .search-facts { grid-template-columns: 1fr; } }
.search-facts div { border-left: 3px solid var(--brass); padding-left: 14px; }
.search-facts strong { display: block; font-size: var(--step-1); }
.search-facts span { color: var(--ink-soft); font-size: var(--step--1); }

/* --- About --- */
.about { background: var(--paper-2); }
.about .wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about h2 { font-size: var(--step-3); font-stretch: 80%; margin-bottom: 22px; }
.about p { max-width: 60ch; margin-bottom: 16px; }
@media (max-width: 720px) { .about .wrap { grid-template-columns: 1fr; } .about img { max-width: 260px; } }

/* --- Contact / footer --- */
.contact { background: var(--bench); color: var(--paper); padding: clamp(64px, 9vw, 112px) 0 40px; }
.contact h2 { font-size: var(--step-3); font-stretch: 80%; max-width: 16ch; margin-bottom: 26px; }
.contact-mail { font-size: var(--step-2); font-weight: 700; color: var(--paper); text-decoration-color: var(--brass); word-break: break-word; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }
.contact-links a { color: var(--mint); }
.footnote { margin-top: clamp(48px, 7vw, 88px); padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: var(--step--1); color: #B9C6BF; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* --- Work page --- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px); }
.site-item img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; object-position: top; background: var(--paper-2); }
.site-item h3 { font-size: var(--step-1); margin-top: 14px; }
.site-item p { color: var(--ink-soft); font-size: var(--step--1); margin-top: 4px; }
.site-item .status { margin-top: 8px; font-size: var(--step--1); font-weight: 600; }
.site-item .status.pending { color: var(--ink-soft); font-weight: 500; }

.brand-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 56px); padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.brand-block h3 { font-size: var(--step-2); font-stretch: 85%; margin-bottom: 12px; }
.brand-block > div > p { color: var(--ink-soft); max-width: 42ch; }
.bottles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.bottles figure img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.bottles figcaption { margin-top: 8px; font-weight: 650; }
.bottles figcaption span { display: block; font-weight: 400; font-size: var(--step--1); color: var(--ink-soft); }
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.reels .instagram-media { min-width: 0 !important; width: 100% !important; margin: 0 !important; }
@media (max-width: 820px) { .brand-block { grid-template-columns: 1fr; } }

/* --- Games page --- */
.game { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.game .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.game:nth-of-type(even) .game-media { order: -1; }
.game h2 { font-size: var(--step-3); font-stretch: 80%; }
.game .tagline { font-size: var(--step-1); margin-top: 12px; max-width: 34ch; }
.game .desc { color: var(--ink-soft); margin-top: 16px; max-width: 54ch; }
.game ul { padding-left: 1.1em; margin-top: 14px; color: var(--ink-soft); }
.game li { margin-bottom: 6px; }
.game-specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 22px 0 0; font-size: var(--step--1); }
.game-specs dt { font-weight: 650; }
.game-specs dd { margin: 0; color: var(--ink-soft); }
.game-play { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.game-play small { color: var(--ink-soft); font-size: var(--step--1); }
.game-media { display: grid; gap: 14px; }
.game-media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.game-media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.game-media.portrait { grid-template-columns: 1fr 1fr; max-width: 520px; }
@media (max-width: 860px) {
  .game .wrap { grid-template-columns: 1fr; }
  .game:nth-of-type(even) .game-media { order: 0; }
}

/* Game player overlay */
.player { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #0C1512; color: var(--paper); }
.player::backdrop { background: #0C1512; }
.player[open] { display: flex; flex-direction: column; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line-dark); }
.player-bar strong { font-weight: 700; }
.player-bar .btns { display: flex; gap: 8px; }
.player-bar button { background: none; border: 1px solid rgba(238,240,236,0.45); color: var(--paper); font: inherit; font-size: var(--step--1); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.player-bar button:hover { border-color: var(--paper); }
.player-stage { flex: 1; display: grid; place-items: center; padding: 12px; min-height: 0; }
.player-stage iframe { border: 0; background: #000; width: 100%; height: 100%; max-width: calc((100dvh - 90px) * var(--ar)); max-height: 100%; aspect-ratio: var(--ar); }

/* --- Method page --- */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); font-stretch: 85%; margin: 48px 0 14px; }
.prose h3 { font-size: var(--step-1); margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.1em; margin-top: 10px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 24px 36px; margin-top: 18px; }
.principles div { border-top: 3px solid var(--bench); padding-top: 14px; }
.principles h3 { margin: 0 0 6px; }
