/* ============================================================
   Cascadia.me — Living Watershed homepage prologue
   Phase 2: sustained reading, illustrated plates, quiet utility
   ============================================================ */

.home-page {
  --lw-cream-50: #fbf7ee;
  --lw-cream-100: #f2e9d7;
  --lw-ocean-900: #063b5c;
  --lw-ocean-700: #075a78;
  --lw-glacial-500: #2faab3;
  --lw-camas-600: #65529a;
  --lw-coral-600: #c44737;
  --lw-sun-400: #e8b934;
  --lw-spruce-700: #2f5a43;
  --lw-basalt-900: #232d31;
  --lw-rain-300: #c9d3da;
  --lw-line: #d8cfbc;
  --lw-text: #24343b;
  --lw-muted: #53656b;

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --color-stone: var(--lw-ocean-900);
  --color-timber: var(--lw-muted);
  --color-fog: var(--lw-line);
  --color-cloud: var(--lw-cream-100);
  --color-white: var(--lw-cream-50);
  --color-lantern: var(--lw-sun-400);
  --color-lantern-dim: #865c12;
  --color-lantern-glow: #fff0bd;
  --color-water: var(--lw-ocean-700);
  --color-alert: var(--lw-coral-600);
  --color-safe: var(--lw-spruce-700);
  --page-width: 90rem;
  --content-width: 46rem;
  --nav-height: 4.25rem;
  --home-section-space: clamp(4rem, 6vw, 6.25rem);
  --home-flow-space: clamp(2.5rem, 4vw, 4rem);

  color: var(--lw-text);
  background: var(--lw-cream-50);
  font-family: var(--font-body);
}

.home-page main {
  overflow: clip;
}

.home-page h1,
.home-page h2,
.home-page h3,
.home-page h4 {
  color: var(--lw-ocean-900);
  font-family: var(--font-display);
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 3px solid var(--lw-cream-50);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--lw-ocean-900);
}

.home-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  color: var(--lw-cream-50);
  background: var(--lw-ocean-900);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.home-skip-link:focus {
  transform: translateY(0);
}

.home-container {
  width: min(100% - clamp(2rem, 6vw, 6rem), 90rem);
  margin-inline: auto;
}

.home-reading-column {
  width: min(100% - clamp(2rem, 6vw, 6rem), 46rem);
  margin-inline: auto;
}

.home-eyebrow,
.home-chapter-mark {
  margin: 0 0 1rem;
  color: var(--lw-spruce-700);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.45;
  text-transform: uppercase;
}

.home-reading-column > h2,
.home-author-note h2 {
  margin: 0;
  color: var(--lw-ocean-900);
  font-size: clamp(3.15rem, 5.2vw, 5.25rem);
  font-weight: 500;
  letter-spacing: -0.048em;
  line-height: 0.96;
}

.home-prose {
  margin-top: clamp(1.8rem, 3vw, 2.65rem);
}

.home-prose p {
  margin: 0;
  color: var(--lw-text);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.5vw, 1.35rem);
  letter-spacing: -0.006em;
  line-height: 1.72;
}

.home-prose p + p {
  margin-top: 1.45em;
}

.home-continuation,
.home-contents-link {
  margin: 2rem 0 0;
}

.home-continuation a,
.home-contents-link a,
.home-chapter-link,
.home-author-links a {
  color: var(--lw-ocean-700);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.23em;
}

.home-continuation a:hover,
.home-contents-link a:hover,
.home-chapter-link:hover,
.home-author-links a:hover {
  color: var(--lw-coral-600);
}

/* Header */

