/* Steady Demo Project — city magazine
   Sections are colour-coded like transit lines. Each article runs down its
   section's line, with subheadings as stops. Everything else stays quiet. */

:root {
  --ink: #15233b;          /* deep navy, used for all text */
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --concrete: #eceeea;     /* pale pavement grey for bands */
  --rule: #d6d9d3;

  /* section lines */
  --food: #e39b2d;
  --housing: #2f6fd6;
  --moving: #d4432f;
  --culture: #7a4fc9;
  --us: #1f8f66;

  --line: var(--ink);      /* overridden per section */

  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

.l-food { --line: var(--food); }
.l-housing { --line: var(--housing); }
.l-moving { --line: var(--moving); }
.l-culture { --line: var(--culture); }
.l-us { --line: var(--us); }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- Line bullet: the one recurring device ---------- */

.bullet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.bullet::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--line);
  flex: none;
}

.members {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.members svg { width: 13px; height: 13px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

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

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 3px;
}
.wordmark-mark span { width: 9px; height: 9px; border-radius: 50%; }
.wordmark-mark span:nth-child(1) { background: var(--food); }
.wordmark-mark span:nth-child(2) { background: var(--housing); }
.wordmark-mark span:nth-child(3) { background: var(--moving); }
.wordmark-mark span:nth-child(4) { background: var(--culture); }

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #22375a; border-color: #22375a; }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding: 0 6px;
}
.btn-quiet:hover { background: transparent; border-color: transparent; text-decoration: underline; }

/* Mobile: sections become a scrolling strip under the header */
.nav a { white-space: nowrap; }
.nav .nav-support { display: none; }
@media (max-width: 1060px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 14px; }
  .header-actions { margin-left: auto; }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin: 10px calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
    gap: 20px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 8px 0 10px; }
}
@media (max-width: 480px) {
  .site-header .wrap { gap: 0 8px; }
  .wordmark { font-size: 16px; gap: 8px; }
  .site-header .wordmark-mark { display: none; }
  .issue-line span:last-child { display: none; }
  .header-actions { gap: 4px; }
}
/* Phones: the Steady login button needs the room, so "Support us"
   moves from a button into the section strip. */
@media (max-width: 560px) {
  .header-actions .btn { display: none; }
  .nav .nav-support { display: block; font-weight: 700; border-bottom-color: var(--us); }
  /* login gets its own slim row above the wordmark */
  .header-actions {
    order: -1;
    flex-basis: calc(100% + 2 * var(--gutter));
    justify-content: flex-end;
    margin: -6px calc(var(--gutter) * -1) 12px;
    padding: 0 var(--gutter) 8px;
    border-bottom: 1px solid var(--rule);
  }
}

/* ---------- Homepage ---------- */

.issue-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.lead {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: end;
  padding: 20px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.lead-img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.lead-text { padding-bottom: 8px; }
.lead h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.lead h1 a { text-decoration: none; }
.lead h1 a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-decoration-color: var(--line); text-underline-offset: 6px; }
.standfirst {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--ink);
  max-width: 34em;
}
.byline { font-size: 14px; color: var(--ink-soft); margin: 0; }

@media (max-width: 860px) {
  .lead { grid-template-columns: 1fr; gap: 20px; padding-bottom: 40px; }
  .lead-img { aspect-ratio: 3 / 2; }
}

.stories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 0 64px;
}
.story { display: flex; flex-direction: column; gap: 10px; }
.story img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; margin-bottom: 4px; }
.story h2 {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.story h2 a { text-decoration: none; }
.story h2 a::after { content: ""; position: absolute; inset: 0; }
.story { position: relative; }
.story:hover h2 { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.story p { font-family: var(--serif); font-size: 16px; line-height: 1.5; margin: 0; color: var(--ink-soft); }
.story-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

@media (max-width: 1000px) { .stories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .stories { grid-template-columns: 1fr; gap: 0; padding-top: 8px; }
  .story {
    display: grid;
    grid-template-columns: 1fr 112px;
    grid-template-areas: "meta img" "title img" "text text";
    gap: 6px 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
  }
  .story img { grid-area: img; aspect-ratio: 1; margin: 0; }
  .story-meta { grid-area: meta; }
  .story h2 { grid-area: title; font-size: 20px; }
  .story p { grid-area: text; }
}

/* ---------- Bands (newsletter, support) ---------- */

.band { background: var(--concrete); padding: 56px 0; }
.band-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 48px;
  align-items: center;
}
.band h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 12px;
  text-wrap: balance;
}
.band p { font-family: var(--serif); font-size: 18px; margin: 0; max-width: 32em; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; gap: 24px; } .band { padding: 40px 0; } }

