/* ══════════════════════════════════════════════════════════════════
   ERA @ ALIFE 2026
   Palette: flag of Canada — red on white — warmed into paper and ink.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --paper:     #f7f2e9;
  --paper-2:   #f1eade;
  --card:      #fffdf8;
  --ink:       #191510;
  --ink-2:     #443c33;
  --muted:     #776c5e;
  --red:       #c8102e;
  --red-deep:  #8f1023;
  --red-tint:  rgba(200, 16, 46, .075);
  --red-shade: #8f1023;      /* the ledge under the big button, always darker */
  --hack-bg:   #1b0c12;      /* the hackathon's own ground: ink with red in it */
  --line:      rgba(25, 21, 16, .14);
  --line-soft: rgba(25, 21, 16, .075);
  --dark:      #14100d;
  --dark-2:    #201a15;
  --on-dark:   #f2ebdf;
  --on-dark-2: #b3a795;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  /* the poster voice: heavy, condensed, set in capitals */
  --display: "Archivo Black", "Arial Black", "Helvetica Neue", Impact,
             "Franklin Gothic Heavy", var(--font);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo,
          Consolas, monospace;

  --hero-red:  #bd1130;
  --tissue-line: var(--ink);
  --tissue-dot:  var(--red);

  --wrap: 1000px;
  --gutter: 104px;          /* the agenda's time column */
  --r: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #14110d;
    --paper-2:   #1b1712;
    --card:      #201b15;
    --ink:       #f2ebdf;
    --ink-2:     #cdc2b1;
    --muted:     #9a8d7c;
    --red:       #e8465c;
    --red-deep:  #f5798a;
    --red-tint:  rgba(232, 70, 92, .10);
    --red-shade: #9c2134;
    --hack-bg:   #150810;
    --line:      rgba(242, 235, 223, .16);
    --line-soft: rgba(242, 235, 223, .08);
    --dark:      #0d0b09;
    --dark-2:    #16120e;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  /* Opening a drawer changes a row's height, and the browser's scroll
     anchoring compensates by nudging the page about 35px — enough to read
     as a jump. The anchor it picks can be anywhere below, so this has to
     be set on the scrolling box itself. */
  overflow-anchor: none;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--red-deep); text-underline-offset: 2px; }
a:hover { color: var(--red); }

h1, h2, h3 { line-height: 1.18; letter-spacing: -.015em; margin: 0 0 .5em; }
h2 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em;
  display: flex; align-items: center; gap: .45em;
}
p { margin: 0 0 .8em; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── paper grain, fixed over everything ────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='190'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='190' height='190' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { mix-blend-mode: screen; opacity: .28; } }

/* ── shell ─────────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; position: relative; }

.band { position: relative; padding: 34px 0; overflow: hidden; }
.band-tint { background: var(--paper-2); border-block: 1px solid var(--line-soft); }

/* cell tissue, drawn at run time into every band */
.tissue { position: absolute; inset: -10% -5% auto -5%; height: 130%; opacity: .5; pointer-events: none; }
/* Fixed overhang, not a percentage: a band gets taller when a talk opens, and
   a percentage top would drag the whole pattern upwards with it. */
.tissue--band { inset: -60px -5% auto -5%; height: calc(100% + 120px); opacity: .3; }
.tissue svg { width: 100%; height: 100%; display: block; }

/* an organelle watermark, half off the edge */
.cell-mark {
  position: absolute; top: 50%; width: 340px; height: 340px;
  transform: translateY(-50%); opacity: .16; pointer-events: none;
}
.cell-mark--left  { left: -140px; }
.cell-mark--right { right: -140px; }
.cell-mark svg { width: 100%; height: 100%; }
@media (max-width: 1180px) { .cell-mark { display: none; } }

/* ── hero: one big red block, the flag's own colour ────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 30px 0 28px;
  background:
    radial-gradient(120ch 70ch at 12% -25%, #d4183a, transparent 70%),
    var(--hero-red);
  color: #fff;
  --tissue-line: #fff;
  --tissue-dot: #fff;
}
.hero-inner { position: relative; }
.hero .tissue { opacity: .75; }
.hero a { color: #fff; }

.hero .ic { fill: #fff; }
.hero .h1-mark { filter: invert(1); }

/* on red the emphasis inverts: the solid button is the pale one */
.hero .btn { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero .btn:hover { border-color: #fff; background: rgba(255, 255, 255, .12); }
.hero .btn-primary { background: var(--paper); border-color: var(--paper); color: var(--hero-red); }
.hero .btn-primary:hover { background: #fff; border-color: #fff; color: var(--hero-red); }

.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: .6em;
}
.kicker .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  flex: none; box-shadow: 0 0 0 3px var(--red-tint);
}
.kicker--light { color: var(--on-dark-2); }

h1 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.9rem, 6.4vw, 4rem);
  line-height: .88; letter-spacing: -.028em;
  margin: 0 0 .28em; display: grid; gap: .1em; justify-items: start;
}
.h1-row { display: flex; align-items: center; gap: .1em; flex-wrap: wrap; }
.h1-mark { height: 1.1em; width: auto; display: block; }
h1 .at {
  color: rgba(255, 255, 255, .6); font-weight: 400; font-family: var(--font);
  font-size: .3em; align-self: center; margin-left: .3em;
}
.h1-big { letter-spacing: -.035em; }
.h1-alt {
  color: var(--dark); letter-spacing: .2em; font-size: .42em;
  padding: .2em .6em .14em; background: var(--paper);
}

