/* Andiron — Unified Stylesheet (Pico override layer) */

:root[data-theme="dark"] {
  --pico-background-color: #0d0d0d;
  --pico-color: #e0dcd4;
  --pico-primary: #c8613a;
  --pico-primary-hover: #d4734e;
  --pico-muted-color: rgba(224,220,212,0.5);
  --pico-card-background-color: #1a1714;
  --pico-card-border-color: #2e2925;
  --pico-font-family: 'Cormorant Garamond', Georgia, serif;
  --pico-font-size: 100%;
  --pico-block-spacing-vertical: 0;
  --pico-block-spacing-horizontal: 0;
  color-scheme: dark;
}

:root {
  --ash:    #e0dcd4;
  --ember:  #c8613a;
  --coal:   #0d0d0d;
  --iron:   #1a1714;
  --smoke:  #2e2925;
  --dim:    rgba(224,220,212,0.35);
}

html { font-size: 16px; }

body {
  background-color: var(--coal);
  background-image: url('sparks.jpg');
  background-repeat: repeat;
  background-size: 512px 512px;
  color: var(--ash);
  font-family: 'Cormorant Garamond', Georgia, serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Pico resets we need to undo */
article, section, header, nav { margin: 0; padding: 0; }
a { color: var(--ash); }
a:hover { color: var(--ember); }

/* ==============================================
   NAV / HEADER
   ============================================== */
header {
  z-index: 50;
  padding: 1.2rem 2.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--smoke);
  background-color: var(--coal);
  background-image: url('sparks.jpg');
  background-repeat: repeat;
  background-size: 512px 512px;
}
nav {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  width: 100%;
  position: relative;
}
.nav-right {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-left: auto;
}
.hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ash);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.hamburger:hover { color: var(--ember); }
.wordmark {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
}
.wordmark:hover { color: var(--ember); }
.tagline-nav {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-style: italic;
  color: var(--ash);
  letter-spacing: 0.06em;
}
.nav-link {
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: underline;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--ember); }
.nav-link + .nav-link { margin-left: 0; }

/* ==============================================
   FOOTER
   ============================================== */
footer {
  z-index: 49;
  padding: 1.8rem 2.5rem;
  padding-bottom: 1.5em !important;
  border-top: 1px solid var(--smoke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--coal);
  background-image: url('sparks.jpg');
  background-repeat: repeat;
  background-size: 512px 512px;
}
.copy {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--ash);
  font-family: 'Cinzel', serif;
}
.back-link {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ember); }

/* ==============================================
   ANIMATION
   ============================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   HERO (index.html)
   ============================================== */
.hero-image {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--smoke);
  background: var(--coal);
  padding: 0;
}
.hero-image img {
  width: 80%;
  height: 55vw;
  max-height: 65vh;
  object-fit: cover;
  object-position: center 75%;
  display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}
.hero-title {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.pre-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1rem;
}
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ash);
}
.hero-page h1 {
  font-size: clamp(3.4rem, 8vw, 6rem);
  line-height: 1.0;
}
h1 em {
  font-style: italic;
  color: rgba(224,220,212,0.75);
}

/* ==============================================
   BODY COPY (index.html)
   ============================================== */
.body-copy {
  padding: 5rem 2.5rem 6rem;
  flex: 1;
  display: flex;
  justify-content: center;
}
.content-col {
  max-width: 720px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.9s ease both;
  animation-delay: 0.15s;
}
.drop-cap {
  font-size: 2.3rem;
  line-height: 1.8;
  color: rgba(224,220,212,0.8);
  margin-bottom: 1.8rem;
}
.body-copy p {
  font-size: 2.1rem;
  line-height: 1.9;
  color: rgba(224,220,212,0.62);
  margin-bottom: 1.6rem;
  font-weight: 300;
}
.body-copy p em {
  font-style: italic;
  color: rgba(224,220,212,0.82);
}
blockquote {
  margin: 2.8rem 0;
  padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--ember);
  font-size: 2rem;
  line-height: 1.75;
  font-style: italic;
  color: rgba(224,220,212,0.75);
  font-weight: 300;
}
blockquote .ref {
  display: block;
  margin-top: 0.8rem;
  font-size: 1.6rem;
  font-style: normal;
  color: var(--ember);
  letter-spacing: 0.04em;
}

/* ==============================================
   POEM (the-invisible-floor.html)
   ============================================== */
.poem-section {
  padding: 5rem 2.5rem 7rem;
  flex: 1;
  display: flex;
  justify-content: center;
}
.poem-col {
  max-width: 696px;
  width: 100%;
  animation: fadeUp 0.9s ease both;
  animation-delay: 0.1s;
}
.poem-label {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.4rem;
}
.poem-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-style: italic;
  color: var(--ash);
  letter-spacing: 0.03em;
  margin-bottom: 4rem;
}
.poem-body {
  font-size: 2.1rem;
  line-height: 1.85;
  font-weight: 300;
  color: var(--ash);
}
.stanza {
  margin-bottom: 2.2rem;
}
.stanza p {
  margin: 0;
  line-height: 2.0;
}
.attribution {
  text-align: right;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-style: italic;
  color: var(--ash);
  margin-top: 3rem;
}
.poem-divider {
  margin: 3.5rem 0;
  border: none;
  border-top: 1px solid var(--smoke);
  width: 3rem;
}

