/* =========================================================================
   A3 Workshop site — shared styles
   Visual language adapted from the CHIA site: royal-blue + gold layered glow,
   light/dark aware. Self-contained (no external fonts or assets).
   ========================================================================= */

:root {
  --blue-h: 222; --blue-s: 85%; --blue-l: 60%;
  --gold-h: 42;  --gold-s: 95%; --gold-l: 56%;

  --blue: hsl(var(--blue-h) var(--blue-s) var(--blue-l));
  --blue-strong: hsl(var(--blue-h) 80% 46%);
  --gold: hsl(var(--gold-h) var(--gold-s) var(--gold-l));

  --overlay-blue: hsla(var(--blue-h), var(--blue-s), var(--blue-l), 0.16);
  --overlay-gold: hsla(var(--gold-h), var(--gold-s), var(--gold-l), 0.20);

  /* Light theme surfaces */
  --bg: #f6f8fd;
  --surface: #ffffff;
  --surface-2: #f0f3fa;
  --border: #dfe4f0;
  --text: #1c2540;
  --text-muted: #5b6784;
  --shadow: 0 1px 2px rgba(28,37,64,.04), 0 8px 24px rgba(28,37,64,.06);
  --shadow-lg: 0 2px 4px rgba(28,37,64,.06), 0 20px 48px rgba(28,37,64,.12);

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --blue-l: 66%;
  --overlay-blue: hsla(var(--blue-h), 70%, 55%, 0.20);
  --overlay-gold: hsla(var(--gold-h), 90%, 55%, 0.14);
  --bg: #0d111c;
  --surface: #151b2b;
  --surface-2: #1b2233;
  --border: #2a3350;
  --text: #e7ecf8;
  --text-muted: #9aa6c2;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 20px 48px rgba(0,0,0,.5);
}

/* Follow the OS when the user hasn't chosen manually. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue-l: 66%;
    --overlay-blue: hsla(var(--blue-h), 70%, 55%, 0.20);
    --overlay-gold: hsla(var(--gold-h), 90%, 55%, 0.14);
    --bg: #0d111c;
    --surface: #151b2b;
    --surface-2: #1b2233;
    --border: #2a3350;
    --text: #e7ecf8;
    --text-muted: #9aa6c2;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 20px 48px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Layered glow, adapted from the CHIA landing background. */
  background-image:
    linear-gradient(215deg, var(--overlay-blue), transparent 42%),
    radial-gradient(var(--overlay-blue), transparent 40%);
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, -55vw -45vh;
  background-size: 100% 100%, 105vw 190vh;
  background-attachment: fixed, fixed;
}

a { color: var(--blue-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
:root[data-theme="dark"] a { color: hsl(var(--blue-h) 90% 76%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a { color: hsl(var(--blue-h) 90% 76%); }
}

h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ----- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px; max-width: var(--maxw); margin: 0 auto; padding: .5rem 1.25rem;
}
/* min-width:0 lets the spelled-out wordmark wrap instead of overflowing the bar. */
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.02em; min-width: 0; }
.brand img { height: 44px; width: auto; display: block; flex: none; }
.brand .brand-text { line-height: 1.15; }
.brand .brand-text sup { font-size: .6em; }
@media (max-width: 1040px) { .brand .brand-text { font-size: .9rem; } }
.nav-links { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav-links a {
  color: var(--text-muted); font-weight: 600; font-size: .95rem;
  padding: .45rem .7rem; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .brand .brand-text { font-size: .85rem; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .5rem; box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem; }
  .nav-toggle { display: inline-flex; }
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .98rem; padding: .7rem 1.15rem;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-strong); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: hsl(var(--blue-h) 80% 40%); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ----- Section scaffolding ---------------------------------------------- */
section { padding: 2.2rem 0; }
.section-tight { padding: 1.5rem 0; }
/* Neighbouring blocks would otherwise stack both paddings and leave a doubled gap;
   the preceding block's bottom padding is the whole gap. */
.hero + section, section + section,
.hero + section.section-tight, section + section.section-tight { padding-top: 0; }
/* A trailing paragraph keeps its own bottom margin, which lands on top of the
   section padding; the section padding alone should set the gap. */
section .container > :last-child { margin-bottom: 0; }
/* Small, quiet label above a heading — no pill, no fill. */
.eyebrow {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem;
}
h2.section-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 .5rem; }
.lead { color: var(--text-muted); font-size: 1.08rem; max-width: none; }

/* ----- Hero -------------------------------------------------------------- */
.hero { padding: 4.2rem 0 2.6rem; }
.hero .eyebrow { margin-bottom: 1rem; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0 0 1rem;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--blue-strong), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem); font-weight: 600; color: var(--text);
  letter-spacing: -.01em; margin: .1rem 0 .7rem; max-width: 34ch;
}
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark img { width: 120px; height: 120px; }

