/* ============================================================
   Anne Frehill — Historical Fiction Author
   Editorial elegant theme: cream, wine & gold
   ============================================================ */

:root {
  --cream:      #f2ece0;
  --cream-2:    #efe7d7;
  --white:      #fffdf9;
  --paper:      #fbf8f1;
  --ink:        #2b2320;
  --ink-soft:   #5a4f47;
  --wine:       #7b2d3a;
  --wine-dark:  #5e2029;
  --gold:       #b08d34;
  --gold-soft:  #c9a961;
  --line:       rgba(43, 35, 32, 0.14);

  --serif: "Playfair Display", Georgia, serif;
  --body:  "EB Garamond", Georgia, serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* leave room for the fixed nav when jumping to an anchor */
section[id], [id="top"] { scroll-margin-top: 86px; }

body {
  font-family: var(--body);
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.2rem);
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
}

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

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

em { font-style: italic; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; }

::selection { background: var(--wine); color: var(--cream); }

/* Slim wine bar across the very top — matches Anne's jacket */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--wine);
  z-index: 400;
  pointer-events: none;
}

/* ---------- Shared helpers ---------- */
.kicker {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 1.1rem;
}
.kicker--light { color: var(--gold-soft); }

.section__head { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.4rem, 5vw, 3rem); }
.section__head h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--ink);
}
.section__head h2 em { color: var(--wine); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95em 1.9em;
  border: 1px solid var(--wine);
  transition: all 0.4s var(--ease);
  cursor: pointer;
}
.btn--sm { padding: 0.75em 1.6em; font-size: 0.82rem; margin-top: 1.6rem; }
.btn--solid { background: var(--wine); color: var(--cream); }
.btn--solid:hover {
  background: var(--white);
  color: var(--wine);
  border-color: var(--wine);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(94, 32, 41, 0.20);
}
.btn--ghost { background: transparent; color: var(--wine); }
.btn--ghost:hover {
  background: var(--white);
  color: var(--wine);
  border-color: var(--wine);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(94, 32, 41, 0.20);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.5s var(--ease);
  padding: 1.4rem 0;
}
.nav--scrolled {
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.85rem 0;
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav__links { display: flex; gap: 2.4rem; }
.nav__links a {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--wine);
  transition: width 0.4s var(--ease);
}
.nav__links a:hover { color: var(--wine); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.nav--open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav--open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem clamp(1.4rem, 5vw, 3rem) 4rem;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(176,141,52,0.10), transparent 55%),
    linear-gradient(160deg, var(--paper), var(--cream-2));
}
.hero__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 1.4rem;
}
.hero__name {
  font-size: clamp(3.6rem, 9vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.hero__name::after {
  content: "";
  display: block;
  width: 90px; height: 3px;
  background: var(--gold);
  margin-top: 1.6rem;
}
.hero__tag {
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 34ch;
  font-style: italic;
  margin-bottom: 2.4rem;
}
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__photo { position: relative; }
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(43,35,32,0.28);
  position: relative;
  z-index: 2;
}
.hero__photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  z-index: 1;
}
.hero__photo figcaption {
  position: absolute;
  bottom: 1rem; left: 1rem;
  z-index: 3;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--white);
}
.about .section__head { margin-bottom: 3.4rem; }
.about__body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.about__col p { margin-bottom: 1.3rem; color: var(--ink-soft); }
.about__col .lede {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
}
.about__col strong { color: var(--wine); font-weight: 600; }

.about__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1.4rem;
}
.fact:first-child { padding-left: 0; }
.fact:not(:first-child) { border-left: 1px solid var(--line); }
.fact__num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--wine);
  line-height: 1;
}
.fact__lbl {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.about__anthologies {
  max-width: var(--maxw);
  margin: 3.5rem auto 0;
  padding: 0 clamp(1.4rem, 5vw, 3rem);
}
.about__anthologies h3 {
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 1rem;
  font-family: var(--body);
  font-weight: 500;
}
.about__anthologies ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.about__anthologies li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink-soft);
}
.about__anthologies li::before {
  content: "❧";
  position: absolute; left: 0;
  color: var(--gold);
}

