/*
Theme Name: Abby McKeena — The Fog Archive
Theme URI: https://abbymckeena.com
Author: Vigart Creative Solutions LLC
Description: A bilingual, atmospheric author website designed to showcase English and Spanish editions of Abby McKeena's work.
Version: 1.3.4
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: abby-mckeena
*/

:root {
  --ink: #070b0d;
  --ink-soft: #0e1517;
  --fog: #dfe5e2;
  --bone: #f3efe7;
  --pine: #263b36;
  --pine-light: #779189;
  --ember: #c56650;
  --amber: #d6a267;
  --line: rgba(243, 239, 231, 0.24);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bone);
  background: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: .8rem 1rem;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: var(--bone);
  color: var(--ink);
}

.site-header {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 5rem);
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(3,7,9,.82), rgba(3,7,9,.05));
}
.brand {
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  letter-spacing: .19em;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.3rem); }
.site-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  color: rgba(255,255,255,.86);
}
.site-nav a:hover,
.site-nav a:focus-visible { color: #fff; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  border: 0;
  padding: .45rem .62rem;
  color: var(--bone);
  background: transparent;
  cursor: pointer;
  font: 700 .68rem/1 var(--sans);
}
.lang-toggle button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(0,0,0,.22);
  color: white;
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 19px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition: .25s ease;
}

