/* ===================================================================
   Morgan Mae — author site
   Dark mystery theme: ink/midnight base, gold + arcane-violet accents.
   Single-page layout. No build step — plain HTML/CSS.
   =================================================================== */

:root {
  --ink:        #14121d;   /* page background */
  --ink-2:      #1c1a2b;   /* raised surface  */
  --panel:      #232136;   /* cards           */
  --panel-2:    #2b2842;   /* card hover      */
  --line:       #3a3653;   /* hairline border */
  --gold:       #e0b15f;   /* primary accent  */
  --gold-soft:  #f0d49a;
  --violet:     #9a86c8;   /* arcane accent   */
  --violet-dim: #6f5fa0;
  --text:       #ece8e0;   /* body text       */
  --text-dim:   #a39fb2;   /* muted text      */
  --teal:       #5fb0a8;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Fixed gothic-city backdrop as a pinned, viewport-sized layer behind all
   content. Using a position:fixed pseudo-element (instead of
   background-attachment:fixed) keeps it reliable on mobile — it avoids the iOS
   fixed-attachment bug AND the "scroll + cover = giant zoom" problem on long
   pages. The dark gradient is a veil so text stays readable. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(18, 16, 26, .58), rgba(18, 16, 26, .74)),
    url('media/bg-city.jpg') center center / cover no-repeat;
}
/* On phones the viewport is tall+narrow, so bias the crop upward to keep the
   moon + spires in frame. Swap to a mobile-specific image here if ever needed. */
@media (max-width: 880px) {
  body::before {
    background:
      linear-gradient(rgba(18, 16, 26, .55), rgba(18, 16, 26, .78)),
      url('media/bg-city.jpg') center 32% / cover no-repeat;
  }
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-soft); }

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

em { color: var(--gold-soft); font-style: italic; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--violet);
  font-weight: 500;
}

/* ----------------------------- NAV ----------------------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 18, 29, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  max-width: 1300px; margin: 0 auto;
  padding: 0 1.5rem; min-height: 64px;
}
.brand {
  flex: none;
  font-family: var(--serif);
  font-size: 1.6rem; font-weight: 600;
  color: var(--gold); letter-spacing: .04em;
}
.brand:hover { color: var(--gold-soft); }
.site-nav nav { flex: 1; display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.site-nav nav a {
  color: rgba(236, 232, 224, .85);
  font-size: .95rem; letter-spacing: .02em;
}
.site-nav nav a:hover { color: var(--gold); }
.nav-actions { flex: none; display: flex; align-items: center; gap: .25rem; }
.nav-action-link { color: rgba(236, 232, 224, .85); font-size: .95rem; white-space: nowrap; padding: 0 .5rem; }
.nav-action-link:hover { color: var(--gold); }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--text); }
.nav-icon:hover { color: var(--gold); }
.nav-icon svg { width: 22px; height: 22px; }
@media (max-width: 1024px) {
  .nav-inner { flex-direction: column; gap: .6rem; padding: .8rem 1.5rem; }
  .site-nav nav { flex: none; }
}

/* ----------------------------- HERO ----------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 7rem 1.5rem 6rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(154, 134, 200, .18), transparent 70%),
    linear-gradient(180deg, rgba(28, 26, 43, .35), rgba(20, 18, 29, .6));
}
.hero-glow {
  position: absolute; left: 50%; top: 38%;
  width: 520px; height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(224, 177, 95, .14), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3.4rem, 9vw, 6rem);
  margin: .6rem 0 .2rem;
  letter-spacing: .01em;
}
.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.hero-blurb {
  color: var(--text-dim);
  max-width: 540px; margin: 0 auto 2.2rem;
  font-size: 1.02rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ----------------------------- BUTTONS ----------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 500;
  font-size: .92rem; letter-spacing: .04em;
  padding: .85rem 1.7rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #c9923f);
  color: #1a1626;
}
.btn-primary:hover { color: #1a1626; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); }
.btn-ghost {
  background: transparent;
  border-color: var(--violet-dim);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--violet); color: var(--gold-soft); }
.btn-sm { padding: .6rem 1.2rem; font-size: .84rem; }

/* ----------------------------- SECTIONS ----------------------------- */
.section { padding: 5.5rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-head h2,
.section-about h2,
.section-news h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .5rem 0; }
.section-sub { color: var(--text-dim); font-size: 1.02rem; }

/* ----------------------------- SERIES ROWS ----------------------------- */
/* Each series: the book cover floats over the page background, blurb beside
   it. No card, no panel, no dividers — cover + text sit on the page itself. */
.series-list { display: flex; flex-direction: column; gap: 4rem; }

.series-row {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 3rem;
  align-items: center;
}

/* the placeholder cover keeps its 2:3 shape; just float it with a shadow */
.series-cover {
  border-bottom: none;
  border-radius: 4px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .6);
}

/* translucent "glass" frame around each real cover (à la darklingcollective) */
.cover-frame {
  padding: 2.4rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(2px) saturate(120%);
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .05);
  overflow: hidden;
}
/* the cover image inside the frame */
img.series-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  transition: transform .3s ease;   /* drives the hover zoom */
}
/* hovering directly over a cover zooms it in within its frame */
.cover-frame:hover img.series-cover {
  transform: scale(1.06);
}