/* ============================================================
   CASTLE BAND
   ============================================================ */
.band { position: relative; }
.band--castle {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
/* the photo — brightened & saturated so the summer sky reads vibrant blue */
.band--castle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/trim-castle.jpg") center 18% / cover no-repeat;
  filter: saturate(1.4) brightness(1.1) contrast(1.04);
  z-index: 0;
}
/* keep the sky bright up top, darken only the lower third for readable text */
.band--castle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(90,150,205,0.04) 0%,
      rgba(60,90,130,0.08) 42%,
      rgba(34,26,30,0.52) 76%,
      rgba(43,20,26,0.85) 100%);
  z-index: 1;
}
.band__overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 2rem 1.6rem clamp(2.6rem, 6vw, 4.8rem);
}
.band__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.1vw, 1.85rem);
  line-height: 1.5;
  color: var(--cream);
  text-shadow: 0 3px 22px rgba(0,0,0,0.7);
}
.band__cite {
  margin-top: 1.4rem;
  font-family: var(--body);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.band__cite em { text-transform: none; letter-spacing: 0.03em; font-style: italic; }

/* ============================================================
   BOOKS
   ============================================================ */
.books {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--cream);
}
.books .section__head { margin-bottom: 4rem; text-align: center; }
.books .books__intro {
  font-size: clamp(1.4rem, 2.9vw, 2.2rem);
  font-weight: 500;
  line-height: 1.4;
  max-width: 24ch;
  margin: 0 auto;
  color: var(--ink);
}

.book {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.4rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.book + .book { border-top: 1px solid var(--line); }
.book--reverse .book__cover { order: 2; }
.book--reverse .book__info { order: 1; }

.book__cover { position: relative; }
.book__cover img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 0 24px 50px rgba(43,35,32,0.32);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.book__cover:hover img { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 34px 64px rgba(43,35,32,0.4); }
.book__badge {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: var(--wine);
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5em 1.1em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(94,32,41,0.35);
}

.book__meta {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.book__title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.book__text p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.book__hook { color: var(--ink) !important; font-weight: 500; }
.book__invite {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--wine) !important;
}
.book__review {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.4rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}
.book__review cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* ============================================================
   PODCAST
   ============================================================ */
.podcast {
  background: var(--white);
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 3rem);
  text-align: center;
}
.podcast__inner { max-width: 680px; margin: 0 auto; }
.podcast h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.podcast__text {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 2.4rem;
}
.podcast__text strong { color: var(--wine); font-weight: 600; }
.podcast__player {
  max-width: 560px;
  margin: 0 auto 2rem;
}
.podcast__player iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43, 35, 32, 0.16);
}
.podcast__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: #1db954;
  color: #fff;
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9em 2em;
  border-radius: 50px;
  border: 1px solid #1db954;
  transition: all 0.4s var(--ease);
}
.podcast__spotify { width: 26px; height: 26px; flex-shrink: 0; }
.podcast__btn:hover {
  background: #1aa34a;
  border-color: #1aa34a;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(29, 185, 84, 0.32);
}
.podcast__note {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-style: italic;
}

/* ============================================================
   BUY
   ============================================================ */
