/*
Theme Name:  Les Savoy Artiste
Description: Custom gallery theme for Shelley Savoy — "Ominous, yet beautiful." Deep-indigo night gallery with antique gold, per-collection color palettes, and a fleur-de-lis signature. Built to pair with the Les Savoy Artworks plugin.
Author:      Savoy Family
Version:     1.0.1
License:     GPL-2.0-or-later
Text Domain: les-savoy

=============================================================================
HOW THIS FILE IS ORGANIZED (edit with confidence)
  1. Color & font variables  — change the whole site's palette here
  2. Base elements           — body, links, images
  3. Header & navigation     — top bar, mobile menu
  4. Hero                    — the big opening image
  5. Shared section pieces   — headings, buttons, reveal animation
  6. Artwork grid & cards    — the masonry gallery
  7. Collection index cards  — the "rooms" on the home page
  8. Single artwork page     — one piece, price, inquiry
  9. Lightbox                — click-to-enlarge viewer
 10. About / contact / footer
 11. Light mood              — collections that choose "Light (parchment)"
 12. Mobile adjustments      — everything under 860px wide
=============================================================================
*/

/* ---- 1. COLOR & FONT VARIABLES ------------------------------------------
   --accent is overridden per collection page by the theme (each collection
   picks its own accent color in the admin). Everything derives from these. */
:root {
  --ink:        #10131f;   /* deep indigo-black canvas */
  --ink-soft:   #181c2c;   /* slightly lifted panels */
  --parchment:  #efe7d8;   /* warm cream text */
  --parchment-dim: #c9bfae;
  --accent:     #c19a5b;   /* antique gold (default accent) */
  --accent-soft: color-mix(in srgb, var(--accent) 30%, transparent);
  --serif:   'Cormorant Garamond', Georgia, serif;
  --display: 'Cinzel', 'Times New Roman', serif;
  --sans:    'Jost', 'Helvetica Neue', sans-serif;
}

/* ---- 2. BASE ELEMENTS ---------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--ink); }

/* Respect visitors who turn off animation in their device settings. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- 3. HEADER & NAVIGATION ---------------------------------------------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 4vw;
  transition: background .4s, box-shadow .4s;
}
.site-nav.scrolled {
  background: rgba(13, 16, 28, .96);
  box-shadow: 0 1px 0 var(--accent-soft);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand svg { width: 30px; height: 30px; fill: var(--accent); transition: transform .5s; }
.brand:hover svg { transform: rotate(-8deg) scale(1.08); }
.brand-name { font-family: var(--display); font-size: 1.02rem; letter-spacing: .22em; }
.brand-name span { color: var(--accent); }
.nav-links {
  display: flex; gap: 2rem; align-items: center;
  font-family: var(--sans); font-weight: 300; font-size: .8rem;
  letter-spacing: .22em; text-transform: uppercase;
}
.nav-links a { position: relative; padding: .3rem 0; color: var(--parchment-dim); transition: color .3s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .35s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--parchment); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

/* Mobile menu button (hidden on desktop) */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--accent-soft);
  color: var(--parchment); font-family: var(--sans); font-size: .75rem;
  letter-spacing: .2em; text-transform: uppercase; padding: .55rem 1rem; cursor: pointer;
}

/* ---- 4. HERO -------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; isolation: isolate; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background-position: center 38%; background-size: cover; background-repeat: no-repeat;
  animation: slow-drift 26s ease-in-out infinite alternate; /* gentle "living painting" motion */
}
@keyframes slow-drift {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.07) translateY(-1.5%); }
}
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(16,19,31,.74) 0%, rgba(16,19,31,.30) 42%,
    rgba(16,19,31,.55) 72%, var(--ink) 100%);
}
.hero-inner { padding: 0 6vw; max-width: 920px; animation: rise 1.4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; } }
.hero-fleur { width: 62px; height: 62px; margin: 0 auto 1.4rem; fill: var(--parchment); opacity: .92; filter: drop-shadow(0 2px 14px rgba(0,0,0,.5)); }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.1rem, 6.4vw, 4.6rem);
  letter-spacing: .14em; line-height: 1.15;
  text-shadow: 0 2px 30px rgba(0,0,0,.65);
}
.hero h1 .amp { color: var(--accent); }
.hero-sub {
  margin-top: 1.2rem; font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  opacity: .93; text-shadow: 0 1px 14px rgba(0,0,0,.7);
}
.hero-cta { margin-top: 2.6rem; display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--parchment-dim); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* Slim hero variant used on collection pages */
.hero.hero-slim { min-height: 62svh; }

