/**
 * Echo Pond V5 - The Local Project Style
 * Clean, contemplative editorial design
 */

/* ============================================
   CSS Reset & Base
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1a1a1a;
  background-color: #fff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  line-height: 1.3;
}

/* ============================================
   Audio Toggle
   ============================================ */

.audio-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 101;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.audio-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.audio-toggle.muted {
  opacity: 0.5;
}

.audio-toggle.muted .audio-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.audio-icon {
  position: relative;
  font-size: 1rem;
}

/* ============================================
   Site Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 2rem;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.site-header.hidden {
  transform: translateY(-100%);
}

.site-logo {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1a1a;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}

.site-nav--centered {
  justify-content: center;
}

.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #666;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #1a1a1a;
}

/* Nav Toggle */
.nav-toggle {
  position: absolute;
  right: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Phones and small tablets: the page row stays put; only the section row scrolls */
@media (max-width: 767px) {
  .site-header {
    padding: 0;
    display: block;
  }

  .site-nav,
  .site-nav.site-nav--centered {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem 0;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.9rem;
    font-size: 0.9375rem;
    white-space: nowrap;
  }

  /* The drawer duplicates the two rows; keep it off */
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #1a1a1a;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

/* Mobile Menu - Slide-in Drawer */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  z-index: 99;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Overlay behind drawer */
.mobile-menu::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 280px;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.mobile-menu.is-open::before {
  background: rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-menu-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a1a1a;
}

/* ============================================
   Hero Video
   ============================================ */

.hero-video {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  color: #fff;
  text-align: center;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-overlay {
    padding: 4rem 2rem;
  }

  .hero-title {
    font-size: 4rem;
  }

  .hero-tagline {
    font-size: 1.75rem;
  }
}

/* ============================================
   Article Layout
   ============================================ */

.article {
  padding-top: 0; /* No padding needed - hero is full height */
}

/* Hero Image */
.hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-image {
    aspect-ratio: 16 / 9;
  }
}

/* Article Header */
.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.article-tagline {
  font-family: 'Lora', serif;
  font-size: 1.125rem;
  font-style: italic;
  color: #555;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .article-header {
    padding: 4rem 2rem 3rem;
  }

  .article-title {
    font-size: 2.25rem;
  }

  .article-tagline {
    font-size: 1.25rem;
  }
}

/* Article Body */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.article-body--first {
  padding-top: 0;
}

.hero-spacer {
  height: 4rem;
}

@media (min-width: 768px) {
  .hero-spacer {
    height: 6rem;
  }
}

/* Drop Cap */
.drop-cap::first-letter {
  float: left;
  font-family: 'Lora', serif;
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  color: #1a1a1a;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body .lead {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: #333;
}

.article-body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e5e5;
  scroll-margin-top: 5rem;
}

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

@media (min-width: 768px) {
  .article-body {
    padding: 0 2rem 4rem;
  }

  .article-body .lead {
    font-size: 1.1875rem;
    line-height: 1.8;
  }
}

