/* ==========================================================================
   events.address.md — signal terminal
   A control-room aesthetic for a public NATS event hub.
   Dark instrument panel · phosphor-green signal · amber alert · mono identity
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Archivo:wght@500;600;700;800;900&display=swap");

:root {
  /* surfaces */
  --bg:        #070a0c;
  --bg-2:      #0b1013;
  --panel:     #0e151a;
  --panel-2:   #121b21;
  --line:      #1c2a31;
  --line-soft: #16222a;

  /* ink */
  --ink:       #e8f0ee;
  --ink-dim:   #9fb2b0;
  --ink-faint: #6a7e7d;

  /* signal */
  --signal:    #4ade9a;   /* phosphor green   */
  --signal-2:  #2fae77;
  --alert:     #f5a524;   /* amber outage     */
  --transit:   #5db8ff;   /* cool blue transit*/
  --glow:      rgba(74, 222, 154, 0.55);

  /* type */
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Spectral", Georgia, serif;
  --disp:  "Archivo", system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* atmospheric base: grid mesh + radial glow + grain ----------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(74,222,154,0.08), transparent 60%),
    radial-gradient(900px 600px at 8% 12%, rgba(93,184,255,0.05), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 85%);
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--signal); color: #04130c; }

/* ---- shared layout ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 8px var(--glow);
}

.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line-soft); }

.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 52px; }
.section-head h2 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head p { margin: 0; max-width: 60ch; color: var(--ink-dim); font-size: 18px; }

.idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

/* ===========================  TOP BAR  ================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(180deg, rgba(7,10,12,0.92), rgba(7,10,12,0.55));
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,154,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(74,222,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,154,0); }
}
.brand b { color: var(--signal); font-weight: 600; }
.navlinks { display: flex; gap: 26px; font-family: var(--mono); font-size: 13px; color: var(--ink-dim); }
.navlinks a { position: relative; transition: color 0.2s; }
.navlinks a:hover { color: var(--ink); }
.navlinks a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--signal); transition: width 0.3s var(--ease);
}
.navlinks a:hover::after { width: 100%; }

/* ===========================  HERO  ==================================== */
.hero { position: relative; padding: clamp(70px, 13vw, 150px) 0 clamp(60px, 9vw, 110px); }
.hero .wrap { position: relative; z-index: 2; }

.hero-status {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  background: rgba(14,21,26,0.6);
  padding: 7px 14px; border-radius: 100px;
  margin-bottom: 30px;
}
.hero-status .live {
  color: var(--signal); display: inline-flex; align-items: center; gap: 7px;
}
.hero-status .live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 10px var(--glow); animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.hero h1 {
  font-family: var(--disp);
  font-weight: 900;
  /* Size against the text COLUMN (container query inline unit), not the viewport,
     so the oversized wordmark always fits its column and never bleeds under the
     console. ~19cqi keeps ".address.md" (the widest line) within the column. */
  font-size: clamp(40px, 19cqi, 132px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0 0 28px;
  overflow-wrap: break-word; /* hard safety net: never spill past the column */
}
.hero h1 .sub {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(13px, 2.2vw, 18px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 22px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, var(--signal) 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lede {
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ink);
  margin: 0 0 38px;
}
.hero-lede em { color: var(--signal); font-style: italic; }

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

.btn {
  font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.04em; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease);
}
.btn-primary {
  background: var(--signal); color: #04130c;
  box-shadow: 0 0 0 1px rgba(74,222,154,0.4), 0 12px 40px -12px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--signal), 0 18px 50px -14px var(--glow); }