.buy {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.buy__rose {
  order: 2;
  position: relative;
  min-height: 100%;
  background-image: url("img/yellow-rose.jpg");
  background-size: cover;
  background-position: center;
}
.buy__content {
  order: 1;
  position: relative;
  z-index: 2;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.6rem, 4vw, 4rem);
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.buy__content h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--ink); margin-bottom: 1rem; }
.buy__sub { color: var(--ink-soft); margin-bottom: 2.6rem; font-size: 1.15rem; }
.buy__links { display: flex; flex-direction: column; gap: 0.9rem; max-width: 460px; margin: 0 auto; }
.store {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.5rem 1.05rem 1.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
              transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* gold accent bar that grows in from the left edge on hover */
.store::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.store__logo { display: inline-flex; flex-shrink: 0; }
.store__logo svg { width: 82px; height: auto; display: block; }
.amz-word {
  font-family: "Arial", "Helvetica Neue", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  fill: var(--ink);
  transition: fill 0.4s var(--ease);
}
.amz-smile { fill: none; stroke: #ff9900; stroke-width: 2.6; stroke-linecap: round; }
.amz-head { fill: #ff9900; }

.store__region {
  flex: 1;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}
.store__flag { font-size: 1.35rem; line-height: 1; transition: transform 0.4s var(--ease); }
.store:hover {
  background: var(--white);
  color: var(--wine);
  border-color: var(--wine);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(94, 32, 41, 0.16);
}
.store:hover::before { width: 6px; background: var(--wine); }
.store:hover .amz-word { fill: var(--wine); }
.store:hover .store__region { color: var(--wine); }
.store:hover .store__flag { transform: scale(1.15); }

/* ============================================================
   CLOSING QUOTE
   ============================================================ */
.closing {
  padding: clamp(5rem, 12vw, 9rem) clamp(1.4rem, 5vw, 3rem);
  background: var(--white);
  text-align: center;
}
.closing__inner { max-width: 760px; margin: 0 auto; }
.closing__quote {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
  position: relative;
  padding-top: 3rem;
}
.closing__quote::before {
  content: "“";
  position: absolute;
  top: -1.4rem; left: 50%;
  transform: translateX(-50%);
  font-size: 7rem;
  color: var(--gold);
  opacity: 0.35;
  font-family: var(--serif);
}
.closing__author {
  margin-top: 1.6rem;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--wine);
  color: var(--cream);
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.footer__name {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}
.footer__meta {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.6rem;
}
.footer__copy { font-size: 0.85rem; color: rgba(246,241,231,0.5); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  /* full-screen, fully opaque menu — cannot show the page behind it */
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: 2;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    padding: 2rem;
    background: var(--cream);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s var(--ease);
  }
  .nav--open .nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__links a { font-size: 1.4rem; letter-spacing: 0.16em; }

  /* keep brand + close button above the open menu */
  .nav__brand { position: relative; z-index: 3; }
  .nav__toggle { display: flex; z-index: 3; }

  /* CRITICAL: no backdrop-filter/filter/transform on the nav, or it becomes the
     containing block for the fixed full-screen menu and collapses it to the bar.
     Use a solid background on the scrolled nav instead of a blur. */
  .nav--scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--cream);
  }

  .hero { min-height: auto; padding-top: 8rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__photo { max-width: 380px; }
  .hero__photo::before { inset: 12px -12px -12px 12px; }

  .about__body { grid-template-columns: 1fr; }

  .band--castle { min-height: 68vh; }
  .band--castle::before { background-position: center 22%; }

  .buy { grid-template-columns: 1fr; }
  .buy__rose { order: -1; min-height: 42vh; }

  .book, .book--reverse .book__cover, .book--reverse .book__info { grid-template-columns: 1fr; order: unset; }
  .book { text-align: center; }
  .book__cover { margin-bottom: 1rem; }
  .book__review { text-align: left; }
  .book__text { text-align: left; }
}

@media (max-width: 460px) {
  .fact { padding: 0 0.8rem; }
  .fact__lbl { font-size: 0.72rem; letter-spacing: 0.04em; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   PRINT / PDF EXPORT
   ============================================================ */
@media print {
  @page { size: 1240px 1754px; margin: 0; }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .nav { position: absolute !important; }
  .band--castle { background-attachment: scroll !important; }
  .book, .about__body, .buy { break-inside: avoid; }
}
