:root {
  --burgundy: #7B1E34;
  --burgundy-deep: #5C1427;
  --burgundy-soft: #9A3A51;
  --honey: #F2B33D;
  --honey-pale: #FCE6B2;
  --ink: #2A1A1F;
  --muted: #6B5A5F;
  --rule: #EADCDD;
  --wash: #FAF4F3;
  --paper: #FFFFFF;
  --error: #B3261E;
  --on-burgundy: #FFF7F0;
  --on-burgundy-muted: #EFD3D9;

  --font: "Andika", "Trebuchet MS", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; }

p, li, label, h1, h2, h3 { text-wrap: pretty; }

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

/* Burgundy band: header + hero */
.top {
  background: var(--burgundy);
  color: var(--on-burgundy);
}

.top :focus-visible { outline-color: var(--honey); }

.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.wordmark-mark {
  width: 46px;
  height: auto;
  flex: none;
  /* light outline so the bee's dark edges read on burgundy */
  filter: drop-shadow(1.5px 0 0 var(--on-burgundy)) drop-shadow(-1.5px 0 0 var(--on-burgundy))
          drop-shadow(0 1.5px 0 var(--on-burgundy)) drop-shadow(0 -1.5px 0 var(--on-burgundy));
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 9vh, 104px) var(--gutter) clamp(56px, 10vh, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(2.75rem, 6.4vw, 5rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 11ch;
}

.lede {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.4375rem);
  line-height: 1.45;
  max-width: 34ch;
}

.lede-sub {
  margin: 0 0 32px;
  color: var(--on-burgundy-muted);
  max-width: 44ch;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 999px;
}

.btn-honey { background: var(--honey); color: var(--ink); }
.btn-honey:hover { background: #F6C362; }

.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-deep); }

.btn-quiet {
  padding-left: 0;
  padding-right: 0;
  border-radius: 0;
  text-decoration: underline;
  text-decoration-color: var(--honey);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.btn-quiet:hover { text-decoration-color: var(--on-burgundy); }

/* Number rods: rod n is n tenths of the column; units alternate honey / pale honey */
.rods {
  container-type: inline-size;
  position: relative;
  margin: 0;
  max-width: 480px;
  width: 100%;
  justify-self: end;
}

.rods-inner {
  display: flex;
  flex-direction: column;
  gap: 2.2cqi;
  position: relative;
  padding-bottom: 2.2cqi;
}

/* Wooden-tray shelf the rods rest on, a little wider than rod 10 */
.rods-inner::after {
  content: "";
  position: absolute;
  left: -2cqi;
  right: -2cqi;
  bottom: -2.2cqi;
  height: 2.2cqi;
  min-height: 8px;
  border-radius: 3px;
  background: var(--burgundy-soft);
  box-shadow: inset 0 -3px 0 var(--burgundy-deep);
}

.rod {
  height: 4.2cqi;
  width: calc(var(--n) * 10%);
  border-radius: 2px;
  background: linear-gradient(to right, var(--honey) 50%, var(--honey-pale) 50%) 0 0 / calc(200% / var(--n)) 100% repeat-x;
  animation: place-rod 520ms cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--n) * 110ms + 150ms);
}

@keyframes place-rod {
  from { transform: translateX(-24px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Bee flight overlay: same width as the rods, 66 units tall to match their height */
.flight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 66;
  overflow: visible;
  pointer-events: none;
}

.flight-trail {
  fill: none;
  stroke: var(--on-burgundy-muted);
  stroke-width: .5;
  stroke-dasharray: 1.2 1.6;
  stroke-linecap: round;
}

.trail-mask { fill: none; stroke: #fff; stroke-width: 3; }

/* Interest-list form */
.signup {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 88px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  scroll-margin-top: 8px;
}

.signup h2,
.contact h2 { color: var(--burgundy); }

.signup h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.signup-intro { position: sticky; top: 24px; }

.signup-intro p { margin: 0 0 16px; max-width: 38ch; }

.steps-title {
  margin: 28px 0 12px;
  font-size: 1.125rem;
  color: var(--burgundy);
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 20px;
  padding: 0;
  max-width: 38ch;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 44px;
  min-height: 30px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 30px;
  text-align: center;
}

/* connector between step numbers */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 2px;
  border-left: 2px dotted var(--honey);
}

.signup-privacy { color: var(--muted); font-size: 1rem; }

.signup-form,
.signup-done {
  background: var(--wash);
  border-radius: 12px;
  border-top: 6px solid var(--honey);
}

.signup-form { padding: clamp(20px, 3vw, 36px); }

.field { margin-bottom: 20px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-items: end;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.optional { font-weight: 400; color: var(--muted); }

.field input:not([type="checkbox"]),
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #CDBDC0;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 46px;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 0;
  border-color: var(--burgundy);
}

.field [aria-invalid="true"] { border-color: var(--error); }

.field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.9375rem;
}

.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
}

.field-check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--burgundy);
}

