/* Note Nest — Salt Ladder design system */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&family=IBM+Plex+Sans:wght@400;500&family=Newsreader:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --ink: #17262C;
  --deep: #0A141A;
  --paper: #F0EEE8;
  --amber: #B07A16;
  --haze: #4a5559;
  --stone: #3d4a50;
  --text-on-light: #1a2529;
  --text-muted-light: #3d4a50;
  --text-on-dark: #e8eaec;
  --text-muted-dark: #b8c0c4;
  --measure: min(68ch, 100%);
  --shell: min(1140px, 92vw);
  --pad-sm: 56px;
  --pad-md: 80px;
  --pad-lg: 112px;
  --pad-xl: 144px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  overflow-x: clip;
}

html.js .reveal-photo {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.js .reveal-photo.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal-photo,
  html.js .reveal-photo.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rung-line { animation: none !important; width: 100% !important; }
  .reading-progress { transition: none !important; }
  .cookie-banner,
  .cookie-panel { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-on-light);
  font-family: 'Newsreader', Georgia, serif;
  line-height: 1.74;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

main,
.reading-shell,
.wide-shell {
  color: var(--text-on-light);
}

main p,
.reading-shell p,
.wide-shell p {
  color: var(--text-on-light);
}

h1, h2, h3, h4 {
  color: var(--ink);
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--amber); }

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

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--amber);
  z-index: 1000;
  transition: width 0.12s linear;
}

.site-header {
  padding: 24px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--stone);
  max-width: 100%;
}

.site-logo {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.site-logo:hover { color: var(--amber); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.site-nav a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted-light);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--amber); }

.rung {
  position: relative;
  width: 100%;
  padding: 0;
  margin: var(--pad-md) 0;
}

.rung-line {
  display: block;
  width: 0;
  height: 1px;
  background: var(--stone);
  margin: 0 auto;
  animation: rungDraw 1s var(--ease) forwards;
}

.rung.is-active .rung-line { background: var(--amber); }

.rung-num {
  position: absolute;
  top: -0.55em;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--paper);
  padding: 0 8px;
}

.rung.is-active .rung-num { color: var(--amber); }

.rung-num--left { left: 4vw; }
.rung-num--right { right: 4vw; }

@keyframes rungDraw {
  from { width: 0; }
  to { width: 100%; }
}

.reading-shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--pad-md) 4vw;
}

.wide-shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--pad-md) 4vw;
}

.article-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-bottom: 24px;
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }

.tagline-accent { font-style: italic; color: var(--amber); }

.lead { font-size: 1.12rem; color: var(--text-muted-light); }

.photo-break {
  width: min(calc(68ch + 240px), 100%);
  margin: var(--pad-md) auto;
}

.photo-frame {
  border: 1px solid var(--stone);
  padding: 8px;
  background: var(--paper);
}

.photo-caption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stone);
}

.photo-bleed {
  width: 100vw;
  max-width: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.photo-bleed img {
  width: 100%;
  height: auto;
}

.note-list { display: grid; gap: 40px; }

.note-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
  text-decoration: none;
  color: var(--text-on-light);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--stone);
}

.note-card h2 { color: var(--ink); }

.note-card p { color: var(--text-muted-light); }

.note-card:hover h2 { color: var(--amber); }

.note-card__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--amber);
}

.note-card__thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid var(--stone);
}

.note-card__date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .note-card { grid-template-columns: 1fr; }
}

.who-band {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: center;
  padding: var(--pad-sm) 0;
}

.who-band img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--stone);
}

.archive-group h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-bottom: 32px;
}

.archive-group > p { color: var(--text-muted-light); }

.back-strip {
  margin: var(--pad-md) auto;
  padding: 24px 4vw;
  max-width: var(--measure);
  border-top: 1px solid var(--stone);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-on-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-details {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-on-light);
}

.contact-details p { color: var(--text-on-light); }

.disclaimer-block {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--stone);
  font-size: 0.92rem;
  color: var(--text-muted-light);
  background: rgba(255, 255, 255, 0.35);
}

