/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  /* Brand — fixed in both themes */
  --orange: #F04E0F;          /* white on it = 3.6:1 (display only) · ink on it = 5.4:1 */
  --black: #0D0D0D;
  --black-2: #141619;
  --black-3: #1F2124;
  --cream: #F4EFE6;
  --cream-2: #E9E1D3;
  --white: #FFFFFF;
  --grey: #8E8A83;

  /* Surfaces — light */
  --bg: #FFFFFF;
  --bg-alt: #F4EFE6;
  --text: #0D0D0D;
  --muted: #5C5A56;
  --line: #E3DDD2;
  --accent-text: #B83A08;     /* orange for small text on light: 5.8:1 */

  /* Ink bands (invert in dark mode) */
  --band-bg: #0D0D0D;
  --band-text: #F4EFE6;
  --band-muted: #A39F98;
  --band-line: #2C2A27;

  /* Nav, hero + footer: always black, in both modes */
  --hero-bg: #0D0D0D;
  --hero-text: #F4EFE6;
  --hero-muted: #A39F98;
  --hero-line: #2C2A27;

  /* Type */
  --f-display: 'Poppins', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-serif: 'Newsreader', Georgia, serif;

  /* Layout */
  --gx: clamp(16px, 4vw, 64px);
  --sy: clamp(72px, 10vw, 144px);
  --nav-h: 64px;
  --max: 1600px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  --bg: #0A0D16;          /* navy-black page, matches the ink navy header */
  --bg-alt: #131A2B;
  --text: #F4EFE6;
  --muted: #A3A6B4;
  --line: #242B3F;
  --accent-text: #FF6A2E;
  --band-bg: #F4EFE6;
  --band-text: #0D0D0D;
  --band-muted: #5C5A56;
  --band-line: #D8D1C4;
  --hero-bg: #0F1424;
  --hero-text: #F4EFE6;
  --hero-muted: #A3A6B4;
  --hero-line: #262C40;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::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(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--black); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gx); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Display type */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: .9;
}
.hl { color: var(--orange); }
.outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}
.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ==========================================================================
   EDITORIAL FRAME — tag boxes, rules, barcode, circles
   ========================================================================== */
