/* Flagship · Store 001 — shared styles for every page.
   Tokens live on :root. "Open" is the light theme, "After hours" the dark one. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/plex-mono-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/fonts/plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/fonts/plex-mono-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/plex-mono-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/plex-mono-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --accent: #FF4F00;
  --ground: #F1F1EE;
  --surface: #FBFBFA;
  --ink: #121211;
  --ink2: #4A4A45;
  --muted: #66665F;
  --line: #121211;
  --hair: #D6D6D0;
  --wall: #8F8F88;
  --onink: #FBFBFA;
  --band: #121211;
  --onband: #F1F1EE;
  --bandmuted: #A9A9A2;
  --atext: #B33800;
  --revisit: #2D5BFF;
  --rtext: #2346E0;
  --sans: "Archivo", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "PingFang SC", "Noto Sans SC", ui-monospace, monospace;
  --wrap: 1360px;
  --gutter: 40px;
  --dock: 0px;
  color-scheme: light;
}
:root[data-theme="after"] {
  --ground: #0E0E0D;
  --surface: #171716;
  --ink: #F1F1EE;
  --ink2: #C4C4BD;
  --muted: #9A9A92;
  --line: #F1F1EE;
  --hair: #2C2C29;
  --wall: #3A3A37;
  --onink: #0E0E0D;
  --band: #1C1C1A;
  --onband: #F1F1EE;
  --bandmuted: #A9A9A2;
  --atext: var(--accent);
  --revisit: #6A88FF;
  --rtext: #7F98FF;
  color-scheme: dark;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root { --atext: color-mix(in srgb, var(--accent) 70%, #000000); }
  :root[data-theme="after"] { --atext: var(--accent); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--dock);
}
img, svg { display: block; }
a { color: var(--ink); }
a:hover { color: var(--atext); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #121211; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--onink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--onink); }
/* Scroll reveals: set up by site.js (and the homepage head script). */
.reveal-on [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), translate 0.8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rd, 0s);
}
.reveal-on [data-reveal].is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on [data-reveal] { opacity: 1; translate: none; transition: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Small signage type: the store's labels, codes and drawing notes. */
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sign {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.btn:hover { color: var(--atext); }
.btn-ink { background: var(--ink); color: var(--onink); border-color: var(--ink); font-weight: 700; }
.btn-ink:hover { color: var(--onink); background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 16px; }
.btn svg { flex: none; }

.toggle-group { display: flex; border: 1px solid var(--line); }
.toggle-group > button {
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.toggle-group > button[aria-pressed="true"] { background: var(--ink); color: var(--onink); }

/* Status tags: Case study, Playable, Read, Soon, TBA */
.tag { padding: 2px 7px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.tag-ink { background: var(--ink); color: var(--onink); border-color: var(--ink); }
.tag-accent { border-color: var(--atext); color: var(--atext); }
.tag-dash { border-style: dashed; border-color: var(--muted); color: var(--muted); }

.pins { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pins li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Fascia (header) ---------- */
.fascia { background: var(--ground); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.fascia-in {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--onink);
}
.brand-mark svg { width: 17px; height: 32px; overflow: visible; }
.brand-text { display: flex; flex-direction: column; gap: 5px; }
.brand-name {
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.directory { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.directory a {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
}
.directory .dir-sign {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.directory .dir-name { font-size: 15px; font-weight: 650; }
.fascia-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.langs > button { min-width: 44px; padding: 0 10px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.theme-toggle {
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.theme-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--accent);
}
:root[data-theme="after"] .theme-dot { background: transparent; }
.lang-cycle, .menu-btn { display: none; }

.mobile-menu { border-top: 1px solid var(--line); background: var(--ground); }
.mobile-menu-in { padding-top: 16px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 18px; }
.mobile-menu nav { display: flex; flex-direction: column; border-top: 3px solid var(--line); }
.mobile-menu nav a {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
}
.mobile-menu nav a .dir-sign { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.mobile-menu .menu-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Footer ---------- */
.site-footer .wrap {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--atext); }

/* ---------- Phone dock: resume and email always one tap away ---------- */
.dock { display: none; }

/* ---------- Sub-page chrome (case studies, notes, express) ---------- */
.subhead { border-bottom: 1px solid var(--line); }
.subhead .wrap { padding-top: 40px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 16px; }
.crumbs { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--atext); }
.page-title { margin: 0; font-size: clamp(40px, 6vw, 76px); line-height: 0.98; font-weight: 800; letter-spacing: -0.04em; max-width: 18ch; }
.lede { margin: 0; max-width: 60ch; font-size: 20px; line-height: 1.5; color: var(--ink2); }
.draft-flag {
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px dashed var(--atext);
  color: var(--atext);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.facts > div { min-width: 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.facts dt { order: 2; font-size: 13px; line-height: 1.4; color: var(--ink2); }
.facts dd { order: 1; margin: 0; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }

.prose { max-width: 68ch; font-size: 18px; line-height: 1.6; color: var(--ink); }
.prose h2 { margin: 56px 0 14px; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.prose h3 { margin: 32px 0 10px; font-size: 21px; line-height: 1.2; font-weight: 750; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 750; }
.prose a { text-underline-offset: 3px; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink2); }
.prose .note { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--muted); }
.prose figure { margin: 32px 0; }
.prose figcaption { margin-top: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }

.page-body .wrap { padding-top: 56px; padding-bottom: 88px; }
.two-col { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.two-col > .main { flex: 1 1 560px; min-width: 0; }
.two-col > .side { flex: 0 1 320px; min-width: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.side-card { border: 1px solid var(--line); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.side-card h2 { margin: 0; font-size: 18px; font-weight: 800; }
.side-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.side-card dl { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.side-card dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.side-card dd { margin: 0; }

.next-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --dock: 76px; }
  .fascia-in { padding-top: 10px; padding-bottom: 10px; gap: 10px; flex-wrap: nowrap; }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-mark svg { width: 16px; height: 30px; }
  .brand-name { font-size: 13px; letter-spacing: 0.05em; }
  .brand-sub { font-size: 10px; }
  .directory, .fascia-tools .langs, .fascia-tools .theme-toggle, .fascia-tools .express-link { display: none; }
  .fascia-tools { gap: 4px; flex-wrap: nowrap; }
  .lang-cycle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0; padding: 0;
    border: 1px solid var(--line); background: transparent; color: var(--ink);
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; cursor: pointer;
  }
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0; padding: 0;
    border: 0; background: var(--ink); color: var(--onink); cursor: pointer;
  }
  .dock {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--ground);
    border-top: 1px solid var(--hair);
  }
  .dock a {
    flex: 1 1 0;
    height: 52px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
  }
  .dock .dock-primary { background: var(--ink); color: var(--onink); }
  .dock .dock-secondary { border: 1px solid var(--line); color: var(--ink); font-weight: 650; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts dd { font-size: 26px; }
  .lede { font-size: 18px; }
  .prose { font-size: 17px; }
  .two-col > .side { position: static; }
  .subhead .wrap { padding-top: 28px; padding-bottom: 36px; }
  .page-body .wrap { padding-top: 36px; padding-bottom: 64px; }
}

@media print {
  .fascia-tools, .dock, .band, .skip-link { display: none !important; }
  body { padding-bottom: 0; }
}

/* Long and short versions of the same label. */
.short { display: none; }
@media (max-width: 760px) {
  .long { display: none; }
  .short { display: inline; }
}
.prose > h2:first-child, .prose > .chapter:first-child { margin-top: 0; }
