/* Deep Matters 2026 — mobile-first. Palette carried over from 2025. */
:root {
  --bg: #ffffff;
  --panel: #f8f9fa;
  --border: #e5e7eb;
  --fg: #1f2937;
  --muted: #6b7280;
  --accent: #fab22b;        /* gold: fills, rings, buttons */
  --accent-2: #d97706;      /* amber: large accents */
  --accent-ink: #b45309;    /* amber dark enough for small text on white */
  --theme-gradient: linear-gradient(90deg, #f5a623 0%, #e8890c 50%, #c2410c 100%);  /* 'Agents for Science' — also used on the Luma cover */
  --radius: 18px;
  --shadow: 0 4px 16px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .05);
  --header-h: 64px;
  --maxw: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

h1, h2, h3 { line-height: 1.2; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.1rem; }
.lead { font-size: 1.1rem; color: #374151; margin: 0; }
.muted { color: var(--muted); }

section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .8rem 1.3rem; border-radius: 14px; border: 1px solid transparent;
  background: var(--accent); color: #1a1200; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 20px rgba(250, 178, 43, .3);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-sm { padding: .5rem .9rem; font-size: .9rem; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.btn-dark { background: #1f1f1f; color: #fff; box-shadow: none; }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; box-shadow: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-bar { display: flex; align-items: center; gap: .75rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--fg); text-decoration: none; font-weight: 700; margin-right: auto; white-space: nowrap; min-width: 0; }
@media (max-width: 400px) { .header-bar { gap: .5rem; } .brand { font-size: .92rem; } .brand img { height: 26px; } }
.brand img { height: 30px; width: auto; }
.menu-btn { display: inline-flex; padding: .45rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--fg); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

.nav { display: none; }
.nav.open {
  display: grid; position: absolute; top: var(--header-h); left: 0; right: 0;
  padding: .5rem 16px 1rem; gap: .25rem; background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
}
.nav a { color: var(--fg); text-decoration: none; padding: .65rem .75rem; border-radius: 10px; font-size: .95rem; }
.nav a:hover { background: rgba(250, 178, 43, .14); }

@media (min-width: 860px) {
  .menu-btn { display: none; }
  .nav, .nav.open { display: flex; position: static; padding: 0; background: none; border: 0; box-shadow: none; gap: .15rem; }
  .nav a { padding: .45rem .7rem; }
}

/* Hero */
.hero {
  padding: 4.5rem 0 4rem;
  text-align: center;
  background: radial-gradient(900px 480px at 50% -20%, rgba(250, 178, 43, .18), transparent 70%);
}
.hero h1 { font-size: clamp(1.9rem, 7.5vw, 4.4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 1.5rem; }
.hero h1 > span { display: block; }
.hero-theme {
  width: fit-content; margin-inline: auto; color: var(--accent-2);
  padding-bottom: .15em; margin-bottom: -.15em;  /* room for descenders (g) inside the clipped gradient */
  background: var(--theme-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-meta { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.75rem; font-weight: 600; font-size: 1.05rem; }
.hero-meta li { display: flex; align-items: center; gap: .5rem; }
.hero-meta svg { width: 20px; height: 20px; color: var(--accent-2); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* People cards (speakers + organizers) */
.people { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .people { gap: 1rem; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .people { grid-template-columns: repeat(4, 1fr); } }
.person {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.5rem 1rem 1.25rem; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.person { position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.person h3 { margin: .9rem 0 .15rem; font-size: 1.05rem; }
.org-logo { height: 13px; width: auto; max-width: 80%; margin-top: .6rem; }

/* Bio panel revealed on hover / tap / keyboard focus */
.person.has-back { cursor: pointer; outline-offset: 3px; }
.person-back {
  position: absolute; inset: 0 0 auto 0; min-height: 100%; padding: 1.25rem;  /* covers the card; grows downward if the bio is longer */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  background: #fff; border: 1px solid var(--accent); border-radius: inherit;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.person .person-back p { color: var(--fg); font-size: .92rem; line-height: 1.5; }
@media (max-width: 719px) { .person-back { padding: .7rem .75rem; gap: .5rem; } .person .person-back p { font-size: .82rem; line-height: 1.4; } }
.person.has-back:hover, .person.has-back:focus-within { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .1); z-index: 5; }
.person-back { box-shadow: 0 12px 26px rgba(0, 0, 0, .1); }
.person.has-back:hover .person-back, .person.has-back:focus-within .person-back, .person.open .person-back { opacity: 1; visibility: visible; }
.person p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.person .role { color: var(--fg); }

.avatar {
  --size: 88px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  object-fit: cover; border: 3px solid var(--accent); background: #fff;
  display: grid; place-items: center; font-weight: 800; color: var(--accent-2); font-size: calc(var(--size) * .32);
}
@media (min-width: 720px) { .person .avatar { --size: 112px; } }
.avatar.ghost { border: 2px dashed #d1d5db; color: #d1d5db; }
.avatar.ghost svg { width: 45%; height: 45%; }

.links { display: flex; gap: .5rem; }
.links a {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  color: var(--fg); background: #fff; border: 1px solid var(--border);
}
.links a:hover { color: #1a1200; background: var(--accent); border-color: var(--accent); }
.links svg { width: 17px; height: 17px; }
.links .fill { fill: currentColor; stroke: none; }

/* Gallery — infinite photo marquee (never pauses); static scroller for reduced motion */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--duration, 60s) linear infinite; }
.marquee-set { display: flex; gap: 16px; padding-right: 16px; }
.marquee-set img { height: 200px; width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--panel); }
@media (min-width: 720px) { .marquee-set img { height: 280px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-set[aria-hidden="true"] { display: none; }
}

/* Agenda */
.agenda { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.slot { display: grid; gap: .35rem 1.5rem; padding: 1.25rem; border-top: 1px solid var(--border); }
.slot:first-child { border-top: 0; }
.slot time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-ink); font-size: .95rem; white-space: nowrap; }
.slot h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }  /* every agenda title bold; descriptions stay regular */
.slot-break { background: var(--panel); padding-block: .85rem; }
.slot-block .abstract { font-style: italic; color: var(--muted); }  /* talk block whose speakers are not yet confirmed */
.slot.tba h3 { color: var(--muted); font-weight: 600; font-style: italic; }
/* Talk abstracts: hidden until the row is hovered (mouse) or tapped (touch screens) */
.abstract-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.abstract-wrap > div { min-height: 0; overflow: hidden; }
.slot.expanded .abstract-wrap { grid-template-rows: 1fr; }
@media (hover: hover) {
  .slot:hover .abstract-wrap { grid-template-rows: 1fr; }
}
.abstract { margin: .5rem 0 0; color: #4b5563; font-size: .95rem; max-width: 75ch; }

.speaker-chips { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .7rem; }
.chip { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
a.chip:hover strong { color: var(--accent-ink); text-decoration: underline; }
.slot-link { cursor: pointer; transition: background .15s ease; }
.slot-link:hover { background: rgba(250, 178, 43, .07); }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250, 178, 43, 0); border-color: var(--border); }
  15%, 70% { box-shadow: 0 0 0 6px rgba(250, 178, 43, .5); border-color: var(--accent); }
}
.person.flash { animation: flash 1s ease; }
.person.quiet:hover .person-back { opacity: 0; visibility: hidden; }  /* just scrolled into view: see openSpeaker() */
.person.quiet:hover { transform: none; box-shadow: none; }
/* agenda row reached from a speaker card */
@keyframes rowflash { 0%, 100% { background-color: transparent; } 20%, 60% { background-color: rgba(250, 178, 43, .22); } }
.slot.flash { animation: rowflash 1s ease; }
.slot.quiet:hover .abstract-wrap { grid-template-rows: 0fr; }
.chip .avatar { --size: 44px; border-width: 2px; }
.chip .avatar.ghost { border-width: 2px; }
.chip strong { display: block; font-size: .95rem; line-height: 1.3; }
.chip span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.3; }

@media (min-width: 720px) {
  .slot { grid-template-columns: 8.5rem 1fr; padding: 1.4rem 1.75rem; }
  .slot-break { padding-block: .9rem; }
}

/* Venue */
.venue { display: grid; gap: 2rem; }
.venue-name { font-weight: 700; font-size: 1.15rem; margin: 0; }
.venue h3 { margin: 1.5rem 0 .3rem; }
.venue p { margin: 0 0 .4rem; }
.map { width: 100%; min-height: 300px; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); }
@media (min-width: 860px) { .venue { grid-template-columns: 1fr 1.4fr; align-items: stretch; } }

/* Register band */
.register { background: linear-gradient(135deg, #fbbf3d, var(--accent)); border-bottom: 0; }
.register h2 { color: #1a1200; }
.register p { margin: 0 0 1.5rem; font-size: 1.1rem; font-weight: 600; color: #3b2a00; }

/* Host & sponsors */
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem 6rem; text-align: center; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 3rem; min-height: 80px; }
.logos img { height: 44px; width: auto; }  /* final height set by balanceLogos() */
.logos a:hover img { opacity: .8; }
.partners .logos { gap: 2.5rem 6rem; }

/* FAQ */
.faq { display: grid; gap: 2rem; }
details { border: 1px solid var(--border); border-radius: 14px; background: #fff; }
details + details { margin-top: .6rem; }
summary {
  list-style: none; cursor: pointer; padding: 1rem 1.15rem; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent-2); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 1.15rem 1.1rem; color: #4b5563; }

.contact-card { align-self: start; padding: 1.75rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.contact-card h3 { margin-bottom: .75rem; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.contact-row p { margin: 0; color: var(--fg); }
.copy-wrap { position: relative; flex: none; }
.copy-btn {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #1a1200; box-shadow: 0 8px 20px rgba(250, 178, 43, .3);
  transition: transform .15s ease, filter .15s ease;
}
.copy-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.copy-btn svg { width: 22px; height: 22px; }
.copy-toast {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 2; white-space: nowrap; pointer-events: none;
  padding: .4rem .7rem; border-radius: 8px; background: #1f2937; color: #fff; font-size: .85rem; font-weight: 600;
  opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease;
}
.copy-toast::after { content: ""; position: absolute; bottom: 100%; right: 18px; border: 6px solid transparent; border-bottom-color: #1f2937; }
.copy-toast.show { opacity: 1; transform: none; }
@media (min-width: 860px) { .faq { grid-template-columns: 1.6fr 1fr; gap: 3rem; } .contact-card { margin-top: 3.4rem; } }

/* Footer */
.site-footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