.frame-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.frame-top .rule { flex: 1; height: 1px; background: currentColor; opacity: .18; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--fill { background: currentColor; }
.tag--fill > span { color: var(--tag-ink, var(--bg)); }
.tag--line { border: 1px solid currentColor; }

.barcode {
  width: 112px;
  height: 28px;
  flex: none;
  background: repeating-linear-gradient(90deg,
    currentColor 0 2px, transparent 2px 3px,
    currentColor 3px 4px, transparent 4px 7px,
    currentColor 7px 10px, transparent 10px 11px,
    currentColor 11px 12px, transparent 12px 14px,
    currentColor 14px 15px, transparent 15px 18px);
}

.frame-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-block: 24px;
  border-top: 1px solid var(--hero-line);
}
.made-by { display: grid; gap: 0; line-height: 1.35; font-size: 13px; }
.made-by b { font-family: var(--f-display); font-weight: 700; font-size: 13px; }
.frame-bottom .push { margin-left: auto; display: flex; align-items: center; gap: 24px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  border: 2px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; stroke: currentColor; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn--orange { background: var(--orange); color: var(--black); }
.btn--orange:hover { background: var(--hero-text); color: var(--hero-bg); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: var(--cream); color: var(--black); border-color: var(--cream); }

/* ==========================================================================
   NAV — always black, editorial bar
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--hero-bg);
  color: var(--hero-text);
  border-bottom: 1px solid var(--hero-line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-logo { width: 28px; height: auto; flex: none; }
.brand-logo rect, .brand-logo polygon { fill: var(--hero-text); }
.brand-logo circle { fill: var(--orange); transition: transform .4s var(--ease); transform-origin: 263px 76px; }
.brand:hover .brand-logo circle { transform: scale(1.12); }
.brand-name { font: 800 18px/1 var(--f-display); letter-spacing: -.025em; }
.brand-name .hl { color: var(--orange); }
.nav-links { display: flex; gap: 8px; margin-left: auto; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--hero-muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--hero-text); }
.nav-links a[aria-current="page"] { color: var(--hero-text); box-shadow: inset 0 -2px 0 var(--orange); }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }
.nav-links a .n { font-family: var(--f-mono); font-size: 10px; color: var(--orange); margin-right: 6px; transform: translateY(-4px); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hero-line);
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--orange); color: var(--orange); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav .btn { min-height: 44px; padding: 8px 20px; font-size: 14px; }
.menu-btn { display: none; }

/* Mobile menu overlay */
.menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  background: var(--orange);
  color: var(--black);
  padding: 32px var(--gx);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.menu.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.menu a { font: 800 clamp(40px, 12vw, 64px)/1.05 var(--f-display); text-transform: uppercase; letter-spacing: -.03em; padding-block: 4px; }
.menu .mono { margin-top: auto; }

@media (max-width: 860px) {
  .nav-links, .nav .btn { display: none; }
  .menu-btn { display: grid; }
  .nav-actions { margin-left: auto; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
  min-height: calc(100svh - var(--nav-h));
  display: flex;
}
.hero .wrap { display: flex; flex-direction: column; padding-top: 32px; }
.hero .frame-top { color: var(--hero-text); --tag-ink: var(--hero-bg); margin-bottom: 0; }
.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 8vw, 96px);
}
.hero-title {
  font-size: clamp(48px, 15vw, 232px);
  line-height: .86;
  letter-spacing: -.045em;
}
.hero-title .line { display: block; }
.hero-title .line-2 { display: flex; align-items: center; gap: .12em; }
.hero-title .dash { flex: none; width: .5em; height: .07em; background: var(--hero-text); }
.hero-title .outline { -webkit-text-stroke-width: clamp(1px, .2vw, 3px); }
.hero-title .dot { color: var(--orange); }

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
  margin-top: clamp(32px, 5vw, 56px);
}
.strip { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.strip-orange {
  background: var(--orange);
  color: var(--black);
  padding: 8px 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.strip-text { font-family: var(--f-mono); font-size: 12px; letter-spacing: .42em; text-transform: uppercase; color: var(--hero-muted); }
.hero-intro { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--hero-muted); max-width: 48ch; }
.hero-intro strong { color: var(--hero-text); font-weight: 600; }
.hero .frame-bottom { color: var(--hero-text); }
.hero .frame-bottom .url { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: var(--hero-muted); }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border: 1px solid currentColor; padding: 0 12px; }
.scroll-cue svg { width: 14px; height: 14px; stroke: currentColor; animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

@media (max-width: 860px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   SECTIONS — shared
   ========================================================================== */
.section { padding-block: var(--sy); overflow-x: clip; }
.section--alt { background: var(--bg-alt); }
.section--orange { background: var(--orange); color: var(--black); --tag-ink: var(--orange); }
.section--band { background: var(--band-bg); color: var(--band-text); --tag-ink: var(--band-bg); }
.section .frame-top { color: inherit; }
.h2 { font-size: clamp(44px, 8.5vw, 136px); }
.label { font-family: var(--f-display); font-weight: 700; font-size: 14px; line-height: 1.3; }
.label + p { margin-top: 8px; }
.body-sm { font-size: 15px; line-height: 1.65; color: var(--muted); }

/* ---------- HELLO ---------- */
.hello-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(32px, 6vw, 96px);
  align-items: end;
}
.hello-title-wrap { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 24px); }
.serif-title {
  font-family: var(--f-serif);
  font-size: clamp(56px, 10.5vw, 176px);
  font-weight: 400;
  font-variation-settings: 'opsz' 72;
  line-height: .98;
  letter-spacing: -.03em;
}
.serif-title > * { display: block; }
.serif-title b { font-weight: 800; letter-spacing: -.035em; }
.serif-title i { font-style: italic; }
.serif-title { flex: none; }
.hello-arrow {
  flex: 0 1 clamp(72px, 8vw, 144px);
  min-width: 48px;
  margin-right: 8px;
  color: var(--orange);
  transform: translateY(40%);
}
@media (max-width: 860px) {
  .hello-arrow { width: 64px; transform: translateY(60%) rotate(20deg); }
}
.hello-lead {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
}
.hello-lead em { font-style: italic; font-weight: 600; color: var(--accent-text); }
.hello-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 860px) {
  .hello-grid { grid-template-columns: minmax(0, 1fr); }
  .hello-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .hello-meta { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------- ABOUT (orange) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px clamp(32px, 5vw, 80px);
}
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--black);
  color: var(--cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}
