/* COPPER PULSE — thoughtwave.life */
:root {
  --charcoal: #1A1F1C;
  --night: #0A0D0B;
  --paper: #ECEAE4;
  --paper-warm: #F5F3ED;
  --copper: #A66B3A;
  --copper-light: #c48452;
  --fog: #4A524C;
  --fog-light: #6B746E;
  --stone: #3D4540;
  --rule: rgba(166, 107, 58, 0.22);
  --font-display: "Literata", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-width: 74rem;
  --measure: 42rem;
  --rail-width: 3.5rem;
  --gutter: clamp(1.35rem, 4.5vw, 2.75rem);
  --section-y: clamp(3rem, 7vw, 5rem);
  --radius-sm: 4px;
  --shadow-soft: 0 4px 28px rgba(10, 13, 11, 0.1);
  --shadow-lift: 0 16px 48px rgba(10, 13, 11, 0.14);
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

html.js .band-edge { opacity: 0; transform: translateX(12px); }
html.js .band-edge.is-visible { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .band-edge { opacity: 1; transform: none; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--charcoal);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(166, 107, 58, 0.06), transparent 60%),
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 40%, var(--paper) 100%);
  -webkit-font-smoothing: antialiased;
}

/* Layout helpers */
.content-wrap {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.content-narrow {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

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

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

a:hover, a:focus-visible { color: var(--copper-light); }

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

/* Header */
.site-header {
  background: var(--night);
  color: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(166, 107, 58, 0.12);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(236, 234, 228, 0.88);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

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

/* Page shell with right rail */
.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr var(--rail-width);
  gap: 0;
}

.page-main { min-width: 0; }

.pulse-rail {
  position: relative;
  padding-top: 2rem;
}

.pulse-rail-inner {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fog);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse-rail-inner span { opacity: 0.6; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; }
  .pulse-rail { display: none; }
}

/* Bands */
.band {
  padding: var(--section-y) 0;
  position: relative;
}

.article-shell {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  max-width: var(--measure);
  margin: 0 auto;
}

.page-section {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.band-ink {
  background: var(--night);
  color: var(--paper);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.band-ink a { color: var(--copper-light); }

.band-ink .eyebrow { color: var(--fog-light); }

.band-paper { background: transparent; }

.band-stone {
  background: linear-gradient(165deg, #3d4540 0%, var(--stone) 50%, #3a423d 100%);
  color: var(--paper);
}

.band-stone .photo-caption,
.band-stone .map-note { color: rgba(236, 234, 228, 0.92); }

.band-edge {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.band-edge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--copper);
  opacity: 0.35;
}

/* Typography */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
}

.band-ink .eyebrow { color: rgba(236, 234, 228, 0.82); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1rem;
}

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

h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--copper);
}

.dateline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 0.75rem;
}

.article-body {
  max-width: var(--measure);
}

.article-body > p {
  margin: 0 0 1.35rem;
  color: var(--charcoal);
}

.copper-dot::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--copper);
  border-radius: 50%;
  margin-right: 0.75rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.lead {
  font-size: 1.375rem;
  line-height: 1.6;
  font-family: var(--font-display);
}

/* Photos */
.photo-frame {
  border: 1px solid rgba(74, 82, 76, 0.28);
  padding: 6px;
  background: var(--paper-warm);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.photo-frame img {
  border-radius: 1px;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.photo-caption {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--stone);
  margin-top: 0.75rem;
  line-height: 1.55;
}

.photo-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.photo-grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Note cards */
.note-stream {
  padding: 0 var(--gutter) var(--section-y);
  max-width: var(--max-width);
  margin: 0 auto;
}

.note-card {
  display: grid;
  gap: 1.75rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease;
}

.note-card:first-child { border-top: none; padding-top: 0; }

.note-card:hover {
  background: rgba(166, 107, 58, 0.04);
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  border-radius: var(--radius-sm);
}

.note-card:hover h3 { color: var(--copper); }

.note-card-wide {
  grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
}

.note-card-row {
  grid-template-columns: 1fr min(220px, 38%);
  align-items: center;
  gap: 2rem;
}

.note-card-row .photo-frame img {
  aspect-ratio: 4 / 3;
}

@media (max-width: 640px) {
  .note-card-row { grid-template-columns: 1fr; }
  .note-card:hover {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

.note-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0.35rem 0 0.65rem;
  transition: color 0.2s ease;
}

.note-card p {
  margin: 0;
  color: var(--stone);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Archive groups */
.archive-group { margin-bottom: 3rem; }

.archive-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.archive-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(26, 31, 28, 0.1);
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: background 0.2s ease;
}

.archive-card:hover {
  background: rgba(166, 107, 58, 0.04);
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  border-radius: var(--radius-sm);
}

.archive-card:hover h3 { color: var(--copper); }

.archive-card .photo-frame img {
  aspect-ratio: 1;
  object-fit: cover;
}

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

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

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

.disclaimer-band {
  border: 1px solid var(--rule);
  padding: 1.75rem 2rem;
  margin: 2.5rem 0 0;
  background: rgba(245, 243, 237, 0.85);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.disclaimer-band h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

.contact-details {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 2;
}

.contact-details a { text-decoration: none; }

/* Maps */
.map-strip {
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--night);
}

.map-strip iframe {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
  filter: saturate(0.85) contrast(1.05);
}

.map-band {
  padding: 2rem var(--gutter);
  background: var(--stone);
}

.map-band-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.map-band iframe {
  width: 100%;
  height: 300px;
  border: 0;
  filter: saturate(0.9);
}

.map-primary iframe {
  width: 100%;
  height: 480px;
  border: 1px solid var(--copper);
  filter: saturate(0.88);
}

@media (max-width: 768px) {
  .map-primary iframe { height: 300px; }
  .map-band iframe { height: 200px; }
}

.map-card {
  max-width: 28rem;
  margin: 1.5rem 0;
}

.map-card iframe {
  width: 100%;
  height: 170px;
  border: 1px solid var(--rule);
  filter: saturate(0.85);
}

.map-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fog);
  margin-top: 0.65rem;
  line-height: 1.5;
}