.field-check label { font-weight: 400; font-size: 1.0625rem; margin: 0; }

.field-check .field-error { grid-column: 2; margin-top: 0; }

.signup-form .btn { border: 0; cursor: pointer; }
.signup-form .btn:disabled { opacity: .7; cursor: progress; }

.form-status:not(:empty) { margin: 14px 0 0; color: var(--error); }
.form-status:empty { display: none; }

/* Visually hidden trap field for bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.signup-done {
  border-top-color: var(--burgundy);
  padding: clamp(24px, 3vw, 40px);
}
.signup-done:focus { outline: none; }
.signup-done h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--burgundy); }
.signup-done p { margin: 0; max-width: 44ch; }

/* No-JavaScript result page from signup.php */
.result-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px var(--gutter);
}
.result-page h1 { font-size: 2.25rem; line-height: 1.15; margin: 0 0 16px; color: var(--burgundy); }
.result-page li { color: var(--error); }

/* Location + map */
.location {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 8vh, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.location h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  color: var(--burgundy);
}

.location-text > p { margin: 0 0 20px; max-width: 40ch; }

.walks {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.walks li {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.walk-time {
  font-weight: 700;
  color: var(--burgundy);
  white-space: nowrap;
}

.location-more { color: var(--muted); font-size: 1rem; }

.map { margin: 0; }

.map-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  font-family: var(--font);
}

.map figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.map-bg { fill: #F4ECEA; }
.map-water { fill: #CFE0E4; }
.map-creek { fill: none; stroke: #B5CFD6; stroke-width: 3; stroke-linecap: round; }
.map-minor { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.map-tertiary-case, .map-secondary-case, .map-primary-case, .map-motorway-case,
.map-tertiary, .map-secondary, .map-primary, .map-motorway {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-tertiary-case  { stroke: #E2D2D4; stroke-width: 8; }
.map-tertiary       { stroke: #FFFFFF; stroke-width: 6; }
.map-secondary-case { stroke: #D9C5C8; stroke-width: 11; }
.map-secondary      { stroke: #FFFFFF; stroke-width: 8.5; }
.map-primary-case   { stroke: #D3BCC0; stroke-width: 14; }
.map-primary        { stroke: #FFFFFF; stroke-width: 11; }
.map-motorway-case  { stroke: #E3BF6F; stroke-width: 15; }
.map-motorway       { stroke: #F8DFA0; stroke-width: 12; }

/* Line 1 runs underground here: dashed, in the line's yellow */
.map-subway { fill: none; stroke: #D99A16; stroke-width: 4; stroke-dasharray: 10 7; }

.map-walk {
  fill: none;
  stroke: var(--burgundy);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.1 11;
}

.map-svg text {
  paint-order: stroke;
  stroke: #F4ECEA;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.map-svg .street { fill: var(--muted); font-size: 17px; }
.map-svg .poi-label { fill: var(--ink); font-size: 18px; }
.map-svg .place-label { fill: var(--ink); font-size: 21px; font-weight: 700; }
.map-svg .school-label { fill: var(--burgundy); font-size: 25px; font-weight: 700; }

.map-poi circle { fill: #fff; stroke: var(--burgundy); stroke-width: 3; }

.map-station circle { fill: #D99A16; stroke: #fff; stroke-width: 3.5; }
.map-station text { fill: var(--ink); stroke: none; font-size: 17px; font-weight: 700; }

.map-school circle { fill: var(--burgundy); stroke: #fff; stroke-width: 5; }

/* Contact */
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 8vh, 80px);
}

.contact h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.contact-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.contact-list > div { padding: 20px 24px 4px 0; }

.contact-list dt {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-list dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-list a {
  text-decoration: underline;
  text-decoration-color: var(--honey);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.contact-list a:hover { text-decoration-color: var(--burgundy); }

/* Footer */
.site-footer {
  background: var(--burgundy-deep);
  color: var(--on-burgundy-muted);
  font-size: 0.9375rem;
}
.site-footer p {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
}

/* Responsive */
@media (max-width: 900px) {
  .hero { gap: 32px; }
  .signup { grid-template-columns: 1fr; }
  .location { grid-template-columns: 1fr; }
  .signup-intro { position: static; }
  /* single column: the steps only repeat the intro, so keep the form close */
  .steps-title, .steps { display: none; }
  .contact-list { grid-template-columns: 1fr; }
  .contact-list > div { padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
    padding-bottom: 48px;
    gap: 36px;
  }
  .hero h1 { margin-bottom: 20px; }
  .lede-sub { margin-bottom: 24px; }
  .rods { justify-self: start; max-width: 300px; }
  /* the map scales down to ~45%, so enlarge its labels to stay readable */
  .map-svg .street { font-size: 24px; }
  .map-svg .poi-label { font-size: 26px; }
  .map-svg .place-label { font-size: 29px; }
  .map-svg .school-label { font-size: 32px; }
  .map-svg text { stroke-width: 7px; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rod { animation: none; }
}