.portrait .big-k {
  position: absolute;
  right: -.08em;
  bottom: -.2em;
  font: 900 clamp(240px, 30vw, 480px)/1 var(--f-display);
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
  letter-spacing: -.06em;
  pointer-events: none;
}
.portrait .tag { color: var(--cream); --tag-ink: var(--black); align-self: flex-start; }
.portrait .made-by { position: relative; }
.portrait .made-by span { color: var(--grey); }
.about-main { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.about-main .h2 .w { color: var(--white); }
.about-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 64px);
  padding-top: 32px;
  border-top: 2px solid var(--black);
}
.about-cols p { font-size: 16px; line-height: 1.65; }
.stats { display: grid; gap: 24px; }
.stat { display: flex; align-items: baseline; gap: 16px; }
.stat b { font: 800 clamp(40px, 4.4vw, 64px)/1 var(--f-display); letter-spacing: -.04em; min-width: 2.2ch; }
.stat i { font: italic 600 15px/1.3 var(--f-display); }
@media (max-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { aspect-ratio: 16 / 9; max-height: 360px; }
  .portrait .big-k { font-size: clamp(200px, 48vw, 360px); }
}
@media (max-width: 600px) { .about-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- SELECTED WORK ---------- */
.work-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
.vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: clamp(56px, 6vw, 96px);
  line-height: .85;
  display: flex;
  gap: .08em;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 4vw, 56px) clamp(16px, 2vw, 32px); }
.card { display: flex; flex-direction: column; gap: 20px; }
/* Cards in the same row share row tracks (subgrid), so images, titles,
   descriptions and tags all line up across the row */
@supports (grid-template-rows: subgrid) {
  .card:not(.card--feature) { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .card:not(.card--feature) > .mock { margin-bottom: 20px; }
  .card:not(.card--feature) > .card-meta { grid-row: 2 / span 3; grid-template-rows: subgrid; row-gap: 4px; }
  .card-meta > p { align-self: start; }
  .card-meta > .chips { align-self: start; }
}
.card--7 { grid-column: span 7; }
.card--5 { grid-column: span 5; }
.card--4 { grid-column: span 4; }
.card--12 { grid-column: span 12; }
.card-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding-top: 16px;
  border-top: 2px solid var(--text);
}
.card-meta .idx { font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); padding-top: 6px; }
.card-meta h3 { font: 700 clamp(19px, 1.6vw, 24px)/1.25 var(--f-display); letter-spacing: -.015em; }
.card-meta p { grid-column: 2; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 56ch; }
.card-meta .chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips li { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); }
.card .go {
  grid-row: 1; grid-column: 3;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--text);
  border-radius: 50%;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.card .go svg { width: 18px; height: 18px; stroke: currentColor; }
.card:hover .go { background: var(--orange); border-color: var(--orange); color: var(--black); transform: rotate(45deg); }
@media (max-width: 1024px) {
  .card--7, .card--5 { grid-column: span 12; }
  .card--4 { grid-column: span 6; }
  .card--4:last-of-type { grid-column: span 12; }
}
@media (max-width: 760px) {
  .work-layout { grid-template-columns: minmax(0, 1fr); }
  .vert { writing-mode: horizontal-tb; transform: none; position: static; flex-direction: row; flex-wrap: wrap; gap: 0 .25em; font-size: clamp(40px, 12vw, 72px); }
  .card--4 { grid-column: span 12; }
}

/* ---------- MOCK UI ILLUSTRATIONS ---------- */
.mock {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  padding: 7%;
  display: flex;
  background: var(--m-bg, var(--black));
  color: var(--black);
}
.mock--shot .win-body { overflow: hidden; background: var(--white); }
.mock--shot .win-body img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card--7 .mock, .card--5 .mock { aspect-ratio: auto; height: clamp(300px, 34vw, 520px); }
.win {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--win, var(--white));
  color: var(--win-ink, var(--black));
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 32px 64px -24px rgb(0 0 0 / .45);
  transition: transform .5s var(--ease);
}
.card:hover .win { transform: translateY(-8px) rotate(-.6deg); }
.win-bar { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid rgb(127 127 127 / .18); flex: none; }
.win-bar i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .25; }
.win-body { flex: 1; display: flex; min-height: 0; }
.ln { display: block; height: 6px; border-radius: 3px; background: currentColor; opacity: .16; width: var(--w, 100%); flex: none; }
.ln--o { background: var(--orange); opacity: 1; }
.ln--b { opacity: .7; }