.map-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog-light);
  margin-bottom: 0.65rem;
}

.map-strip .map-eyebrow {
  padding: 0.85rem var(--gutter);
  margin: 0;
  background: var(--night);
  color: rgba(236, 234, 228, 0.82);
}

/* Pulled quote */
.pulled-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-style: italic;
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  color: var(--charcoal);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(245, 243, 237, 0.75);
  line-height: 1.55;
}

/* Footer */
.site-footer {
  background: var(--night);
  color: var(--fog);
  padding: 3rem var(--gutter);
  font-size: 0.9375rem;
  line-height: 1.7;
}

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

.footer-inner a { color: var(--copper-light); text-decoration: none; }

.footer-inner a:hover { text-decoration: underline; }

.footer-inner p {
  color: rgba(236, 234, 228, 0.82);
}

.footer-title {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--fog-light);
}

.footer-links { margin-top: 1rem; }

/* End strip */
.end-strip {
  padding: 2.5rem 0 0;
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.end-strip a { text-decoration: none; font-weight: 500; }

/* Legal pages */
.legal-body h2 {
  margin-top: 2.5rem;
  font-size: 1.25rem;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  columns: 2;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(26, 31, 28, 0.05);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  line-height: 1.8;
  color: var(--stone);
}

.legal-index span {
  display: block;
  break-inside: avoid;
}

@media (max-width: 480px) {
  .legal-index { columns: 1; }
}

/* 404 */
.error-page {
  text-align: center;
  padding: 4rem var(--gutter);
  min-height: 50vh;
}

.error-page h1 { font-size: 2.5rem; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--night);
  color: var(--paper);
  border-top: 2px solid var(--copper);
  padding: 1.25rem var(--gutter);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

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

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cookie-text {
  flex: 1 1 280px;
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.5;
}

.cookie-text a { color: var(--copper-light); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
  border-color: var(--copper);
  background: rgba(166, 107, 58, 0.15);
}

.cookie-btn-primary {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--paper);
}

.cookie-btn-primary:hover {
  background: var(--copper-light);
  border-color: var(--copper-light);
}

.cookie-panel {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stone);
  display: none;
}

.cookie-panel.is-open { display: block; }

.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(74, 82, 76, 0.4);
  gap: 1rem;
}

.cookie-category-label {
  font-size: 0.9375rem;
}

.cookie-category-desc {
  font-size: 0.8125rem;
  color: var(--fog);
  margin-top: 0.25rem;
}

.cookie-toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--fog);
  cursor: not-allowed;
  border-radius: 2px;
  min-width: 3.5rem;
}

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

.cookie-toggle:not([disabled]) {
  cursor: pointer;
}

.cookie-toggle:not([disabled]):hover {
  border-color: var(--copper);
}

.cookie-panel-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

/* Hero bleed photo */
.hero-bleed {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--section-y) * 0.75);
  padding-bottom: calc(var(--section-y) * 0.75);
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

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

.hero-photo-bleed {
  margin-right: 0;
}

.hero-photo-bleed img {
  width: 100%;
  object-fit: cover;
  max-height: 440px;
  aspect-ratio: 3 / 2;
}

.hero-intro {
  padding-top: calc(var(--section-y) * 0.6);
  padding-bottom: calc(var(--section-y) * 0.4);
}

.text-muted {
  color: var(--stone);
  line-height: 1.75;
  font-size: 1.0625rem;
}

.hero-card {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.feature-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

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

.page-title {
  margin-bottom: 0.5rem;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Motion */
html.js .photo-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html.js .photo-reveal { opacity: 1; transform: none; }
}

/* Manage cookies button on cookies page */
.manage-cookies-btn {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--copper);
  background: var(--copper);
  color: var(--paper);
  cursor: pointer;
  border-radius: 2px;
  margin: 1.5rem 0;
}

.manage-cookies-btn:hover {
  background: var(--copper-light);
  border-color: var(--copper-light);
}
