/* sebvandort.co.uk — shared styles. Tokens match The Real Pipeline. */
:root {
  --bg: #EEF1F5;
  --ink: #0E1B2E;
  --muted: #475970;
  --line: #C3CDDA;
  --green: #1E9E6A;
  --gold: #D9A21B;
  --link: #11704A;
  --panel: #FFFFFF;
  --f-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --f-body: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A111D;
    --ink: #E7EDF5;
    --muted: #9FB0C6;
    --line: #243550;
    --green: #2BA36F;
    --gold: #D9A21B;
    --link: #4CC892;
    --panel: #101A2B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 1040px); margin-inline: auto; }
.narrow > * { max-width: 680px; }

/* Header and footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 28px; }
.wordmark { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 4px 0; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--green); }

.site-footer { margin-top: 96px; padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }

/* Home */
.home-intro { padding: 56px 0 0; text-align: center; }
.home-intro h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.9rem, 9vw, 6.2rem); line-height: 0.98; letter-spacing: -0.015em; margin: 0 auto 22px; }
.home-intro p { max-width: 36em; margin: 0 auto; font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); }

/* The pipe: one line from the intro that splits into the two sections */
.pipe { --h: 56px; position: relative; height: var(--h); margin-top: 36px; }
.pipe::before { content: ""; position: absolute; left: 50%; top: 0; width: 3px; height: 50%; margin-left: -1.5px; background: var(--ink); transform-origin: top; animation: draw-down 0.45s ease-out both; }
.pipe::after { content: ""; position: absolute; left: calc(25% - 7px); right: calc(25% - 7px); top: 50%; height: 3px; margin-top: -1.5px; background: var(--ink); transform-origin: center; animation: draw-across 0.5s ease-out 0.4s both; }
.doors { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.door { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 30px 30px 28px; background: var(--panel); border: 2px solid var(--ink); border-radius: 4px; color: var(--ink); text-decoration: none; }
.door::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--drop, 28px)); width: 3px; height: var(--drop, 28px); margin-left: -1.5px; background: var(--ink); transform-origin: top; animation: draw-down 0.35s ease-out 0.85s both; }
.door::after { content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); }
.door h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.05; margin: 0; }
.door p { margin: 0; color: var(--muted); max-width: 30em; }
.door .go { margin-top: 10px; font-weight: 900; color: var(--link); }
.door:hover { border-color: var(--green); box-shadow: 6px 6px 0 var(--green); }
.door:hover .go { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.door.data::after { background: var(--green); }

@keyframes draw-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw-across { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Sub pages */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; letter-spacing: -0.01em; margin: 0 0 18px; }
.lede { font-size: 1.25rem; color: var(--muted); margin: 0; max-width: 34em; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; line-height: 1.15; margin: 44px 0 10px; }
.prose p { margin: 0 0 16px; max-width: 38em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-block; padding: 12px 22px; font-weight: 900; font-family: var(--f-body); font-size: 1rem; text-decoration: none; border: 2px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.subscribe { margin: 40px 0 0; }
.subscribe iframe { display: block; width: 100%; max-width: 480px; height: 320px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.subscribe p { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Open data list */
.project { display: block; margin-top: 36px; padding: 28px 30px; background: var(--panel); border: 2px solid var(--ink); border-left: 10px solid var(--green); border-radius: 4px; color: var(--ink); text-decoration: none; }
.project:hover { border-color: var(--green); box-shadow: 6px 6px 0 var(--green); }
.project h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; line-height: 1.1; margin: 0 0 10px; }
.project p { margin: 0 0 12px; max-width: 38em; }
.project .meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.project .go { display: inline-block; margin-top: 14px; font-weight: 900; color: var(--link); }
.project:hover .go { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.more { margin-top: 28px; color: var(--muted); }

@media (max-width: 760px) {
  .home-intro { padding-top: 36px; padding-bottom: 36px; text-align: left; }
  .home-intro p { margin-left: 0; }
  .pipe { display: none; }
  .doors { grid-template-columns: 1fr; gap: 36px; }
  .door::before { left: 20px; --drop: 36px; }
  .door::after { left: 20px; }
  .site-footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .pipe::before, .pipe::after, .door::before { animation: none; }
}