/* ---- 5. SHARED SECTION PIECES --------------------------------------------- */
section { padding: 6rem 6vw; }
.kicker {
  font-family: var(--sans); font-weight: 300; font-size: .74rem;
  letter-spacing: .4em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
h2.section-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: .1em; margin-bottom: 1.1rem;
}
.rule { width: 64px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); margin: 1.5rem 0; }
.btn {
  display: inline-block; font-family: var(--sans); font-size: .78rem; letter-spacing: .26em;
  text-transform: uppercase; padding: .95rem 2.1rem; border: 1px solid var(--accent);
  color: var(--parchment); background: rgba(16,19,31,.35); transition: .35s; cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--ink); }
.btn.ghost { border-color: rgba(239,231,216,.4); }
.btn.ghost:hover { background: var(--parchment); border-color: var(--parchment); color: var(--ink); }

/* Scroll-into-view reveal (JS adds .in when the element becomes visible) */
/* Hiding only arms when main.js confirms it is running (html.js) — no JS, no blank page. */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---- 6. ARTWORK GRID & CARDS ---------------------------------------------- */
.works-head { text-align: center; max-width: 720px; margin: 0 auto 2.4rem; }
.filters { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }
.chip {
  font-family: var(--sans); font-weight: 300; font-size: .74rem; letter-spacing: .2em;
  text-transform: uppercase; padding: .55rem 1.25rem;
  border: 1px solid rgba(239,231,216,.25); color: var(--parchment-dim);
  cursor: pointer; background: none; transition: .3s;
}
.chip:hover { border-color: var(--accent); color: var(--parchment); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.works-grid { columns: 3 300px; column-gap: 1.4rem; max-width: 1320px; margin: 0 auto; }
.piece {
  break-inside: avoid; margin-bottom: 1.4rem; position: relative; overflow: hidden;
  background: var(--ink-soft); border: 1px solid rgba(239,231,216,.07); display: block;
}
.piece img { width: 100%; transition: transform .8s ease, filter .8s ease; filter: saturate(.96); }
.piece:hover img { transform: scale(1.045); filter: saturate(1.06); }
.piece figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.4rem 1.1rem .85rem;
  background: linear-gradient(180deg, transparent, rgba(13,16,28,.9));
  opacity: 0; transform: translateY(8px); transition: .45s;
}
.piece:hover figcaption { opacity: 1; transform: none; }
.p-title { font-family: var(--display); font-size: .98rem; letter-spacing: .08em; }
.p-meta  { font-family: var(--sans); font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin-top: .2rem; }
.piece.hide { display: none; }

/* Little "Sold" ribbon on cards */
.badge-sold {
  position: absolute; top: .9rem; left: -2.2rem; z-index: 2; transform: rotate(-45deg);
  background: #7d2b3a; color: var(--parchment); font-family: var(--sans);
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; padding: .3rem 2.6rem;
}

/* ---- 7. COLLECTION INDEX CARDS (the "rooms" on the home page) -------------- */
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.3rem; max-width: 1320px; margin: 0 auto; }
.room {
  position: relative; min-height: 340px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(239,231,216,.08); display: flex; align-items: flex-end;
}
.room-bg {
  position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center;
  transition: transform 1.1s ease; filter: saturate(.92);
}
.room:hover .room-bg { transform: scale(1.06); }
.room-veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(16,19,31,.12) 30%, rgba(16,19,31,.88) 100%);
  transition: background .5s;
}
.room-body { padding: 1.6rem 1.5rem; width: 100%; }
.room-title { font-family: var(--display); font-size: 1.35rem; letter-spacing: .12em; }
.room-count { font-family: var(--sans); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; margin-top: .35rem; color: var(--parchment-dim); }
.room-line { width: 0; height: 2px; margin-top: .8rem; transition: width .5s; }
.room:hover .room-line { width: 56px; }