.home-page .site-header {
  background: rgba(251, 247, 238, 0.94);
  border-bottom-color: rgba(6, 59, 92, 0.11);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.home-page .site-header.scrolled {
  border-bottom-color: rgba(6, 59, 92, 0.18);
  box-shadow: 0 8px 30px rgba(6, 59, 92, 0.07);
}

.home-page .nav-inner {
  max-width: 90rem;
  gap: 1rem;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.home-page .nav-logo {
  color: var(--lw-ocean-900);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 600;
}

.home-page .nav-logo span {
  color: inherit;
  font-weight: inherit;
}

.home-page .nav-logo:hover,
.home-page .nav-links a:hover,
.home-page .nav-links a.active {
  color: var(--lw-coral-600);
}

.home-page .nav-links {
  gap: clamp(1.25rem, 2.7vw, 2.75rem);
}

.home-page .nav-links a {
  color: var(--lw-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.home-page .nav-links a.active {
  border-bottom-color: var(--lw-coral-600);
}

.home-page .share-button {
  border-color: rgba(6, 59, 92, 0.18);
  background: rgba(251, 247, 238, 0.96);
  color: var(--lw-ocean-900);
  box-shadow: none;
}

.home-page .share-button:hover {
  border-color: var(--lw-glacial-500);
  background: #e2f3f2;
  color: var(--lw-ocean-900);
  box-shadow: none;
}

.home-page .floating-share-btn {
  display: none;
}

/* Hero */

.home-hero {
  padding-top: var(--nav-height);
  background: var(--lw-cream-50);
}

.home-hero-stage {
  position: relative;
  width: min(100%, 96rem);
  min-height: clamp(43rem, 54vw, 51rem);
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--lw-line);
  background-color: var(--lw-cream-50);
}

.home-hero-picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-hero-picture > picture,
.home-hero-picture > noscript,
.home-hero-picture > noscript > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.home-hero-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(251, 247, 238, 0.995) 0%,
    rgba(251, 247, 238, 0.97) 31%,
    rgba(251, 247, 238, 0.78) 44%,
    rgba(251, 247, 238, 0) 62%
  );
}

.home-hero-copy {
  position: absolute;
  z-index: 2;
  top: clamp(5rem, 8vw, 7.2rem);
  left: clamp(1.5rem, 5vw, 5.25rem);
  width: min(48%, 44rem);
}

.home-hero-copy .home-eyebrow {
  max-width: 34rem;
  color: var(--lw-ocean-700);
}

.home-hero h1 {
  max-width: 43rem;
  margin: 0;
  color: var(--lw-ocean-900);
  font-size: clamp(4rem, 6.15vw, 6.35rem);
  font-weight: 500;
  letter-spacing: -0.057em;
  line-height: 0.89;
}

.home-hero h1 em {
  display: block;
  margin-top: 0.08em;
  color: var(--lw-spruce-700);
  font-style: normal;
}

.home-hero-lede {
  max-width: 36rem;
  margin: clamp(1.55rem, 2.8vw, 2.25rem) 0 0;
  color: var(--lw-text);
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.45vw, 1.3rem);
  letter-spacing: -0.004em;
  line-height: 1.62;
}

/* Sustained prologue */

.home-prologue {
  background: var(--lw-cream-50);
}

.home-prologue-opening {
  padding: var(--home-section-space) 0;
}

.home-prologue-opening .home-prose p:first-child {
  color: var(--lw-ocean-900);
  font-size: clamp(1.28rem, 1.8vw, 1.52rem);
}

.home-regional-passage {
  padding: var(--home-section-space) 0;
  border-top: 1px solid var(--lw-line);
  background:
    radial-gradient(circle at 6% 18%, rgba(47, 170, 179, 0.06), transparent 24rem),
    var(--lw-cream-50);
}

.home-plate {
  width: min(100% - clamp(2rem, 4vw, 4rem), 96rem);
  margin: var(--home-flow-space) auto 0;
}

.home-plate picture,
.home-plate img {
  display: block;
  width: 100%;
}

.home-plate img {
  height: auto;
}

.home-plate figcaption {
  max-width: 58rem;
  margin: 0;
  padding: 1rem 0.15rem 0;
  color: var(--lw-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  line-height: 1.58;
}

.home-watershed-plate {
  padding-top: 0;
  border-top: 1px solid rgba(6, 59, 92, 0.12);
}

.home-regional-continuation {
  padding-top: var(--home-flow-space);
}

/* Illustrated table of contents */

.home-chapter-contents {
  padding: var(--home-section-space) 0;
  border-top: 1px solid var(--lw-line);
  background:
    linear-gradient(180deg, rgba(47, 170, 179, 0.055), transparent 22rem),
    var(--lw-cream-100);
}

.home-chapters-intro {
  margin: 2rem 0 0;
  color: var(--lw-text);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.5vw, 1.35rem);
  line-height: 1.7;
}

.home-chapter-list {
  width: min(100% - clamp(2rem, 6vw, 6rem), 90rem);
  margin: var(--home-flow-space) auto 0;
  padding: 0;
  border-top: 1px solid var(--lw-line);
  list-style: none;
}

