/* ============================================================
   FigStudio Hackathon, event site.

   Hand written rather than a utility framework, on purpose. The two
   things this file has to survive are somebody editing copy who does
   not write CSS, and a designer replacing the look entirely once the
   brand is settled. Both are easier against named rules and a block of
   variables than against a thousand class names in the markup.

   Every colour, radius and font size is a variable below. Reskinning
   the site should mean editing that block and nothing else.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --fg: #16171a;
  --fg-muted: #6b6f76;
  --line: #e6e7ea;
  --accent: #2563eb;
  --accent-soft: #eff4ff;

  --radius: 12px;
  --radius-sm: 8px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;      /* comfortable line length for body copy */
  --page: 1080px;       /* outer content width */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1rem; max-width: var(--measure); }
a  { color: var(--accent); }

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

/* ---- header ---- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand { font-weight: 650; text-decoration: none; color: var(--fg); }
.site-nav { display: flex; gap: 22px; align-items: center; }

/*
  Buttons are excluded rather than overridden. ".site-nav a" is more specific
  than ".button", so without the :not() the muted link colour won a fight it
  should never have been in, and the call to action rendered as grey text on a
  blue fill.
*/
.site-nav a:not(.button) {
  color: var(--fg-muted); text-decoration: none; font-size: 0.95rem;
}
.site-nav a:not(.button):hover { color: var(--fg); }

/* Navigation collapses rather than wraps into two lines on a phone. The
   page is short enough that scrolling is a fine substitute for links. */
@media (max-width: 720px) {
  .site-nav a:not(.button) { display: none; }
}

/* Anywhere a button sits inside something that sets a text colour, the button
   keeps its own. Stated once here rather than patched per context. */
a.button, a.button:hover, a.button:visited { color: #fff; text-decoration: none; }
a.button.secondary, a.button.secondary:visited { color: var(--fg); }

/* ---- buttons ---- */

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  border: 1px solid transparent;
  white-space: nowrap;
}
.button:hover { filter: brightness(1.08); }
.button.secondary {
  background: transparent; color: var(--fg); border-color: var(--line);
}

/* ---- sections ---- */

section { padding: 72px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.section-label {
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 10px;
}

/* ---- hero ---- */

.hero { padding: 96px 0 80px; border-bottom: 1px solid var(--line); }
.hero .lede { font-size: 1.15rem; color: var(--fg-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-meta div { min-width: 140px; }
.hero-meta dt {
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted);
}
.hero-meta dd { margin: 4px 0 0; font-weight: 550; }

/* ---- cards ---- */

.cards {
  display: grid; gap: 16px; margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: var(--bg);
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }

/* ---- timeline ---- */

.timeline { list-style: none; padding: 0; margin: 28px 0 0; }
.timeline li {
  display: grid; grid-template-columns: 180px 1fr; gap: 20px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-weight: 550; }
.timeline .what { color: var(--fg-muted); }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- table ---- */

table { width: 100%; border-collapse: collapse; margin-top: 24px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--fg-muted); font-weight: 550; }
td.points { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 600; border-bottom: 0; }

/* ---- faq ---- */

details {
  border-bottom: 1px solid var(--line); padding: 16px 0;
}
details summary {
  cursor: pointer; font-weight: 550; list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--fg-muted); }
details[open] summary::before { content: "\2212  "; }
details p { margin: 10px 0 0; color: var(--fg-muted); }

/* ---- winners ---- */

/* Hidden until the results endpoint answers with something. A section
   headed "Winners" above an empty space, for the weeks before there are
   any, reads as a mistake. */
#winners[hidden] { display: none; }
.winner {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-top: 16px;
}
.winner .place {
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.winner h3 { margin: 6px 0 4px; }
.winner .team { color: var(--fg-muted); font-size: 0.95rem; margin: 0; }

/* ---- callout ---- */

.callout {
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-top: 28px;
}
.callout p:last-child { margin-bottom: 0; }

/* ---- footer ---- */

.site-footer { background: var(--bg-soft); padding: 40px 0; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}
.site-footer p { color: var(--fg-muted); font-size: 0.9rem; margin: 0; }

/* Marks copy that still has to be replaced with real details. Loud on
   purpose: a placeholder that looks finished is a placeholder that ships. */
.todo {
  background: #fff8e1; border-bottom: 1px dashed #c9a227; padding: 0 2px;
}