/* 01 Admin — dark dashboard */
.m-admin { --m-bg: var(--orange); --win: var(--black-2); --win-ink: var(--cream); }
.m-admin .side { width: 18%; padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; background: var(--black-3); }
.m-admin .side .logo { width: 20px; height: 20px; background: var(--orange); margin-bottom: 8px; }
.m-admin .main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.m-admin .tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.m-admin .tile { background: var(--black-3); padding: 10px; display: grid; gap: 8px; border-radius: 3px; }
.m-admin .tile b { font: 800 clamp(11px, 1.2vw, 18px)/1 var(--f-display); letter-spacing: -.03em; }
.card--4 .m-admin .tile b { font-size: clamp(10px, .9vw, 14px); }
.m-admin .tile { min-width: 0; overflow: hidden; }
.m-admin .tile:first-child { background: var(--orange); color: var(--black); }
.m-admin .chart { flex: 1; display: flex; align-items: flex-end; gap: 6px; padding: 12px; background: var(--black-3); border-radius: 3px; min-height: 60px; }
.m-admin .chart span { flex: 1; height: var(--h); background: var(--cream); opacity: .2; border-radius: 2px 2px 0 0; }
.m-admin .chart span.on { background: var(--orange); opacity: 1; }
.m-admin .rows { display: grid; gap: 8px; }
.m-admin .row { display: flex; gap: 12px; align-items: center; }

/* 02 CRM — pipeline */
.m-crm { --m-bg: var(--black); }
.m-crm .win-body { padding: 12px; gap: 8px; }
.m-crm .col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--cream); padding: 8px; border-radius: 3px; }
.m-crm .col > .ln { margin-bottom: 4px; }
.m-crm .kc { background: var(--white); padding: 8px; display: grid; gap: 6px; border-radius: 3px; box-shadow: 0 1px 0 rgb(0 0 0 / .06); }
.m-crm .kc.on { background: var(--orange); }
.m-crm .kc.on .ln { opacity: .55; }

/* 04 AI assistant, chat */
.m-chat { --m-bg: var(--orange); --win: var(--cream); }
.m-chat .win-body { flex-direction: column; padding: 14px; gap: 10px; justify-content: flex-end; }
.m-chat .msg { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; max-width: 72%; background: var(--white); }
.m-chat .msg.me { align-self: flex-end; background: var(--black); color: var(--cream); border-bottom-right-radius: 2px; }
.m-chat .msg.bot { border-bottom-left-radius: 2px; }
.m-chat .msg.me .ln { opacity: .5; }
.m-chat .typing { display: flex; gap: 4px; padding: 10px 12px; background: var(--white); border-radius: 10px; align-self: flex-start; }
.m-chat .typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.m-chat .input { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--white); border-radius: 999px; margin-top: 4px; }
.m-chat .input .send { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); flex: none; }