.home-chapter-entry {
  display: grid;
  grid-template-columns: minmax(15rem, 0.58fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  padding: clamp(2.25rem, 3.75vw, 3.5rem) 0;
  border-bottom: 1px solid var(--lw-line);
}

.home-chapter-heading {
  align-self: start;
}

.home-chapter-number {
  display: inline-block;
  margin-bottom: 1.1rem;
  color: var(--lw-camas-600);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.home-chapter-wildfire .home-chapter-number {
  color: var(--lw-coral-600);
}

.home-chapter-flooding .home-chapter-number {
  color: var(--lw-ocean-700);
}

.home-chapter-winter .home-chapter-number {
  color: #8a6200;
}

.home-chapter-volcano .home-chapter-number {
  color: #985139;
}

.home-chapter-heading h3 {
  margin: 0;
  font-size: clamp(2.8rem, 4.5vw, 4.65rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.home-chapter-heading h3 a {
  color: var(--lw-ocean-900);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.home-chapter-heading h3 a:hover {
  color: var(--lw-coral-600);
  text-decoration: underline;
}

.home-chapter-copy p {
  max-width: 52rem;
  margin: 0;
  color: var(--lw-text);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.35vw, 1.25rem);
  line-height: 1.7;
}

.home-chapter-link {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.6rem;
}

.home-chapter-link span {
  transition: transform 200ms ease-out;
}

.home-chapter-link:hover span {
  transform: translateX(0.25rem);
}

.home-contents-link {
  width: min(100% - clamp(2rem, 6vw, 6rem), 90rem);
  margin-inline: auto;
  text-align: right;
}

/* Two reader-facing routes that sit beside the hazard chapters */

.home-companions {
  padding: var(--home-section-space) 0;
  border-top: 1px solid var(--lw-line);
  background:
    linear-gradient(120deg, rgba(47, 170, 179, 0.07), transparent 36%),
    var(--lw-cream-50);
}

.home-companion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--home-flow-space);
  border-top: 1px solid var(--lw-line);
  border-bottom: 1px solid var(--lw-line);
}

.home-companion {
  padding: clamp(2rem, 4vw, 3.5rem) clamp(0rem, 3vw, 3.5rem);
}

.home-companion + .home-companion {
  border-left: 1px solid var(--lw-line);
}

.home-companion-label {
  margin: 0 0 0.9rem;
  color: var(--lw-coral-600);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-companion h3 {
  max-width: 31rem;
  margin: 0;
  color: var(--lw-ocean-900);
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.home-companion > p:not(.home-companion-label) {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--lw-text);
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.35vw, 1.22rem);
  line-height: 1.7;
}

.home-companion-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  font-size: 0.84rem;
  font-weight: 750;
}

/* Neighbor and household passage */

.home-neighbors {
  padding: var(--home-section-space) 0;
  border-top: 1px solid var(--lw-line);
  background:
    radial-gradient(circle at 100% 8%, rgba(232, 185, 52, 0.13), transparent 30rem),
    var(--lw-cream-50);
}

.home-neighbors-figure {
  width: min(100% - clamp(2rem, 6vw, 6rem), 90rem);
}

.home-neighbors-continuation {
  padding-top: var(--home-flow-space);
}

/* Author and evidence note */

.home-author-note {
  padding: var(--home-section-space) 0;
  border-top: 1px solid var(--lw-line);
  background:
    linear-gradient(90deg, rgba(101, 82, 154, 0.055), transparent 30%),
    var(--lw-cream-100);
}

.home-author-note-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.58fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: start;
}

.home-author-note h2 {
  font-size: clamp(3rem, 4.8vw, 4.8rem);
}

.home-author-note-copy .home-prose {
  margin-top: 0;
}

.home-author-note-copy .home-prose p {
  font-size: clamp(1.08rem, 1.3vw, 1.2rem);
  line-height: 1.72;
}

