/* ============================================================
   Reset + shell + shared primitives
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: 'ss01', 'ss02';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ir-blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ir-cyan-lit);
  outline-offset: 3px;
  border-radius: 2px;
}

/* thin, cold scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border: 3px solid var(--bg-0);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: #1c2650; }

/* --- the lattice ------------------------------------------- */
/* Every surface sits on the same grid. It is the brand. */
.lattice {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 78%);
}

/* faint film grain so the flats never look like dead CSS colour */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- layout ------------------------------------------------- */
.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
.stack { position: relative; z-index: 2; }

/* --- type primitives ---------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 400;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-label);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--ir-orange);
  box-shadow: 0 0 12px var(--ir-orange);
  flex: none;
}
.tnum { font-variant-numeric: tabular-nums; }

h1, h2, h3 {
  color: var(--ink-0);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.035em;
}
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.2; }

.lede {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.62;
  max-width: 54ch;
}

/* --- logo mark ---------------------------------------------- */
.mark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: none;
}
.mark img {
  /* The wordmark is built from ~3px blocks at this size; below ~26px the
     letterforms stop resolving and it reads as a blue smear. The asset is
     cropped to its bounding box, so this height is all mark, no padding. */
  height: 27px;
  width: auto;
  /* Blue-on-transparent source; the deep #1337F5 goes muddy on near-black. */
  filter: brightness(1.22) saturate(1.1);
}
.mark .sub {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-left: .7rem;
  border-left: 1px solid var(--line-1);
  line-height: 1;
}

/* --- buttons ------------------------------------------------ */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink-0);
  --btn-bd: var(--line-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .72rem 1.35rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: color .25s var(--ease), border-color .25s var(--ease),
              background .25s var(--ease), transform .25s var(--ease);
}
.btn::after {
  /* a sweep of light, not a colour change */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--ir-cyan); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-bg: var(--ir-blue);
  --btn-fg: #fff;
  --btn-bd: var(--ir-blue-lit);
  box-shadow: var(--glow-blue);
}
.btn-primary:hover { --btn-bg: var(--ir-blue-lit); border-color: var(--ir-cyan-lit); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* --- corner ticks: a card that reads like an instrument ----- */
.ticked { position: relative; }
.ticked::before, .ticked::after {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--line-2);
  pointer-events: none;
  transition: border-color .3s var(--ease);
}
.ticked::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ticked::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* --- dashboard primitives (shared by landing + hub) --------- */
.glyph {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 1.35rem;
  color: var(--accent, var(--ir-blue));
  background: color-mix(in srgb, var(--accent, var(--ir-blue)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--ir-blue)) 32%, transparent);
  border-radius: var(--r-sm);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .6rem;
  border: 1px solid var(--line-1);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.pill.live { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.pill.live::before { box-shadow: 0 0 0 0 currentColor; animation: ping 2.4s var(--ease-io) infinite; }
.pill.soon { color: var(--ink-3); }
.pill.locked { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.pill.pending { color: var(--ir-cyan-lit); border-color: color-mix(in srgb, var(--ir-cyan) 35%, transparent); }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.card-link {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.card-link:hover { color: var(--ink-0); gap: .8rem; }

.empty {
  padding: 4rem 2rem;
  text-align: center;
  border: 1px dashed var(--line-1);
  border-radius: var(--r-md);
  color: var(--ink-3);
}

/* --- messages ----------------------------------------------- */
.flashes {
  position: fixed;
  top: 1rem; left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  gap: .5rem;
  width: min(100% - 2rem, 520px);
}
.flash {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 1rem;
  background: rgba(11, 16, 32, .92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-1);
  border-left: 2px solid var(--ir-cyan);
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-size: .875rem;
  animation: flash-in .5s var(--ease) both;
}
.flash.success { border-left-color: var(--up); }
.flash.error   { border-left-color: var(--down); }
.flash.warning { border-left-color: var(--warn); }
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-10px); }
}

/* --- reveal on scroll --------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* --- footer -------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line-0);
  padding: 2.2rem 0 2.6rem;
  margin-top: 6rem;
}
.foot .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.foot .mono { color: var(--ink-3); }
.foot a:hover { color: var(--ink-1); }
