/* =========================================================================
   Lady Viri — Ashley Hunt
   Botanical / earthy palette. Zero dependencies. Edit the variables below
   to retune the whole site.
   ========================================================================= */

:root {
  /* Palette — drawn from the Lady Viri brand (sunlit forest, gold light) */
  --paper:        #f6f3e8;  /* page background — warm sunlit haze */
  --paper-deep:   #ebe5d3;  /* alternating section / cards        */
  --ink:          #2b2a22;  /* primary text — soft black          */
  --ink-soft:     #585646;  /* secondary text                     */
  --sage:         #7e9350;  /* primary accent — living chartreuse */
  --forest:       #35501f;  /* deep forest green — the wordmark    */
  --gold:         #c49a46;  /* sunlight / dragonfly gold accent    */
  --clay:         #b07a4e;  /* warm earth (soft flags, nfs)        */
  --line:         #ddd5c2;  /* hairline borders                    */

  /* Type */
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --maxw: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.12rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: 0.01em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--forest); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Header / nav ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
}
.wordmark {
  font-family: var(--serif); font-size: 1.4rem; letter-spacing: 0.06em;
  color: var(--forest); text-decoration: none; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--gold);
}
.nav-links {
  list-style: none; display: flex; gap: clamp(0.9rem, 2.5vw, 2rem);
  margin: 0; padding: 0; font-size: 0.95rem;
}
.nav-links a {
  color: var(--ink-soft); text-decoration: none; letter-spacing: 0.04em;
  text-transform: uppercase; font-size: 0.8rem;
}
.nav-links a:hover { color: var(--forest); }

/* On small screens, drop the links onto their own line(s) below the title */
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: center; gap: 0.6rem; }
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.3rem; }
  html { scroll-padding-top: 7.5rem; }
}

/* -------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid; place-items: center;
  text-align: center;
  padding: var(--section-y) 1.5rem;
  background:
    radial-gradient(90% 55% at 50% -8%, color-mix(in srgb, var(--gold) 30%, var(--paper)) 0%, transparent 55%),
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--sage) 26%, var(--paper)) 0%, var(--paper) 62%),
    var(--paper);
  overflow: hidden;
}
.hero::after {
  /* soft botanical vignette */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 120%, color-mix(in srgb, var(--forest) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 42rem; }
.hero-emblem { margin: 0 0 1.8rem; }
.hero-emblem img {
  width: clamp(110px, 16vw, 164px); height: clamp(110px, 16vw, 164px);
  border-radius: 50%; object-fit: cover; margin: 0 auto;
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold), 0 14px 36px rgba(53, 80, 31, 0.28);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.72rem;
  color: var(--sage); margin: 0 0 1.4rem;
}
.hero-title {
  font-size: clamp(3.2rem, 13vw, 7rem); margin: 0; color: var(--forest);
  letter-spacing: 0.02em;
}
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--ink-soft); margin: 1.2rem 0 2.2rem; }

.btn {
  display: inline-block; font-family: var(--sans);
  background: var(--forest); color: var(--paper);
  padding: 0.8rem 1.8rem; border-radius: 999px;
  text-decoration: none; letter-spacing: 0.06em; font-size: 0.85rem;
  text-transform: uppercase; transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--sage); color: var(--paper); transform: translateY(-1px); }

.scroll-cue {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-size: 1.5rem; color: var(--sage); text-decoration: none; z-index: 1;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ------------------------------ Sections -------------------------------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: var(--section-y) clamp(1rem, 4vw, 2.5rem);
}
.section--narrow { max-width: 760px; }
.section-head { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; color: var(--forest);
  display: inline-block; position: relative; padding-bottom: 0.4rem;
}
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 2.5rem; height: 2px;
  background: var(--sage);
}
.section-note { color: var(--ink-soft); font-size: 0.95rem; margin: 0.6rem 0 0; }

.prose p { margin: 0 0 1.1rem; max-width: 62ch; }
.placeholder-flag {
  font-size: 0.8rem; color: var(--clay); font-style: italic;
  border-left: 2px solid var(--clay); padding-left: 0.75rem;
}