.home-review-line {
  margin: 2rem 0 0;
  color: var(--lw-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.home-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.6rem;
  margin-top: 1.4rem;
}

/* Footer */

.home-page .site-footer {
  background: var(--lw-basalt-900);
  color: var(--lw-cream-100);
}

.home-page .footer-inner {
  max-width: 90rem;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.home-page .footer-brand {
  max-width: 28rem;
}

.home-page .footer-brand h3 {
  color: var(--lw-cream-50);
  font-size: 2rem;
  font-weight: 500;
}

.home-page .footer-brand h3 span {
  color: inherit;
  font-weight: inherit;
}

.home-page .footer-brand p,
.home-page .footer-col a {
  color: rgba(251, 247, 238, 0.72);
}

.home-page .footer-col h4 {
  color: var(--lw-glacial-500);
}

.home-page .footer-col a:hover,
.home-page .footer-bottom a:hover {
  color: var(--lw-sun-400);
}

.home-page .footer-bottom {
  border-top-color: rgba(251, 247, 238, 0.17);
  color: rgba(251, 247, 238, 0.6);
}

.home-page .seasonal-footer {
  color: rgba(242, 233, 215, 0.62);
}

/* Responsive */

@media (max-width: 1100px) {
  .home-hero-copy {
    width: 54%;
  }

  .home-hero h1 {
    font-size: clamp(3.8rem, 6.8vw, 5.65rem);
  }

  .home-chapter-entry {
    grid-template-columns: minmax(13rem, 0.48fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
  }
}

@media (max-width: 860px) {
  .home-hero-stage {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .home-hero-stage::after {
    display: none;
  }

  .home-hero-copy {
    position: relative;
    top: auto;
    left: auto;
    z-index: 2;
    order: 1;
    width: auto;
    max-width: 50rem;
    padding: clamp(3.5rem, 8vw, 5.25rem) clamp(1.25rem, 6vw, 3rem) 3.5rem;
    background: var(--lw-cream-50);
  }

  .home-hero h1 {
    max-width: 44rem;
    font-size: clamp(3.8rem, 10.5vw, 5.7rem);
  }

  .home-hero-picture {
    position: relative;
    order: 2;
    height: min(66vh, 38rem);
    min-height: 28rem;
  }

  .home-hero-picture img {
    object-position: 69% center;
  }

  .home-author-note-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .home-author-note-copy {
    max-width: 46rem;
  }
}

@media (max-width: 768px) {
  .home-page .nav-inner {
    padding-inline: 1.1rem;
  }

  .home-page .nav-links {
    border-bottom-color: rgba(6, 59, 92, 0.15);
    background: var(--lw-cream-50);
    box-shadow: 0 14px 28px rgba(6, 59, 92, 0.09);
  }

  .home-chapter-entry {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .home-chapter-heading {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: baseline;
  }

  .home-chapter-number {
    margin: 0;
  }

  .home-chapter-heading h3 {
    font-size: clamp(2.75rem, 9vw, 4rem);
  }

  .home-contents-link {
    text-align: left;
  }

  .home-companion-list {
    grid-template-columns: 1fr;
  }

  .home-companion + .home-companion {
    border-top: 1px solid var(--lw-line);
    border-left: 0;
  }

  .home-page .seasonal-footer {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .home-container,
  .home-reading-column,
  .home-chapter-list,
  .home-contents-link,
  .home-companion-list,
  .home-neighbors-figure {
    width: min(100% - 2rem, 90rem);
  }

  .home-reading-column > h2,
  .home-author-note h2 {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .home-prose p,
  .home-chapters-intro {
    font-size: 1.16rem;
    line-height: 1.68;
  }

  .home-hero-copy {
    padding-inline: 1.25rem;
  }

  .home-hero h1 {
    font-size: clamp(3.2rem, 15.5vw, 4.75rem);
    line-height: 0.91;
  }

  .home-hero-lede {
    font-size: 1.08rem;
  }

  .home-hero-picture {
    height: 31rem;
    min-height: 0;
  }

  .home-plate {
    width: 100%;
  }

  .home-plate figcaption {
    padding-inline: 1rem;
  }

  .home-chapter-copy p {
    font-size: 1.12rem;
  }

  .home-author-links {
    flex-direction: column;
  }

  .home-page .feedback-widget-launcher {
    width: 3rem;
    height: 3rem;
    min-height: 3rem;
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .home-page .feedback-widget-launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .home-page .feedback-widget-icon {
    width: 1.15rem;
    height: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-skip-link,
  .home-chapter-link span {
    transition: none;
  }

  .home-chapter-link:hover span {
    transform: none;
  }
}

@media print {
  .home-page {
    color: #111;
    background: #fff;
  }

  .home-page .site-header,
  .home-page .site-footer,
  .home-page .feedback-widget {
    display: none;
  }

  .home-hero {
    padding-top: 0;
  }

  .home-hero-stage {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .home-hero-stage::after {
    display: none;
  }

  .home-hero-copy,
  .home-hero-picture {
    position: static;
    width: auto;
  }

  .home-hero-copy {
    padding: 0 0 1.5rem;
  }

  .home-hero-picture {
    height: auto;
  }

  .home-hero-picture img {
    height: auto;
    object-fit: contain;
  }

  .home-prologue-opening,
  .home-regional-passage,
  .home-chapter-contents,
  .home-neighbors,
  .home-author-note {
    padding-block: 2.5rem;
    background: #fff;
  }

  .home-plate,
  .home-chapter-entry {
    break-inside: avoid;
  }

  .home-plate {
    width: 100%;
  }

  .home-author-note-layout,
  .home-chapter-entry {
    display: block;
  }

  .home-chapter-copy {
    margin-top: 1rem;
  }
}
