/* ─────────────────────────────────────────────
   RENA BLACK — Design System
   History has teeth.
   ───────────────────────────────────────────── */

:root {
  --ink: #1A1A1A;
  --ink-soft: #221F1C;
  --ink-deep: #0E0C0B;
  --parchment: #F5F0E8;
  --parchment-aged: #E8DEC9;
  --parchment-shadow: #C9BFA8;
  --oxblood: #8B0000;
  --oxblood-deep: #5C0606;
  --oxblood-ember: #A52020;
  --gold: #C9A84C;
  --gold-dim: #8E7630;
  --gold-bright: #E6C56A;
  --ash: #6B6B6B;
  --ash-warm: #8A7F72;
  --navy: #1B2838;

  --font-display: 'Playfair Display', 'EB Garamond', Georgia, serif;
  --font-body: 'Lora', 'Crimson Text', Georgia, serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--parchment);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain overlay — applied to dark sections */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.85  0 0 0 0 0.7  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--parchment);
}
.on-parchment h1, .on-parchment h2, .on-parchment h3, .on-parchment h4 {
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.tagline {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--oxblood-ember);
  font-weight: 500;
}

.script {
  font-family: 'Cormorant Garamond', var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(14,12,11,0.92) 0%, rgba(14,12,11,0.6) 70%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.3em;
  color: var(--parchment);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.nav-brand .nav-monogram {
  width: 35px;
  height: 35px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.3));
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.3s, color 0.3s;
  padding: 8px 0;
  position: relative;
}
.nav-links a:hover {
  opacity: 1;
  color: var(--gold);
}
.nav-links a.active {
  opacity: 1;
  color: var(--gold);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 4px; height: 4px;
  background: var(--oxblood-ember);
  border-radius: 50%;
  transform: translateX(-50%);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.btn-primary {
  background: var(--oxblood);
  color: var(--parchment);
  border: 1px solid var(--oxblood);
}
.btn-primary:hover {
  background: var(--oxblood-ember);
  box-shadow: 0 0 28px rgba(165,32,32,0.4), inset 0 0 0 1px var(--gold);
}
.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border: 1px solid rgba(245,240,232,0.3);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-dark {
  background: var(--ink);
  color: var(--parchment);
  border: 1px solid var(--ink);
}
.btn-dark:hover {
  background: var(--oxblood);
  border-color: var(--oxblood);
}

/* ─── Ornaments ─── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--gold);
  margin: 20px auto;
  max-width: 280px;
  height: 32px;
  background-image: url('assets/ornament-fleur.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  filter: drop-shadow(0 0 10px rgba(201,168,76,0.18));
}
.ornament .line,
.ornament .glyph { display: none; }
.ornament.ornament-vines,
.page-head .ornament,
.page-head-hero .ornament,
.newsletter-head .ornament,
.archive-head .ornament,
.about-page-head .about-text > .ornament {
  background-image: url('assets/ornament-vines.webp');
  height: 36px;
  max-width: 320px;
}
.on-parchment .ornament { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }

/* Warmer gold tone for the vines ornament across all pages */
.ornament.ornament-vines,
.page-head .ornament,
.page-head-hero .ornament,
.newsletter-head .ornament,
.archive-head .ornament,
.about-page-head .about-text > .ornament {
  filter: hue-rotate(-8deg) saturate(1.35) brightness(1.05);
}

/* ─── Sections ─── */
section {
  position: relative;
}
.section-label {
  position: absolute;
  top: 48px; left: 48px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}
.section-label::before {
  content: "§ ";
  color: var(--oxblood-ember);
}

/* ─── Placeholder frames for imagery ─── */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
}
.frame.ornate {
  border: 1px solid var(--gold-dim);
  box-shadow:
    inset 0 0 0 1px var(--ink),
    inset 0 0 0 6px var(--gold-dim),
    inset 0 0 0 7px var(--ink),
    0 20px 60px rgba(0,0,0,0.6);
}
.frame-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    repeating-linear-gradient(135deg,
      rgba(201,168,76,0.04) 0,
      rgba(201,168,76,0.04) 2px,
      transparent 2px,
      transparent 10px),
    radial-gradient(ellipse at center, rgba(201,168,76,0.08), transparent 70%),
    var(--ink-deep);
}
.frame-placeholder .label {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}
.frame-placeholder .sub {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--ash-warm);
  margin-top: 8px;
  opacity: 0.7;
}

/* Candlelight vignette effect on hero images */
.vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, transparent 0%, rgba(14,12,11,0.2) 50%, rgba(14,12,11,0.85) 100%);
}

