/* ==========================================================================
   CLARA NOCTURNE — SHARED STYLESHEET (used by all 11 pages)

   Quick guide to editing:
     1. COLORS & FONTS ........ change them once in the :root block below
     2. BACKGROUND MEDIA ...... the image/video + the dark overlay on top of it
     3. HEADER & MENU
     4. CONTENT PANELS ........ the dark boxes that hold the text
     5. BUTTONS & FORMS
     6. BOOK PAGES ............ Literary Fiction + Science Fiction
     7. HOME PAGE (+ 7b Mailing List, 7c Legal / Thank-you / 404 pages, 7d Footer)
     8. PER-PAGE SETTINGS ..... where each background is "aimed" + extra darkening
     9. RESPONSIVE ............ hamburger menu + phone behaviour
    ========================================================================== */


/* ==========================================================================
   0. COLORS & FONTS — change the look of the whole site here
   ========================================================================== */
:root {
  --black:       #0a0607;                  /* near-black page color            */
  --panel-bg:    rgba(10, 6, 7, 0.70);     /* dark box behind the text         */
  --cream:       #efe6d2;                  /* main off-white text              */
  --cream-soft:  rgba(239, 230, 210, 0.80);/* body paragraphs / inactive menu  */
  --cream-faint: rgba(239, 230, 210, 0.28);/* thin lines and borders           */
  --red:         #a5161f;                  /* deep red accent (dots, borders)  */
  --red-deep:    #6e0c12;                  /* button shade                     */
  --red-glow:    #c8283a;                  /* brighter red for hover / active  */

  /* Fonts are loaded from Google Fonts in each page's <head>.
     If they cannot load, the browser falls back to the serif fonts listed. */
  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-body:    "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
}


/* ==========================================================================
   1. BASE / RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;               /* NO scrolling on desktop / laptop */
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;

  /* Gentle fade-in every time a page loads */
  animation: page-fade 1.3s ease-out both;
}

@keyframes page-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

img, video { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--red-glow);
  outline-offset: 3px;
}

/* Hidden "skip to content" link (appears when tabbing with the keyboard) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1px solid var(--red);
}
.skip-link:focus { top: 12px; }

/* Text that is hidden visually but still read by screen readers / Google */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   2. BACKGROUND (image or video) + DARK OVERLAY
   - The picture / video is ALWAYS shown in full: nothing is cropped and
     nothing is stretched (object-fit: contain).
   - When the screen shape is different from the picture (16:9), the space
     left over at the sides (or top/bottom) is filled with a soft, blurred,
     darkened copy of the same picture (--bg-fill, set per page in section 8),
     so there are never hard black bars.
   - The overlay keeps the text easy to read. Make it lighter/darker per page
     in section 8.
   ========================================================================== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  container-type: size;   /* lets the picture size itself to the screen */
}

/* blurred fill behind the picture */
.bg::before {
  content: "";
  position: absolute;
  inset: -80px;           /* bigger than the screen, so the blur has no soft edge */
  background: var(--bg-fill, none) center / cover no-repeat;
  filter: blur(30px) brightness(0.4);
}

/* the picture / video itself — always the full frame */
.bg-media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: contain;
}
/* modern browsers: make the box exactly the size of the picture, so its
   edges can be softly faded into the blurred fill (see below) */
@supports (width: 1cqw) {
  .bg-media {
    width:  min(100cqw, 100cqh * var(--bg-ratio, 1.7778));
    height: min(100cqh, 100cqw / var(--bg-ratio, 1.7778));
  }
}

/* soft fade on the edges that meet the blurred fill */
@media (min-aspect-ratio: 16/9) {       /* wide screens: fill at left + right */
  .bg-media {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
  }
}
@media (max-aspect-ratio: 16/9) {       /* taller screens: fill at top + bottom */
  .bg-media {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  }
}

.bg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* page-specific extra darkening (set in section 8) */
    var(--overlay-extra, linear-gradient(transparent, transparent)),
    /* dark band at the top so the menu is always readable */
    linear-gradient(to bottom, rgba(6, 3, 4, 0.84) 0%, rgba(6, 3, 4, 0.42) 12%, rgba(6, 3, 4, 0) 27%),
    /* soft dark vignette around the edges */
    radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.6) 100%);
}