/* DATE · TIME · WHERE · WHO, ruled apart */
.specs {
  display: flex; flex-wrap: wrap; gap: 0; margin: 1.3em 0 0; padding: 0;
}
.specs > div { padding: 0 22px; border-left: 1px solid rgba(255, 255, 255, .3); }
.specs > div:first-child { padding-left: 0; border-left: 0; }
.specs dt {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: rgba(255, 255, 255, .62); margin-bottom: .35em;
}
.specs dd {
  margin: 0; font-size: .84rem; line-height: 1.45; color: #fff;
  text-transform: uppercase; letter-spacing: .03em;
}
@media (max-width: 700px) {
  .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em 0; }
  .specs > div { padding: 0 16px; border-left: 1px solid rgba(255, 255, 255, .3); }
  .specs > div:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* a hairline with a label sitting in it */
.rule-label {
  position: relative; margin: 1.6em 0 .9em; text-align: left;
  border-top: 1px solid rgba(255, 255, 255, .35); height: 0;
}
.rule-label span {
  position: absolute; top: -.72em; left: 0; padding-right: 12px;
  background: var(--hero-red);
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: rgba(255, 255, 255, .7);
}
.org-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.org-name {
  display: grid; gap: .25em; text-decoration: none;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(.92rem, 2.2vw, 1.15rem); letter-spacing: -.01em; line-height: 1.15; color: #fff;
}
.org-name span { border-bottom: 1px solid rgba(255, 255, 255, .35); padding-bottom: .18em; transition: border-color .15s ease; }
.org-name:hover { color: #fff; }
.org-name:hover span { border-bottom-color: #fff; }
.org-name em {
  font-family: var(--font); font-style: normal; font-weight: 400;
  font-size: .74rem; letter-spacing: .12em; color: rgba(255, 255, 255, .62);
}

.lead { max-width: 56ch; font-size: 1rem; color: var(--ink-2); margin-bottom: 0; }

.facts { list-style: none; margin: 1.1em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.facts li {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .82rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.facts b { font-weight: 600; color: var(--ink); }
.ic { width: 13px; height: 13px; fill: var(--red); flex: none; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 1.3em; }

.about {
  max-width: 60ch; margin: 1.5em 0 0; padding-top: 1.1em;
  border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted);
}

/* ── controls ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  height: 38px; padding: 0 15px; font-size: .85rem; font-weight: 500;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); text-decoration: none;
  cursor: pointer; font-family: inherit;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--red); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }

.tz { display: inline-flex; height: 32px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.tz button {
  font: inherit; font-size: .74rem; letter-spacing: .06em; font-weight: 500;
  padding: 0 11px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.tz button + button { border-left: 1px solid var(--line); }
.tz button.is-on { background: var(--red); color: #fff; }

/* the two logos ride along with the buttons, same height */
.logo-strip { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.logo-chip {                       /* light in both themes: each logo keeps its own ground */
  display: grid; place-items: center; height: 38px; padding: 0 12px;
  border-radius: 8px; background: #fffdf8; border: 1px solid rgba(25, 21, 16, .16);
  text-decoration: none; transition: border-color .15s ease, transform .12s ease;
}
.logo-chip:hover { border-color: var(--red); transform: translateY(-1px); }
.logo-chip img { height: 22px; width: auto; display: block; }
.logo-chip--dark { background: var(--dark); border-color: var(--dark); }
.logo-chip--dark img { height: 15px; }

/* ── section heads ─────────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 1.2em;
}
.sec-sub { font-size: .85rem; color: var(--muted); margin: 0; max-width: 56ch; }

.h-glyph { flex: none; width: 18px; height: 20px; fill: var(--red); }

/* ── helix rule ────────────────────────────────────────────────── */
.helix { height: 26px; display: grid; place-items: center; background: var(--paper); overflow: hidden; }
.helix svg { display: block; width: 100%; height: 14px; opacity: .5; }

/* ══════════════════════════════════════════════════════════════════
   Agenda — the timetable and the talks are the same list. One rail,
   one row per slot, and the abstract opens in place.
   ══════════════════════════════════════════════════════════════════ */
.agenda { list-style: none; margin: 0; padding: 0; position: relative; }


/* the rail runs the height of the list, behind the dots */
.agenda::before {
  content: ""; position: absolute; top: 6px; bottom: 6px;
  left: calc(var(--gutter) - 15px); width: 1px; background: var(--line);
}

.ag-session {
  display: flex; align-items: baseline; gap: .8em;
  padding: 14px 0 8px calc(var(--gutter) + 4px);
}
.ag-session:first-child { padding-top: 0; }
.ag-session b { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red-deep); }
.ag-session span { font-family: var(--mono); font-size: .75rem; color: var(--muted); }

.ag-item { position: relative; }

/* the row is inset by its own padding, like the hackathon card, so the
   hover ground has air around the text instead of butting up against it */
.ag-row {
  display: grid;
  grid-template-columns: calc(var(--gutter) - 22px) 22px 1fr auto;
  align-items: start; gap: 0;
  width: calc(100% + 40px); margin: 0 0 3px -20px; padding: 11px 20px;
  font: inherit; color: inherit; text-align: left;
  background: transparent; border: 0; border-radius: var(--r);
}
button.ag-row { cursor: pointer; transition: background .14s ease; }
button.ag-row:hover { background: var(--red-tint); }

.ag-time {
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
  padding-top: 2px; white-space: nowrap;
}
.ag-t0 { font-weight: 400; }
.ag-node { position: relative; height: 100%; }
.ag-node::before {                         /* the dot, sitting on the rail */
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px var(--paper-2);
}
.ag-main { min-width: 0; }
.ag-title { display: block; font-size: .95rem; font-weight: 600; line-height: 1.35; }
.ag-who { display: block; font-size: .82rem; color: var(--muted); margin-top: 1px; }
.ag-chev { width: 15px; height: 15px; color: var(--muted); margin-top: 5px; flex: none; transition: transform .18s ease; }
button.ag-row[aria-expanded="true"] .ag-chev { transform: rotate(180deg); color: var(--red); }
button.ag-row[aria-expanded="true"] .ag-title { color: var(--red-deep); }

/* scheduled, waiting on an abstract */
.ag-item--tba .ag-title { font-weight: 600; }
.ag-item--tba .ag-who { font-style: italic; }

/* plain rows: the intro, the breaks */
.ag-item--plain .ag-title { font-weight: 400; font-style: italic; color: var(--muted); font-size: .9rem; }
.ag-item--plain .ag-node::before { background: var(--paper-2); border: 1px solid var(--line); top: 8px; }

/* the hackathon slot: a card, but its time and dot stay on the rail.
   The negative margin widens the dark ground without moving the columns. */
.ag-item--hack { margin-top: 12px; }
.ag-item--hack .ag-row {
  align-items: center;
  width: calc(100% + 40px); margin-left: -20px;
  padding: 20px;
  background: var(--dark); color: var(--on-dark);
  border-radius: var(--r); border-left: 3px solid var(--red);
  text-decoration: none;
}
.ag-item--hack .ag-row:hover { background: var(--dark-2); }
.ag-item--hack .ag-time { color: var(--on-dark-2); }
.ag-item--hack .ag-title { font-size: 1.06rem; }
.ag-item--hack .ag-who { color: #ff8c9c; margin-top: 3px; }
.ag-item--hack .ag-node::before { background: var(--red); box-shadow: 0 0 0 4px var(--dark); }
.ag-hack-leaf { width: 26px; height: 30px; fill: var(--red); flex: none; opacity: .85; }

/* the abstract, opening in place */
.ag-panel { display: none; padding: 4px 12px 18px calc(var(--gutter) + 4px); }
.ag-panel.is-open { display: block; }
.ag-panel h4 {
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin: 10px 0 .35em; font-weight: 600;
}
.ag-panel p { font-size: .89rem; color: var(--ink-2); max-width: 66ch; }
.ag-panel p:last-child { margin-bottom: 0; }
.ag-link { font-size: .8rem; }

@media (max-width: 620px) {
  :root { --gutter: 62px; }
  .ag-title { font-size: .9rem; }
  .ag-t1 { display: none; }          /* the start time is enough on a phone */
  .ag-panel { padding-left: 12px; }
  .ag-session { padding-left: calc(var(--gutter) + 4px); }
}

/* ── register: one band, one button ────────────────────────────── */
.band-cta {
  /* a step up from the hackathon's --dark, so the two read as separate
     blocks without a rule between them */
  background: var(--dark-2); color: var(--on-dark); padding: 40px 0;
  --tissue-line: #fff;
  --tissue-dot: #ff5f75;
}
.band-cta .tissue { opacity: .3; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px 34px; flex-wrap: wrap;
}
.cta-copy h2 { margin: 0 0 .25em; }
.cta-copy p { margin: 0; color: var(--on-dark-2); font-size: .92rem; }

.btn-huge {
  display: inline-flex; align-items: center; gap: .45em; flex: none;
  padding: 20px 34px; border-radius: var(--r);
  background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1rem, 2.2vw, 1.35rem); letter-spacing: -.01em;
  box-shadow: 0 3px 0 var(--red-shade);
  transition: transform .12s ease, background .15s ease, box-shadow .12s ease;
}
.btn-huge:hover {
  background: var(--red-deep); color: #fff;
  transform: translateY(2px); box-shadow: 0 1px 0 var(--red-shade);
}
@media (max-width: 640px) {
  .btn-huge { width: 100%; justify-content: center; padding: 18px 20px; }
}

/* ── hackathon band ────────────────────────────────────────────── */
.band-dark {
  --tissue-line: #fff;
  --tissue-dot: #ff5f75;
  /* Its own ground rather than the shared --dark, so the hackathon reads as
     a block apart from the register band and the footer below it. */
  background:
    radial-gradient(90ch 60ch at 15% -10%, rgba(200, 16, 46, .18), transparent 65%),
    var(--hack-bg);
  color: var(--on-dark); border-block: 1px solid rgba(242, 235, 223, .08);
}
.band-dark p { color: var(--on-dark-2); }
.band-dark a { color: #ff8c9c; }

/* the hackathon speaks in a different voice: monospace body copy, a
   larger and looser headline, and the pink accent instead of the red */
.hack-wrap { position: relative; }
.hack-title {
  display: flex; align-items: center; gap: .42em;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 3rem); line-height: .94;
  letter-spacing: -.03em; color: var(--on-dark); margin-bottom: .6em;
}
.hack-bug { font-size: 1.75em; line-height: 1; flex: none; }
.hack-words { display: grid; gap: .06em; }
.hack-l2 { font-size: .76em; color: var(--on-dark-2); letter-spacing: -.01em; }
@media (max-width: 560px) { .hack-bug { font-size: 1.4em; } }
.ant-word { color: #ff5f75; position: relative; white-space: nowrap; }
.ant-word::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.06em; height: 2px;
  background: repeating-linear-gradient(90deg, #ff5f75 0 4px, transparent 4px 8px);
}

.band-dark .hack-lead {
  font-family: var(--mono); font-size: .86rem; line-height: 1.75;
  color: #cdc0ae; max-width: 60ch; margin-bottom: 0;
}
.hack-ask {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: 1.05rem; letter-spacing: .01em; color: var(--on-dark);
  margin: 1.5em 0 .8em;
}
.hack-ideas {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 7px; max-width: 74ch;
}
.hack-ideas li {
  font-family: var(--mono); font-size: .74rem; padding: 6px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); color: #cdc0ae;
}
.hack-ideas li:nth-child(3n+1) { border-color: rgba(255, 95, 117, .5); color: #ffb3bf; }

.hack-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 1.5em 0 1.2em; }
.or { font-family: var(--mono); font-size: .78rem; color: var(--on-dark-2); }
.hack-note {
  font-family: var(--mono); font-size: .78rem; line-height: 1.7;
  border-left: 2px solid #ff5f75; padding-left: 14px;
  color: var(--on-dark-2); max-width: 62ch; margin-bottom: 0;
}
.band-dark .kicker { font-family: var(--mono); letter-spacing: .12em; }

/* ── marching ants ─────────────────────────────────────────────── */
/* Dashed trails winding across the band. The dashes crawl along them,
   which is the oldest trick in the book and still called marching ants. */
.antpaths { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.antpaths svg { width: 100%; height: 100%; display: block; }
.antpaths path {
  fill: none; stroke: #ff5f75; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 3 13;
  animation: march 2.4s linear infinite;
}
@keyframes march { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) { .antpaths path { animation: none; } }

/* ── elsewhere ─────────────────────────────────────────────────── */
/* ── footer ────────────────────────────────────────────────────── */
/* the hackathon band runs straight into the footer; one tonal step apart */
.foot {
  background: var(--dark-2); color: var(--on-dark-2);
  padding: 26px 0 32px; border-top: 1px solid rgba(242, 235, 223, .1);
}
.foot-inner { display: grid; gap: 14px; justify-items: start; }
.foot-logos { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-isal { height: 30px; width: auto; }
.foot-flag { height: 20px; width: auto; border-radius: 2px; }
.foot-text { font-size: .86rem; margin: 0; color: var(--on-dark); }
.foot-fine { font-size: .74rem; margin: 0; color: #7d7264; max-width: 62ch; }

/* ── value bar ─────────────────────────────────────────────────── */

.band-dark .tissue { opacity: .35; }