/* ─── Candle flame ─── */
.flame {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: radial-gradient(ellipse at 50% 80%, #FFE7A0 0%, #E6C56A 30%, var(--oxblood-ember) 70%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: blur(0.4px);
  animation: flicker 2.6s infinite ease-in-out;
  transform-origin: center bottom;
  box-shadow: 0 0 18px rgba(230,197,106,0.45);
}
@keyframes flicker {
  0%, 100% { transform: scale(1,1) rotate(-1deg); opacity: 1; }
  20% { transform: scale(0.96,1.06) rotate(1deg); opacity: 0.9; }
  45% { transform: scale(1.03,0.96) rotate(-2deg); opacity: 1; }
  70% { transform: scale(0.98,1.04) rotate(1deg); opacity: 0.85; }
}

/* ─── Book cover ─── */
.book {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
}
.book:hover {
  transform: translateY(-6px);
}
.book-cover {
  position: relative;
  aspect-ratio: 2/3;
  background: var(--ink-deep);
  border: 1px solid var(--gold-dim);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.6),
    inset 0 0 0 5px var(--ink),
    inset 0 0 0 6px var(--gold-dim),
    0 30px 60px rgba(0,0,0,0.7),
    0 8px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 22px;
  overflow: hidden;
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,0.12), transparent 60%);
  pointer-events: none;
}
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14,12,11,0.9) 100%);
  pointer-events: none;
}
.book-cover .piece {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
}
.book-cover .center-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.book-cover h3 {
  position: relative;
  z-index: 2;
  font-size: 22px;
  line-height: 1.1;
  text-align: center;
  color: var(--parchment);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.book-cover .subtitle {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--oxblood-ember);
  text-align: center;
  margin-top: 10px;
}

/* ─── Form ─── */
.email-form {
  display: flex;
  align-items: stretch;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--ink);
}
.email-form input {
  flex: 1;
  border: none;
  background: var(--parchment);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.email-form input::placeholder {
  color: var(--ash);
  font-style: italic;
}
.email-form button {
  border: none;
  background: var(--oxblood);
  color: var(--parchment);
  padding: 0 28px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}
.email-form button:hover { background: var(--oxblood-ember); }

/* ─── Utilities ─── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 48px; }

.on-parchment {
  background: var(--parchment);
  color: var(--ink);
}
.on-parchment .eyebrow { color: var(--oxblood); }
.on-parchment .tagline { color: var(--oxblood); }

/* Parchment paper texture */
.parchment-tex {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(139,0,0,0.04), transparent 40%),
    radial-gradient(ellipse at 80% 80%, rgba(201,168,76,0.06), transparent 50%),
    linear-gradient(180deg, #F5F0E8 0%, #EFE7D4 100%);
  position: relative;
}
.parchment-tex::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.45  0 0 0 0 0.3  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  mix-blend-mode: multiply;
}

/* ─── Wax seal ─── */
.wax-seal {
  width: 96px; height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #C83030 0%, #8B0000 40%, #5C0606 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  color: #2A0606;
  text-shadow:
    0 1px 0 rgba(255,200,200,0.2),
    0 -1px 0 rgba(0,0,0,0.4);
  letter-spacing: 0.05em;
  font-weight: 600;
  box-shadow:
    inset 0 4px 10px rgba(255,150,150,0.2),
    inset 0 -6px 14px rgba(0,0,0,0.5),
    0 8px 30px rgba(0,0,0,0.5);
  position: relative;
}
.wax-seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(0,0,0,0.35);
  border-radius: 50%;
}

/* ─── Footer ─── */
.footer {
  background: var(--ink-deep);
  padding: 64px 48px 32px;
  border-top: 1px solid rgba(201,168,76,0.15);
  text-align: center;
  position: relative;
}
.footer .brand {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.3em;
  color: var(--parchment);
  margin-bottom: 8px;
}
.footer .tag {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--oxblood-ember);
  margin-bottom: 32px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  list-style: none;
}
.footer-links a {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--parchment);
  opacity: 0.7;
  text-decoration: none;
  transition: color 0.3s, opacity 0.3s;
}
.footer-links a:hover { color: var(--gold); opacity: 1; }
.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.footer-socials li {
  display: flex;
  align-items: center;
}
.footer-socials a {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0.78;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s;
  padding: 0 18px;
}
.footer-socials a:hover { opacity: 1; color: var(--parchment); }
.footer-socials li:not(:last-child)::after {
  content: '·';
  color: rgba(212,175,55,0.4);
  font-style: normal;
}
.footer .copyright {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ash);
  font-style: italic;
}

/* ─── Links ─── */
a.ink-link {
  color: var(--oxblood-ember);
  text-decoration: none;
  border-bottom: 1px solid rgba(165,32,32,0.4);
  transition: border-color 0.3s, color 0.3s;
}
a.ink-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* ─── Pending / Coming Soon Tag ─── */
.entry-pending {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  padding: 5px 10px;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 2px;
  background: rgba(201,168,76,0.04);
}


/* ═══════════════════════════════════════════════════════════
   MOBILE NAV — Hamburger toggle + fullscreen drawer (≤760px)
   ═══════════════════════════════════════════════════════════ */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 2px;
  padding: 12px 10px;
  cursor: pointer;
  position: relative;
  width: 44px;
  height: 44px;
  z-index: 1001;
  transition: border-color 0.3s;
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  margin: 4px auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav {
    padding: 14px 18px;
  }
  .nav-brand {
    font-size: 16px;
    letter-spacing: 0.18em;
    gap: 10px;
  }
  .nav-brand .nav-monogram {
    width: 28px;
    height: 28px;
  }
  .nav-toggle { display: block; }

  /* Drawer */
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0; padding: 80px 24px 40px;
    background:
      radial-gradient(ellipse at 50% 30%, rgba(139,0,0,0.18), transparent 55%),
      linear-gradient(180deg, #0a0807 0%, #15100b 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
  }
  .nav-open .nav-links {
    transform: translateX(0);
  }
  .nav-links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(201,168,76,0.12);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 22px 0;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--parchment);
    opacity: 0.85;
  }
  .nav-links a.active {
    color: var(--gold);
    opacity: 1;
  }
  .nav-links a.active::after {
    display: none;
  }
}