/* 06 Design system — wide feature */
.card--feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; background: var(--orange); color: var(--black); }
.card--feature .feat-copy { padding: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: 24px; justify-content: space-between; }
.card--feature .feat-copy .display { font-size: clamp(40px, 5.4vw, 88px); }
.card--feature .feat-copy p { font-size: 16px; line-height: 1.65; max-width: 44ch; }
.card--feature .chips li { border-color: var(--black); color: var(--black); }
.card--feature .card-meta { border-top-color: var(--black); }
.card--feature .card-meta .idx { color: var(--black); }
.card--feature .go { border-color: var(--black); }
.card--feature:hover .go { background: var(--black); color: var(--orange); border-color: var(--black); }
.m-ds { --m-bg: var(--black); aspect-ratio: auto; min-height: 100%; }
.m-ds .win-body { padding: clamp(16px, 2vw, 24px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.m-ds .sw { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; grid-column: 1 / -1; }
.m-ds .sw span { aspect-ratio: 1; border-radius: 3px; border: 1px solid rgb(0 0 0 / .08); }
.m-ds .spec { display: flex; flex-direction: column; justify-content: center; gap: 8px; background: var(--cream); border-radius: 3px; padding: 16px; }
.m-ds .spec b { font: 800 clamp(40px, 5vw, 80px)/.9 var(--f-display); letter-spacing: -.05em; }
.m-ds .spec .mono { font-size: 9px; color: var(--muted); }
.m-ds .comps { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.m-ds .pill { height: 26px; border-radius: 3px; display: flex; align-items: center; padding: 0 10px; font: 600 10px/1 var(--f-display); }
.m-ds .pill.p1 { background: var(--orange); color: var(--black); }
.m-ds .pill.p2 { border: 1.5px solid var(--black); }
.m-ds .tgl { display: flex; gap: 8px; align-items: center; }
.m-ds .tgl i { width: 32px; height: 18px; border-radius: 9px; background: var(--black); position: relative; }
.m-ds .tgl i::after { content: ''; position: absolute; right: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }
.m-ds .tgl i.off { background: var(--cream-2); }
.m-ds .tgl i.off::after { right: auto; left: 3px; background: var(--white); }
@media (max-width: 900px) {
  .card--feature { grid-template-columns: minmax(0, 1fr); }
  .m-ds { aspect-ratio: 16 / 11; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* ---------- PLAYGROUND (ink band) ---------- */
.play-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 64px); }
.play-head .outline { -webkit-text-stroke-width: clamp(1px, .16vw, 2px); }
.play-head .split { display: inline-block; }
.play-intro { max-width: 44ch; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.play-intro p { color: var(--band-muted); font-size: 16px; line-height: 1.65; }
.section--band .btn--ghost:hover { background: var(--orange); border-color: var(--orange); color: var(--black); }
.play-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(180px, 20vw, 300px);
  gap: clamp(12px, 1.6vw, 24px);
}
.art { position: relative; overflow: hidden; display: block; outline: 1px solid var(--band-line); outline-offset: -1px; }
.art .cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  background: var(--black); color: var(--cream); padding: 6px 8px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.art:hover .cap { background: var(--orange); color: var(--black); }
.art { background: var(--black-3); }
.art img { position: absolute; left: 0; top: -25%; width: 100%; height: 150%; object-fit: cover; transition: transform .7s var(--ease); }
.art:hover img { transform: scale(1.04); }
.art--a { grid-column: span 5; grid-row: span 2; }
.art--b { grid-column: span 4; }
.art--c { grid-column: span 3; }
.art--d { grid-column: span 3; }
.art--e { grid-column: span 4; }
@media (max-width: 1024px) {
  .art--a { grid-column: span 12; grid-row: span 2; }
  .art--b, .art--e { grid-column: span 7; }
  .art--c, .art--d { grid-column: span 5; }
}
@media (max-width: 600px) {
  .play-grid { grid-auto-rows: 220px; }
  .art--a, .art--b, .art--c, .art--d, .art--e { grid-column: span 12; grid-row: span 1; }
  .art--a { grid-row: span 2; }
}

/* Pose annotation mock: key point list + video frame with a skeletal overlay */
.m-pose { --m-bg: var(--orange); --win: var(--black-2); --win-ink: var(--cream); }
.m-pose .win-body { gap: 0; }
.m-pose .pts { width: 30%; padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; background: var(--black-3); }
.m-pose .pt { display: flex; align-items: center; gap: 6px; }
.m-pose .pt.sub { padding-left: 12px; }
.m-pose .pt i { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid var(--cream); opacity: .6; }
.m-pose .pt.on i { background: var(--orange); border-color: var(--orange); opacity: 1; }
.m-pose .stage { flex: 1; display: flex; flex-direction: column; padding: 10px; gap: 8px; min-width: 0; }
.m-pose svg { flex: 1; min-height: 0; width: 100%; background: #23272c; border-radius: 3px; }
.m-pose .box { fill: none; stroke: var(--cream); stroke-opacity: .25; stroke-dasharray: 4 4; }
.m-pose .bone path { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.m-pose .joint circle { fill: var(--cream); }
.m-pose .joint .head { fill: none; stroke: var(--orange); stroke-width: 2.5; }
.m-pose .joint .active { fill: var(--orange); stroke: var(--cream); stroke-width: 1.5; }
.m-pose .timeline { height: 14px; display: flex; align-items: center; }
.m-pose .track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgb(244 239 230 / .2); }
.m-pose .track .head { position: absolute; left: 38%; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }

/* Synthetic testing mock */
.m-syn { --m-bg: var(--cream-2); }
.m-syn .win-body { padding: 14px; gap: 14px; }
.m-syn .flow { flex: 1.4; position: relative; background: var(--cream); border-radius: 3px; }
.m-syn .flow svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-syn .node { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--black); color: var(--cream); font: 700 9px/20px var(--f-mono); text-align: center; }
.m-syn .node--drop { background: var(--orange); color: var(--black); box-shadow: 0 0 0 4px rgb(240 78 15 / .25); }
.m-syn .people { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; min-width: 0; }
.m-syn .p { display: flex; align-items: center; gap: 8px; }
.m-syn .p i { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.m-syn .hyp { margin-top: 6px; background: var(--orange); padding: 10px; display: grid; gap: 6px; border-radius: 3px; }
.m-syn .hyp .mono { font-size: 9px; }
.m-syn .hyp .ln { opacity: .5; }

/* UX reporting mock */
.m-rep { --m-bg: var(--black); --win: var(--cream); }
.m-rep .win-body { flex-direction: column; padding: 14px; gap: 12px; }
.m-rep .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-rep .kpis div { background: var(--white); padding: 8px; display: grid; gap: 6px; border-radius: 3px; }
.m-rep .kpis b { font: 800 clamp(14px, 1.5vw, 20px)/1 var(--f-display); letter-spacing: -.03em; }
.m-rep .kpis b.o { color: var(--accent-ink, #B83A08); }
.m-rep .plot { flex: 1; background: var(--white); border-radius: 3px; padding: 8px; min-height: 40px; }
.m-rep .plot svg { width: 100%; height: 100%; }

.btn--ink { background: var(--black); color: var(--cream); }
.btn--ink:hover { background: var(--cream); color: var(--black); }
.section-cta { display: flex; justify-content: flex-end; margin-top: clamp(40px, 5vw, 64px); }
:root[data-theme="dark"] .section--alt .btn--ink { background: var(--cream); color: var(--black); }
:root[data-theme="dark"] .section--alt .btn--ink:hover { background: var(--orange); }

/* ---------- CONTACT / END ---------- */
.end { background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.end .wrap { padding-top: var(--sy); }
.end .frame-top { --tag-ink: var(--hero-bg); }
.end .btn--ghost:hover { background: var(--hero-text); border-color: var(--hero-text); color: var(--hero-bg); }
.end-title { font-size: clamp(56px, 14vw, 216px); line-height: .86; letter-spacing: -.045em; }
.end-title .line-2 { display: flex; align-items: center; gap: .12em; }
.end-title .dash { flex: none; width: .5em; height: .07em; background: var(--hero-text); }
.end-title .outline { -webkit-text-stroke-width: clamp(1px, .2vw, 3px); }
.end-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; margin-top: clamp(32px, 5vw, 56px); padding-bottom: var(--sy); }
.end-row .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.email { font: 700 clamp(20px, 2.4vw, 32px)/1.2 var(--f-display); letter-spacing: -.015em; display: inline-block; border-bottom: 2px solid var(--orange); padding: 10px 0 6px; transition: color .2s; word-break: break-all; }
.email:hover { color: var(--orange); }
.end-row .made-by { margin-bottom: 16px; color: var(--hero-muted); }
.end .frame-bottom .url { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--hero-muted); }
@media (max-width: 860px) { .end-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .barcode { display: none; } .frame-bottom .push { margin-left: 0; } }

/* ---------- REVEAL ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- LIGHTBOX ---------- */
.lb { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: rgb(10 10 10 / .96); color: var(--cream); }
.lb::backdrop { background: rgb(10 10 10 / .7); }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: 16px; padding: 16px var(--gx); }
.lb-top .mono { color: var(--grey); }
.lb-top .close { margin-left: auto; }
.lb-stage { display: grid; place-items: center; padding: 8px var(--gx); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; display: block; }
.lb-bottom { justify-content: space-between; border-top: 1px solid var(--line); }
.lb-title { font: 800 clamp(20px, 2.4vw, 32px)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
.lb-title span { display: block; margin-top: 6px; font: 500 11px/1 var(--f-mono); letter-spacing: .12em; color: var(--orange); }
.lb-nav { display: flex; gap: 8px; }
.lb .icon-btn { border-color: #2C2A27; color: var(--cream); }
.lb .icon-btn:hover { border-color: var(--orange); color: var(--orange); }
.lb .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.lb-top .lb-title { font-size: clamp(14px, 1.4vw, 18px); color: var(--cream); }

/* On tablets and phones, sections stack, so vertical parallax on text would slide
   headings into the content below them. Keep it for images only. */
@media (max-width: 1024px) {
  #work-title, #hello-title, .play-intro, .big-k { translate: none !important; }
}

/* Very narrow phones: let the section tags wrap instead of running off-screen */
@media (max-width: 420px) {
  .frame-top { flex-wrap: wrap; gap: 8px 12px; }
  .frame-top .rule { display: none; }
  .frame-top .tag--line { margin-left: auto; }
}