.btn-primary .arrow { transition: transform 0.25s var(--ease); }
.btn-primary:hover .arrow { transform: translate(3px, -3px); }
.btn-ghost {
  background: rgba(14,21,26,0.5); color: var(--ink); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

/* hero: clean two-column composition — text column + console column, no overlap -- */
.hero-grid {
  display: grid;
  /* text column flexes; console column is a fixed, generous track with a real gap */
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 64px;
  align-items: center;
}
.hero-grid > * { min-width: 0; } /* allow children to shrink without overflow */

/* the text column is the sizing context for the oversized wordmark (cqw) */
.hero-copy {
  container-type: inline-size;
  container-name: herocopy;
  min-width: 0;
}

.console {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(18,27,33,0.9), rgba(11,16,19,0.9));
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.console::after { /* scanline sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.1em;
}
.console-bar .lamp { width: 9px; height: 9px; border-radius: 50%; background: #2a3a40; }
.console-bar .lamp.on { background: var(--signal); box-shadow: 0 0 8px var(--glow); }
.console-bar .meta { margin-left: auto; }
.console-body {
  padding: 18px 18px 20px;
  font-family: var(--mono); font-size: 13px; line-height: 1.85;
  overflow-x: auto;            /* scroll rather than crush at narrow widths */
  overscroll-behavior-x: contain;
}
.console-body .ln { display: flex; gap: 14px; color: var(--ink-dim); white-space: nowrap; }
.console-body .ln .n { color: var(--ink-faint); width: 1.4em; flex: 0 0 1.4em; text-align: right; user-select: none; }
.tok-k { color: var(--transit); }
.tok-s { color: var(--signal); }
.tok-a { color: var(--alert); }
.tok-c { color: var(--ink-faint); font-style: italic; }
.tok-p { color: var(--ink); }

/* ===========================  ABOUT  ================================== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.about-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.42; font-weight: 500; margin: 0;
}
.about-lede b { color: var(--signal); font-weight: 600; }
.about-grid p.note { color: var(--ink-dim); font-size: 17px; }

.specs { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}
.spec:last-child { border-bottom: none; }
.spec dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0; }
.spec dd { margin: 0; font-family: var(--mono); font-size: 14px; color: var(--ink); }
.spec dd .hl { color: var(--signal); }

/* ===========================  STREAMS  ================================ */
.subj-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 56px; }
.subj-table thead th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0 18px 14px; border-bottom: 1px solid var(--line);
}
.subj-table tbody td {
  padding: 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top;
  color: var(--ink-dim);
}
.subj-table tbody tr { transition: background 0.2s; }
.subj-table tbody tr:hover { background: rgba(74,222,154,0.03); }
.subj {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  display: inline-block;
}
.subj .var { color: var(--signal); }
.subj.transit .var { color: var(--transit); }
.pill {
  font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.pill.util { color: var(--alert); border-color: rgba(245,165,36,0.35); background: rgba(245,165,36,0.06); }
.pill.transit { color: var(--transit); border-color: rgba(93,184,255,0.35); background: rgba(93,184,255,0.06); }

/* code blocks (payloads + snippet) ---------------------------------------- */
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.code {
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
  background: linear-gradient(180deg, rgba(14,21,26,0.96), rgba(9,13,15,0.96));
  box-shadow: 0 30px 70px -45px rgba(0,0,0,0.9);
  display: flex; flex-direction: column;
}
.code-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim);
}
.code-head .tag {
  font-size: 11px; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 5px;
  font-weight: 500;
}
.code-head .tag.util { color: var(--alert); background: rgba(245,165,36,0.1); }
.code-head .tag.transit { color: var(--transit); background: rgba(93,184,255,0.1); }
.code-head .tag.html { color: var(--transit); background: rgba(93,184,255,0.1); }
.code-head .tag.cli { color: var(--signal); background: rgba(74,222,154,0.12); box-shadow: 0 0 0 1px rgba(74,222,154,0.25) inset; }
.code-head .file { color: var(--ink-faint); }
.code-head .copy {
  margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-faint); border: 1px solid var(--line); background: transparent;
  padding: 4px 9px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.code-head .copy:hover { color: var(--signal); border-color: var(--signal); }
.code-head .copy.ok { color: var(--signal); border-color: var(--signal); }

.code pre {
  margin: 0; padding: 18px 20px; overflow-x: auto; flex: 1;
  font-family: var(--mono); font-size: 13px; line-height: 1.72; color: var(--ink-dim);
  tab-size: 2;
}
.code pre code { font-family: inherit; }

/* JSON syntax tokens */
.j-key  { color: var(--transit); }
.j-str  { color: var(--signal); }
.j-num  { color: #e9c46a; }
.j-bool { color: var(--alert); }
.j-null { color: var(--ink-faint); }
.j-punc { color: var(--ink-faint); }
/* HTML/JS snippet tokens */
.h-tag  { color: var(--transit); }
.h-atr  { color: var(--signal); }
.h-str  { color: #e9c46a; }
.h-kw   { color: var(--alert); }
.h-fn   { color: var(--signal); }
.h-com  { color: var(--ink-faint); font-style: italic; }

/* ===========================  CONNECT  ================================ */
.connect-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.connect-steps { display: grid; gap: 4px; counter-reset: step; min-width: 0; }
.connect-codes { display: grid; gap: 18px; min-width: 0; }
.connect-codes .code { min-width: 0; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: none; }
.step .num {
  counter-increment: step;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--signal);
  background: rgba(74,222,154,0.05);
}
.step .num::before { content: counter(step, decimal-leading-zero); }
.step h4 { margin: 4px 0 5px; font-family: var(--disp); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-dim); font-size: 15px; }
.step code {
  font-family: var(--mono); font-size: 0.86em; color: var(--signal);
  background: rgba(74,222,154,0.08); padding: 1px 6px; border-radius: 5px;
}