/* Blockquotes */
.article-body blockquote {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

.article-body blockquote p {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.article-body blockquote cite {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #666;
}

@media (min-width: 768px) {
  .article-body blockquote {
    margin: 3rem -2rem;
    padding: 2.5rem 2rem;
  }

  .article-body blockquote p {
    font-size: 1.375rem;
  }
}

/* ============================================
   Images
   ============================================ */

/* Full Width Image */
.full-image {
  margin: 0 0 3rem;
}

.full-image img,
.full-image video {
  width: 100%;
}

.full-video {
  display: block;
}

.full-image figcaption {
  max-width: 680px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #888;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .full-image {
    margin: 0 0 4rem;
  }

  .full-image figcaption {
    padding: 0 2rem;
  }
}

/* Image Grid */
.image-grid {
  display: grid;
  gap: 1rem;
  margin: 0 0 3rem;
  padding: 0 1.5rem;
}

.image-grid figure {
  overflow: hidden;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-grid figcaption {
  margin-top: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #888;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) {
  .image-grid {
    gap: 2rem;
    margin-bottom: 4rem;
    padding: 0 2rem;
  }
}

/* Three Column Grid */
.image-grid--three {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .image-grid--three {
    grid-template-columns: repeat(3, 1fr);
  }

  .image-grid--three img {
    aspect-ratio: 3 / 4;
  }
}

/* Four Column Grid */
.image-grid--four {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .image-grid--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .image-grid--four {
    grid-template-columns: repeat(4, 1fr);
  }

  .image-grid--four img {
    aspect-ratio: 3 / 4;
  }
}

/* ============================================
   Article Credits
   ============================================ */

.article-credits {
  max-width: 680px;
  margin: 2rem auto 0;
  padding: 3rem 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.article-credits h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: #888;
}

.credits-grid {
  display: grid;
  gap: 1rem;
}

.credit {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.credit-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.credit-value {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: #1a1a1a;
}

@media (min-width: 640px) {
  .credits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 3rem;
  }
}

@media (min-width: 768px) {
  .article-credits {
    padding: 4rem 2rem;
  }

  .credits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Related Projects
   ============================================ */

.related {
  padding: 4rem 1.5rem;
  background: #f8f8f8;
}

.related h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2rem;
  color: #888;
}

.related-grid {
  display: grid;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.related-item {
  display: block;
}

.related-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}

.related-item:hover img {
  opacity: 0.85;
}

.related-title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.related-location {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #888;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 768px) {
  .related {
    padding: 5rem 2rem;
  }
}

/* ============================================
   Site Footer
   ============================================ */

.site-footer {
  padding: 3rem 1.5rem 2rem;
  background: #000;
  color: #fff;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
}

.footer-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo-img {
  height: 24px;
  width: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  color: #888;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-brand p {
  font-family: 'Lora', serif;
  font-size: 0.9375rem;
  color: #888;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #888;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #888;
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: #fff;
}

.footer-music {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  text-align: center;
  color: #666;
}

.footer-music a {
  color: #888;
  transition: color 0.2s ease;
}

.footer-music a:hover {
  color: #fff;
}

.footer-copyright {
  max-width: 1200px;
  margin: 1rem auto 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-align: center;
  color: #666;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 4rem 2rem 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr auto auto;
    align-items: start;
    gap: 4rem;
  }
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .site-header,
  .nav-toggle,
  .mobile-menu,
  .related,
  .site-footer {
    display: none;
  }

  .article {
    padding-top: 0;
  }

  .article-body {
    max-width: 100%;
  }
}

/* Links inside captions (credits) */
figcaption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

figcaption a:hover {
  color: #1a1a1a;
}

/* Two-level header: pages on top, article sections beneath */
.site-nav a.is-current {
  color: #1a1a1a;
}

.site-header--sub {
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
}

.site-subnav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.site-subnav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #888;
  transition: color 0.2s ease;
}

.site-subnav a:hover {
  color: #1a1a1a;
}

.site-subnav a.is-active {
  color: #1a1a1a;
}

/* The section row never pushes the page wider than the screen */
.site-subnav {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-subnav::-webkit-scrollbar {
  display: none;
}

/* Tablets and small laptops */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Start-aligned so a long row can scroll to its first link;
     auto margins still center a row that fits. */
  .site-subnav {
    gap: 0.25rem;
    justify-content: flex-start;
  }

  .site-subnav a:first-child {
    margin-left: auto;
  }

  .site-subnav a:last-child {
    margin-right: auto;
  }

  .site-subnav a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .site-header--sub {
    gap: 0.25rem;
    padding-bottom: 0.35rem;
  }
}

/* Phones */
@media (max-width: 767px) {
  .site-header--sub {
    gap: 0;
    padding-bottom: 0;
  }

  .site-subnav {
    justify-content: flex-start;
    gap: 0;
    padding: 0 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* Fade at both edges signals that the row swipes */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.75rem), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.75rem), transparent 100%);
  }

  /* Centered when the links fit, left-aligned and swipeable when they do not */
  .site-subnav a:first-child {
    margin-left: auto;
  }

  .site-subnav a:last-child {
    margin-right: auto;
  }

  .site-subnav a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 0.8rem;
    font-size: 0.875rem;
    color: #666;
    white-space: nowrap;
    scroll-snap-align: center;
  }
}

/* Phones: larger reading text, narrower side margins */
@media (max-width: 639px) {
  .article-header {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .article-body {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .article-body p,
  .article-body .lead {
    font-size: 1.1875rem;
    line-height: 1.7;
  }

  .article-tagline {
    font-size: 1.1875rem;
  }

  .full-image figcaption,
  .image-grid figcaption {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .image-grid {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .article-credits {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .article-body blockquote p {
    font-size: 1.3125rem;
  }
}