/* ----- Cards / grids ----------------------------------------------------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin: .35rem 0 .5rem; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); }
.card .kicker { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-strong); }
.card .num { font-size: .78rem; font-weight: 800; letter-spacing: .1em; color: var(--blue-strong); }
:root[data-theme="dark"] .card .num { color: hsl(var(--blue-h) 90% 78%); }
/* Card with a blue→gold gradient bar along its top edge. */
.card.accent-top { position: relative; overflow: hidden; padding-top: 1.6rem; }
.card.accent-top::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

/* Big "link" blocks on the homepage */
.block-link {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative; overflow: hidden;
}
.block-link::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}
.block-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--blue) 40%, var(--border)); text-decoration: none; }
.block-link h3 { font-size: 1.4rem; margin: .4rem 0 0; color: var(--text); }
.block-link p { color: var(--text-muted); margin: 0; }
.block-link .go { margin-top: .4rem; font-weight: 700; color: var(--blue-strong); display: inline-flex; gap: .4rem; align-items: center; }

/* ----- Feature list (pillars) ------------------------------------------- */
.feature { display: flex; gap: .9rem; }
.feature .dot {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--blue), var(--blue-strong));
}
.feature h3 { margin: .1rem 0 .3rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: .96rem; }

/* ----- Callout (quiet emphasis — a left rule, no fill) ------------------- */
.callout {
  border-left: 3px solid var(--blue);
  padding: .1rem 0 .1rem 1.3rem;
}
.callout p { margin: 0; font-size: 1.05rem; }

/* ----- Definition list (headings + text, no boxes) ---------------------- */
.deflist { display: grid; gap: 1.6rem 2.6rem; margin-top: 1.6rem; }
.deflist.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .deflist.cols-2 { grid-template-columns: 1fr; } }
.deflist .item { padding-top: 1rem; border-top: 1px solid var(--border); }
.deflist .item h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.deflist .item p { margin: 0; color: var(--text-muted); }
.deflist .item .lbl {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem;
}

/* ----- Organizer list (boxed) ------------------------------------------- */
.org-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.org-list.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .org-list, .org-list.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .org-list, .org-list.cols-2 { grid-template-columns: 1fr; } }
.org-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
/* Organizers as one row of six: headshot stacked above the name. */
.org-list.cols-6 { grid-template-columns: repeat(6, 1fr); gap: .8rem; }
@media (max-width: 900px) { .org-list.cols-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .org-list.cols-6 { grid-template-columns: repeat(2, 1fr); } }
.org-item.with-photo {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .55rem; padding: 1rem .6rem;
}
.org-item .headshot {
  width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border);
}
.org-item.with-photo .name { font-size: .92rem; line-height: 1.25; }
.org-item.with-photo .affil { font-size: .78rem; line-height: 1.25; }
.org-item .name { font-weight: 700; font-size: 1.05rem; }
.org-item .affil { color: var(--blue-strong); font-weight: 600; font-size: .9rem; margin-top: .1rem; }
:root[data-theme="dark"] .org-item .affil { color: hsl(var(--blue-h) 90% 78%); }
.org-item p { margin: .5rem 0 0; color: var(--text-muted); font-size: .93rem; }

