/* ==========================================================================
   Flashers — home
   The hub for QWavey's browser flashers. Same instrument-panel language as the
   flashers themselves: black field, white type, one orange that means "live".
   ========================================================================== */

:root {
  --black:     #000000;
  --surface-1: #0A0A0B;
  --surface-2: #101013;
  --line-1:    #1F1F23;
  --line-2:    #34343B;
  --white:  #F5F5F7;
  --gray-1: #A1A1A6;
  --gray-2: #8A8A8F;
  --accent: #FF6A13;
  --ok:     #30D158;
  --r-2: 8px;
  --r-3: 16px;
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --e-out:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --e-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --d-1: 160ms; --d-2: 300ms; --d-3: 520ms; --d-4: 820ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--black);
  color: var(--white);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column; align-items: center;
  padding: var(--s-7) var(--s-5) var(--s-6);
}
::selection { background: var(--accent); color: #120600; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: 960px; }

/* ---- masthead ---- */
.mast { text-align: center; margin-bottom: var(--s-8); }
.mast .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gray-2); margin: 0 0 var(--s-4);
}
.mast .eyebrow .dot { color: var(--accent); }
.mast h1 {
  margin: 0;
  font-size: clamp(44px, 9vw, 92px); font-weight: 800;
  line-height: 0.94; letter-spacing: -0.04em;
}
.mast p {
  max-width: 52ch; margin: var(--s-5) auto 0;
  font-size: 18px; color: var(--gray-1);
}

/* ---- cards ---- */
.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5);
}
.card {
  display: grid; grid-template-rows: 1fr auto;
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.card:hover { border-color: var(--line-2); background: #0E0E10; }

.card .art {
  display: grid; place-items: center;
  padding: var(--s-7) var(--s-6) var(--s-5);
  border-bottom: 1px solid var(--line-1);
  background: var(--surface-2);
  min-height: 300px;
}
.card .art svg { height: 230px; width: auto; max-width: 100%; display: block; }

.card .body { padding: var(--s-5); display: grid; gap: var(--s-3); }
.card .kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-2); margin: 0;
}
.card h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.card .desc { margin: 0; font-size: 15px; color: var(--gray-1); max-width: 40ch; }

.card .meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--gray-2);
  padding-top: var(--s-2);
}
.card .meta b { color: var(--white); font-weight: 500; }

.card .open {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-2);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px; font-weight: 600; color: var(--white);
}
.card .open .arrow { transition: transform var(--d-2) var(--e-out); }
.card:hover .open .arrow { transform: translateX(4px); }

/* device drawing style (shared classes with the flashers, static here) */
.device { color: var(--white); }
.device .shell, .device .board, .device .part {
  fill: none; stroke: var(--white); stroke-linecap: round; stroke-linejoin: round;
}
.device .shell, .device .board { stroke-width: 1.5; }
.device .part { stroke-width: 1.1; stroke: var(--gray-1); }
.device .card2 { stroke: var(--line-2); }
.device .passive { fill: none; stroke: var(--line-2); stroke-width: 1; }
.device .pins { stroke: var(--gray-2); stroke-width: 0.9; }
.device .ink { fill: var(--gray-2); stroke: none; }
.device .drill { fill: var(--surface-2); }
.device .ghost { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 5 4; }
.device .led { fill: var(--accent); stroke: none; }
.grid > .card:nth-child(1) .device .led { fill: #30D158; }  /* Ducky: green */
.grid > .card:nth-child(2) .device .led { fill: #0A84FF; }  /* ESP: blue */
.device .mod {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 20px; font-weight: 600; letter-spacing: 0.04em;
  fill: var(--gray-2); text-anchor: middle;
}
.device .mod.sub2 { font-size: 15px; fill: var(--line-2); }
.device .sd {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 22px; font-weight: 600; fill: var(--line-2); text-anchor: middle;
}
.device .fillpin { fill: var(--gray-2); stroke: none; }

/* one-time draw-on */
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card { animation: cardIn var(--d-4) var(--e-apple) both; }
.card:nth-child(2) { animation-delay: 90ms; }

/* ---- footer ---- */
.foot {
  margin-top: var(--s-8);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px; color: var(--gray-2);
  display: flex; gap: var(--s-5); flex-wrap: wrap; justify-content: center;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .card .art { min-height: 240px; }
  .card .art svg { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* traced ESP figure on its card */
.device .case   { fill:none; stroke:var(--white);  stroke-width:5;   stroke-linecap:round; stroke-linejoin:round; }
.device .chip   { fill:none; stroke:var(--white);  stroke-width:4;   stroke-linecap:round; stroke-linejoin:round; }
.device .edge   { fill:none; stroke:var(--white);  stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
.device .detail { fill:none; stroke:var(--white);  stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.device .fine   { fill:none; stroke:var(--gray-1); stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
