/* ============================================================
   THEME — light/dark toggle. Loads after each page's inline CSS
   so these rules win for [data-theme="light"]. Dark mode uses
   the existing :root tokens unchanged.
   ============================================================ */

html{transition:background-color .3s ease}
body{transition:background-color .3s ease,color .3s ease}

/* ── LIGHT THEME TOKENS ── */
html[data-theme="light"]{
  --bg:#f7f4ec;            /* warm bone background */
  --bone:#1a1814;          /* deep ink text */
  --bone2:#4a463e;         /* secondary text */
  --bone3:#6e695e;         /* tertiary text */
  --gold:#a8842c;           /* slightly darker gold for contrast on light */
  --gold-line:rgba(168,132,44,.28);
}

/* nav background flip */
html[data-theme="light"] nav{
  background:rgba(247,244,236,.92)!important;
  border-bottom:1px solid var(--gold-line);
}

/* gallery filter sticky bar — slightly warmer tan than page bg */
html[data-theme="light"] .filters{
  background:rgba(232,224,206,.96)!important;
  border-bottom:1px solid var(--gold-line);
  border-top:1px solid var(--gold-line);
}
html[data-theme="light"] .ftab{color:var(--bone3)}
html[data-theme="light"] .ftab.active,
html[data-theme="light"] .ftab:hover{color:var(--gold)}
html[data-theme="light"] .ftab.active{border-bottom-color:var(--gold)}
html[data-theme="light"] .fcount{color:var(--bone3);opacity:.7}

/* gallery card image overlay — soften so text reads on light surface */
html[data-theme="light"] .card-overlay{
  background:linear-gradient(0deg,rgba(26,24,20,.78) 0%,rgba(26,24,20,.35) 50%,rgba(26,24,20,.05) 100%)!important;
}
@media(hover:none){
  html[data-theme="light"] .card-overlay{
    background:linear-gradient(0deg,rgba(26,24,20,.7) 0%,transparent 60%)!important;
  }
}

/* footer flip */
html[data-theme="light"] footer{
  background:rgba(247,244,236,.6)!important;
  border-top:1px solid var(--gold-line);
}

