/* cardano.events 2.0
   Cardano Foundation palette, Switzer throughout.
   Layout: full-width colour bands (blue, ink, paper, white, blue, ink), one 1200px column inside each.
   Three event kinds carry a colour and a shape: physical = yellow disc, virtual = green ring, problem = pink diamond. */

@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --blue: #0084FF;
  --ink: #050B2B;
  --ink-2: #0A1340;
  --paper: #F4F8FF;
  --white: #FFFFFF;
  --yellow: #FFE24A;
  --green: #2BFFB3;
  --pink: #FF4768;
  --cyan: #00E0FF;
  --muted: #3D4870;
  --muted-on-ink: #B4C0E8;
  --line: #C9D3EE;
  --font: "Switzer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --band: clamp(48px, 7vw, 96px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); line-height: 1.5; color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 8px var(--yellow); }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 10; padding: 12px 20px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 800; }
.skip:focus { top: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 2px solid transparent; border-radius: 999px; font-size: 17px; font-weight: 800; text-decoration: none; transition: transform 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { background: var(--blue); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 24px; }
/* Brand lockup. The logo is sized so the CARDANO cap height equals the x-height of "events" (1.13em),
   then dropped by the part of the logo that sits under its wordmark's baseline (0.289em),
   so both words share one baseline. line-height 0 makes the logo the whole line box, which keeps its centre on the header's. */
.brand { display: block; padding: calc((44px - 1.13em) / 2) 0.06em calc((44px - 1.13em) / 2) 0; font-size: 30px; line-height: 0; white-space: nowrap; text-decoration: none; }
.brand img { display: inline-block; width: auto; height: 1.13em; margin-right: 0.26em; vertical-align: -0.289em; }
.brand span { font-weight: 800; letter-spacing: -0.03em; color: var(--white); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 16px; font-weight: 600; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .nav-cta { padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--white); }
.nav .nav-cta:hover { text-decoration: none; }

/* Hero */
.hero { background: var(--blue); }
.hero .wrap { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); padding-block: clamp(28px, 5vw, 64px) clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(44px, 12vw, 136px); font-weight: 800; line-height: 0.88; letter-spacing: -0.045em; color: var(--white); }
.hero h1 span { color: var(--ink); }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hero-lede { flex: 1 1 420px; max-width: 620px; font-size: clamp(19px, 1.7vw, 24px); font-weight: 600; line-height: 1.4; }
.equation { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px 24px; padding-top: 18px; border-top: 3px solid var(--ink); }
.equation dt { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--white); }
.equation dd { margin-top: 6px; font-size: 16px; font-weight: 600; line-height: 1.4; }