/* ----- Definition / bullet lists ---------------------------------------- */
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.tick-list li { position: relative; padding-left: 1.7rem; color: var(--text); }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .55rem; height: .55rem; border-radius: 3px;
  background: var(--blue);
}
.tick-list li strong { color: var(--text); }

/* ----- Table ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--surface); }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .96rem; }
th { background: var(--surface-2); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
tr:last-child td { border-bottom: none; }

/* ----- Timeline ---------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 1.15rem 2rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--blue);
}
.timeline li.done::before { background: var(--blue); }
.timeline .date { font-weight: 800; font-variant-numeric: tabular-nums; margin-right: .5rem; }
.timeline .strike { text-decoration: line-through; color: var(--text-muted); font-weight: 600; }
.timeline .muted { color: var(--text-muted); }

/* ----- Process steps (dated rail alongside step cards) -------------------- */
.steps { --rail: 8.5rem; position: relative; display: grid; gap: 1.1rem; }
.steps::before {
  content: ""; position: absolute; left: var(--rail); top: 1.4rem; bottom: 1.4rem;
  width: 2px; background: var(--border);
}
.steps .step {
  position: relative; display: grid; align-items: start;
  grid-template-columns: calc(var(--rail) - 1rem) 1fr; gap: 2rem;
}
.steps .step::before {
  content: ""; position: absolute; left: calc(var(--rail) - 7px); top: 1.35rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--blue);
}
.steps .when { text-align: right; padding-top: 1.1rem; }
.steps .when .date { display: block; font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.steps .when .what { display: block; margin-top: .15rem; font-size: .82rem; color: var(--text-muted); }

@media (max-width: 760px) {
  .steps { --rail: 0rem; }
  .steps::before { left: 7px; top: .3rem; }
  .steps .step { grid-template-columns: 1fr; gap: .45rem; padding-left: 2rem; }
  .steps .step::before { left: 0; top: .25rem; }
  .steps .when { text-align: left; padding-top: 0; }
  .steps .when .date, .steps .when .what { display: inline; }
  .steps .when .what { margin-left: .5rem; }
}

/* ----- Badges ------------------------------------------------------------ */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge {
  font-size: .82rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* ----- Logo wall --------------------------------------------------------- */
.logo-wall { display: flex; flex-wrap: wrap; gap: 3.6rem; align-items: center; }
.logo-wall img { height: 58px; width: auto; opacity: .95; }
.logo-wall-sponsor { display: flex; flex-wrap: wrap; gap: 3.6rem; align-items: center; }
.logo-wall-sponsor img { height: 150px; width: auto; opacity: .95; }
/* For logos that ship with a baked-in white background (e.g. a JPG). */
.logo-chip { background: #fff; border-radius: 8px; padding: 6px 10px; box-sizing: content-box; }
.logo-note { font-size: .82rem; color: var(--text-muted); margin-top: .6rem; }

/* Theme-aware logo swap: show the light-theme art by default, dark art in dark. */
img.only-dark { display: none; }
:root[data-theme="dark"] img.only-light { display: none; }
:root[data-theme="dark"] img.only-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.only-light { display: none; }
  :root:not([data-theme="light"]) img.only-dark { display: inline-block; }
}

/* Organizer list */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 720px) { .people { grid-template-columns: 1fr; } }
.person { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.person .name { font-weight: 800; }
.person .affil { color: var(--blue-strong); font-weight: 600; font-size: .9rem; }
:root[data-theme="dark"] .person .affil { color: hsl(var(--blue-h) 90% 78%); }
.person p { margin: .55rem 0 0; color: var(--text-muted); font-size: .92rem; }

/* Callout note for placeholders */
.placeholder-note {
  font-size: .82rem; color: var(--text-muted); font-style: italic;
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); padding: 2.4rem 0; margin-top: 1rem; color: var(--text-muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; }
.footer-grid a { color: var(--text-muted); }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-small { font-size: .85rem; margin-top: 1rem; }

/* Utility */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.anchor { scroll-margin-top: 80px; }
