/*
  Cyborg Commons - shared styles
  Look: white background, system fonts, one green accent, hairline dividers, small line icons.
  Keep it plain. No gradients, shadows, or decorative imagery.
*/

/* Font: Atkinson Hyperlegible Next (SIL Open Font License), served from /fonts. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Atkinson Hyperlegible Next"), url("fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local("Atkinson Hyperlegible Next SemiBold"), url("fonts/atkinson-hyperlegible-next-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Atkinson Hyperlegible Next Bold"), url("fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --fg: #12292b;
  --muted: #4a6264;
  --line: #d3e2e2;
  --accent: #0b6b70;
  --accent-ink: #ffffff;
  --soft: #eef6f6;
  --warm: #b4531f;
  --sand: #fbf5ec;
  --sand-line: #ecd9c4;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-inline: 20px;
}

h1, h2, h3, p, ul { margin: 0; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.4vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--fg); }

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

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

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

/* Layout */
.wrap { max-width: 720px; margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 20px;
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
}

/* Header */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 28px;
  padding-block: 24px;
}
.brand { margin-right: auto; font-weight: 600; color: var(--fg); text-decoration: none; }
.brand .muted { font-weight: 400; }
.top nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); text-decoration: underline; }
.top nav a[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: underline; }

/* Sections */
.sec {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 48px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.sec.first { border-top: 0; padding-block: 32px 48px; }
.hero { gap: 24px; padding-block: 40px 56px; border-top: 0; }
.lead { font-size: 1.1875rem; max-width: 34em; }

/* Buttons and links */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--fg); border-color: var(--fg); color: var(--accent-ink); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; white-space: nowrap; }
.btn .ic { stroke: currentColor; width: 18px; height: 18px; }

/* Icons: inline SVG with class "ic" */
.ic {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Event heading and details */
.event-title { display: flex; gap: 12px; align-items: flex-start; }
.event-title .ic { width: 30px; height: 30px; margin-top: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 32px; font-weight: 600; }
.meta span { display: inline-flex; gap: 10px; align-items: center; }

/* Short icon lists */
.tiles {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  column-gap: 32px;
  border-bottom: 1px solid var(--line);
}
.tiles li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.tiles li > div { min-width: 0; }
.tiles li strong { display: block; font-weight: 600; }
.tiles li .muted { font-size: 0.95rem; }
.tiles.links { grid-template-columns: 1fr; }
.tiles.links a { display: flex; gap: 14px; align-items: center; width: 100%; color: var(--fg); text-decoration: none; font-weight: 600; }
.tiles.links a:hover { color: var(--accent); }
.tiles.links .go { margin-left: auto; }
.tiles.links li { padding-block: 0; }
.tiles.links a { padding-block: 14px; }

/* Event teaser on the home page */
.teaser {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}
.teaser:hover { border-color: var(--accent); color: var(--fg); }
.teaser strong { display: block; font-weight: 600; }
.teaser .go { margin-left: auto; }

/* Facts with sources */
.facts { list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
.facts li { padding-block: 14px; border-top: 1px solid var(--line); }
.src { font-size: 0.9rem; white-space: nowrap; }

/* Sign-up slot on the session page */
#signup-embed { min-width: 0; max-width: 100%; text-align: center; }
#signup-embed iframe { display: block; width: 100%; max-width: 560px; margin-inline: auto; border: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--sand-line);
  border-radius: 8px;
  background: var(--sand);
}
.countdown .ghost { width: 36px; height: 36px; stroke: var(--warm); }
@media (prefers-reduced-motion: no-preference) {
  .countdown .ghost { animation: float 3.2s ease-in-out infinite; }
}
@keyframes float { 50% { transform: translateY(-4px); } }
.cd-label { font-size: 0.9rem; color: var(--muted); }
.cd { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.cd span { display: flex; flex-direction: column; min-width: 3.2rem; }
.cd b { font-size: 1.75rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd small { font-size: 0.8rem; color: var(--muted); }

.actions a:not(.btn) { align-self: center; }

/* Session page header with illustration */
.event-head { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.event-text { display: flex; flex-direction: column; gap: 20px; flex: 1 1 340px; min-width: 0; }
.frog { width: 100%; max-width: 280px; height: auto; flex: 0 1 280px; }

@media (max-width: 480px) {
  .countdown { gap: 12px; padding: 14px; }
  .cd { gap: 6px 12px; }
  .cd span { min-width: 2.6rem; }
}

.credit { font-size: 0.75rem; opacity: 0.85; }
