/* ============================================================
   Bearclaw's World — design tokens
   ============================================================ */
:root{
  --ink:        #0a0a09;
  --ink-2:      #131210;
  --parchment:  #ece3cd;
  --parchment-dim: #b9ae90;
  --gold:       #c9a227;
  --gold-dim:   #8a7325;
  --blood:      #8a2020;
  --dragon:     #3f5c3a;

  --font-display: "Cinzel Decorative", "Cinzel", serif;
  --font-heading: "Cinzel", serif;
  --font-body:    "EB Garamond", serif;

  --slide-time: 7s;
  --loop-time: 35s;
}

@media (prefers-reduced-motion: reduce){
  :root{ --slide-time: 0.01s; --loop-time: 0.01s; }
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}

a{ color: var(--gold); }

::selection{ background: var(--blood); color: var(--parchment); }

/* ============================================================
   Backdrop — panning, dissolving plates
   ============================================================ */
.backdrop{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}
.backdrop::after{
  /* ink vignette so type stays legible over any plate */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10,10,9,0.35) 0%, rgba(10,10,9,0.82) 72%, rgba(10,10,9,0.94) 100%),
    linear-gradient(180deg, rgba(10,10,9,0.55) 0%, rgba(10,10,9,0.25) 18%, rgba(10,10,9,0.25) 82%, rgba(10,10,9,0.75) 100%);
  z-index: 2;
}
.slide{
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  filter: grayscale(1) contrast(1.05);
  animation-name: dissolve, drift;
  animation-duration: var(--loop-time), var(--loop-time);
  animation-timing-function: ease-in-out, linear;
  animation-iteration-count: infinite, infinite;
  will-change: opacity, transform;
}
.slide--1{ background-image: url("/images/plate-01-fountain.png"); animation-delay: 0s, 0s; }
.slide--2{ background-image: url("/images/plate-02-lycan.png");    animation-delay: -7s, -7s; }
.slide--3{ background-image: url("/images/plate-03-druidess.png"); animation-delay: -14s, -14s; }
.slide--4{ background-image: url("/images/plate-04-elder.png");    animation-delay: -21s, -21s; }
.slide--5{ background-image: url("/images/plate-05-sorcerer.png"); animation-delay: -28s, -28s; }

@keyframes dissolve{
  0%   { opacity: 0; }
  2.5% { opacity: 1; }
  17%  { opacity: 1; }
  20%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes drift{
  0%   { transform: scale(1.02) translate3d(0,0,0); }
  100% { transform: scale(1.16) translate3d(-2.5%,-1.8%,0); }
}

/* ============================================================
   Layout shell
   ============================================================ */
.page{ position: relative; z-index: 1; }

.rule{
  height: 26px;
  background-image: url("/images/braid.svg");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.85;
}
.rule--tight{ height: 18px; background-size: auto 18px; }

.container{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   Nav
   ============================================================ */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 34px;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
}
.nav__mark{
  color: var(--parchment);
  text-decoration: none;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.nav__mark span{ color: var(--gold); }
.nav__cta{
  color: var(--ink);
  background: var(--gold);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 9px 18px;
  border: 1px solid var(--gold);
  transition: background .25s ease, color .25s ease;
}
.nav__cta:hover{ background: transparent; color: var(--gold); }

/* ============================================================
   Hero
   ============================================================ */
.hero{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
}
.hero__eyebrow{
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 22px;
}
.hero__title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 9vw, 108px);
  line-height: 0.98;
  margin: 0;
  color: var(--parchment);
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
.hero__title em{
  display:block;
  font-style: normal;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub{
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--parchment-dim);
  max-width: 34ch;
  margin: 26px 0 0;
}
.hero__scroll{
  margin-top: 70px;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero__scroll::after{
  content: "";
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollpulse 2.2s ease-in-out infinite;
}
@keyframes scrollpulse{
  0%,100%{ opacity: .35; }
  50%{ opacity: 1; }
}

/* ============================================================
   Reveal-on-scroll sections
   ============================================================ */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

section{ padding: 110px 0; }

.kicker{
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 0 0 18px;
}
h2.title{
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  text-align: center;
  margin: 0 0 40px;
  color: var(--parchment);
}

/* ============================================================
   Illuminated panel (signature framing device)
   ============================================================ */
.plate-frame{
  position: relative;
  background: rgba(10,10,9,0.72);
  border: 1px solid rgba(201,162,39,0.35);
  padding: 46px 42px;
  backdrop-filter: blur(2px);
}
.plate-frame::before,
.plate-frame::after{
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 22px;
  background-image: url("/images/braid.svg");
  background-repeat: repeat-x;
  background-size: auto 22px;
  opacity: 0.9;
}
.plate-frame::before{ top: -11px; }
.plate-frame::after{ bottom: -11px; }

.about__body{
  font-size: 20px;
  color: var(--parchment);
}
.about__body p{ margin: 0 0 20px; }
.about__signature{
  font-family: var(--font-heading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--parchment-dim);
  margin-top: 30px;
}
.about__signature span{ color: var(--gold); }

/* ============================================================
   Gallery
   ============================================================ */
.gallery{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.gallery__item{
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,0.25);
  cursor: pointer;
  background: var(--ink-2);
}
.gallery__item img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
  transition: transform .6s ease, filter .6s ease;
}
.gallery__item:hover img{
  transform: scale(1.08);
  filter: grayscale(0.2);
}
.gallery__cap{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 10px;
  font-family: var(--font-heading);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,6,5,0.92);
  padding: 40px;
}
.lightbox.is-open{ display: flex; }
.lightbox img{
  max-width: min(92vw, 620px);
  max-height: 86vh;
  border: 1px solid rgba(201,162,39,0.4);
  box-shadow: 0 20px 80px rgba(0,0,0,0.7);
}
.lightbox__close{
  position: absolute;
  top: 26px; right: 34px;
  font-family: var(--font-heading);
  color: var(--parchment);
  background: none;
  border: 1px solid var(--parchment-dim);
  padding: 8px 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
}
.lightbox__close:hover{ border-color: var(--gold); color: var(--gold); }

/* ============================================================
   Book / CTA
   ============================================================ */
.book{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 52px;
  align-items: center;
}
.book__cover-link{
  display: block;
  border: 1px solid rgba(201,162,39,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transition: transform .35s ease, box-shadow .35s ease;
}
.book__cover-link:hover{
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.7);
}
.book__cover-link img{ display: block; width: 100%; height: auto; }
.book__eyebrow{
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}
.book__title{
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 16px;
  color: var(--parchment);
}
.book__desc{ margin: 0 0 26px; color: var(--parchment-dim); font-size: 18px; }
.book__buy{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink);
  background: var(--gold);
  padding: 14px 26px;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: background .25s ease, color .25s ease;
}
.book__buy:hover{ background: transparent; color: var(--gold); }

/* ============================================================
   Footer
   ============================================================ */
footer{
  padding: 50px 0 60px;
  text-align: center;
  color: var(--parchment-dim);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
footer .gold{ color: var(--gold); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px){
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .book{ grid-template-columns: 1fr; text-align: center; }
  .book__cover-link{ max-width: 220px; margin: 0 auto; }
  .plate-frame{ padding: 34px 22px; }
  .nav{ padding: 16px 18px; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
