/* Electrochem 2027 — styles follow the conference slide deck:
   light grey background, black text, Segoe UI (Inter as the fallback).
   Inter is self-hosted (assets/fonts, SIL Open Font License). */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/inter-latin-900-normal.woff2") format("woff2"); }

:root {
  --bg: #e8e8e8;
  --surface: #f4f4f4;
  --text: #111111;
  --muted: #4a4a4a;
  --line: #c9c9c9;
  --accent: #111111;
  --accent-text: #ffffff;
  --radius: 4px;
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 72px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  line-height: 1.55;
  font-size: 1.0625rem;
}

img { max-width: 100%; display: block; }

/* Ordinal superscripts (19th) without disturbing line height */
sup { font-size: 0.6em; line-height: 0; vertical-align: 0.7em; text-transform: none; }

a { color: inherit; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(232, 232, 232, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand {
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

@media (max-width: 1020px) {
  .site-nav { display: none; }
  .site-header .button { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  white-space: nowrap;
}

.button:hover, .button:focus-visible { background: transparent; color: var(--accent); }

.button.small { padding: 7px 16px; font-size: 0.95rem; }

.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover, .button.ghost:focus-visible { background: var(--accent); color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 96px); }

.hero h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero .when, .hero .where {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
}

.hero .when { margin-top: 16px; }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Sections ---------- */
section { padding: clamp(48px, 7vw, 80px) 0; border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 24px;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h3 { margin: 0 0 6px; font-weight: 600; font-size: 1.15rem; line-height: 1.3; }

p { margin: 0 0 16px; }

.prose { max-width: 720px; }

.muted { color: var(--muted); }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card .label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.card p:last-child { margin-bottom: 0; }

/* ---------- Themes ---------- */
.themes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.themes li { border-top: 4px solid var(--text); padding-top: 14px; }

.themes .num {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1;
  color: #7a7a7a;
  font-variant-numeric: tabular-nums;
}

.themes h3 { font-size: 1.2rem; }

/* ---------- Speakers ---------- */
.speakers { gap: 16px; }

.speaker {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.speaker h3 { font-size: 1.45rem; font-weight: 900; line-height: 1.15; margin-bottom: 14px; }

/* The name link covers the whole card */
.speaker h3 a { text-decoration: none; }
.speaker h3 a::after { content: ""; position: absolute; inset: 0; }
.speaker h3 a:focus-visible { outline: none; }
.speaker:has(a:focus-visible) { outline: 2px solid var(--text); outline-offset: 3px; }

.speaker p { margin: 0 0 4px; }
.speaker .role { color: var(--muted); font-size: 0.98rem; line-height: 1.4; }
.speaker .org { font-weight: 600; }

.speaker .more {
  margin-top: auto;
  padding-top: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.speaker:hover { border-color: var(--text); }
.speaker:hover .more { text-decoration: underline; }

/* ---------- Dates list ---------- */
.dates { list-style: none; margin: 0; padding: 0; max-width: 760px; }

.dates li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.dates li:first-child { border-top: 1px solid var(--line); }

.dates .date { font-weight: 600; }

.dates .what p { margin: 0; }

@media (max-width: 560px) {
  .dates li { grid-template-columns: 1fr; }
}

.note { margin-top: 20px; max-width: 760px; }

/* ---------- Venue ---------- */
.venue-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: start;
}

@media (max-width: 860px) {
  .venue-layout { grid-template-columns: 1fr; }
}

.address { margin-bottom: 16px; }

.map { margin: 0; }

.map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.map figcaption { margin-top: 6px; font-size: 0.8rem; }

/* ---------- Organisers ---------- */
/* ---------- Programme (for the agenda, when published) ----------
   Markup: see README.md, "Adding the programme". */
.schedule { width: 100%; max-width: 760px; border-collapse: collapse; margin-bottom: 32px; }
.schedule caption { text-align: left; font-weight: 900; font-size: 1.2rem; padding-bottom: 8px; }
.schedule th, .schedule td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.schedule th[scope="row"] { width: 90px; font-weight: 600; font-variant-numeric: tabular-nums; }
.schedule .session td { padding-top: 22px; font-weight: 900; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.04em; }

/* ---------- Sponsors ----------
   Equal tiles that wrap: 2 per row on phones, up to 5 on desktop. */
.sponsor-grid {
  margin-bottom: 32px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
}

@media (max-width: 560px) {
  .sponsor-grid { grid-template-columns: repeat(2, 1fr); }
}

.sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.sponsor:hover, .sponsor:focus-visible { border-color: var(--text); }

.sponsor img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }


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

.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