/* ==========================================================================
   3. PAGE FRAME + HEADER & MENU
   Every page is exactly one screen tall (100dvh).
   ========================================================================== */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;     /* fallback for older browsers */
  height: 100dvh;    /* exactly one full screen */
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* logo | menu | (empty, keeps menu centered) */
  align-items: center;
  padding: clamp(12px, 2.6vh, 28px) clamp(20px, 3vw, 48px);
}

/* "Clara Nocturne" logo / name — links back to Home */
.brand {
  justify-self: start;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-decoration: none;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
}
.brand:hover { color: #fff; }

/* The menu: Bio • Contact • Literary Fiction • Science Fiction • Mailing List */
.nav-list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  display: flex;
  align-items: center;
}

/* small dark-red dot between menu items */
.nav-list li + li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin: 0 clamp(10px, 1.5vw, 24px);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px rgba(200, 40, 58, 0.55);
}

.nav-list a {
  display: block;
  padding: 0.4em 0;
  font-family: var(--font-display);   /* Cinzel: capitals + small caps */
  font-weight: 500;
  font-size: clamp(0.8rem, 0.92vw, 1rem);
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--cream-soft);
  border-bottom: 1px solid transparent;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.nav-list a:hover,
.nav-list a:focus-visible { color: #fff; }

/* highlight for the page you are currently on */
.nav-list a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--red-glow);
}

/* hamburger button (only shown on small screens, see section 9) */
.nav-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--cream-faint);
  color: var(--cream);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--cream);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ==========================================================================
   4. CONTENT AREA + PANELS
   .content fills the space under the header. Choose where the panel sits
   with align-left / align-center / align-right (set on <main> in each page).
   ========================================================================== */
.content {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 6vw, 110px) clamp(4px, 1.6vh, 22px);   /* the footer adds the rest */
}
.align-left   { justify-content: flex-start; }
.align-center { justify-content: center; }
.align-right  { justify-content: flex-end; }

/* The dark glass box that holds the text */
.panel {
  position: relative;
  width: min(100%, var(--panel-w, 540px));
  padding: clamp(18px, 3.6vh, 36px) clamp(20px, 2.6vw, 40px);
  background: var(--panel-bg);
  border: 1px solid rgba(165, 22, 31, 0.38);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* small red accent on the top edge of every panel */
.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 76px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--red-glow);
}

/* ----- text styles used inside panels ----- */
.eyebrow {
  margin: 0 0 0.35em;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--red-glow);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, min(3.4vw, 5.8vh), 2.9rem);
  line-height: 1.1;
  letter-spacing: 0.09em;
  color: var(--cream);
}

.subtitle {
  margin: 0.55em 0 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.02rem, min(1.3vw, 2.5vh), 1.3rem);
  letter-spacing: 0.04em;
  color: var(--cream);
}

/* thin red line with a dot in the middle */
.rule {
  position: relative;
  height: 1px;
  margin: clamp(10px, 1.8vh, 18px) 0 clamp(10px, 2vh, 20px);
  background: linear-gradient(90deg, transparent, var(--red) 25%, var(--red) 75%, transparent);
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--red-glow);
}

.panel p {
  margin: 0 0 0.8em;
  font-size: clamp(1.04rem, min(1.28vw, 2.55vh), 1.28rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--cream-soft);
}
.panel p:last-child { margin-bottom: 0; }

/* Bio page: the long bio scrolls INSIDE the box, so the box keeps its size.
   Make the box taller/shorter by changing max-height. */
.bio-scroll {
  max-height: clamp(160px, 25vh, 270px);
  overflow-y: auto;
  padding-right: 14px;
  overscroll-behavior: contain;
  scrollbar-width: thin;                              /* Firefox */
  scrollbar-color: var(--red) rgba(239, 230, 210, 0.08);
  /* soft fade at the bottom edge hints there is more to read */
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, #000 85%, transparent);
}
.bio-scroll p:last-child { padding-bottom: 1.6em; }   /* last line clears the fade */
.bio-scroll:focus-visible { outline-offset: 6px; }
/* Chrome / Edge / Safari scrollbar */
.bio-scroll::-webkit-scrollbar { width: 6px; }
.bio-scroll::-webkit-scrollbar-track { background: rgba(239, 230, 210, 0.08); }
.bio-scroll::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }


/* ==========================================================================
   5. BUTTONS & FORMS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.85em 2em;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(180deg, #8a121a, var(--red-deep));
  border: 1px solid var(--red-glow);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.btn:hover,
.btn:focus-visible {
  background: linear-gradient(180deg, #a5161f, #7c0d14);
  box-shadow: 0 0 22px rgba(200, 40, 58, 0.45);
  transform: translateY(-1px);
}

/* form fields */
.field { margin-bottom: clamp(8px, 1.6vh, 14px); }

.field label {
  display: block;
  margin-bottom: 0.3em;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.field input,
.field textarea,
.signup-form input[type="email"] {
  width: 100%;
  padding: 0.62em 0.85em;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--cream-faint);
  border-radius: 0;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.field textarea {
  display: block;
  resize: none;
  min-height: 0;
}
.field input:focus,
.field textarea:focus,
.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--red-glow);
  background: rgba(0, 0, 0, 0.65);
}
::placeholder { color: rgba(239, 230, 210, 0.45); }

/* small lowercase note next to a field label, e.g. "optional · PDF, DOC…" */
.label-note {
  margin-left: 0.6em;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(239, 230, 210, 0.6);
}

/* file picker (contact form attachments) */
.field input[type="file"] {
  padding: 0.4em 0.5em;
  font-size: 0.98rem;
  color: var(--cream-soft);
  cursor: pointer;
}
.field input[type="file"]::file-selector-button {
  margin-right: 0.9em;
  padding: 0.45em 1.1em;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(165, 22, 31, 0.25);
  border: 1px solid rgba(165, 22, 31, 0.7);
  cursor: pointer;
  transition: background 0.3s ease;
}
.field input[type="file"]:hover::file-selector-button { background: rgba(165, 22, 31, 0.5); }

/* hidden spam-trap field (Formspree) — leave as is */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* success / error message under a form */
.panel .form-status {
  min-height: 1.4em;
  margin: 0.7em 0 0;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--cream);
}
/* no empty gap while there is no message */
.panel .form-status:empty {
  min-height: 0;
  margin: 0;
}

/* contact form: the message appears next to the button (saves height) */
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.panel .form-actions .form-status {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
}


/* ==========================================================================
   6. BOOK PAGES (Literary Fiction + Science Fiction)
   Layout: [ cover ] [ title, blurb, Buy Now ]
   ========================================================================== */
/* Panel is at most 760px wide, and never wider than 44% of the screen.
   (On the Literary Fiction page this keeps the panel off the book that is
   already shown in the background video.) */
.panel--book { --panel-w: min(760px, 44vw); }

.book {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(16px, 1.8vw, 40px);
  align-items: center;
}

/* Spot for the book cover — 2:3 ratio (like most paperback covers) */
.cover {
  height: min(46vh, 360px, 21vw);
  aspect-ratio: 2 / 3;
  margin: 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  line-height: 1.7;
  color: var(--cream-soft);
  border: 1px dashed var(--cream-faint);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px);
}

.book-text .blurb { margin-top: 0.2em; }
.book-text .btn  { margin-top: clamp(8px, 1.6vh, 16px); }

/* ----- Slim info bar at the bottom (Literary Fiction page) -----
   [ Buy Now ] [ blurb ] in one row, centered at the bottom of the screen. */
.bar-bottom {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;    /* the bar sits just above the footer links */
}
.panel--bar {
  --panel-w: 640px;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  padding: 12px 18px;
}
.panel--bar .btn { flex: none; }
.panel--bar .blurb {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: calc(clamp(0.98rem, min(1.1vw, 2.2vh), 1.12rem) + 4px);
  line-height: 1.4;
  text-wrap: balance;     /* splits the lines evenly, so no word is left alone on line 2 */
}


/* ==========================================================================
   7. HOME PAGE
   The home video already shows the "Clara Nocturne" title inside the video,
   and the video is always shown in full, so the <h1> is visually hidden on
   every screen (but still there for Google and screen readers).
   ========================================================================== */
.home {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(22px, 7vh, 84px);
  text-align: center;
}

.home-hero { max-width: 46ch; }

.video-title {                      /* hidden by default… */
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-title {
  margin: 0 0 0.4em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 11vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: 0.1em;
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.tagline {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.7vw, 1.7rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.8);
}
/* small red dot above the tagline */
.tagline::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto 0.8em;
  border-radius: 50%;
  background: var(--red-glow);
  box-shadow: 0 0 10px rgba(200, 40, 58, 0.7);
}