/* Hide the empty newsletter band until the Steady widget shows the form */
.newsletter-band:has(#steady_newsletter_signup_embed[style*="none"]) { display: none; }

.support-band { background: var(--ink); color: var(--paper); }
.support-band p { color: #d5dbe6; }
.support-band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.support-band .btn:hover { background: var(--concrete); }
.support-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; }
.support-facts div { border-top: 3px solid var(--us); padding-top: 12px; }
.support-facts dt { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.support-facts dd { margin: 0; font-size: 14px; color: #c3cbd8; }
@media (max-width: 560px) { .support-facts { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Article ---------- */

.article-head {
  padding: 48px 0 32px;
  max-width: 820px;
}
.article-head h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 16px 0 20px;
  text-wrap: balance;
}
.article-head .standfirst { font-size: clamp(19px, 2.2vw, 22px); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--ink-soft); }
.article-meta strong { color: var(--ink); font-weight: 600; }

.article-figure { margin: 0 0 8px; }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { font-size: 13px; color: var(--ink-soft); padding: 8px 0 0; }

/* The route: a thick line in the section colour runs down the text,
   subheadings are stops on it. */
.route {
  position: relative;
  max-width: 720px;
  margin: 40px 0 80px;
  padding-left: 56px;
}
.route::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  bottom: 0;
  width: 6px;
  border-radius: 3px;
  background: var(--line);
}
.route > p, .route > ul, .route > blockquote, .route > aside {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  margin: 0 0 1.2em;
}
.route > p:first-child::first-letter {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.08em 0 0;
}
.route h2 {
  position: relative;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
}
.route h2::before {
  content: "";
  position: absolute;
  left: -56px;
  top: 2px;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--paper);
  border: 6px solid var(--line);
}
.route blockquote {
  font-family: var(--sans);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 1.6em 0;
  padding: 0;
}
.route ul { padding-left: 1.1em; }
.route li { margin-bottom: 0.4em; }
.route li strong { font-family: var(--sans); }

.route .end {
  position: relative;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 2.4em;
}
.route .end::before {
  content: "";
  position: absolute;
  left: -56px;
  top: 50%;
  margin: -16px 0 0 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
}

@media (max-width: 560px) {
  .route { padding-left: 32px; margin-top: 28px; }
  .route::before { left: 4px; width: 5px; }
  .route h2::before { left: -32px; margin-left: 0; width: 18px; height: 18px; border-width: 5px; top: 3px; }
  .route .end::before { left: -32px; width: 26px; height: 26px; margin-top: -13px; margin-left: -6px; }
  .route > p, .route > ul { font-size: 18px; }
  .article-head { padding-top: 28px; }
  .article-figure { margin: 0 calc(var(--gutter) * -1); }
  .article-figure figcaption { padding: 8px var(--gutter) 0; }
}

.more { border-top: 1px solid var(--rule); padding: 40px 0 64px; }
.more h2 { font-size: 20px; margin: 0 0 8px; letter-spacing: -0.01em; }
.more .stories { padding: 16px 0 0; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .more .stories { grid-template-columns: 1fr; } }

/* ---------- Plain pages (support, newsletter, demo) ---------- */

.page-head { padding: 56px 0 24px; max-width: 760px; }
.page-head h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 12px 0 18px;
  text-wrap: balance;
}
.prose { max-width: 680px; padding-bottom: 48px; }
.prose p, .prose li { font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.prose h2 { font-size: 26px; letter-spacing: -0.02em; margin: 1.6em 0 0.4em; }

.checkout { margin: 8px 0 56px; }

/* Demo guide */
.features { list-style: none; margin: 8px 0 64px; padding: 0; border-top: 1px solid var(--rule); max-width: 900px; }
.features li {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 8px 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.features h2 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.features p { font-family: var(--serif); font-size: 17px; margin: 0; }
.features .links { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) {
  .features li { grid-template-columns: 1fr; }
  .features .links { flex-direction: row; flex-wrap: wrap; gap: 4px 20px; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--concrete); padding: 48px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: 15px; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .about { max-width: 30em; color: var(--ink-soft); margin: 12px 0 0; }
.demo-links { border-left: 3px solid var(--ink); padding-left: 16px; }
.credits { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-soft); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
