/* ==========================================================
   SABLE'S SECRET — Magical, Meaningful & Mesmerizing
   ========================================================== */

:root {
  --midnight: #110c1a;
  --plum: #2b1c36;
  --plum-deep: #1c1226;
  --gold: #d6b36a;
  --gold-soft: #f0dca8;
  --cream: #f5ecdc;
  --parchment: #efe2c6;
  --ink: #2c2016;
  --wood: #4a2f1e;
  --wood-dark: #2a1a10;

  --script: "Pinyon Script", cursive;
  --display: "Cinzel", serif;
  --body: "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.2rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold-soft); }
h1, h2, h3 { font-weight: 400; margin: 0 0 .5em; line-height: 1.15; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  transition: background .4s, padding .4s, box-shadow .4s;
}
.site-header.scrolled {
  background: rgba(17, 12, 26, .88);
  backdrop-filter: blur(8px);
  padding-top: .6rem; padding-bottom: .6rem;
  box-shadow: 0 1px 0 rgba(214, 179, 106, .25);
}
.logo {
  font-family: var(--script); font-size: 2.1rem; color: var(--gold-soft);
  text-decoration: none; text-shadow: 0 0 18px rgba(240, 220, 168, .45);
}
.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.site-nav a {
  font-family: var(--display); font-size: .82rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream); text-decoration: none;
  position: relative; padding: .3rem 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0;
  height: 1px; background: var(--gold); transition: left .3s, right .3s;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { left: 0; right: 0; }
.site-nav a[aria-current="page"] { color: var(--gold-soft); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--gold); color: var(--gold-soft);
  font-family: var(--display); letter-spacing: .15em; padding: .4rem .8rem; cursor: pointer;
}

/* ---------- Shelves (full-screen sections) ---------- */
.shelf {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 7rem clamp(1rem, 5vw, 4rem) 5rem;
  background-color: var(--plum-deep);
  background-size: cover; background-position: center;
  overflow: hidden; isolation: isolate;
}
.shelf::before {          /* soft candlelight veil over the backgrounds */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(17,12,26,.15) 0%, rgba(17,12,26,.65) 75%),
    linear-gradient(180deg, rgba(17,12,26,.45), rgba(17,12,26,.25) 40%, rgba(17,12,26,.7));
}
.shelf-edge {             /* the wooden shelf between areas */
  height: 18px; position: relative; z-index: 5;
  background: linear-gradient(180deg, #6b4630 0%, var(--wood) 35%, var(--wood-dark) 100%);
  border-top: 1px solid var(--gold);
  box-shadow: 0 6px 14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,220,160,.25);
}
.shelf-edge::after {
  content: "✦"; position: absolute; left: 50%; top: -15px; transform: translateX(-50%);
  color: var(--gold); font-size: 1.1rem; background: var(--midnight);
  padding: 0 .7rem; line-height: 28px; border-radius: 50%;
}
canvas.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- Shelf 1: Hero video ---------- */
.hero { padding: 0 0 4.5rem; text-align: center; align-items: flex-end; }
.hero::before {           /* lighter veil so the video and book cover stay bright */
  background:
    linear-gradient(180deg, rgba(17,12,26,.55) 0%, rgba(17,12,26,0) 18%, rgba(17,12,26,0) 55%, rgba(17,12,26,.92) 100%);
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 0 1rem; }
.hero h1 {
  font-family: var(--script); font-size: clamp(3rem, 7vw, 5.5rem); color: var(--gold-soft);
  text-shadow: 0 0 30px rgba(240,220,168,.55), 0 0 80px rgba(214,179,106,.3);
  margin: 0; animation: glow-in 3s ease-out both;
}
.tagline {
  font-family: var(--display); letter-spacing: .35em; text-transform: uppercase;
  font-size: clamp(.75rem, 1.6vw, 1rem); color: var(--cream);
  animation: glow-in 3s 1s ease-out both;
}
.byline { font-style: italic; font-size: 1.25rem; opacity: .9; animation: glow-in 3s 1.6s ease-out both; }
.hero .btn-row { animation: glow-in 3s 2.2s ease-out both; }
@keyframes glow-in {
  from { opacity: 0; filter: blur(8px); transform: translateY(12px); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}
.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  color: var(--gold-soft); text-decoration: none; font-size: 1.6rem;
  animation: float 2.6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translate(-50%, 8px); } }

