/* #9 joelugwumadu.dev — v2 "THE FLEET".
   Near-black page (akinkunmi restraint), split identity rail (marclou shape),
   and product cards that each wear their product's real skin. One committed
   look — the page is a night studio; there is no light variant of Joel's desk.
   Invisible layer per DESIGN.md: spacing scale, type scale, motion rhythm,
   focus rings, reduced-motion paths. */

:root {
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;

  --bg: #0b0b0e;
  --panel: #131318;
  --edge: #23232c;
  --ink: #f0eee9;
  --ink-soft: #9b9aa4;
  --amber: #f5b04c;      /* the page accent — cap-brown warmed to signal */
  --live: #4ade80;
  --yard: #e8a33d;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(245, 176, 76, 0.07), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 "DM Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-16);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-16);
  align-items: start;
}

/* ---------------- identity rail ---------------- */

.rail { position: sticky; top: var(--space-12); }

.portrait {
  width: 128px; height: 128px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 210deg, var(--amber), #7fb2ff 40%, transparent 75%, var(--amber));
  margin-bottom: var(--space-6);
}

.portrait img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}

h1 {
  margin: 0 0 var(--space-3);
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.where {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0 0 var(--space-4);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bio { margin: 0 0 var(--space-4); color: var(--ink-soft); max-width: 34ch; }

.tally {
  margin: 0 0 var(--space-8);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.t-live { color: var(--live); }
.t-yard { color: var(--yard); }
.t-queue { color: var(--ink-soft); }

/* The mail button owns its own line; the two profiles share the next one. */
.rail-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.rail-actions .btn:first-child { flex: 1 0 100%; }
.rail-actions .btn.ghost { flex: 1 1 auto; }

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-6);
  border-radius: 999px;
  background: var(--amber);
  color: #171204;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--edge);
}
.btn.ghost:hover { border-color: var(--ink-soft); }

.btn.icon-only { width: 44px; padding: 0; justify-content: center; flex: 0 0 auto; }

/* ---------------- the fleet ---------------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

a.card:hover { transform: translateY(-3px); border-color: #3a3a48; }
a.card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.card-body { padding: var(--space-4) var(--space-6) var(--space-6); }

.card h2 {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 0 var(--space-2);
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
}

.card p { margin: 0 0 var(--space-3); font-size: 14px; color: var(--ink-soft); }

.domain {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0.75;
}
.still .domain { opacity: 0.45; }

.chip {
  font: 700 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 9px 4px;
  border-radius: 999px;
}
.chip.live  { color: #0c2a17; background: var(--live); }
.chip.yard  { color: #2a1d04; background: var(--yard); }
.chip.queue { color: var(--ink-soft); border: 1px solid var(--edge); }

/* ---- scenes: each card wears its product's skin ---- */

.scene { position: relative; height: 128px; overflow: hidden; }

/* Ship Am — the night shift skyline */
.scene-shipam { background: linear-gradient(#070b14 55%, #0d1322); }
.sa-clock {
  position: absolute; top: 10px; left: 12px;
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  color: #8e93a6;
}
.sa-city {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: flex-end; gap: 5px;
  padding: 0 10px;
}
.sa-city i {
  flex: 1;
  background: #0d1322;
  border: 1px solid #1a2337;
  border-bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  align-content: start;
}
.sa-city s { height: 4px; background: #141c2e; }
.sa-city s.lit { background: #ffb35c; }
@keyframes nepa { 0%, 92% { opacity: 1; } 94%, 97% { opacity: 0.15; } 100% { opacity: 1; } }
.sa-city s.flick { animation: nepa 7s linear infinite; }

/* B2C Playbook — the receipts rail */
.scene-b2c { background: #0a0b0e; }
.scene-b2c svg { position: absolute; inset: 12px 0 0; width: 100%; height: calc(100% - 12px); }
.b2c-a, .b2c-b {
  position: absolute;
  font: 700 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
}
.b2c-a { left: 12px; bottom: 26px; color: #9aa0b0; }
.b2c-b { right: 12px; top: 10px; color: #d8b36c; }
@keyframes climb { from { stroke-dashoffset: 340; } to { stroke-dashoffset: 0; } }
.b2c-line { stroke-dasharray: 340; animation: climb 2.2s var(--ease-out) 0.3s both; }

/* Syndicate — the published ledger */
.scene-syn { background: #0a0a0a; }
.scene-syn pre {
  margin: 0; padding: 14px 16px;
  font: 500 11px/1.8 "Inconsolata", monospace;
  color: #8a8a8a;
}
.scene-syn .g { color: #4ade80; }
.scene-syn .r { color: #f87171; }
@keyframes blink { 50% { opacity: 0; } }
.cursor { color: #fafafa; animation: blink 1.1s steps(1) infinite; }

/* Metrix — the privacy-first dashboard */
.scene-metrix { background: #0a0a0c; padding: 12px 14px 0; }
.mx-stats {
  display: flex; gap: 14px; align-items: baseline;
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  color: #6f6f7d;
}
.mx-stats b { color: #eceaf6; font-weight: 700; font-size: 12px; }
.mx-priv { margin-left: auto; color: #6366f1; }
.mx-bars {
  position: absolute; inset: auto 14px 0 14px;
  height: 74px;
  display: flex; align-items: flex-end; gap: 4px;
}
.mx-bars i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(#7c78ff, #4f46e5);
  transform-origin: bottom;
  animation: mx-rise 520ms var(--ease-out) both;
}
@keyframes mx-rise { from { transform: scaleY(0.05); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* Replwave — seven channels braided into one inbox (its own daylight world) */
.scene-rep { background: #f5f5fb; }
.scene-rep svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rep-inbox rect { fill: #fff; stroke: #dbd9e8; stroke-width: 1; }
@keyframes braid { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
.rep-braid path {
  stroke-dasharray: 260;
  animation: braid 1.6s var(--ease-out) both;
}
.rep-braid path:nth-child(2) { animation-delay: 90ms; }
.rep-braid path:nth-child(3) { animation-delay: 180ms; }
.rep-braid path:nth-child(4) { animation-delay: 270ms; }
.rep-braid path:nth-child(5) { animation-delay: 360ms; }
.rep-braid path:nth-child(6) { animation-delay: 450ms; }
.rep-braid path:nth-child(7) { animation-delay: 540ms; }
@keyframes ember { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.rep-new { animation: ember 2.4s ease-in-out infinite; }

/* Selko — the order arrives as a chat */
.scene-selko {
  background: #0c1712;
  display: flex; align-items: center;
  padding: 0 14px;
}
.chat { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.msg {
  max-width: 78%;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.35;
}
.msg.out {
  align-self: flex-end;
  background: #12b76a;
  color: #04170e;
  border-bottom-right-radius: 3px;
}
.msg.in {
  align-self: flex-start;
  background: #13251c;
  color: #cfe6da;
  border: 1px solid rgba(18, 183, 106, 0.22);
  border-bottom-left-radius: 3px;
}
.msg.typing {
  align-self: flex-start;
  display: flex; gap: 4px; align-items: center;
  padding: 8px 10px;
  background: #13251c;
  border: 1px solid rgba(255, 138, 61, 0.25);
}
.msg.typing i { width: 5px; height: 5px; border-radius: 50%; background: #ff8a3d; }
@keyframes bump { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.msg.typing i { animation: bump 1.3s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.18s; }
.msg.typing i:nth-child(3) { animation-delay: 0.36s; }

/* ClipFast — the strip */
.scene-clip { background: #101014; display: grid; place-items: center; }
.strip {
  display: flex; gap: 8px;
  padding: 10px;
  border-block: 4px dashed #23232c;
}
.strip span {
  width: 26px; height: 46px;
  border-radius: 4px;
  background: #1b1b22;
  border: 1px solid #2a2a34;
}
.strip .hot { background: #e8a33d; border-color: #e8a33d; box-shadow: 0 0 18px rgba(232, 163, 61, 0.45); }
.clip-cap {
  position: absolute; bottom: 8px;
  font: 500 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  color: #6b6b76;
}

/* The slate — unlit berths */
.scene-slate {
  background: var(--panel);
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 6px;
  align-content: center;
  padding: 0 var(--space-6);
}
.scene-slate i { height: 14px; border-radius: 3px; border: 1px dashed var(--edge); }
.slate { border-style: dashed; grid-column: 1 / -1; }
.slate .scene { height: 72px; }

/* ---------------- the log ---------------- */

.log { padding-top: var(--space-16); }

h3 {
  margin: 0 0 var(--space-6);
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 24px;
}

.log ol { list-style: none; margin: 0; padding: 0; }

.log li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--edge);
}

.log time {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.log p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 60ch; }

/* ---------------- faq ---------------- */

.faq { padding-top: var(--space-16); }
.faq-item { padding: var(--space-3) 0; border-top: 1px solid var(--edge); }
.faq-item h4 {
  margin: 0 0 var(--space-2);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.faq-item p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 60ch; }

/* ---------------- footer ---------------- */

.foot {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--edge);
  color: var(--ink-soft);
  font-size: 14px;
}
.foot p { margin: 0; max-width: 60ch; }
.foot a { color: var(--amber); }

/* ---------------- shared with thanks.html ---------------- */

.wrap { width: 100%; max-width: 62ch; margin: 0 auto; padding-top: var(--space-24); }
.tick { display: block; margin-bottom: var(--space-6); color: var(--live); }
.lede { margin: 0 0 var(--space-8); font-size: 18px; color: var(--ink-soft); }
.link {
  display: inline-block;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.link:hover { opacity: 0.7; }
.link.inline { display: inline; }

:where(a):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------- responsive ---------------- */

@media (max-width: 960px) {
  /* One column, and that column is centred — otherwise the page reads as a
     left-aligned slab with a void down the right of wide-ish windows. */
  .page {
    grid-template-columns: 1fr;
    max-width: 680px;
    gap: var(--space-12);
    padding: var(--space-8) var(--space-4) var(--space-12);
  }
  .rail { position: static; }
  .cards { grid-template-columns: 1fr; }

  /* Stacked: the rail becomes a compact header — portrait beside the name — so
     the first product card is on screen without a full scroll. */
  .rail-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--space-4);
    align-items: center;
  }

  .portrait {
    grid-area: 1 / 1;
    width: 60px; height: 60px;
    padding: 3px;
    margin: 0;
  }
  .portrait img { border-width: 2px; }

  h1 {
    grid-area: 1 / 2;
    margin: 0;
    font-size: 30px;
    line-height: 1.1;
  }
  h1 br { display: none; }

  .where { grid-area: 2 / 2; margin: var(--space-1) 0 0; }

  .bio {
    grid-area: 3 / 1 / auto / span 2;
    margin: var(--space-4) 0 0;
    max-width: none;
    font-size: 15px;
  }

  .tally { grid-area: 4 / 1 / auto / span 2; margin: var(--space-3) 0 0; }

  .rail-actions {
    grid-area: 5 / 1 / auto / span 2;
    margin-top: var(--space-6);
  }
  .btn { justify-content: center; padding: 0 var(--space-6); }
}

/* Phones: tighten the cards and the log. */
@media (max-width: 720px) {
  .page {
    gap: var(--space-8);
    padding: var(--space-6) var(--space-4) var(--space-12);
  }

  .rail-actions { gap: var(--space-2); }
  .btn { flex: 1 1 auto; padding: 0 var(--space-4); }

  .cards { gap: var(--space-4); }
  .scene { height: 112px; }
  .card-body { padding: var(--space-4); }
  .card h2 { font-size: 21px; }

  .log { padding-top: var(--space-12); }
  .log li { grid-template-columns: 60px 1fr; gap: var(--space-3); }

  .foot { margin-top: var(--space-12); }
}

/* Narrow phones: the name no longer fits beside the portrait. */
@media (max-width: 380px) {
  h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .sa-city s.flick, .cursor, .b2c-line,
  .mx-bars i, .rep-braid path, .rep-new, .msg.typing i { animation: none; }
  .rep-braid path { stroke-dasharray: none; }
  .b2c-line { stroke-dasharray: none; }
  .btn:hover, a.card:hover { transform: none; }
}