.access-note {
  margin-top: 26px; padding: 16px 18px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel);
  font-family: var(--mono); font-size: 13px; color: var(--ink-dim); line-height: 1.7;
}
.access-note b { color: var(--signal); font-weight: 500; }

/* ===========================  LIVE  =================================== */
.live-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 28px; }
.live-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: var(--panel); padding: 7px 13px; border-radius: 100px;
}
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.live-tag.online i { background: var(--signal); box-shadow: 0 0 9px var(--glow); animation: blink 1.6s steps(1) infinite; }
/* paused while reading an expanded payload — amber, steady (no blink) */
.live-tag.paused { color: var(--alert); border-color: rgba(245,165,36,0.4); }
.live-tag.paused i { background: var(--alert); box-shadow: 0 0 9px rgba(245,165,36,0.5); animation: none; }

.ticker-shell {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(14,21,26,0.85), rgba(9,13,15,0.9));
  min-height: 280px; position: relative;
}
.ticker-shell::before { /* corner ticks */
  content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line-soft);
  border-radius: 8px; pointer-events: none;
}
/* the empty placeholder Task 3 fills */
#ticker {
  position: relative; z-index: 1; min-height: 280px;
  display: grid; place-items: center; padding: 40px;
}
/* graceful empty state — replaced once the ticker script mounts */
#ticker:empty::after {
  content: "awaiting first signal on  pmr.>";
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  color: var(--ink-faint);
}
#ticker:empty::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; margin: -34px 0 0 -7px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--signal);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================  TICKER ITEMS  ============================ */
/* Populated by assets/ticker.js; designed to match the dark instrument panel */
.ticker-placeholder {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 0;
  text-align: center;
}

/* Once populated: fixed-height panel with internal scroll (does not grow
   with the number of events). min-height kept so it never collapses. */
#ticker:has(.ticker-item) {
  display: block;
  place-items: unset;
  padding: 0;
  min-height: 0;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
/* subtle dark-theme scrollbar (WebKit) */
#ticker::-webkit-scrollbar { width: 9px; }
#ticker::-webkit-scrollbar-track { background: transparent; }
#ticker::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
#ticker::-webkit-scrollbar-thumb:hover { background: var(--line-soft); }

/* the item is now a column: summary row + (optional) raw payload panel */
.ticker-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-soft);
}
.ticker-item:last-child { border-bottom: none; }
.ticker-item.open { background: rgba(74,222,154,0.025); }

.ticker-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: baseline;
  gap: 10px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.ticker-row:hover { background: rgba(74,222,154,0.03); }
.ticker-row:focus-visible { outline: 1px solid var(--signal); outline-offset: -1px; }

.ticker-icon {
  font-size: 15px;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.ticker-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ticker-subject {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-summary {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-ts {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  align-self: center;
}

.ticker-chevron {
  display: inline-block; /* transforms don't apply to inline boxes */
  font-size: 11px;
  color: var(--ink-faint);
  align-self: center;
  user-select: none;
  transition: transform 0.2s var(--ease), color 0.2s;
}
.ticker-row[aria-expanded="true"] .ticker-chevron {
  transform: rotate(90deg);
  color: var(--signal);
}

/* expanded raw payload — contained and scrollable so big payloads stay tidy */
.ticker-raw {
  margin: 0;
  padding: 14px 20px 16px;
  max-height: 240px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
  background: rgba(7,10,12,0.5);
  border-top: 1px solid var(--line-soft);
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.ticker-raw::-webkit-scrollbar { width: 9px; height: 9px; }
.ticker-raw::-webkit-scrollbar-track { background: transparent; }
.ticker-raw::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ===========================  FOOTER  ================================= */
.footer { border-top: 1px solid var(--line-soft); padding: 46px 0; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer .f-brand { font-family: var(--mono); font-size: 14px; color: var(--ink-dim); }
.footer .f-brand b { color: var(--signal); }
.footer .f-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); display: flex; gap: 22px; flex-wrap: wrap; }
.footer .f-meta a:hover { color: var(--signal); }

/* ===========================  MOTION  ================================= */
/* Content is visible by default; only the JS-enabled path hides-then-reveals,
   so no-JS users, print, and full-page captures always see everything. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===========================  RESPONSIVE  ============================= */
/* stack the hero earlier so the console never lives in a too-narrow column */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .console { order: 2; max-width: 560px; }
}
@media (max-width: 980px) {
  .about-grid, .connect-grid { grid-template-columns: 1fr; gap: 36px; }
  .codes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .navlinks { display: none; }
  .subj-table thead { display: none; }
  .subj-table, .subj-table tbody, .subj-table tr, .subj-table td { display: block; width: 100%; }
  .subj-table tbody tr { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 14px; padding: 4px 0; }
  .subj-table tbody td { border: none; padding: 8px 16px; }
}