/* ---- 8. SINGLE ARTWORK PAGE ------------------------------------------------ */
.artwork-single { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); gap: 3.6rem; max-width: 1320px; margin: 0 auto; align-items: start; padding-top: 8.5rem; }
.artwork-stage { position: relative; }
.artwork-stage img { width: 100%; border: 1px solid var(--accent-soft); box-shadow: 0 30px 80px rgba(0,0,0,.55); cursor: zoom-in; }
.artwork-stage .frame-echo { position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; border: 1px solid rgba(239,231,216,.14); z-index: -1; }
.artwork-info h1 { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: .08em; line-height: 1.2; }
.artwork-price { font-family: var(--display); font-size: 1.5rem; color: var(--accent); margin-top: 1.1rem; letter-spacing: .06em; }
.artwork-status { display: inline-block; font-family: var(--sans); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; border: 1px solid var(--accent-soft); padding: .35rem .9rem; margin-top: .9rem; color: var(--parchment-dim); }
.artwork-status.sold { border-color: #7d2b3a; color: #d98a99; }
.artwork-specs { margin-top: 1.6rem; font-family: var(--sans); font-weight: 300; font-size: .85rem; letter-spacing: .08em; color: var(--parchment-dim); line-height: 2; }
.artwork-specs strong { color: var(--parchment); font-weight: 400; }
.artwork-desc { margin-top: 1.4rem; font-size: 1.05rem; color: #ded5c4; }
.artwork-collections { margin-top: 1.6rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.artwork-collections a { font-family: var(--sans); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; border: 1px solid rgba(239,231,216,.25); padding: .4rem 1rem; color: var(--parchment-dim); transition: .3s; }
.artwork-collections a:hover { border-color: var(--accent); color: var(--parchment); }
.inquire { margin-top: 2rem; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; max-width: 1320px; margin: 3.5rem auto 0; padding-top: 1.8rem; border-top: 1px solid rgba(239,231,216,.1); font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
.prevnext a { color: var(--parchment-dim); transition: color .3s; }
.prevnext a:hover { color: var(--accent); }

/* ---- 9. LIGHTBOX ------------------------------------------------------------ */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,12,22,.96);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 88vw; max-height: 76vh; width: auto; box-shadow: 0 24px 80px rgba(0,0,0,.7); border: 1px solid var(--accent-soft); }
.lb-caption { margin-top: 1.1rem; font-family: var(--display); letter-spacing: .12em; font-size: 1.02rem; text-align: center; padding: 0 1rem; }
.lb-meta { font-family: var(--sans); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-top: .3rem; }
.lb-link { font-family: var(--sans); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; margin-top: .8rem; border-bottom: 1px solid var(--accent); padding-bottom: .15rem; color: var(--parchment-dim); }
.lb-link:hover { color: var(--parchment); }
.lb-close { position: absolute; top: 1.2rem; right: 1.6rem; font-size: 2rem; color: var(--parchment-dim); cursor: pointer; background: none; border: none; transition: .3s; line-height: 1; }
.lb-close:hover { color: var(--parchment); transform: rotate(90deg); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--parchment-dim); font-size: 2.6rem; cursor: pointer; padding: 1rem; transition: .3s; font-family: var(--serif); }
.lb-nav:hover { color: var(--accent); }
.lb-prev { left: .6rem; } .lb-next { right: .6rem; }

/* ---- 10. ABOUT / CONTACT / FOOTER ------------------------------------------- */
.statement { max-width: 840px; margin: 0 auto; text-align: center; }
.statement blockquote { font-size: clamp(1.3rem, 2.6vw, 1.85rem); font-style: italic; line-height: 1.5; }
.statement blockquote em { color: var(--accent); }
.statement .attrib { margin-top: 1.4rem; font-family: var(--sans); font-size: .76rem; letter-spacing: .3em; text-transform: uppercase; color: var(--parchment-dim); }

.about-band { background: linear-gradient(180deg, var(--ink) 0%, #151a2b 50%, var(--ink) 100%); }
.about-wrap { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 4rem; max-width: 1150px; margin: 0 auto; align-items: center; }
.about-art { position: relative; }
.about-art img { border: 1px solid var(--accent-soft); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.about-art::after { content: ''; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; border: 1px solid rgba(239,231,216,.18); z-index: -1; }
.about-text p { margin-bottom: 1.15rem; color: #ded5c4; }
.about-text .lede { font-size: 1.28rem; font-style: italic; color: var(--parchment); }
.sig { font-family: var(--display); letter-spacing: .2em; color: var(--accent); margin-top: 1.6rem; font-size: 1.02rem; }

.contact-band { text-align: center; position: relative; isolation: isolate; }
.contact-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.contact-band::after { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(13,16,28,.9); }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact-email { font-family: var(--display); font-size: clamp(1.15rem, 3vw, 1.85rem); letter-spacing: .08em; border-bottom: 1px solid var(--accent); padding-bottom: .3rem; transition: .3s; }
.contact-email:hover { color: var(--accent); }
.contact-meta { margin-top: 2rem; font-family: var(--sans); font-weight: 300; font-size: .84rem; letter-spacing: .2em; text-transform: uppercase; color: var(--parchment-dim); line-height: 2.2; }
.socials { margin-top: 2rem; display: flex; gap: 1.4rem; justify-content: center; }
.socials a { width: 44px; height: 44px; border: 1px solid rgba(239,231,216,.3); display: flex; align-items: center; justify-content: center; transition: .3s; }
.socials a:hover { border-color: var(--accent); background: var(--accent); }
.socials svg { width: 17px; height: 17px; fill: var(--parchment); }
.socials a:hover svg { fill: var(--ink); }

.site-footer { padding: 2.6rem 6vw; text-align: center; border-top: 1px solid var(--accent-soft); }
.site-footer svg { width: 26px; height: 26px; fill: var(--accent); margin-bottom: .8rem; opacity: .85; }
.site-footer p { font-family: var(--sans); font-weight: 300; font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--parchment-dim); }

/* Plain page (About / Contact if kept as pages) */
.plain-page { max-width: 780px; margin: 0 auto; padding-top: 8.5rem; }
.plain-page h1 { font-family: var(--display); letter-spacing: .1em; margin-bottom: 1.4rem; }
.plain-page p { margin-bottom: 1.1rem; }

/* ---- 11. LIGHT MOOD ---------------------------------------------------------
   Applied to <body> as .mood-light when a collection chooses "Light (parchment)".
   The same variables flip, so every component adapts automatically. */
body.mood-light {
  --ink:        #efe7d8;
  --ink-soft:   #e4dac6;
  --parchment:  #241f18;
  --parchment-dim: #6d6353;
}
body.mood-light .hero-veil { background: linear-gradient(180deg, rgba(239,231,216,.55) 0%, rgba(239,231,216,.15) 42%, rgba(239,231,216,.5) 72%, var(--ink) 100%); }
body.mood-light .site-nav.scrolled { background: rgba(239,231,216,.96); }
body.mood-light .piece figcaption { background: linear-gradient(180deg, transparent, rgba(239,231,216,.92)); }
body.mood-light .btn { background: rgba(239,231,216,.35); }
body.mood-light .btn:hover { color: #fff; }
body.mood-light .lightbox { background: rgba(239,231,216,.97); }

/* ---- 12. MOBILE ADJUSTMENTS -------------------------------------------------- */
@media (max-width: 860px) {
  section { padding: 4.2rem 5vw; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: 90; flex-direction: column; justify-content: center;
    gap: 2.2rem; background: #0e1220; overscroll-behavior: contain; font-size: 1rem;
    opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  body.mood-light .nav-links { background: #efe7d8; }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .about-wrap { grid-template-columns: 1fr; gap: 2.6rem; }
  .artwork-single { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 6.5rem; }
  .works-grid { columns: 2 160px; column-gap: .8rem; }
  .piece { margin-bottom: .8rem; }
  /* On phones there is no hover — always show the caption bar. */
  .piece figcaption { opacity: 1; transform: none; padding: 1.6rem .8rem .7rem; }
  .p-title { font-size: .85rem; }
  .p-meta { font-size: .58rem; }
  .lb-nav { display: none; } /* swipe instead */
  .hero.hero-slim { min-height: 46svh; }
}