/* ------------------------------- Gallery -------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--gap);
}
.work {
  display: flex; flex-direction: column; gap: 0.7rem;
  background: none; border: 0; padding: 0; margin: 0;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.work-frame {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 0.6rem;
  overflow: hidden;
}
.work-frame img {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.work:hover .work-frame img { transform: scale(1.03); }
.work:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
.work-meta { line-height: 1.35; }
.work-title { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.work-sub { font-size: 0.85rem; color: var(--ink-soft); }
.status {
  display: inline-block; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 0.12rem 0.5rem; border-radius: 999px;
  margin-top: 0.3rem;
}
.status--available { background: color-mix(in srgb, var(--sage) 25%, var(--paper)); color: var(--forest); }
.status--sold      { background: var(--paper-deep); color: var(--ink-soft); }
.status--nfs       { background: var(--paper-deep); color: var(--clay); }

/* --- TEMP: hide per-piece metadata (title · medium · year · availability)
   until the real details are ready. Delete this block to show it again.
   The data still lives in js/site.js; this only hides it visually. --- */
.work-meta { display: none; }
/* (the lightbox caption is hidden further down, after its base rules, so it wins) */

/* -------------------------------- About --------------------------------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--gap); align-items: start; margin-bottom: 2.5rem;
}
.about-portrait img {
  width: 100%; height: auto; max-height: 72vh; object-fit: contain;
  border: 1px solid var(--line);
}
@media (max-width: 640px) { .about-portrait img { max-width: 20rem; margin: 0 auto; } }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }

.cv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2.5rem; }
.cv-block h3 {
  font-size: 1.1rem; color: var(--forest); margin: 0 0 0.6rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.3rem;
}
.cv-list { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.cv-list li { margin-bottom: 0.55rem; color: var(--ink); }
.cv-year { display: inline-block; min-width: 3.4rem; color: var(--sage); font-variant-numeric: tabular-nums; }

/* ------------------------------- Contact -------------------------------- */
.contact-email { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0.5rem 0 0.5rem; }
.contact-email a { text-decoration: none; }
.contact-social { font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.4rem); margin: 0 0 1rem; }
.contact-social a { text-decoration: none; }
.contact-social-label { color: var(--ink-soft); font-family: var(--sans); font-size: 0.9rem; }

/* -------------------------------- Footer -------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center; padding: 2.5rem 1rem;
  color: var(--ink-soft); font-size: 0.85rem; background: var(--paper-deep);
}
.site-footer p { margin: 0.2rem 0; }
.footer-note { color: var(--sage); }

/* ------------------------------- Lightbox ------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in srgb, var(--ink) 92%, black);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1rem; padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; display: grid; place-items: center; min-width: 0; }
.lightbox-figure img {
  max-width: 100%; max-height: 72vh; width: auto; height: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); background: var(--paper);
}
.lightbox-caption { color: var(--paper); text-align: center; margin-top: 1rem; font-size: 0.95rem; }
.lightbox-caption .lb-title { font-family: var(--serif); font-size: 1.3rem; display: block; }
.lightbox-caption .lb-sub { color: #cfc9ba; }
.lightbox-caption .lb-inquire {
  display: inline-block; margin-top: 0.8rem; color: var(--paper);
  border: 1px solid var(--sage); padding: 0.45rem 1.2rem; border-radius: 999px;
  text-decoration: none; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.lightbox-caption .lb-inquire:hover { background: var(--sage); }

/* --- TEMP: hide the lightbox caption (title / details / inquire) for now.
   Placed after the base rules above so source order lets it win.
   Delete this block (and the .work-meta one) to restore everything. --- */
.lightbox-caption .lb-title,
.lightbox-caption .lb-sub,
.lightbox-caption .lb-inquire { display: none; }
.lightbox-close, .lightbox-nav {
  background: none; border: 0; color: var(--paper); cursor: pointer;
  font-size: 2.5rem; line-height: 1; padding: 0.5rem; opacity: 0.8;
}
.lightbox-close { position: absolute; top: 0.5rem; right: 1rem; font-size: 2.2rem; }
.lightbox-nav:hover, .lightbox-close:hover { opacity: 1; color: var(--sage); }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 3rem; }
  .lightbox-prev { left: 0.2rem; } .lightbox-next { right: 0.2rem; }
}

/* ----------------------------- Reduced motion --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* -------------------------------- Print --------------------------------- */
@media print {
  .site-header, .hero, .scroll-cue, .lightbox, .site-footer, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 0.5rem 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .cv { grid-template-columns: 1fr 1fr; }
  .placeholder-flag { display: none; }
}