/* Bands */
.band .wrap { padding-block: var(--band); }
.band--ink { background: var(--ink); color: var(--white); }
.band--ink .wrap { padding-block: clamp(40px, 6vw, 72px); }
.band--paper { background: var(--paper); }
.band--white { background: var(--white); }
.band--blue { background: var(--blue); }
.stack { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.stack--tight { gap: 32px; }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.display { font-size: clamp(40px, 6vw, 80px); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; }
.lede { flex: 0 1 420px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.band--ink .lede { color: var(--muted-on-ink); }

/* Right now */
.now-block { display: flex; flex-direction: column; gap: 8px; }
.now-block .display { font-size: clamp(44px, 7vw, 88px); font-variant-numeric: tabular-nums; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.now-detail { min-height: 27px; font-size: 18px; color: var(--muted-on-ink); }

/* Shapes: one per kind */
.shape { display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; }
.shape--physical { border-radius: 50%; background: var(--yellow); }
.shape--virtual { border: 4px solid var(--green); border-radius: 50%; }
.shape--problem { width: 12px; height: 12px; margin: 0 1px; background: var(--pink); transform: rotate(45deg); }

/* Time rail */
.rail-scroll { overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 24px; background: var(--ink-2); }
.rail-scroll:focus-visible { outline-color: var(--cyan); box-shadow: none; }
.rail { min-width: 880px; padding: 20px 24px 14px 0; }
.rail-row { display: flex; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.rail-row--months { border-top: 0; }
/* The label column stays put while the tracks scroll sideways. */
.rail-label { position: sticky; left: 0; z-index: 2; flex: 0 0 156px; display: flex; align-items: center; gap: 10px; padding-left: 24px; background: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.2; }
.rail-track { flex: 1; position: relative; height: 66px; }
.rail-row--months .rail-track { height: 30px; }
.rail-row--epochs .rail-track { height: 42px; }
.rail-row--epochs .rail-label { align-items: flex-start; padding-top: 12px; font-size: 13px; color: var(--muted-on-ink); }
.rail-month { position: absolute; top: 0; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted-on-ink); }
.rail-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--cyan); }
.rail-row--epochs .rail-now { bottom: auto; height: 16px; }
.rail-now-tag { position: absolute; top: -11px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: var(--cyan); color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; transform: translateX(-50%); }
.rail-tick { position: absolute; top: 0; width: 1px; height: 7px; background: rgba(255, 255, 255, 0.45); }
.rail-tick--major { height: 14px; }
.rail-epoch { position: absolute; top: 20px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted-on-ink); transform: translateX(-50%); }
.mark { position: absolute; top: 50%; display: flex; align-items: center; gap: 10px; margin-left: -7px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--white); transform: translateY(-50%); }
.mark--flip { flex-direction: row-reverse; margin-left: 7px; transform: translate(-100%, -50%); }
.mark--past { opacity: 0.62; }
.mark small { font-size: 14px; font-weight: 400; color: #D5DCF5; }
.mark-span { position: absolute; top: 50%; height: 3px; margin-top: 9px; border-radius: 2px; opacity: 0.7; }
.mark-span--physical { background: var(--yellow); }
.mark-span--virtual { background: var(--green); }
.mark-span--problem { background: var(--pink); }
.rail-legend { display: none; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.rail-legend li { display: flex; align-items: center; gap: 8px; }
.rail-note { font-size: 15px; color: var(--muted-on-ink); }
.rail-note strong { font-weight: 600; color: var(--white); }
.rail-note a { color: var(--white); font-weight: 600; }

/* Three kinds */
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.kind { display: flex; flex-direction: column; gap: 14px; min-height: 320px; padding: 32px; border-radius: 28px; }
.kind--physical { background: var(--yellow); }
.kind--virtual { background: var(--green); }
.kind--problem { background: var(--pink); }
.kind h3 { margin-top: auto; font-size: clamp(32px, 3.4vw, 44px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.kind p { font-size: 18px; font-weight: 600; line-height: 1.45; }
.kind-shape { display: block; width: 44px; height: 44px; }
.kind--physical .kind-shape { border-radius: 50%; background: var(--ink); }
.kind--virtual .kind-shape { border: 11px solid var(--ink); border-radius: 50%; }
.kind--problem .kind-shape { width: 34px; height: 34px; margin: 5px; background: var(--ink); transform: rotate(45deg); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.filter:hover { background: var(--paper); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.filter .count { font-weight: 400; font-variant-numeric: tabular-nums; }

/* Events list */
.event-list { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.event { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.event-date { flex: 0 0 176px; display: flex; flex-direction: column; gap: 4px; }
.event-date__top { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.event-date--long .event-date__top { font-size: 26px; line-height: 1.1; }
.event-date--past .event-date__top { color: #6F7BA6; }
.event-date__sub { font-size: 15px; font-weight: 600; }
.event-date__epoch { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.event-body { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #E3E9F8; font-size: 14px; font-weight: 600; }
.chip--physical { background: var(--yellow); }
.chip--virtual { background: var(--green); }
.chip--problem { background: var(--pink); }
.chip--live { background: var(--ink); color: var(--white); }
.chip .shape { width: 12px; height: 12px; margin: 0; }
.chip .shape--physical { background: var(--ink); }
.chip .shape--virtual { border: 3px solid var(--ink); }
.chip .shape--problem { background: var(--ink); transform: rotate(45deg) scale(0.8); }
.event-name { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.event-desc { max-width: 62ch; font-size: 17px; line-height: 1.5; color: var(--muted); }
.event-where { font-size: 15px; font-weight: 600; }
.event-links { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; }
.text-link:hover { color: #003E9C; }
.event-status { padding: 28px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--muted); }
.event-status a { color: var(--ink); font-weight: 600; }

/* Add yours */
.add .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; }
.add-copy { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; }
.add-copy .display { color: var(--white); }
.add-copy p { font-size: 19px; font-weight: 600; line-height: 1.5; }
.add-copy .add-small { font-size: 17px; }
.fields { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-block: 2px solid var(--ink); font-size: 16px; line-height: 1.4; }
.fields div { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.fields dt { flex: 0 0 96px; font-weight: 800; }
.fields dd { flex: 1 1 220px; font-weight: 600; }
.snippet { flex: 1 1 420px; min-width: 0; margin: 0; padding: 28px; border-radius: 28px; background: var(--ink); color: #EAF0FF; font-family: var(--font); font-size: 15px; line-height: 1.75; white-space: pre; tab-size: 24px; overflow-x: auto; }
.snippet code { font: inherit; }
.snippet .k { color: var(--cyan); }
.snippet:focus-visible { outline-color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: #EAF0FF; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 40px; padding-block: 56px 40px; }
.footer-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 64px; }
.footer-brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: 14px; }
.footer-brand img { width: 48px; }
.footer-name { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--white); }
.footer-muted { font-size: 14px; color: var(--muted-on-ink); }
.footer-brand .footer-muted { font-size: 16px; }
.footer-col { flex: 0 1 280px; display: flex; flex-direction: column; align-items: flex-start; }
.footer-col h2 { margin-bottom: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-on-ink); }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--white); }
.footer-col .footer-muted + a { margin-top: 8px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 14px; color: var(--muted-on-ink); }
.footer-base a { color: var(--white); }
.site-footer :focus-visible, .band--ink :focus-visible { outline-color: var(--yellow); box-shadow: none; }

/* Phone */
@media (max-width: 640px) {
  .brand { font-size: 26px; }
  .nav { gap: 0 20px; font-size: 15px; }
  .rail-label { flex-basis: 46px; padding-left: 16px; }
  .rail-label__text { display: none; }
  .rail-legend { display: flex; }
  .event-date { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .event-links { flex-direction: row; flex-wrap: wrap; }
  .kind { min-height: 260px; }
  .snippet { padding: 20px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