.hero {
  position: relative;
  min-height: 920px;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 8.5rem clamp(1.25rem, 5vw, 6rem) 5rem;
  background: #10191b;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 68% 42%, rgba(80,108,117,.25), transparent 38%), linear-gradient(120deg, #05090b 0%, #0c1518 52%, #080c0e 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .25;
  background:
    radial-gradient(ellipse at 40% 45%, rgba(226,234,231,.24), transparent 45%),
    linear-gradient(115deg, transparent 30%, rgba(223,229,226,.14) 48%, transparent 64%);
  animation: fog-shift 18s ease-in-out infinite alternate;
}
@keyframes fog-shift { to { transform: translate3d(2.5%, -1%, 0) scale(1.04); opacity: .36; } }
.hero-inner {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(390px, .78fr) minmax(560px, 1.22fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}
.hero-mockup { position: relative; margin: 0; min-width: 0; }
.hero-mockup::after { content: ""; position: absolute; inset: 8% 5% 3%; z-index: -1; background: rgba(93,128,137,.2); filter: blur(45px); border-radius: 50%; }
.hero-mockup img { width: 100%; border-radius: 51% 49% 46% 54% / 43% 48% 52% 57%; filter: drop-shadow(0 30px 45px rgba(0,0,0,.55)); }
.hero-mockup figcaption { margin-top: .85rem; color: rgba(255,255,255,.55); font-size: .72rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.book-section { background: linear-gradient(180deg, #101719, #080c0e); }
.book-section-heading { margin-bottom: clamp(3rem, 6vw, 6rem); text-align: center; }
.book-section-heading .section-title,
.book-section-heading .section-intro { margin-left: auto; margin-right: auto; }
.book-showcase { width: min(820px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.book-edition { min-width: 0; text-align: center; }
.book-cover-wrap {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 28px 35px rgba(0,0,0,.48));
  transition: transform .35s ease, filter .35s ease;
}
.book-edition:hover .book-cover-wrap { transform: translateY(-8px); filter: drop-shadow(0 36px 42px rgba(0,0,0,.6)); }
.book-cover-wrap::before {
  content: "";
  position: absolute;
  inset: 2% -4% -3% 5%;
  z-index: -1;
  background: #111;
  transform: perspective(800px) rotateY(-8deg);
  border-radius: 2px;
}
.book-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid rgba(255,255,255,.35); }
.edition-label { margin: 0; font: 600 .72rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--fog); }
.book-title { margin: .5rem 0 0; min-height: 2.4em; font: 400 clamp(1.25rem, 1.8vw, 1.75rem)/1.15 var(--serif); letter-spacing: .04em; }
.format-list { display: flex; justify-content: center; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 1rem; }
.format-list span { padding: .28rem .6rem; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.2); }
.purchase-row { display: grid; gap: .55rem; }
.mini-buy {
  display: block;
  padding: .7rem .75rem;
  border: 1px solid rgba(255,255,255,.3);
  text-decoration: none;
  font-size: .72rem;
  letter-spacing: .07em;
  background: rgba(5,9,11,.42);
  transition: background .2s ease, border-color .2s ease;
}
.mini-buy:hover,
.mini-buy:focus-visible { background: rgba(197,102,80,.86); border-color: var(--ember); }
.mini-buy.is-pending { opacity: .72; cursor: not-allowed; }

.hero-copy { max-width: 660px; }
.eyebrow { margin: 0 0 1rem; color: #e6a38f; font-size: .74rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; }
.hero h1,
.section-title { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: .015em; line-height: 1.03; }
.hero h1 { font-size: clamp(3.15rem, 5.4vw, 6.2rem); }
.hero-deck { max-width: 590px; margin: 1.5rem 0 0; font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.8rem); color: rgba(255,255,255,.9); }
.genre-line { display: flex; flex-wrap: wrap; gap: .65rem 1rem; margin: 1.8rem 0; color: rgba(255,255,255,.7); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-note { max-width: 560px; color: rgba(255,255,255,.7); font-size: .94rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: .8rem 1.25rem;
  border: 1px solid rgba(255,255,255,.5);
  text-decoration: none;
  letter-spacing: .05em;
  background: rgba(5,9,11,.35);
}
.button.primary { border-color: var(--ember); background: #8f3029; }
.button:hover,
.button:focus-visible { background: var(--bone); color: var(--ink); }

.section { padding: clamp(4.5rem, 8vw, 8.5rem) clamp(1.25rem, 5vw, 6rem); }
.section-inner { width: min(1320px, 100%); margin: 0 auto; }
.section-kicker { margin: 0 0 .8rem; color: var(--ember); text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; font-weight: 700; }
.section-title { max-width: 900px; font-size: clamp(2.5rem, 5vw, 5.2rem); }
.section-intro { max-width: 760px; margin: 1.4rem 0 0; color: rgba(255,255,255,.72); font-size: 1.05rem; }
.story-section { background: var(--bone); color: #16201e; }
.story-section .section-intro { color: #4a5753; }
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 7rem); margin-top: 3.5rem; align-items: start; }
.story-copy { font-family: var(--serif); font-size: clamp(1.2rem, 1.7vw, 1.45rem); }
.story-copy p:first-child::first-letter { float: left; margin: .06em .12em 0 0; color: #83372f; font-size: 4.2rem; line-height: .78; }
.archive-card { position: relative; min-height: 420px; padding: 2rem; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; color: white; background: url("assets/fog-hero.jpg") 70% center / cover; border-radius: 48% 52% 44% 56% / 38% 42% 58% 62%; }
.archive-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,8,9,.9), rgba(4,8,9,.05)); }
.archive-card > * { position: relative; }
.archive-card h3 { margin: 0; font: 400 2rem/1.1 var(--serif); }
.archive-card p { margin: .65rem 0 0; color: rgba(255,255,255,.75); }
.about-section { background: #101718; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 8rem); align-items: center; }
.author-placeholder { min-height: 540px; display: grid; place-items: center; padding: 2rem; border: 1px solid var(--line); border-radius: 52% 48% 57% 43% / 45% 53% 47% 55%; background: linear-gradient(145deg, #263b36, #0b1012); text-align: center; color: rgba(255,255,255,.64); }
.about-copy p { max-width: 700px; color: rgba(255,255,255,.72); font-size: 1.05rem; }
.journal-section { background: #d9dfdb; color: #17201e; }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.journal-card { min-height: 330px; padding: 1.7rem; display: flex; flex-direction: column; justify-content: flex-end; color: white; text-decoration: none; background: linear-gradient(0deg, rgba(5,9,10,.92), rgba(5,9,10,.18)), url("assets/fog-hero.jpg") center / cover; overflow: hidden; }
.journal-card:nth-child(2) { background-position: 25% center; }
.journal-card:nth-child(3) { background-position: 80% center; }
.journal-card h3 { margin: 0; font: 400 1.65rem/1.12 var(--serif); }
.journal-card p { margin: .55rem 0 0; color: rgba(255,255,255,.72); }
.newsletter-section { text-align: center; background: #080d0f; }
.newsletter-section .section-title,
.newsletter-section .section-intro { margin-left: auto; margin-right: auto; }
.newsletter-form { display: flex; max-width: 620px; margin: 2rem auto 0; }
.newsletter-form input { flex: 1; min-width: 0; padding: 1rem; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: white; font: inherit; }
.newsletter-form button { padding: 1rem 1.3rem; border: 1px solid var(--ember); background: #8f3029; color: white; font: 700 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.form-note { min-height: 1.5rem; margin-top: .8rem; color: var(--pine-light); font-size: .85rem; }
.site-footer { padding: 3rem clamp(1.25rem, 5vw, 6rem); border-top: 1px solid var(--line); background: #050809; }
.footer-inner { width: min(1320px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.footer-brand { margin: 0; font: 400 1.45rem/1 var(--serif); letter-spacing: .14em; }
.footer-copy { margin: .65rem 0 0; color: rgba(255,255,255,.55); font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: rgba(255,255,255,.68); font-size: .82rem; }

.content-shell { min-height: 80vh; padding: 10rem clamp(1.25rem, 5vw, 6rem) 5rem; background: var(--ink-soft); }
.content-shell main { width: min(900px, 100%); margin: auto; }
.content-shell h1 { font: 400 clamp(2.5rem, 6vw, 5.2rem)/1.05 var(--serif); }
.content-shell .entry-content { color: rgba(255,255,255,.75); }

@media (max-width: 1050px) {
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 6rem 12vw;
    background: rgba(4,8,10,.98);
    transition: opacity .22s ease, visibility .22s ease;
  }
  .site-nav.is-open { z-index: 60; opacity: 1; visibility: visible; }
  .site-nav a { font: 400 clamp(1.8rem, 7vw, 3rem)/1.2 var(--serif); text-transform: none; letter-spacing: .02em; }
  .site-nav .lang-toggle { margin-top: 1rem; }
  .menu-toggle { display: block; position: relative; z-index: 70; }
  .menu-toggle[aria-expanded="true"] span { opacity: 0; }
  .menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
  .hero { min-height: auto; padding-top: 8rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; margin: auto; }
  .hero-mockup { width: min(920px, 100%); margin: 1rem auto 0; }
  .genre-line, .cta-row { justify-content: center; }
  .hero-note { margin-left: auto; margin-right: auto; }
  .book-showcase { width: min(760px, 100%); margin: auto; }
}

@media (max-width: 720px) {
  .site-header { padding: 1.1rem 1rem; }
  .brand { font-size: 1.05rem; letter-spacing: .12em; }
  .hero { padding: 7rem 1rem 4rem; background-position: 62% center; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.25rem); }
  .hero-deck { font-size: 1.18rem; }
  .book-showcase { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero-mockup img { min-height: 390px; object-fit: cover; object-position: 64% center; border-radius: 47% 53% 49% 51% / 42% 46% 54% 58%; }
  .book-cover-wrap { width: min(74vw, 315px); }
  .purchase-row { width: min(82vw, 360px); margin: auto; }
  .section { padding-left: 1rem; padding-right: 1rem; }
  .story-grid, .about-grid, .journal-grid { grid-template-columns: 1fr; }
  .author-placeholder { min-height: 420px; }
  .newsletter-form { flex-direction: column; gap: .6rem; }
  .newsletter-form button { min-height: 50px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}


/* Preserve the complete approved book composition at every screen size. */
.hero-inner { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
.hero-mockup img { height: auto; min-height: 0; object-fit: contain; border-radius: 0; }
section[id] { scroll-margin-top: 2rem; }
@media (max-width: 1050px) { .hero-inner { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .hero-mockup { width: 100%; } .hero-mockup figcaption { font-size: .65rem; letter-spacing: .06em; } }

/* Home is a single presentation; each navigation item loads its own document. */
.abby-view-home .site-footer { display: none; }
.home-screen .hero { min-height: 100svh; padding: 7rem 4vw 2rem; }
.home-screen .hero-inner { grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); grid-template-rows: auto auto; column-gap: 4vw; row-gap: 1rem; }
.hero-heading { grid-column: 1; grid-row: 1; align-self: end; }
.hero-details { grid-column: 1; grid-row: 2; align-self: start; }
.home-screen .hero-mockup { grid-column: 2; grid-row: 1 / 3; }
.home-screen .hero h1 { font-size: clamp(2.8rem, 5vw, 5.5rem); }
.home-screen .hero-deck { font-size: clamp(1.05rem, 1.5vw, 1.4rem); margin-top: 0; }
.home-screen .genre-line { margin: 1rem 0; }
.home-screen .cta-row { margin-top: 1.2rem; }
.interior-page { padding-top: 6rem; min-height: 80svh; }
.interior-page > .section:first-child { padding-top: 3rem; }
.interior-page .section-title { font-size: clamp(2.3rem,4vw,4rem); }
.site-nav { max-height: 100dvh; overflow-y: auto; }
@media (max-width: 1050px) {
 .home-screen .hero { padding-top: 7rem; }
 .home-screen .hero-inner { display: flex; flex-direction: column; gap: 1.3rem; }
 .hero-heading { order: 0; align-self: center; text-align: center; }
 .home-screen .hero-mockup { order: 1; width: min(740px,100%); margin: 0; }
 .hero-details { order: 2; align-self: center; text-align: center; max-width: 650px; }
 .home-screen .hero h1 { font-size: clamp(2.5rem,8vw,4rem); }
 .home-screen .hero-mockup img { max-height: 42svh; width: 100%; object-fit: contain; }
}
@media (min-width: 1051px) and (min-height: 700px) {
 .home-screen .hero { height: 100svh; min-height: 0; }
 .home-screen .hero-mockup img { max-height: 68svh; }
}
@media (max-width: 720px) {
 .home-screen .hero { padding: 6.5rem 1rem 2rem; }
 .home-screen .eyebrow { font-size: .65rem; letter-spacing: .16em; }
 .home-screen .hero-deck { font-size: 1.05rem; }
 .home-screen .hero-mockup figcaption { font-size: .6rem; }
 .site-nav { gap: 1.15rem; padding: 5rem 8vw 2rem; justify-content: flex-start; }
 .site-nav a { font-size: 1.75rem; }
}

.contact-email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.1rem, 3vw, 1.65rem); margin: .5rem 0 1.5rem; }
.contact-note { max-width: 40rem; color: var(--fog); font-size: .9rem; line-height: 1.6; margin-top: 1.5rem; }

.author-portrait { width: 100%; aspect-ratio: 1 / 1.12; border-radius: 52% 48% 57% 43% / 45% 53% 47% 55%; background-size: cover; background-position: 52% center; background-repeat: no-repeat; overflow: hidden; border: 1px solid var(--line); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }

.specters-feature {
  width: min(100% - 2rem, 74rem);
  margin: clamp(2rem, 6vw, 5rem) auto;
  border: 1px solid rgba(220, 174, 117, .38);
  background: #0d1317;
  color: var(--bone);
}
.specters-cover {
  display: flex;
  align-items: end;
  min-height: clamp(21rem, 51vw, 32rem);
  padding: clamp(1.5rem, 6vw, 5rem);
  background: linear-gradient(90deg, rgba(5, 9, 13, .80), rgba(5, 9, 13, .08)),
              linear-gradient(0deg, #080e13, transparent 86%),
              url('assets/specters-forest.jpg') center 54% / cover;
}
.specters-cover > div { max-width: 38rem; }
.specters-label {
  margin: 0 0 .65rem;
  color: #f1bf86;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.specters-title {
  margin: 0 0 .7rem;
  font: 400 clamp(3rem, 9vw, 7rem)/.95 var(--serif);
}
.specters-hook { margin: 0 0 1.3rem; font-size: clamp(1.05rem, 2.4vw, 1.45rem); }
.specters-copy {
  max-width: 46rem;
  margin: auto;
  padding: clamp(1.4rem, 5vw, 3.6rem);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.75;
}
.specters-copy p:first-child { margin-top: 0; }
.specters-copy p:last-child { margin-bottom: 0; color: #f1bf86; }
.journal-section .specters-feature { width: 100%; margin-block: 2rem 3rem; }