/* ---------- Buttons ---------- */
.btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.hero .btn-row { margin-top: 1.2rem; }
.hero .tagline, .hero .byline { margin: .3rem 0; }
.scroll-cue { bottom: 1rem; }
.btn {
  display: inline-block; font-family: var(--display); font-size: .82rem; letter-spacing: .2em;
  text-transform: uppercase; text-decoration: none; padding: .9rem 1.7rem;
  border: 1px solid var(--gold); color: var(--gold-soft); background: rgba(17,12,26,.45);
  transition: background .3s, color .3s, box-shadow .3s; cursor: pointer;
}
.btn:hover { background: var(--gold); color: var(--midnight); box-shadow: 0 0 24px rgba(214,179,106,.55); }
.btn.solid { background: var(--gold); color: var(--midnight); }
.btn.solid:hover { background: var(--gold-soft); }
.btn.is-soon { opacity: .55; pointer-events: none; }

/* ---------- Headings ---------- */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title .eyebrow {
  display: block; font-family: var(--display); font-size: .8rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--gold);
}
.section-title h2 {
  font-family: var(--script); font-size: clamp(3rem, 7vw, 5rem); color: var(--gold-soft);
  text-shadow: 0 0 24px rgba(240,220,168,.4); margin: .1em 0 0;
}