/* ==============================================
   ARTICLE (the-address.html)
   ============================================== */
.article-section {
  padding: 5rem 2.5rem 7rem;
  flex: 1;
  display: flex;
  justify-content: center;
}
.article-col {
  max-width: 744px;
  width: 100%;
  animation: fadeUp 0.9s ease both;
  animation-delay: 0.1s;
}
.article-label {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.4rem;
}
.article-body {
  font-size: 2.1rem;
  line-height: 1.9;
  font-weight: 300;
  color: rgba(224,220,212,0.72);
}
.article-body p {
  margin-bottom: 1.8rem;
}
.article-body p em {
  font-style: italic;
  color: var(--ash);
}
.first-line {
  font-size: 2.3rem;
  font-style: italic;
  color: var(--ash);
  margin-bottom: 2.2rem;
}
.section-break {
  margin: 2.8rem 0;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}
.motto {
  margin-top: 3rem;
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--ash);
}


/* ==============================================
   TOC DROPDOWN
   ============================================== */
.toc-wrapper {
  position: relative;
}
.toc-toggle {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
  padding: 0;
}
.toc-toggle:hover { color: var(--ember); }
.toc-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.8rem;
  background: var(--iron);
  border: 1px solid var(--smoke);
  padding: 1.2rem 0;
  min-width: 26rem;
  z-index: 100;
  flex-direction: column;
}
.toc-wrapper.open .toc-menu {
  display: flex;
}
.toc-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  line-height: 1.4;
  color: rgba(224,220,212,0.6);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
  display: block;
}
.toc-menu a:hover {
  color: var(--ash);
}
.toc-menu a.active {
  color: var(--ember);
  font-weight: 600;
}
.toc-menu a[style*="padding-left"] {
  font-size: 1.44rem;
}

/* ==============================================
   CONTINUE LINK (footer)
   ============================================== */
.continue-link {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: underline;
  transition: color 0.2s;
}
.continue-link:hover { color: var(--ember); }

/* ==============================================
   NAV ACTIVE STATE
   ============================================== */
.nav-link.active {
  color: var(--ember);
}

/* ==============================================
   SCROLL PROGRESS BAR
   ============================================== */
.scroll-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 64px;
  width: 0%;
  background: url('assets/flamebar.png') repeat-x left center;
  background-size: auto 64px;
  z-index: 200;
  pointer-events: none;
  transition: none;
}

/* footer is sticky, no extra padding needed */


/* ==============================================
   RESPONSIVE — MOBILE
   ============================================== */
@media (max-width: 768px) {
  /* Header compact */
  header { padding: 0.8rem 1.2rem; }

  .tagline-nav { display: none; }

  .hamburger { display: block; }

  .nav-right {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--iron);
    border-bottom: 1px solid var(--smoke);
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
  }
  .nav-right.open { display: flex; }

  .nav-right .nav-link {
    margin-left: 0;
    padding: 0.6rem 1.2rem;
    font-size: 1.3rem;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid var(--smoke);
  }

  /* TOC inline on mobile (no dropdown, just flows in the menu) */
  .nav-right .toc-wrapper { width: 100%; }
  .nav-right .toc-toggle { display: none; }
  .nav-right .toc-menu {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    min-width: 0;
    padding: 0;
    margin: 0;
  }
  .nav-right .toc-menu a {
    padding: 0.5rem 1.2rem;
    font-size: 1.3rem;
  }
  .nav-right .toc-menu a[style*="padding-left"] {
    font-size: 1.2rem;
  }

  /* Hero scales down */
  .hero-image img {
    width: 100%;
    height: 45vw;
    max-height: 40vh;
  }
  .hero-title {
    bottom: 1.2rem;
    left: 1.2rem;
  }
  .pre-heading { font-size: 1.2rem; }
  h1 { font-size: clamp(2rem, 5vw, 3rem); }
  .hero-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); }

  /* Content padding */
  .body-copy,
  .article-section,
  .poem-section { padding: 2.5rem 1.2rem 4rem; }

  .body-copy p,
  .article-body,
  .poem-body { font-size: 1.7rem; }

  .drop-cap,
  .first-line { font-size: 1.9rem; }

  blockquote { font-size: 1.6rem; }

  /* Footer compact */
  footer {
    padding: 1rem 1.2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .continue-link { font-size: 1.2rem; }
  .copy { font-size: 1.1rem; }

  /* Flame bar thinner on mobile */
  .scroll-progress { height: 48px; }
  footer { bottom: 48px; }
}
