/* Blue Hour Walks website (ADR-0068, redesigned ADR-0108): the shared base for every page (type, top bar,
   buttons, footer) plus the long-form, form and shared-walk pages. The homepage adds home.css.
   Colours only through the app's --md-sys-color-* roles (theme.css), never literals, so light and dark follow
   the app. Derived shades use color-mix() on those roles. */

@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 400;
  font-display: swap;
  src: url('/site/fonts/HankenGrotesk-400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 600;
  font-display: swap;
  src: url('/site/fonts/HankenGrotesk-600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 700;
  font-display: swap;
  src: url('/site/fonts/HankenGrotesk-700Bold.woff2') format('woff2');
}

:root {
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --touch: 56px;
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --radius-xl: 36px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --max: 1180px;
  --line: color-mix(in oklab, var(--md-sys-color-outline-variant) 70%, transparent);
  --shade-1: color-mix(in srgb, var(--md-sys-color-shadow) 14%, transparent);
  --shade-2: color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent);
  --elev-1: 0 1px 2px var(--shade-1), 0 2px 6px var(--shade-2);
  --elev-2: 0 2px 4px var(--shade-2), 0 12px 32px -8px var(--shade-1);
  --elev-3: 0 30px 60px -20px color-mix(in srgb, var(--md-sys-color-shadow) 45%, transparent);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* The blue-hour sky: always dark, in both schemes. */
  --sky-0: color-mix(in oklab, var(--md-sys-color-primary) 38%, var(--md-sys-color-shadow));
  --sky-1: var(--md-sys-color-primary);
  --sky-2: color-mix(in oklab, var(--md-sys-color-primary) 62%, var(--md-sys-color-tertiary));
  --glow: color-mix(in oklab, var(--md-sys-color-tertiary) 70%, var(--md-sys-color-tertiary-container));
  --ink: var(--md-sys-color-on-primary);
  --ink-soft: color-mix(in oklab, var(--md-sys-color-on-primary) 74%, transparent);
  --glass: color-mix(in oklab, var(--md-sys-color-on-primary) 10%, transparent);
  --glass-line: color-mix(in oklab, var(--md-sys-color-on-primary) 18%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --line: var(--md-sys-color-outline-variant);
    --sky-0: var(--md-sys-color-surface-container-lowest);
    --sky-1: color-mix(
      in oklab,
      var(--md-sys-color-primary-container) 80%,
      var(--md-sys-color-surface-container-lowest)
    );
    --sky-2: color-mix(in oklab, var(--md-sys-color-primary-container) 55%, var(--md-sys-color-tertiary-container));
    --glow: color-mix(in oklab, var(--md-sys-color-tertiary) 55%, var(--md-sys-color-tertiary-container));
    --ink: var(--md-sys-color-on-primary-container);
    --ink-soft: color-mix(in oklab, var(--md-sys-color-on-primary-container) 72%, transparent);
    --glass: color-mix(in oklab, var(--md-sys-color-on-primary-container) 8%, transparent);
    --glass-line: color-mix(in oklab, var(--md-sys-color-on-primary-container) 16%, transparent);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--md-sys-color-primary);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 3px;
  border-radius: 10px;
}
h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: none;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 20;
  padding: 12px 20px;
  border-radius: var(--radius-s);
  background: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--md-sys-color-background) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: var(--elev-1);
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.nav-link:hover {
  background: color-mix(in oklab, var(--md-sys-color-on-surface) 7%, transparent);
  color: var(--md-sys-color-on-surface);
}
.nav-link[aria-current='page'] {
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-secondary-container);
}
.nav .btn {
  margin-left: 8px;
}
@media (max-width: 640px) {
  .nav-link {
    display: none; /* in the footer instead; the bar keeps the brand and the one action */
  }
}
@media (max-width: 380px) {
  .bar .brand .word {
    display: none; /* the mark stays, with its accessible name */
  }
}