/* 3D mouse-pan tilt — JS sets the transform on the frame / placeholder cover
   (see index.html); this just gives it depth + a smooth follow/return. */
.book-cover,
.cover-frame {
  transform-style: preserve-3d;
  transition: transform .12s ease-out;
  will-change: transform;
}

.series-blurb {
  display: flex; flex-direction: column;
  gap: .65rem;
}
.series-blurb h3 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--text); }
.series-blurb .eyebrow { margin-top: .15rem; }

/* buy buttons (Stripe Payment Links) + secondary Amazon link */
.buy-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .9rem;
  margin-top: .8rem;
}
.amazon-link { font-size: .85rem; color: var(--text-dim); }
.amazon-link:hover { color: var(--gold); }

.book-tag { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.4; }
.book-desc { color: var(--text-dim); font-size: .95rem; }

/* ----- placeholder book covers (CSS-generated; swap for <img>) ----- */
.book-cover {
  aspect-ratio: 2 / 3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .6rem;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.cover-mark { font-size: 2.6rem; opacity: .9; }
.cover-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.5rem; line-height: 1.2;
  color: #fdf6e6;
}
.cover-byline {
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.cover-note {
  position: absolute; bottom: .7rem;
  font-size: .62rem; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}
.cover-amber  { background: linear-gradient(160deg, #6b4a1e, #2c1d10); }
.cover-violet { background: linear-gradient(160deg, #3f2d5e, #1f1430); }
.cover-teal   { background: linear-gradient(160deg, #1f4a4a, #11242b); }
.cover-ghost  { background: linear-gradient(160deg, #34404a, #181d24); }
.cover-lg { max-width: 280px; }

/* ----------------------------- BADGES ----------------------------- */
.badge {
  align-self: flex-start;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 2px;
}
.badge-free   { background: var(--gold); color: #1a1626; }
.badge-series { background: rgba(154, 134, 200, .18); color: var(--violet); border: 1px solid var(--violet-dim); }
.badge-soon   { background: rgba(95, 176, 168, .16); color: var(--teal); border: 1px solid var(--teal); }

/* ----------------------------- COMING SOON ----------------------------- */
.section-coming { padding-top: 1rem; }
.coming-card {
  background: linear-gradient(135deg, var(--ink-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}
.coming-body { display: flex; flex-direction: column; gap: .8rem; }
.coming-body h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.coming-hint { color: var(--text-dim); font-size: .95rem; margin-top: .4rem; }

/* ----------------------------- ABOUT ----------------------------- */
.section-about { }
.about-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: center;
}
.portrait-ph {
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--violet-dim);
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .5rem;
  color: var(--text-dim);
  background: var(--ink-2);
}
.portrait-ph span { font-size: 2.6rem; }
.portrait-ph small { letter-spacing: .15em; text-transform: uppercase; font-size: .65rem; }
.about-text p { color: var(--text-dim); margin-bottom: 1rem; }
.about-text > p:first-of-type { margin-top: .5rem; }
.about-sign { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--gold); }

/* ----------------------------- NEWSLETTER ----------------------------- */
.section-news {
  text-align: center;
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(224, 177, 95, .1), transparent 70%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.news-inner { max-width: 600px; margin: 0 auto; }
.news-form {
  display: flex; gap: .8rem; justify-content: center;
  margin: 2rem auto 0; flex-wrap: wrap;
}
.news-form input {
  flex: 1; min-width: 240px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--sans); font-size: .95rem;
  padding: .85rem 1rem;
}
.news-form input:focus { outline: none; border-color: var(--gold); }
.news-fineprint { color: var(--text-dim); font-size: .8rem; margin-top: 1rem; }

/* ----------------------------- FOOTER ----------------------------- */
.site-footer {
  background: transparent;
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  text-align: center;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.footer-brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--text); }
.footer-tag { color: var(--text-dim); font-style: italic; font-family: var(--serif); }
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; margin: .6rem 0; }
.footer-nav a { color: var(--text-dim); font-size: .88rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { color: var(--text-dim); font-size: .8rem; }

/* ----------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 880px) {
  .series-row { grid-template-columns: 1fr; gap: 1.8rem; justify-items: center; }
  .cover-frame { width: 300px; max-width: 82%; }
  .series-blurb { text-align: center; align-items: center; }
  .series-blurb .badge { align-self: center; }
  .buy-row { justify-content: center; }
  .coming-card { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .coming-card .book-cover { margin: 0 auto; }
  .about-inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .about-portrait { max-width: 280px; margin: 0 auto; }
  .about-text .badge, .about-sign { align-self: center; }
}
@media (max-width: 560px) {
  .hero { padding: 4.5rem 1.2rem 4rem; }
  .section { padding: 4rem 1.2rem; }
  .coming-card { padding: 2rem 1.4rem; }
  .site-nav nav { gap: 1rem; }
}