/* ==========================================================================
   7b. MAILING LIST PAGE
   The video writes "Mailing List" by hand, so the panel sits below it.
   ========================================================================== */
.mailing { align-items: flex-end; justify-content: center; }
.mailing .panel { --panel-w: 580px; text-align: center; }
.mailing .page-title { margin-bottom: 0.4em; }   /* hidden: the video shows the title */

.signup-form {
  display: flex;
  gap: 10px;
  margin-top: clamp(8px, 1.6vh, 14px);
}
.signup-form input[type="email"] { flex: 1; min-width: 0; }
.signup-form .btn { flex: none; padding-left: 1.5em; padding-right: 1.5em; }

.small-note {
  margin-top: 0.8em !important;
  font-size: 0.92rem !important;
  font-style: italic;
  opacity: 0.8;
}


/* ==========================================================================
   7c. LEGAL PAGES (Privacy Policy, Terms & Conditions) and
       NOTICE PAGES (Thank-you pages + 404)
   ========================================================================== */
/* Legal pages: the long text scrolls INSIDE the box, like the Bio page.
   Make the box taller/shorter by changing max-height. */
.panel--legal { --panel-w: min(620px, 46vw); }

.legal-scroll {
  max-height: clamp(170px, 50vh, 560px);
  overflow-y: auto;
  padding-right: 14px;
  overscroll-behavior: contain;
  scrollbar-width: thin;                              /* Firefox */
  scrollbar-color: var(--red) rgba(239, 230, 210, 0.08);
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
.legal-scroll > :last-child { padding-bottom: 1.6em; }   /* last line clears the fade */
.legal-scroll:focus-visible { outline-offset: 6px; }
.legal-scroll::-webkit-scrollbar { width: 6px; }
.legal-scroll::-webkit-scrollbar-track { background: rgba(239, 230, 210, 0.08); }
.legal-scroll::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* section headings inside the legal text */
.legal-scroll h2 {
  margin: 1.4em 0 0.45em;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
}
.legal-scroll strong { font-weight: 600; color: var(--cream); }
.legal-scroll p { font-size: clamp(1.02rem, min(1.2vw, 2.4vh), 1.18rem); }

/* [PLACEHOLDER] text that still has to be filled in — shown in red so it is
   easy to spot. Remove the <span class="ph"> once the real text is in. */
.ph { color: #e0505f; }

/* Thank-you pages + 404: short message + one button */
.panel--notice { --panel-w: 520px; }
.panel--notice .subtitle { margin-top: 0.45em; }
.panel--notice .btn { margin-top: clamp(12px, 2.4vh, 24px); }


/* ==========================================================================
   7d. FOOTER (Privacy Policy • Terms & Conditions) — small links under every page
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2px 16px clamp(8px, 1.4vh, 14px);
}
.site-footer a {
  display: flex;
  align-items: center;
  padding: 0.3em 0;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: rgba(239, 230, 210, 0.6);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
  transition: color 0.3s ease;
}
/* small red dot between the links */
.site-footer a + a::before {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 14px;
  border-radius: 50%;
  background: var(--red);
}
.site-footer a:hover,
.site-footer a:focus-visible,
.site-footer a[aria-current="page"] { color: var(--cream); }


/* ==========================================================================
   8. PER-PAGE SETTINGS
   --bg-fill        : picture used for the blurred fill around the background
                      (for video pages: the video's poster image). If you
                      change a page's background, change this too.
   --bg-ratio       : width ÷ height of the background (all are 16:9 = 1.7778).
                      Only change it if you use a picture of another shape.
   --overlay-extra  : extra darkening on top of the shared overlay.
   ========================================================================== */
.page-home {
  --bg-fill: url("assets/home-poster.jpg");
  --overlay-extra: linear-gradient(to top, rgba(5, 3, 3, 0.72), rgba(5, 3, 3, 0) 34%);
}

.page-bio {
  --bg-fill: url("assets/bio-bg.jpg");
  --overlay-extra: linear-gradient(90deg, rgba(5, 3, 3, 0.5), rgba(5, 3, 3, 0.15) 50%, rgba(5, 3, 3, 0) 68%);
}

/* Bio + Contact: box sits 24px further from the left edge (laptops and desktops) */
@media (min-width: 1001px) {
  .page-bio .panel,
  .page-contact .panel { margin-left: 24px; }
}

.page-contact {
  --bg-fill: url("assets/contact-bg.jpg");
  --overlay-extra: linear-gradient(90deg, rgba(5, 3, 3, 0.5), rgba(5, 3, 3, 0.15) 50%, rgba(5, 3, 3, 0) 68%);
}

.page-literary {
  --bg-fill: url("assets/literary-poster.jpg");
  --overlay-extra: linear-gradient(rgba(5, 3, 3, 0.28), rgba(5, 3, 3, 0.28));
}
/* narrower right margin so the panel stays clear of the book in the video */
.page-literary .content { padding-right: clamp(16px, 3vw, 60px); }

.page-scifi {
  --bg-fill: url("assets/scifi-bg.jpg");
  --overlay-extra: linear-gradient(rgba(5, 3, 3, 0.3), rgba(5, 3, 3, 0.3));
}

.page-mailing {
  --bg-fill: url("assets/mailing-poster.jpg");
  --overlay-extra: linear-gradient(to top, rgba(5, 3, 3, 0.35), rgba(5, 3, 3, 0) 40%);
}


/* Privacy Policy: rusty safe on the left, text box on the right */
.page-privacy {
  --bg-fill: url("assets/privacy-bg.jpg");
  --overlay-extra: linear-gradient(270deg, rgba(5, 3, 3, 0.55), rgba(5, 3, 3, 0.15) 50%, rgba(5, 3, 3, 0) 68%);
}

/* Terms & Conditions: parchment + ink well on the left, text box on the right */
.page-terms {
  --bg-fill: url("assets/terms-bg.jpg");
  --overlay-extra: linear-gradient(270deg, rgba(5, 3, 3, 0.55), rgba(5, 3, 3, 0.15) 50%, rgba(5, 3, 3, 0) 68%);
}

/* 404: ivy-covered wall, box in the middle */
.page-404 {
  --bg-fill: url("assets/404-bg.jpg");
  --overlay-extra: radial-gradient(ellipse at 50% 55%, rgba(5, 3, 3, 0.45), rgba(5, 3, 3, 0.1) 70%);
}

/* Thank you (contact message): pigeon at the tower on the right, box on the left */
.page-thanks-message {
  --bg-fill: url("assets/thanks-message-bg.jpg");
  --overlay-extra: linear-gradient(90deg, rgba(5, 3, 3, 0.45), rgba(5, 3, 3, 0.12) 50%, rgba(5, 3, 3, 0) 68%);
}

/* Thank you (mailing list): typewriter on the left, box on the right */
.page-thanks-mailing {
  --bg-fill: url("assets/thanks-mailing-bg.jpg");
  --overlay-extra: linear-gradient(270deg, rgba(5, 3, 3, 0.5), rgba(5, 3, 3, 0.12) 45%, rgba(5, 3, 3, 0) 62%);
}

/* Left-hand boxes sit 24px further in, right-hand boxes too (laptops and desktops) */
@media (min-width: 1001px) {
  .page-thanks-message .panel { margin-left: 24px; }
  .page-privacy .panel,
  .page-terms .panel,
  .page-thanks-mailing .panel { margin-right: 24px; }
}


/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

/* ----- Desktop menu: "Mailing List" sits on its own at the far top right;
        the other menu items stay centered ----- */
@media (min-width: 901px) {
  .nav-list li:last-child {
    position: absolute;
    top: 50%;
    right: clamp(20px, 3vw, 48px);     /* same as the header's side padding */
    transform: translateY(-50%);
  }
  .nav-list li:last-child::before { display: none; }   /* no dot in front of it */
}

/* ----- Smaller laptops / tablets in landscape: tighter menu so it never touches the logo ----- */
@media (min-width: 901px) and (max-width: 1150px) {
  .brand { font-size: 0.74rem; letter-spacing: 0.16em; }
  .nav-list a { font-size: 0.76rem; letter-spacing: 0.1em; }
  .nav-list li + li::before { margin: 0 11px; }
}

/* ----- Hamburger menu: tablets and phones ----- */
@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 10px 16px;
  }

  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px 0 14px;
    background: rgba(8, 5, 6, 0.97);
    border-top: 1px solid rgba(165, 22, 31, 0.5);
    border-bottom: 1px solid rgba(165, 22, 31, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list li { flex-direction: column; }

  /* between items: thin red line instead of a dot */
  .nav-list li + li::before {
    width: 28px;
    height: 1px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-list a {
    padding: 0.85em 1em;
    text-align: center;
    font-size: 1rem;
    border-bottom: 0;
  }
  .nav-list a[aria-current="page"] { color: var(--red-glow); }
}

/* ----- Tablets: center the panels and give them a comfortable width ----- */
@media (min-width: 601px) and (max-width: 1000px) {
  .content.align-left,
  .content.align-right { justify-content: center; }
  .page-literary .content { padding-right: clamp(20px, 6vw, 110px); }
  .panel--book { --panel-w: 680px; }
  .panel--legal { --panel-w: 640px; }
  .cover { height: min(40vh, 300px); }
}

/* ----- Phones, tall screens and very short windows: allow scrolling ONLY
        here, and only if the content really does not fit on one screen ----- */
@media (max-width: 600px), (max-height: 520px), (max-aspect-ratio: 1/1) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  /* keep the menu bar visible while scrolling */
  .site-header {
    position: sticky;
    top: 0;
    background: linear-gradient(to bottom, rgba(6, 3, 4, 0.92), rgba(6, 3, 4, 0.55));
  }

  /* legal text: the whole page scrolls here, so no scroll box inside the box */
  .legal-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .legal-scroll > :last-child { padding-bottom: 0; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }

  .content {
    padding: 8px 16px 24px;
    justify-content: center;
  }
  .panel { width: 100%; padding: 20px 18px 22px; }

  /* book pages: cover on top, text below */
  .book {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 16px;
  }
  .cover { height: min(30vh, 250px); height: min(30dvh, 250px); }
  .book-text { width: 100%; }

  .signup-form { flex-direction: column; }
  .signup-form .btn { width: 100%; }

  /* Literary Fiction bottom bar: blurb on top, button underneath */
  .panel--bar { flex-direction: column-reverse; text-align: center; padding: 18px; }
  .panel--bar .btn { width: 100%; }

  .form-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
  .panel .form-actions .form-status { margin-top: 0; }

  .brand { font-size: 0.8rem; letter-spacing: 0.2em; }
}

/* ----- Tall / narrow screens (phones, tablets held upright) -----
   The full background sits at the top, right under the menu bar, and the
   text sits underneath it. The rest of the screen is the blurred fill. */
@media (max-aspect-ratio: 1/1) {
  body {
    --header-h: 88px;                                    /* height of the menu bar */
    --media-h: calc(100vw / var(--bg-ratio, 1.7778));    /* height of the picture  */
  }

  .bg-media {
    top: var(--header-h);
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 88%, transparent 100%);
  }

  /* only darken the strip behind the menu bar (the panels have their own dark box) */
  .bg-overlay {
    background: linear-gradient(to bottom, rgba(6, 3, 4, 0.6) 0, rgba(6, 3, 4, 0) var(--header-h));
  }

  .content,
  .home,
  .mailing {
    align-items: flex-start;
    padding-top: calc(var(--media-h) + clamp(16px, 3vh, 32px));
  }
}
@media (max-aspect-ratio: 1/1) and (max-width: 900px) {
  body { --header-h: 64px; }   /* the compact (hamburger) menu bar is shorter */
}

/* ----- Short laptop windows: tighten things a little so it all fits ----- */
@media (min-width: 601px) and (max-height: 700px) {
  .panel { padding: 16px 24px; }
  .cover { height: min(42vh, 300px); }
  .field label { font-size: 0.66rem; }
  .field input, .field textarea { padding: 0.5em 0.8em; font-size: 1.02rem; }
}

/* ----- Very short windows (small laptops with browser toolbars) ----- */
@media (min-width: 601px) and (max-height: 620px) {
  .site-header { padding-top: 10px; padding-bottom: 6px; }
  .content { padding-bottom: 4px; }
  .panel { padding: 12px 22px 14px; }
  .eyebrow { margin-bottom: 0.15em; font-size: 0.68rem; }
  .rule { margin: 8px 0 10px; }
  .field { margin-bottom: 7px; }
  .field label { margin-bottom: 0.15em; }
  .field textarea { height: 4.2em; }
  .cover { height: min(40vh, 250px, 21vw); }
}

/* ----- Respect "reduce motion" settings (fade becomes instant) ----- */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  * { transition: none !important; }
}