/* ---------- Shelf 2: The Room Upstairs ---------- */
.room-inner {
  position: relative; z-index: 2; width: min(1100px, 100%);
  display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.letter {
  background:
    radial-gradient(ellipse at top left, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(160deg, var(--parchment), #e4d2ad);
  color: var(--ink); padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 0 60px rgba(120,80,30,.25);
  transform: rotate(-1deg); position: relative;
}
.letter::before {          /* wax seal */
  content: "S"; position: absolute; top: -22px; right: 32px; width: 54px; height: 54px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #a13a3a, #5e1717);
  color: #e9c9a0; font-family: var(--script); font-size: 1.9rem; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.45);
}
.letter h3 { font-family: var(--script); font-size: 2.8rem; color: #4a2c1a; }
.letter p { margin: 0 0 1em; }
.letter .signature { font-family: var(--script); font-size: 2rem; text-align: right; margin: 1rem 0 0; }

.letter-thumb { text-align: center; }
.letter-thumb button { background: none; border: 0; padding: 0; cursor: zoom-in; display: block; margin: 0 auto; width: min(280px, 100%); }
.letter-thumb figcaption {
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  margin-top: 1rem; color: var(--gold-soft);
}

/* ---------- Square frames (3x3 images) ---------- */
.frame {
  aspect-ratio: 1 / 1; width: 100%; position: relative; overflow: hidden;
  border: 1px solid var(--gold); padding: 8px; background: rgba(17,12,26,.6);
  box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 4px rgba(17,12,26,.6), 0 0 0 5px rgba(214,179,106,.4);
  transition: transform .4s, box-shadow .4s;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::after {            /* label shown only if the image is missing */
  content: attr(data-label); position: absolute; inset: 8px; display: none;
  place-items: center; text-align: center; padding: 1rem;
  font-family: var(--display); font-size: .8rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold-soft); border: 1px dashed rgba(214,179,106,.5);
  background: repeating-linear-gradient(45deg, rgba(214,179,106,.05) 0 12px, transparent 12px 24px);
}
.frame.missing img { display: none; }
.frame.missing::after { display: grid; }
.letter-thumb .frame { width: 100%; }
button:hover .frame, .product:hover .frame {
  transform: translateY(-6px) rotate(-.5deg);
  box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 30px rgba(214,179,106,.35), 0 0 0 4px rgba(17,12,26,.6), 0 0 0 5px var(--gold);
}

/* ---------- Shelf 3: The Nook ---------- */
.nook-inner { position: relative; z-index: 2; width: min(1200px, 100%); }
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2.2rem);
}
.product { text-align: center; display: flex; flex-direction: column; }
.product h3 {
  font-family: var(--display); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-soft); margin: 1.2rem 0 .3rem;
}
.product p { font-size: 1.05rem; margin: 0 0 .5rem; opacity: .92; }
.product .price { font-family: var(--display); color: var(--gold); letter-spacing: .1em; margin-bottom: 1rem; }
.product .btn { margin-top: auto; align-self: center; }
.note {
  text-align: center; font-style: italic; margin-top: 2.5rem; opacity: .85; font-size: 1.05rem;
}

/* ---------- Inner pages ---------- */
.page-hero { min-height: 60vh; text-align: center; }
.page-hero .section-title { position: relative; z-index: 2; margin: 0; }
.content {
  width: min(900px, 100%); margin: 0 auto; padding: 5rem clamp(1rem, 5vw, 2rem);
}
.content p { margin: 0 0 1.2em; }
.content h2 { font-family: var(--script); font-size: 3rem; color: var(--gold-soft); text-align: center; }
.placeholder-text {
  border: 1px dashed rgba(214,179,106,.55); padding: 1.5rem; color: var(--gold-soft);
  font-style: italic; background: rgba(214,179,106,.05);
}
.divider { text-align: center; color: var(--gold); letter-spacing: 1em; margin: 3rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
.about-grid .frame { max-width: 340px; }

/* Mercantile page list */
.merc-list { display: grid; gap: 3rem; width: min(1100px, 100%); margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2rem) 5rem; }
.merc-item {
  display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; align-items: center;
  padding: 2rem; border: 1px solid rgba(214,179,106,.3); background: rgba(43,28,54,.45);
}
.merc-item h3 { font-family: var(--script); font-size: 2.6rem; color: var(--gold-soft); margin: 0; }
.merc-item .price { font-family: var(--display); color: var(--gold); letter-spacing: .12em; margin: .3rem 0 1rem; }

/* ---------- Scenes (film reels) ---------- */
.reels {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem;
  width: min(1200px, 100%); margin: 0 auto; padding: 4rem clamp(1rem, 5vw, 2rem) 6rem;
}
.reel { position: relative; }
.reel-strip {
  position: relative; padding: 26px 0; background: #0b0810;
  border: 1px solid rgba(214,179,106,.35);
  box-shadow: 0 14px 40px rgba(0,0,0,.6);
}
.reel-strip::before, .reel-strip::after {     /* sprocket holes */
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(240,220,168,.75) 10px 22px, transparent 22px 34px);
  -webkit-mask: linear-gradient(#000 0 0); opacity: .55;
}
.reel-strip::before { top: 7px; }
.reel-strip::after { bottom: 7px; }
.reel-screen { aspect-ratio: 16 / 9; background: #000; position: relative; }
.reel-screen video { width: 100%; height: 100%; object-fit: cover; }
.reel-soon {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle, #2a1d33, #0b0810 75%);
}
.reel-soon span { font-family: var(--script); font-size: 2.4rem; color: var(--gold-soft); }
.reel-soon small { display: block; font-family: var(--display); letter-spacing: .3em; font-size: .7rem; color: var(--gold); }
.reel h3 { font-family: var(--display); letter-spacing: .15em; text-transform: uppercase; font-size: 1rem; color: var(--gold-soft); margin: 1.2rem 0 .3rem; }
.reel .scene-no { font-family: var(--script); color: var(--gold); font-size: 1.6rem; }
.reel p { margin: 0; opacity: .88; font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 1.2rem; }
.contact-form label { font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: .4rem; padding: .9rem 1rem; font: inherit; color: var(--cream);
  background: rgba(17,12,26,.6); border: 1px solid rgba(214,179,106,.45);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold-soft); box-shadow: 0 0 16px rgba(214,179,106,.3); }
.contact-form textarea { min-height: 180px; resize: vertical; }
.hidden { position: absolute; left: -9999px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(10,7,15,.92); padding: 2rem; cursor: zoom-out;
}
.lightbox.open { display: grid; animation: glow-in .5s ease-out; }
.lightbox img { max-height: 90vh; width: auto; box-shadow: 0 0 60px rgba(214,179,106,.3); cursor: default; }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.5rem; background: none; border: 0;
  color: var(--gold-soft); font-size: 2.4rem; cursor: pointer; line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 3rem 1rem; border-top: 1px solid rgba(214,179,106,.3);
  background: var(--midnight); font-size: 1rem;
}
.site-footer .logo { font-size: 2.4rem; }
.site-footer p { margin: .4rem 0; opacity: .85; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.2s ease, transform 1.2s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .room-inner, .about-grid { grid-template-columns: 1fr; }
  .about-grid .frame { margin: 0 auto; }
  .merc-item { grid-template-columns: 1fr; text-align: center; }
  .merc-item .frame { max-width: 320px; margin: 0 auto; }
  .reels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: center;
    gap: 1.2rem; padding: 1.5rem; background: rgba(17,12,26,.97);
    border-bottom: 1px solid rgba(214,179,106,.35); display: none;
  }
  .site-nav.open { display: flex; }
  .shelf { background-attachment: scroll; }
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero: let the video's book cover be the title ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.hero .btn-row { animation: glow-in 2.5s .6s ease-out both; }
@media (max-aspect-ratio: 4/3) {      /* phones & tall tablets: show the whole frame */
  .hero { align-items: center; padding-bottom: 0; }
  .hero-video { object-fit: contain; background: var(--midnight); }
  .hero-content { position: absolute; left: 0; right: 0; bottom: 4rem; }
  .hero::before { background: linear-gradient(180deg, rgba(17,12,26,.6), transparent 25%, transparent 70%, rgba(17,12,26,.9)); }
}

