/* BLUE HOUR PRESS — journalwave.life */
:root {
  --indigo: #16203A;
  --paper: #EEF1F6;
  --sea-glass: #2E7D74;
  --sea-glass-light: #3a9689;
  --ink-muted: #5a6478;
  --rule: rgba(22, 32, 58, 0.12);
  --shadow: 0 12px 40px rgba(22, 32, 58, 0.08);
  --radius: 4px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;
  --max-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--indigo);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sea-glass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--sea-glass-light);
}

:focus-visible {
  outline: 2px solid var(--sea-glass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--indigo);
  color: var(--paper);
  font-weight: 600;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.75rem;
}

/* Header */
.site-header {
  background: var(--indigo);
  color: var(--paper);
  padding: 1.25rem var(--gutter);
  border-bottom: 3px solid var(--sea-glass);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
}

.site-brand__name:hover { color: #fff; }

.site-brand__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 241, 246, 0.65);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-nav a {
  color: rgba(238, 241, 246, 0.88);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Main layout */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.page-lead {
  font-size: 1.125rem;
  color: var(--ink-muted);
  max-width: 42rem;
  margin: 0 0 2rem;
}

.dateline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea-glass);
  margin-bottom: 1.5rem;
}

/* Article */
.article-body p {
  margin: 0 0 1.35rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--sea-glass);
  background: rgba(46, 125, 116, 0.06);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
}

.article-body figure {
  margin: 2.5rem 0;
}

.article-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.65rem;
  letter-spacing: 0.03em;
}

/* Hero variants */
.hero-full {
  margin: 2rem calc(-1 * var(--gutter)) 2.5rem;
  max-width: none;
  width: calc(100% + 2 * var(--gutter));
}

.hero-full img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.article-body figure img {
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(22, 32, 58, 0.1);
}

.hero-press {
  position: relative;
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-press img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.hero-press__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(22, 32, 58, 0.85));
  color: var(--paper);
}

.hero-press__overlay h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0;
}

/* Portrait */
.portrait-grid {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.portrait-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .portrait-grid { grid-template-columns: 1fr; }
}

/* Stacks archive */
.stacks-hero {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stacks-hero img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
}

.stacks-hero figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding: 0.65rem 0 0;
}

.stack-group {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.stack-group:last-child { border-bottom: none; }

.stack-group h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0 0 0.35rem;
}

.stack-group__distance {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea-glass);
  margin-bottom: 1.25rem;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.note-list li:last-child { border-bottom: none; }

.note-list a {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--indigo);
  text-decoration: none;
}

.note-list a:hover { color: var(--sea-glass); text-decoration: underline; }

.note-list .meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

.note-list--with-thumb li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.note-list--with-thumb a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 12rem;
}

.note-list--with-thumb img {
  width: 5rem;
  height: 3.25rem;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22, 32, 58, 0.12);
}

.note-list--with-thumb .meta {
  margin-top: 0;
  flex-shrink: 0;
}

.contact-photo {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-photo img {
  width: 100%;
  max-height: 20rem;
  object-fit: cover;
}

.contact-photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding: 0.65rem 0 0;
}

/* Find Me layout with MAP-A side */
.find-me-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .find-me-layout { grid-template-columns: 1fr; }
}

.contact-block {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.contact-block dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea-glass);
  margin-top: 1rem;
}

.contact-block dt:first-child { margin-top: 0; }

.contact-block dd {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

/* Map sections */
.map-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.map-section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.map-embed iframe {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: #ddd;
  box-shadow: 0 4px 16px rgba(22, 32, 58, 0.08);
}

/* MAP-A: side column */
.map-section--a .map-embed iframe { height: 320px; }

/* MAP-B: below article, wider */
.map-section--b .map-embed iframe { height: 280px; }

/* MAP-C: compact footer band */
.map-section--c {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: rgba(22, 32, 58, 0.04);
  border-radius: var(--radius);
  border-top: none;
}

.map-section--c .map-embed iframe { height: 220px; }

/* MAP-D: minimal strip */
.map-section--d .map-embed iframe { height: 180px; opacity: 0.92; }

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 180px;
  padding: 2rem;
  background: rgba(22, 32, 58, 0.06);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  text-align: center;
}

.map-placeholder p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  max-width: 28rem;
}

.map-placeholder[hidden],
.map-embed[hidden] { display: none !important; }

.btn-load-map {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.25rem;
  background: var(--sea-glass);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-load-map:hover { background: var(--sea-glass-light); }

/* Footer */
.site-footer {
  background: var(--indigo);
  color: rgba(238, 241, 246, 0.85);
  padding: 2.5rem var(--gutter);
  margin-top: 2rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea-glass);
  margin: 0 0 0.75rem;
}

.site-footer p, .site-footer address {
  margin: 0 0 0.5rem;
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.site-footer a {
  color: rgba(238, 241, 246, 0.9);
}

.site-footer a:hover { color: #fff; }

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgba(238, 241, 246, 0.45);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(238, 241, 246, 0.12);
  grid-column: 1 / -1;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--indigo);
  color: var(--paper);
  padding: 1.25rem var(--gutter);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 0.35s ease, opacity 0.35s ease;
  border-top: 3px solid var(--sea-glass);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner.is-dismissed {
  transform: translateY(110%);
}

.cookie-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.cookie-banner__text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cookie-banner__text a { color: #8fd4cb; }

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.cookie-btn--accept {
  background: var(--sea-glass);
  color: #fff;
  border-color: var(--sea-glass);
}

.cookie-btn--accept:hover { background: var(--sea-glass-light); }

.cookie-btn--reject {
  background: transparent;
  color: var(--paper);
  border-color: rgba(238, 241, 246, 0.35);
}

.cookie-btn--reject:hover { border-color: var(--paper); }

.cookie-btn--customise {
  background: rgba(238, 241, 246, 0.1);
  color: var(--paper);
  border-color: rgba(238, 241, 246, 0.2);
}

.cookie-btn--customise:hover { background: rgba(238, 241, 246, 0.18); }

/* Cookie modal */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(22, 32, 58, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}

.cookie-modal-overlay[hidden] { display: none; }

.cookie-modal {
  background: var(--paper);
  color: var(--indigo);
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cookie-modal h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0 0 0.75rem;
}

.cookie-modal p {
  font-size: 0.9375rem;
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
}

.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.cookie-toggle label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.cookie-toggle span {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  display: block;
}

.cookie-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--sea-glass);
}

.cookie-modal__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 4rem var(--gutter);
}

.error-page .page-title {
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--sea-glass);
}

.error-page p {
  max-width: 32rem;
  margin: 0 auto 2rem;
  color: var(--ink-muted);
}

.btn-home {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  background: var(--indigo);
  color: var(--paper);
  text-decoration: none;
  border-radius: var(--radius);
}

.btn-home:hover {
  background: var(--sea-glass);
  color: #fff;
}

/* Legal pages */
.legal-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.legal-body h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-body ul, .legal-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.legal-body li { margin-bottom: 0.5rem; }

.manage-cookies-btn {
  margin: 2rem 0;
}