/* ── Buttons and chips ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--elev-2);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn .icon {
  width: 20px;
  height: 20px;
}
.btn-small {
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
}
.btn-filled {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.btn-tonal {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.btn-text {
  background: none;
  color: var(--md-sys-color-primary);
  padding: 0 16px;
}
.btn-text:hover {
  box-shadow: none;
  background: color-mix(in oklab, var(--md-sys-color-primary) 8%, transparent);
}
.btn[aria-current='page'] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
  font-weight: 600;
}
.chip .icon {
  width: 18px;
  height: 18px;
  color: var(--md-sys-color-primary);
}
.badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

/* ── Long-form pages (privacy, terms) ────────────────────────────────────── */
.page {
  position: relative;
  padding: 64px 0 88px;
  isolation: isolate;
}
/* A faint blue-hour wash at the top of every inner page. */
.page::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 360px;
  z-index: -1;
  background:
    radial-gradient(
      60% 100% at 85% 0%,
      color-mix(in oklab, var(--md-sys-color-tertiary-container) 55%, transparent),
      transparent 70%
    ),
    radial-gradient(
      70% 120% at 10% 0%,
      color-mix(in oklab, var(--md-sys-color-primary-container) 75%, transparent),
      transparent 70%
    );
  opacity: 0.7;
}
.page .wrap {
  max-width: 780px;
}
.page h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.4px;
}
.page h2 {
  margin: 56px 0 12px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.page h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  letter-spacing: -0.2px;
}
.page p,
.page li {
  color: var(--md-sys-color-on-surface-variant);
}
.page strong {
  color: var(--md-sys-color-on-surface);
}
.page > .wrap > p:first-of-type:not(.updated):not(.eyebrow) {
  font-size: 19px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--md-sys-color-tertiary);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.updated {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 600;
}
.summary {
  margin: 32px 0 8px;
  padding: 24px 28px;
  border-radius: var(--radius-l);
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--line);
  box-shadow: var(--elev-1);
}
@media (prefers-color-scheme: dark) {
  .summary {
    background: var(--md-sys-color-surface-container);
  }
}
.summary > strong:first-child {
  display: block;
  font-size: 18px;
}
.summary ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.summary li {
  position: relative;
  padding-left: 32px;
}
.summary li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container);
  box-shadow:
    inset 0 0 0 5px var(--md-sys-color-primary-container),
    inset 0 0 0 9px var(--md-sys-color-primary);
}
.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--md-sys-color-surface-container-lowest);
}
@media (prefers-color-scheme: dark) {
  .table-scroll {
    background: var(--md-sys-color-surface-container-low);
  }
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
  letter-spacing: 0.2px;
}
td {
  color: var(--md-sys-color-on-surface-variant);
}

/* ── Form (ideas) ────────────────────────────────────────────────────────── */
.form-card {
  margin-top: 32px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--line);
  box-shadow: var(--elev-2);
}
@media (prefers-color-scheme: dark) {
  .form-card {
    background: var(--md-sys-color-surface-container);
  }
}
.field {
  margin-bottom: 22px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--md-sys-color-on-surface);
  font-weight: 600;
}
.field .hint {
  display: block;
  margin-top: 8px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: var(--touch);
  padding: 14px 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 14px;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}
.field textarea {
  min-height: 160px;
  resize: vertical;
}
.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--md-sys-color-outline);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container-lowest);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-sys-color-primary) 18%, transparent);
}
.field ::placeholder {
  color: color-mix(in oklab, var(--md-sys-color-on-surface-variant) 70%, transparent);
}
.counter {
  float: right;
  font-weight: 400;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.status {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-s);
}
.status[hidden] {
  display: none;
}
.status.error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
.thanks {
  text-align: center;
  padding: 40px 24px;
}
.thanks .badge {
  margin: 0 auto 16px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.thanks .badge .icon {
  width: 36px;
  height: 36px;
}
.callout {
  margin-top: 24px;
  padding: 32px;
  border-radius: var(--radius-l);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.callout h2 {
  margin: 0 0 8px;
}
.callout p {
  color: inherit;
}

/* ── A shared walk (ADR-0074): bluehourwalks.com/trail ───────────────────── */
.trail .byline {
  margin: 0 0 20px;
  color: var(--md-sys-color-on-surface-variant);
}
.trail .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.route-card,
.profile-card {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: var(--radius-l);
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--line);
  box-shadow: var(--elev-1);
}
@media (prefers-color-scheme: dark) {
  .route-card,
  .profile-card {
    background: var(--md-sys-color-surface-container);
  }
}
.route-card figcaption,
.profile-card figcaption {
  margin-top: 10px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}
.route,
.profile {
  display: block;
  width: 100%;
  height: auto;
}
.profile {
  height: 120px;
}
.route-casing {
  fill: none;
  stroke: var(--md-sys-color-surface-container-lowest);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-line {
  fill: none;
  stroke: var(--md-sys-color-primary);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-start {
  fill: var(--md-sys-color-secondary);
  stroke: var(--md-sys-color-surface-container-lowest);
  stroke-width: 4;
}
.route-end {
  fill: var(--md-sys-color-tertiary);
  stroke: var(--md-sys-color-surface-container-lowest);
  stroke-width: 4;
}
.profile-fill {
  fill: var(--md-sys-color-primary-container);
}
.profile-line {
  fill: none;
  stroke: var(--md-sys-color-primary);
  stroke-width: 2;
}
.trail .description {
  white-space: pre-line;
}
.trail .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 12px;
}
.trail .hint {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.foot {
  padding: 64px 0 36px;
  background: var(--md-sys-color-surface-container-low);
  border-top: 1px solid var(--line);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 15px;
}
.foot .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}
.foot-brand p {
  max-width: 30em;
  margin: 12px 0 0;
}
.foot-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.foot-h {
  margin: 0 0 8px;
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.foot-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
}
.legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
@media (max-width: 720px) {
  .foot .wrap {
    grid-template-columns: 1fr;
  }
}

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