/* =========================================================
   pedrojacosta.com · hand-built, no framework
   Concept: a NYC subway line with Dominican colors.
   Every section is a stop; projects arrive on an LED board.
   ========================================================= */

:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --card: #fffdf8;
  --ink: #0e0f12;
  --ink-2: #34373f;
  --muted: #5f636c;
  --rule: #d8d2c3;
  --grid: rgba(14, 15, 18, .055);

  --blue: #002d62;          /* DR flag blue */
  --blue-ui: #0b4ea2;
  --red: #ce1126;           /* DR flag red */
  --green: #00843d;
  --yellow: #fccc0a;        /* MTA N/Q/R yellow */
  --led: #ffb627;
  --live: #19c37d;

  --sign: #0e0f12;          /* station signs stay black in both themes */
  --sign-ink: #ffffff;

  --link: var(--blue-ui);
  --shadow: 0 1px 0 rgba(14, 15, 18, .04), 0 12px 32px -18px rgba(14, 15, 18, .28);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c0d10;
    --paper-2: #121419;
    --card: #15171c;
    --ink: #f1eee6;
    --ink-2: #c9c6be;
    --muted: #9a9ca3;
    --rule: #2a2d35;
    --grid: rgba(255, 255, 255, .04);
    --link: #7fb2ff;
    --sign: #000000;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 16px 40px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c0d10;
  --paper-2: #121419;
  --card: #15171c;
  --ink: #f1eee6;
  --ink-2: #c9c6be;
  --muted: #9a9ca3;
  --rule: #2a2d35;
  --grid: rgba(255, 255, 255, .04);
  --link: #7fb2ff;
  --sign: #000000;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 16px 40px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