/* ── LIGHTBOX (gallery detail view) — full light-mode flip ── */
html[data-theme="light"] .lb{
  background:rgba(247,244,236,.97)!important;
}
html[data-theme="light"] .lb-close{color:var(--bone3)}
html[data-theme="light"] .lb-close:hover{color:var(--gold)}
html[data-theme="light"] .lb-arr{
  background:rgba(232,224,206,.85)!important;
  border:1px solid var(--gold-line)!important;
  color:var(--bone2)!important;
}
html[data-theme="light"] .lb-arr:hover{
  background:rgba(168,132,44,.12)!important;
  border-color:var(--gold)!important;
  color:var(--bone)!important;
}
html[data-theme="light"] .lb-title{color:var(--bone)}
html[data-theme="light"] .lb-year,
html[data-theme="light"] .lb-counter,
html[data-theme="light"] .lb-desc,
html[data-theme="light"] .lb-sold-msg,
html[data-theme="light"] .lb-nfs-msg{color:var(--bone2)}
html[data-theme="light"] .lb-tag{
  color:var(--gold);
  border-color:rgba(168,132,44,.4)!important;
  background:rgba(168,132,44,.06)!important;
}
html[data-theme="light"] .lb-tag:hover{
  background:rgba(168,132,44,.16)!important;
  border-color:var(--gold)!important;
  color:var(--bone)!important;
}
html[data-theme="light"] .lb-badge.avail{border-color:var(--gold);color:var(--gold)}
html[data-theme="light"] .lb-badge.nfs{border-color:var(--bone3);color:var(--bone3)}
html[data-theme="light"] .lb-badge.anchor{background:var(--gold);color:#fff}
html[data-theme="light"] .lb-rotate{
  background:rgba(232,224,206,.92)!important;
  color:var(--gold)!important;
  border-color:rgba(168,132,44,.4)!important;
}
html[data-theme="light"] .lb-rotate:hover{
  background:rgba(168,132,44,.14)!important;
  border-color:var(--gold)!important;
}
html[data-theme="light"] .lb-rotate-label{color:var(--bone2)}
html[data-theme="light"] .lb-img{
  /* subtle paper-like surround so painting reads on light bg */
  box-shadow:0 8px 32px rgba(26,24,20,.12);
}

/* hero — fade image more in light mode, boost text weight + size */
html[data-theme="light"] .hero-bg{
  filter:brightness(.92) saturate(.88);
  opacity:.55;
}
html[data-theme="light"] .hero-overlay{
  background:linear-gradient(180deg,rgba(247,244,236,.55) 0%,rgba(247,244,236,.35) 40%,rgba(247,244,236,.78) 100%)!important;
}
html[data-theme="light"] .hero-title{
  color:#0d0c09!important;
  font-weight:500!important;
  font-size:clamp(3.4rem,7.6vw,6rem)!important;
  text-shadow:0 1px 18px rgba(247,244,236,.85),0 0 2px rgba(247,244,236,.6);
}
html[data-theme="light"] .hero-sub{
  color:#1a1814!important;
  font-weight:500!important;
  font-size:clamp(1.32rem,2.15vw,1.7rem)!important;
  text-shadow:0 1px 14px rgba(247,244,236,.8);
}
html[data-theme="light"] .hero-detail{
  color:#2a2620!important;
  font-weight:600!important;
  font-size:.85rem!important;
  letter-spacing:.24em!important;
  text-shadow:0 1px 10px rgba(247,244,236,.75);
}
html[data-theme="light"] .hero-eyebrow{
  color:var(--gold)!important;
  text-shadow:0 1px 10px rgba(247,244,236,.7);
}

/* noise overlay reduce on light */
html[data-theme="light"] body::after{opacity:.015;mix-blend-mode:multiply}

/* CTA buttons stay gold but with light tint */
html[data-theme="light"] .hero-cta,
html[data-theme="light"] .technique-cta,
html[data-theme="light"] .bottom-cta-single,
html[data-theme="light"] .cta-btn,
html[data-theme="light"] .hero-cta-secondary{
  background-color:rgba(168,132,44,.22);
  color:#5a4416;
  border-color:var(--gold);
  font-weight:500;
}
html[data-theme="light"] .hero-cta:hover,
html[data-theme="light"] .technique-cta:hover,
html[data-theme="light"] .bottom-cta-single:hover,
html[data-theme="light"] .cta-btn:hover,
html[data-theme="light"] .hero-cta-secondary:hover{
  background-color:rgba(168,132,44,.38);
  color:#3a2c0e;
  border-color:#7a5e1a;
}

/* feat-card image lifts in light */
html[data-theme="light"] .feat-card img{filter:brightness(.97)}
html[data-theme="light"] .feat-card-overlay{
  background:linear-gradient(180deg,transparent 50%,rgba(26,24,20,.78) 100%);
}

/* gallery card surfaces */
html[data-theme="light"] .card,
html[data-theme="light"] .gallery-card{
  background:#ffffff;
  border-color:var(--gold-line);
}

/* about-page editorial photos */
html[data-theme="light"] .editorial-photo img,
html[data-theme="light"] .about-author-photo img,
html[data-theme="light"] .peanut-dedication-photo img{
  filter:brightness(1) contrast(1);
}

/* footer light bg already cascades */

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle{
  position:fixed;
  top:14px;right:14px;
  z-index:1000;
  width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;
  background:transparent;
  border:1px solid var(--gold-line);
  border-radius:50%;
  cursor:pointer;
  color:var(--gold);
  transition:background .25s ease,border-color .25s ease,transform .25s ease;
  padding:0;
}
.theme-toggle:hover{
  background:rgba(212,180,92,.10);
  border-color:var(--gold);
  transform:rotate(15deg);
}
html[data-theme="light"] .theme-toggle:hover{background:rgba(168,132,44,.10)}
.theme-toggle svg{width:16px;height:16px;display:block}
.theme-toggle .icon-sun{display:none}
.theme-toggle .icon-moon{display:block}
html[data-theme="light"] .theme-toggle .icon-sun{display:block}
html[data-theme="light"] .theme-toggle .icon-moon{display:none}

@media(max-width:768px){
  .theme-toggle{width:30px;height:30px;top:12px;right:10px}
  .theme-toggle svg{width:14px;height:14px}
}

/* keep nav from overlapping toggle */
nav .nav-links{padding-right:44px}
@media(max-width:768px){
  nav .nav-links{padding-right:38px}
}
</content>