/* Author portrait (3:4) */
.frame.portrait { aspect-ratio: 3 / 4; }
.frame.portrait img { object-position: center top; }
.about-grid p { margin: 0 0 1em; }

/* Mercantile header: the painted sign is the title */
.merc-hero { min-height: 82vh; background-position: center 30%; align-items: flex-end; padding-bottom: 2.2rem; }
.merc-hero::before {
  background: linear-gradient(180deg, rgba(17,12,26,.55) 0%, rgba(17,12,26,0) 22%, rgba(17,12,26,0) 70%, rgba(17,12,26,.85) 100%);
}
.merc-eyebrow {
  position: relative; z-index: 2; margin: 0;
  font-family: var(--display); font-size: .85rem; letter-spacing: .4em; text-transform: uppercase;
  color: var(--gold-soft); text-shadow: 0 2px 10px rgba(0,0,0,.8);
}

/* Keep inner-page titles readable over detailed rooms */
.page-hero .section-title { padding: 1.5rem 3rem; background: radial-gradient(ellipse at center, rgba(17,12,26,.55), transparent 70%); }
.page-hero .eyebrow { color: var(--gold-soft); text-shadow: 0 1px 8px #000, 0 0 2px #000; }
.page-hero h2 { text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 30px rgba(240,220,168,.35); }
.reel-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.photo-caption {
  position: absolute; bottom: 1.6rem; left: 0; right: 0; z-index: 2; margin: 0; text-align: center;
  font-style: italic; font-size: 1rem; color: var(--cream); opacity: .9; text-shadow: 0 1px 8px #000;
}

/* ---------- Room photo behind each inner page ---------- */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(17, 12, 26, .55);
}
.content.panel {
  margin: 4rem auto; width: min(960px, calc(100% - 2rem));
  background: rgba(17, 12, 26, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(214, 179, 106, .3);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.merc-item { background: rgba(17, 12, 26, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.merc-list { padding-bottom: 4rem; }
.reel .scene-no, .reel h3, .reel p { text-shadow: 0 2px 8px rgba(0,0,0,.9); }
.site-footer { position: relative; }
.content.panel > :last-child, .content.panel > .reveal:last-child > :last-child { margin-bottom: 0; }