ul, ol { margin: 0; padding: 0; list-style: none; }
kbd {
  font-family: var(--mono);
  font-size: .72em;
  border: 1px solid currentColor;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .05em .4em;
  opacity: .85;
}
abbr { text-decoration: none; }
::selection { background: var(--yellow); color: #0e0f12; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px #0e0f12;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); color: #0e0f12; font-weight: 700;
  padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
.p { color: var(--live); font-family: var(--mono); }

/* ---------- subway bullets ---------- */
.bullet {
  --size: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: calc(var(--size) * .6);
  line-height: 1;
  color: #fff;
  background: var(--ink);
  user-select: none;
}
.bullet--sm { --size: 26px; }
.bullet--red { background: var(--red); }
.bullet--blue { background: var(--blue); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.bullet--green { background: var(--green); }
.bullet--yellow { background: var(--yellow); color: #0e0f12; }
.bullet--ink { background: #2b2e36; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.bullet--grey { background: #808183; }
.bullet--brand {
  --size: 34px;
  background:
    radial-gradient(circle at center, #0e0f12 0 62%, transparent 63%),
    linear-gradient(90deg, var(--blue) 50%, var(--red) 50%);
  font-size: 18px;
}
.bullet--flag {
  background:
    linear-gradient(#fff, #fff) center / 100% 18% no-repeat,
    linear-gradient(#fff, #fff) center / 18% 100% no-repeat,
    conic-gradient(from 0deg, var(--red) 0 25%, var(--blue) 0 50%, var(--red) 0 75%, var(--blue) 0);
  color: transparent;
}
.flag-mini {
  display: inline-block; width: 21px; height: 14px; vertical-align: -2px; margin-right: 8px; border-radius: 2px;
  background:
    linear-gradient(#fff, #fff) center / 100% 3px no-repeat,
    linear-gradient(#fff, #fff) center / 3px 100% no-repeat,
    conic-gradient(from 0deg, var(--red) 0 25%, var(--blue) 0 50%, var(--red) 0 75%, var(--blue) 0);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot--live { background: var(--live); box-shadow: 0 0 0 0 rgba(25, 195, 125, .6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(25, 195, 125, .55); }
  70% { box-shadow: 0 0 0 9px rgba(25, 195, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 195, 125, 0); }
}

/* ---------- top bar / line map ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand__name { font-size: 17px; font-variation-settings: "wdth" 110; }

.linemap { flex: 1; display: flex; justify-content: center; min-width: 0; }
.linemap ol { position: relative; display: flex; gap: 0; }
.linemap ol::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 9px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  opacity: .9;
}
.linemap a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none;
  letter-spacing: .01em; white-space: nowrap;
}
.linemap .stop {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--ink);
  transition: transform .2s ease, background .2s ease;
}
.linemap a:hover { color: var(--ink); }
.linemap a:hover .stop { transform: scale(1.12); }
.linemap a.is-here { color: var(--ink); }
.linemap a.is-here .stop { background: var(--yellow); border-color: var(--ink); transform: scale(1.18); }

.topbar__tools { display: flex; align-items: center; gap: 14px; }
.clocks { display: flex; gap: 12px; margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.clocks abbr { color: var(--ink); font-weight: 700; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 600 13px/1 var(--font); color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 8px 12px;
}
.kbd-btn:hover { border-color: var(--ink); }
.kbd-btn kbd { font-size: 11px; }

.progress { height: 3px; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--red)); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 6vw, 72px);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(transparent, var(--paper)); pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; margin-bottom: 26px;
}
.hero__title {
  font-size: clamp(42px, 6.3vw, 92px);
  font-weight: 900;
  font-variation-settings: "wdth" 108;
  letter-spacing: -.035em;
  line-height: .94;
  margin-bottom: 26px;
}
.hero__title-ship {
  position: relative; display: inline-block; color: var(--paper); white-space: nowrap;
  padding: 0 .14em .04em; margin-left: -.06em; margin-top: .06em;
  background: var(--ink);
  border-radius: .12em;
  transform: rotate(-1.2deg);
}
.hero__title-ship::after {
  content: ""; position: absolute; left: .14em; right: .14em; bottom: -.12em; height: .09em;
  background: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%); border-radius: 99px;
}
.hero__lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 36em; margin-bottom: 30px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row--center { justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  font: 700 15px/1 var(--font); letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: 0 4px 0 var(--red); }
.btn--primary:hover { box-shadow: 0 6px 0 var(--red); }
.btn--ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--text { color: var(--ink); padding: 0 10px; }
.btn--text:hover { text-decoration: underline; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--ghost-light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost-light:hover { background: #fff; color: #0e0f12; }

/* ---------- terminal ---------- */
.term {
  background: #0d0f13; color: #e7e5df;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  transform: rotate(.6deg);
}
.term__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #171a20; border-bottom: 1px solid #23262e; }
.term__dots { display: flex; gap: 7px; }
.term__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3e48; }
.term__dots i:nth-child(1) { background: #ff5f57; }
.term__dots i:nth-child(2) { background: #febc2e; }
.term__dots i:nth-child(3) { background: #28c840; }
.term__title { flex: 1; text-align: center; color: #8d919b; font-size: 12px; }
.term__flag {
  width: 18px; height: 12px; border-radius: 2px;
  background:
    linear-gradient(#fff, #fff) center / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 100% no-repeat,
    conic-gradient(from 0deg, var(--red) 0 25%, var(--blue) 0 50%, var(--red) 0 75%, var(--blue) 0);
}
.term__body { padding: 16px 18px 14px; height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.term__out p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.term__out .c { color: #8d919b; }
.term__out .ok { color: var(--live); }
.term__out .y { color: var(--led); }
.term__out .r { color: #ff6b7d; }
.term__out .b { color: #7fb2ff; }
.term__out a { color: #7fb2ff; }
.term__form { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.term__input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: #fff; font: inherit; caret-color: var(--yellow); padding: 2px 0;
}
.term__input::placeholder { color: #5c616c; }
.term__form:focus-within { box-shadow: 0 1px 0 #3a3e48; }
.term .caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -2px; background: var(--yellow); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- LED status board ---------- */
.board-wrap { margin-top: clamp(8px, 2vw, 16px); }
.board {
  background: #08090b; color: var(--led);
  border-radius: var(--radius); padding: 6px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.board__head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 10px; border-bottom: 1px dashed #2a2c31; }
.board__title {
  font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: #fff;
}
.board__note { font-family: var(--mono); font-size: 12px; color: #7a7d85; letter-spacing: .1em; text-transform: uppercase; }
.board__rows { display: grid; grid-template-columns: 1fr 1fr; }
.board__rows li { border-bottom: 1px solid #16181c; }
.board__rows li:nth-child(odd) { border-right: 1px solid #16181c; }
.board__rows li:nth-last-child(-n+2) { border-bottom: 0; }
.board__rows a {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "b n s" "b d s";
  align-items: center; column-gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; border-radius: 10px;
}
.board__rows a:hover { background: #121418; }
.board__rows .bullet { grid-area: b; }
.board__name {
  grid-area: n; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--led); text-shadow: 0 0 10px rgba(255, 182, 39, .45);
}
.board__desc { grid-area: d; font-family: var(--mono); font-size: 12px; color: #8a8d95; }
.led {
  grid-area: s; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #a7aab2; border: 1px solid #2c2f36; border-radius: 6px; padding: 4px 8px;
}
.led--live { color: var(--live); border-color: rgba(25,195,125,.45); text-shadow: 0 0 10px rgba(25,195,125,.6); animation: ledblink 2.4s ease-in-out infinite; }
.led--beta { color: var(--led); border-color: rgba(255,182,39,.45); }
.led--founded { color: #7fb2ff; border-color: rgba(127,178,255,.4); }
@keyframes ledblink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- sections / station signs ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.sign {
  position: relative;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--sign); color: var(--sign-ink);
  border-radius: 10px; padding: 18px 22px 16px;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.sign::before { /* the thin white rule on MTA station signs */
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: rgba(255,255,255,.9);
}
.sign__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; font-variation-settings: "wdth" 100; letter-spacing: -.02em; }
.sign__sub { margin: 0 0 0 auto; font-size: 15px; color: rgba(255,255,255,.72); }

/* ---------- tags & chips ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 4px 8px;
}
.tag--live { color: #0b7a4b; border-color: rgba(25,195,125,.5); background: rgba(25,195,125,.08); }
.tag--beta { color: #8a5a00; border-color: rgba(255,182,39,.6); background: rgba(255,182,39,.12); }
.tag--private { color: var(--ink); border-color: var(--ink); }
.tag--founded { color: var(--blue-ui); border-color: rgba(11,78,162,.45); background: rgba(11,78,162,.06); }
.tag--stay { color: #0b7a4b; border-color: rgba(25,195,125,.5); background: rgba(25,195,125,.08); }
.tag--sale { color: var(--red); border-color: rgba(206,17,38,.45); background: rgba(206,17,38,.05); }
:root[data-theme="dark"] .tag--live, :root[data-theme="dark"] .tag--stay { color: #4fe0a1; }
:root[data-theme="dark"] .tag--beta { color: var(--led); }
:root[data-theme="dark"] .tag--founded { color: #7fb2ff; }
:root[data-theme="dark"] .tag--sale { color: #ff6b7d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag--live, :root:not([data-theme="light"]) .tag--stay { color: #4fe0a1; }
  :root:not([data-theme="light"]) .tag--beta { color: var(--led); }
  :root:not([data-theme="light"]) .tag--founded { color: #7fb2ff; }
  :root:not([data-theme="light"]) .tag--sale { color: #ff6b7d; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; }
.chips li {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  background: var(--paper-2); border-radius: 6px; padding: 3px 8px;
}

.link-arrow { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 1px; }
.link-arrow:hover { color: var(--red); }

/* ---------- FinSight flagship ---------- */
.flagship {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 6px);
  padding: clamp(22px, 4vw, 48px);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.flagship::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}
.flagship__title { font-size: clamp(40px, 6vw, 72px); font-weight: 900; font-variation-settings: "wdth" 115; letter-spacing: -.035em; margin-bottom: 10px; }
.flagship__lede { font-size: clamp(19px, 2vw, 24px); font-weight: 600; line-height: 1.3; color: var(--ink); max-width: 26em; }
.flagship__copy > p:not(.tags):not(.flagship__lede) { color: var(--ink-2); max-width: 38em; }

.phone { margin: 0; justify-self: center; width: min(100%, 300px); }
.phone__screen {
  border-radius: 34px; padding: 18px 14px 14px;
  background: #0e0f12; color: #eceae4;
  box-shadow: 0 0 0 8px #1d2027, 0 0 0 9px #33363e, 0 30px 60px -24px rgba(0,0,0,.6);
  font-size: 13.5px; line-height: 1.45;
  transform: rotate(-2deg);
}
.phone__top { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 12px; }
.phone__logo { font-weight: 800; letter-spacing: -.01em; }
.phone__badge { font-family: var(--mono); font-size: 11px; color: #0e0f12; background: var(--live); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 270px; }
.chat p { margin: 0; }
.chat__q { align-self: flex-end; max-width: 82%; background: #2a5bd7; color: #fff; padding: 9px 12px; border-radius: 16px 16px 4px 16px; }
.chat__a { align-self: flex-start; max-width: 90%; background: #1c1f26; padding: 10px 12px; border-radius: 16px 16px 16px 4px; }
.chat__who { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--live); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.chat__a--typing { display: flex; gap: 5px; padding: 13px 14px; }
.chat__a--typing i { width: 7px; height: 7px; border-radius: 50%; background: #8d919b; animation: typing 1.2s infinite ease-in-out; }
.chat__a--typing i:nth-child(2) { animation-delay: .15s; }
.chat__a--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.phone__input { margin-top: 12px; background: #1c1f26; color: #7d818b; border-radius: 999px; padding: 9px 14px; font-size: 13px; }
.phone figcaption { margin-top: 22px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- project cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); }
.card--wide { grid-column: 1 / -1; }
.card__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; font-variation-settings: "wdth" 108; letter-spacing: -.02em; margin-bottom: 10px; }
.card > p:not(.tags) { color: var(--ink-2); }
.card .chips { margin-bottom: 0; margin-top: auto; padding-top: 6px; }
.card .link-arrow { align-self: flex-start; margin-top: auto; }

.pipe { display: flex; flex-wrap: wrap; gap: 0; margin: 6px 0 20px; counter-reset: step; }
.pipe li {
  position: relative; flex: 1 1 140px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 18px 12px 16px; margin: 4px 0;
  background: var(--paper); border: 1px solid var(--rule);
  font-size: 14px;
}
.pipe li + li { margin-left: -1px; }
.pipe li:first-child { border-radius: 10px 0 0 10px; }
.pipe li:last-child { border-radius: 0 10px 10px 0; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pipe li::before { counter-increment: step; content: "0" counter(step); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pipe li:last-child::before { color: var(--live); content: "0" counter(step) " ✓"; }
.pipe li:not(:last-child)::after {
  content: ""; position: absolute; right: -8px; top: 50%; z-index: 1; width: 14px; height: 14px;
  background: var(--paper); border-top: 1px solid var(--rule); border-right: 1px solid var(--rule);
  transform: translateY(-50%) rotate(45deg);
}
.pipe b { font-weight: 800; }
.pipe span { font-size: 12.5px; color: var(--muted); }
.pipe li:last-child span { color: color-mix(in srgb, var(--paper) 72%, transparent); }

/* ---------- work ---------- */
.work { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.gitlog {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow);
}
.gitlog__cmd { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.commit { position: relative; padding: 0 0 26px 34px; }
.commit:last-child { padding-bottom: 0; }
.commit::before { /* node */
  content: ""; position: absolute; left: 4px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--blue-ui);
}
.commit--head::before { background: var(--yellow); border-color: var(--ink); }
.commit:not(:last-child)::after { /* graph line */
  content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 3px; background: var(--rule); border-radius: 2px;
}
.commit__ref { display: flex; gap: 6px; margin-bottom: 8px; font-family: var(--mono); font-size: 11.5px; }
.ref { border: 1px solid var(--rule); border-radius: 4px; padding: 1px 7px; color: var(--muted); }
.ref--head { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.commit__title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; letter-spacing: -.015em; margin-bottom: 10px; line-height: 1.2; }
.commit__title .at { font-weight: 500; color: var(--muted); }
.commit__body li { position: relative; padding-left: 20px; color: var(--ink-2); margin-bottom: 4px; }
.commit__body li::before { content: "+"; position: absolute; left: 0; font-family: var(--mono); color: var(--live); font-weight: 700; }

.toolbox {
  background: var(--sign); color: #e7e5df; border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px); font-size: 15px;
}
.toolbox__title { font-family: var(--mono); font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.toolbox dl { margin: 0; display: grid; gap: 16px; }
.toolbox dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--led); margin-bottom: 4px; }
.toolbox dd { margin: 0; color: #cfccc4; line-height: 1.55; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.portrait { margin: 0; }
.portrait__placeholder, .portrait__img {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  object-fit: cover;
}
.portrait__placeholder {
  position: relative; display: grid; place-items: center;
  background:
    radial-gradient(circle at center, #0e0f12 0 58%, transparent 58.5%),
    conic-gradient(from -45deg, var(--blue) 0 25%, var(--red) 0 50%, var(--blue) 0 75%, var(--red) 0);
}
.portrait__placeholder::before { /* the white cross of the flag */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 100% 7% no-repeat,
    linear-gradient(#fff, #fff) center / 7% 100% no-repeat;
  -webkit-mask: radial-gradient(circle, transparent 58.5%, #000 59%);
          mask: radial-gradient(circle, transparent 58.5%, #000 59%);
}
.portrait__placeholder span {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; font-size: 64px; letter-spacing: -.02em; color: #fff;
}
.portrait figcaption { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.about__big { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; font-variation-settings: "wdth" 105; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 22px; }
.about__copy p:not(.about__big) { color: var(--ink-2); font-size: 18px; max-width: 36em; }

/* ---------- community ---------- */
.community {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--rule); border-left: 8px solid var(--green);
  border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow);
}
.community__role { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.community__org { font-size: clamp(26px, 3.6vw, 44px); font-weight: 900; font-variation-settings: "wdth" 110; letter-spacing: -.025em; margin-bottom: 16px; }
.community p:not(.community__role) { color: var(--ink-2); font-size: 18px; max-width: 42em; }

/* ---------- real estate ---------- */
.casa__intro { font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-2); max-width: 44em; margin-bottom: 28px; }
.props { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.prop {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.prop:hover { transform: translateY(-3px); border-color: var(--ink); }
.prop__art { aspect-ratio: 32 / 17; overflow: hidden; border-bottom: 1px solid var(--rule); }
.prop__art svg { width: 100%; height: 100%; }
.prop__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.prop__title { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 10px; }
.prop__body > p:not(.tags):not(.price) { color: var(--ink-2); font-size: 16px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 16px; }
.specs li { font-family: var(--mono); font-size: 12px; font-weight: 500; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.price { font-size: 28px; font-weight: 900; font-variation-settings: "wdth" 112; letter-spacing: -.02em; margin: -4px 0 16px; }
.prop .btn { margin-top: auto; }

/* ---------- contact ---------- */
.contact {
  margin-top: clamp(72px, 10vw, 128px);
  background: #0e0f12; color: #fff; position: relative; overflow: hidden;
  padding: clamp(64px, 10vw, 120px) 0;
}
.contact::before { /* two-line route stripe */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}
.contact__inner { text-align: center; position: relative; }
.contact__kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.contact__title { font-size: clamp(44px, 8vw, 112px); font-weight: 900; font-variation-settings: "wdth" 115; letter-spacing: -.04em; line-height: .95; margin-bottom: 22px; }
.contact__lede { font-size: clamp(17px, 1.8vw, 21px); color: rgba(255,255,255,.75); max-width: 34em; margin: 0 auto 34px; }
.contact .btn--primary { background: #fff; color: #0e0f12; }
.contact :focus-visible { box-shadow: 0 0 0 6px #000; }

/* ---------- footer ---------- */
.footer { background: #0e0f12; color: rgba(255,255,255,.62); border-top: 1px solid #23262e; font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 24px; padding-bottom: 28px; }
.footer p { margin: 0; }
.footer kbd { color: #fff; }

/* ---------- command palette ---------- */
.palette {
  width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 520px);
  padding: 0; border: 1px solid var(--rule); border-radius: 16px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.5);
  margin: 12vh auto auto;
}
.palette[open] { display: flex; flex-direction: column; animation: pop .16s ease-out; }
.palette::backdrop { background: rgba(8, 9, 11, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette__form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.palette__prompt { font-family: var(--mono); font-size: 20px; color: var(--red); font-weight: 700; }
.palette__input:focus-visible, .term__input:focus-visible { outline: none; box-shadow: none; }
.palette__input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 500 17px/1.3 var(--font); }
.palette__esc { font-family: var(--mono); font-size: 11px; color: var(--muted); background: transparent; border: 1px solid var(--rule); border-radius: 5px; padding: 3px 7px; cursor: pointer; }
.palette__list { overflow-y: auto; padding: 8px; }
.palette__list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.palette__list li[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.palette__list li[aria-selected="true"] .palette__hint { color: inherit; opacity: .7; }
.palette__label { flex: 1; font-weight: 600; }
.palette__hint { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.palette__empty { padding: 18px 12px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.palette__foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.palette__foot kbd { margin-left: 4px; }

/* ---------- toast & konami ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 140%);
  max-width: calc(100vw - 32px);
  background: #0e0f12; color: #fff; border-radius: 999px; padding: 12px 20px;
  font-weight: 600; font-size: 15px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); }
.flagrun {
  position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) center / 100% 14% no-repeat,
    linear-gradient(#fff, #fff) center / 14% 100% no-repeat,
    conic-gradient(from 0deg, var(--red) 0 25%, var(--blue) 0 50%, var(--red) 0 75%, var(--blue) 0);
  clip-path: inset(0 100% 0 0);
  animation: flagrun 1.8s cubic-bezier(.7,0,.2,1) forwards;
}
@keyframes flagrun {
  0% { clip-path: inset(0 100% 0 0); }
  40%, 60% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}

/* ---------- reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .linemap a { padding: 0 8px; font-size: 12px; }
  .clocks { display: none; }
}
@media (max-width: 960px) {
  .linemap { display: none; }
  .topbar__inner { justify-content: space-between; }
  .hero__inner { grid-template-columns: 1fr; }
  .term { transform: none; }
  .flagship { grid-template-columns: 1fr; }
  .phone { margin-top: 8px; }
  .work { grid-template-columns: 1fr; }
  .props { grid-template-columns: 1fr 1fr; }
  .props .prop:last-child { grid-column: 1 / -1; }
  .about { grid-template-columns: 220px 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .board__rows { grid-template-columns: 1fr; }
  .board__rows li:nth-child(odd) { border-right: 0; }
  .board__rows li:nth-last-child(2) { border-bottom: 1px solid #16181c; }
  .grid { grid-template-columns: 1fr; }
  .props { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; justify-items: start; }
  .portrait { width: 200px; }
  .portrait__placeholder span { font-size: 46px; }
  .sign { padding: 18px 16px 14px; gap: 12px; }
  .sign__sub { margin-left: 0; flex-basis: 100%; font-size: 14px; }
  .pipe { flex-direction: column; }
  .pipe li { flex: none; margin: 0 !important; border-radius: 0 !important; }
  .pipe li + li { margin-top: -1px !important; }
  .pipe li:first-child { border-radius: 10px 10px 0 0 !important; }
  .pipe li:last-child { border-radius: 0 0 10px 10px !important; }
  .pipe li:not(:last-child)::after { right: auto; left: 24px; top: auto; bottom: -8px; transform: rotate(135deg); }
  .term__body { height: 300px; }
  .cta-row .btn { flex: 1 1 auto; }
  .cta-row .btn--text { flex: 0 0 auto; }
  .kbd-btn kbd { display: none; }
  .eyebrow { display: block; border-radius: 12px; font-size: 12.5px; line-height: 1.5; padding: 8px 12px; }
  .eyebrow .dot { margin-right: 8px; vertical-align: 1px; }
  .phone { width: min(100% - 24px, 280px); }
  .phone__screen { transform: none; }
  .portrait figcaption { white-space: nowrap; text-align: left; }
}
@media (hover: none) {
  .footer__hint { display: none; }
}
@media (max-width: 400px) {
  .brand__name { font-size: 15px; }
  .eyebrow { font-size: 12px; }
  .board__rows a { column-gap: 10px; padding: 12px 10px; }
  .board__name { font-size: 13.5px; }
  .led { font-size: 10.5px; padding: 3px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .term, .phone__screen, .hero__title-ship { transform: none; }
}

@media print {
  .topbar, .term, .palette, .toast, .board { display: none !important; }
  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
}