.disclaimer-block h2 { color: var(--ink); }

.disclaimer-block p { color: var(--text-muted-light); }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.map-a {
  height: 480px;
  border: 1px solid var(--amber);
  filter: saturate(0.85);
  overflow: hidden;
}

.map-a:hover { filter: none; }

.map-a iframe, .map-b iframe, .map-c iframe, .map-d iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-b { height: 190px; filter: saturate(0.8); border-top: 1px solid var(--stone); }

.map-b__eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  padding: 12px 4vw 0;
  max-width: var(--shell);
  margin: 0 auto;
}

.map-a,
.map-b,
.map-c,
.map-d {
  position: relative;
  background: url('/images/16-map-preview.jpg') center/cover no-repeat;
}

.map-c {
  height: 300px;
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  filter: saturate(0.85);
}

.map-d {
  height: 170px;
  border: 1px solid var(--stone);
  margin-top: 24px;
}

.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(rgba(240, 238, 232, 0.82), rgba(240, 238, 232, 0.9)), url('/images/16-map-preview.jpg') center/cover no-repeat;
  color: var(--text-on-light);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  height: 100%;
  min-height: inherit;
  padding: 24px;
  text-align: center;
}

.map-placeholder p { color: var(--text-on-light); margin: 0; }

.map-placeholder button {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--stone);
  color: var(--ink);
  padding: 10px 20px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .map-a { height: 300px; }
  .map-b { height: 130px; }
  .map-c { height: 200px; }
}

.section-index {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-bottom: 32px;
  line-height: 2;
  overflow-wrap: anywhere;
}

.section-index a { color: var(--text-muted-light); }

section li { color: var(--text-on-light); }

section h3 { color: var(--ink); }

code {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  padding: 0.1em 0.35em;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
}

.manage-cookies-btn {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--ink);
  padding: 12px 24px;
  cursor: pointer;
  margin-top: 16px;
}

.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-footer {
  background: var(--deep);
  color: var(--text-muted-dark);
  padding: var(--pad-md) 4vw;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer p { color: var(--text-muted-dark); }

.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: var(--amber); }

.footer-inner { max-width: var(--shell); margin: 0 auto; }

.footer-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--deep);
  color: var(--text-on-dark);
  padding: 16px 4vw;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.88rem;
}

.cookie-banner p { color: var(--text-on-dark); }

.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner.is-hidden { display: none; }

.cookie-banner__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.cookie-banner__text { flex: 1 1 280px; line-height: 1.5; }
.cookie-banner__text a { color: var(--amber); }

.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cookie-btn {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--text-on-dark);
  cursor: pointer;
}

.cookie-btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--deep);
}

.cookie-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 24px 4vw;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  font-family: 'IBM Plex Sans', sans-serif;
}

.cookie-panel h2 { color: #fff; }

.cookie-panel p,
.cookie-row__label,
.cookie-row__desc { color: var(--text-on-dark); }

.cookie-row__desc { color: var(--text-muted-dark); }

.cookie-row { border-bottom-color: rgba(255, 255, 255, 0.15); }

.cookie-panel.is-open { transform: translateY(0); }

.cookie-panel__inner { max-width: 560px; margin: 0 auto; }

.cookie-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--stone);
  gap: 16px;
}

.cookie-switch {
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  border: 1px solid var(--stone);
  background: var(--stone);
  position: relative;
  cursor: pointer;
  padding: 0;
}

.cookie-switch[aria-pressed="true"] {
  background: var(--amber);
  border-color: var(--amber);
}

.cookie-switch.is-locked { opacity: 0.5; cursor: not-allowed; }

.cookie-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.cookie-switch[aria-pressed="true"] .cookie-switch__knob {
  transform: translateX(22px);
}

.cookie-panel__save { margin-top: 20px; width: 100%; }

.landing-hero-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-bottom: 32px;
}

.who-band p { color: var(--text-on-light); }

.landing-h1 { max-width: 65%; }

@media (max-width: 768px) {
  .landing-h1 { max-width: 100%; }
}
