/* =========================================================================
   Job Garden "Night Garden" treatment for annieanimation.com
   Aesthetic layer only. Load AFTER fireflies.css.
   - No markup changes, no layout/box-size changes.
   - .cta (portfolio button) and .rail-linkedin are untouched.
   - Video popup (cinema, dock, marks, tips, now panel, fs/skip buttons)
     is untouched; card styling is scoped to body:not(.cinema-open).
   ========================================================================= */

:root {
  --jg-wallpaper: url("./garden/night-garden-wallpaper.jpg");
  --jg-banner: url("./garden/goldleaf-banner.jpg");

  --jg-ivory: #f3ede1;
  --jg-ink-soft: #d5ddd8;
  --jg-muted: #a2b8ae;
  --jg-teal: #5fb3a6;
  --jg-teal-hi: #7ec9be;
  --jg-violet: #a68ecb;
  --jg-applied: #3d9b78;
  --jg-applied-hi: #8fd4b5;
  --jg-gold-line: rgba(201, 164, 95, 0.26);
  --jg-line-strong: rgba(201, 164, 95, 0.38);
  --jg-gild: linear-gradient(168deg, #f4e2b4 8%, #c9a45f 46%, #6f5426 96%);
  --jg-shadow-hover: 0 1px 0 rgba(201, 164, 95, 0.12), 0 22px 48px rgba(0, 0, 0, 0.45);
  --jg-ease: cubic-bezier(.2, .8, .2, 1);
  --jg-sans: "Figtree", "Gill Sans", "Gill Sans MT", Calibri, system-ui, sans-serif;
  --jg-serif: "EB Garamond", "Minion Pro", Georgia, "Times New Roman", serif;
}

::selection { background: rgba(201, 164, 95, 0.3); color: #f4e2b4; }
html { scrollbar-color: rgba(201, 164, 95, 0.35) #050f16; }

/* ---------- Wallpaper: Night Garden, unblurred, with the Job Garden vignette.
   forest.webp stays underneath as a fallback if the wallpaper can't load. */
html::before {
  inset: 0;
  filter: none;
  background:
    radial-gradient(70% 80% at 50% 40%, rgba(5, 15, 22, 0.22) 0%, rgba(5, 15, 22, 0.72) 55%, rgba(5, 15, 22, 0.88) 100%),
    linear-gradient(180deg, rgba(5, 15, 22, 0.35) 0%, rgba(5, 15, 22, 0.15) 20%, rgba(5, 15, 22, 0.55) 100%),
    var(--jg-wallpaper) center top / cover no-repeat,
    url("./forest.webp") center 46% / cover no-repeat;
}

/* ---------- Top rail: frosted night glass with a fading gold hairline */
.rail {
  background: rgba(8, 24, 33, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.rail::after {
  content: "";
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 164, 95, 0.45), transparent);
  pointer-events: none;
}
.rail nav > a, .rail .nav-drop-btn { color: var(--jg-ink-soft); }
.rail nav > a:hover, .rail .nav-drop-btn:hover { color: #f4e2b4; }

.rail .nav-drop-list {
  background: rgba(8, 24, 33, 0.96);
  border: 1px solid var(--jg-gold-line);
  border-radius: 14px;
  padding: 0.35rem 0.3rem 0.45rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.rail .nav-drop-list a { border-radius: 10px; }
.rail .nav-drop-list a:hover { background: rgba(201, 164, 95, 0.08); color: #f4e2b4; }

/* ---------- Mobile menu sheet */
.site-menu {
  background: rgba(8, 24, 33, 0.9);
  border: 1px solid var(--jg-gold-line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.menu-nav a:hover { color: #f4e2b4; }

/* ---------- The garden shell: rounded night panel behind the page (desktop) */
@media (min-width: 861px) {
  .bed { position: relative; }
  .bed::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -0.6rem -1.2rem -1.4rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(8, 24, 33, 0.72), rgba(5, 15, 22, 0.88));
    border: 1px solid var(--jg-gold-line);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 30px 80px rgba(0, 0, 0, 0.45);
    pointer-events: none;
  }
  body.cinema-open .bed::before,
  body.resume-open .bed::before { display: none; }
}

/* ---------- Hero banner: gold-leaf card behind each page title */
.page-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0.45rem 0 -0.45rem;
  border-radius: 18px;
  background:
    radial-gradient(80% 70% at 50% 45%, rgba(6, 20, 28, 0.15) 0%, rgba(6, 20, 28, 0.5) 100%),
    linear-gradient(180deg, rgba(6, 20, 28, 0.35) 0%, rgba(6, 20, 28, 0.6) 100%),
    var(--jg-banner) center / cover no-repeat,
    rgb(6, 24, 32);
  border: 1px solid var(--jg-gold-line);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 12px 40px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.page-head::after {
  content: "";
  position: absolute;
  left: 2.25rem;
  right: 2.25rem;
  bottom: -0.45rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jg-gold-line), transparent);
  pointer-events: none;
}

/* ---------- Title type: Figtree semibold name + gilded Garamond italic
   (same pairing as "Annie's Job Garden"). Sizes unchanged. */
.display:has(em) {
  font-family: var(--jg-sans);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--jg-ivory);
}
.display em {
  font-family: var(--jg-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lede { font-family: var(--jg-serif); font-size: 1.12rem; color: var(--jg-muted); }
.lede-gold { font-size: 1.2rem; letter-spacing: 0.02em; }

/* ---------- Discipline pills: neutral Job Garden pill, no accent colours */
.pills li, .pill {
  background: rgba(5, 15, 22, 0.45);
  border-color: rgba(201, 164, 95, 0.18);
  color: var(--jg-ink-soft);
  font-weight: 600;
}

/* ---------- Cards (outside the popup only) */
body:not(.cinema-open) .card {
  background: rgba(14, 36, 48, 0.9);
  border-color: var(--jg-gold-line);
}
body:not(.cinema-open) #reel-card {
  transition: transform .18s var(--jg-ease), box-shadow .18s var(--jg-ease), border-color .18s ease;
}
body:not(.cinema-open) #reel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--jg-shadow-hover);
  border-color: var(--jg-line-strong);
}

/* Play button gets the sprout ring */
.play-icon {
  box-shadow:
    inset 0 1px 0 rgba(244, 226, 180, 0.35),
    0 0 0 6px rgba(201, 164, 95, 0.12),
    0 0 0 7px rgba(201, 164, 95, 0.3),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

/* ---------- Section tabs (Work pages) */
.option-bar { border-bottom-color: var(--jg-gold-line); }
/* Games: 4 tabs in a 5-column grid sat left; centre them at the same column width */
@media (min-width: 861px) {
  .option-bar[data-count="4"] { display: flex; justify-content: center; }
  .option-bar[data-count="4"] > a { flex: 0 0 20%; }
}
.option-bar a { color: var(--jg-ink-soft); }
.option-bar a:not([aria-current="true"]):hover { color: #f4e2b4; }
.option-bar a[aria-current="true"]::after {
  background: linear-gradient(90deg, #f4e2b4, #c9a45f 55%, #a8843f);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(201, 164, 95, 0.45);
}

/* ---------- Detail bits on Work / Games / About pages */
.still {
  background:
    linear-gradient(180deg, rgba(17, 43, 56, 0.2), rgba(5, 15, 22, 0.65)),
    radial-gradient(80% 80% at 30% 40%, rgba(95, 179, 166, 0.16), transparent 55%),
    #0b1e28;
}
.shots time { color: var(--jg-teal); }
.siblings a:hover { color: #f4e2b4; }
.dir span { color: var(--jg-muted); }
.dir a:hover strong {
  background-image: var(--jg-gild);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.about-photo {
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--jg-gold-line), 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- Fireflies: show every other one (half as many) */
.firefly-field .fly-wrap:nth-child(2n) { display: none; }

.skip {
  background: linear-gradient(174deg, #f4e2b4 4%, #c9a45f 48%, #a8843f 100%);
  color: #241a06;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.cinema-open) #reel-card { transition: none; }
  body:not(.cinema-open) #reel-card:hover { transform: none; }
}
