/* ============================================================
   Creations of Stardust — shared site styles
   Single source of truth for design tokens + the nav system.
   Linked by every page as /css/site.css (bump ?v= on change).
   Page-specific styles stay inline in each page.
   ============================================================ */

:root {
  --bg:        #141410;
  --bg-card:   #1c1c16;
  --green:     #7fb069;
  --green-dim: rgba(127,176,105,0.18);
  --green-border: rgba(127,176,105,0.22);
  --gold:      #c9a84c;
  --restock:   #6f9bb0;
  --cream:     #f0e6cc;
  --cream-warm:#c8b890;  /* italic/blockquote accent — was hardcoded across post + about */
  --muted:     #b0a48c;
  --dim:       #5a5448;
  --dim-text:  #928a72;  /* nudged lighter: clears 4.5:1 on --bg-card, not just --bg */
  --radius:    8px;
}

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20,20,16,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--green-border);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 0.85rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
/* On pages with a full-bleed hero, float the top nav over the image
   (no dead black band — the picture shows through/under the corners).
   :not(.mobile-dock) so this never touches the bottom dock, also a <nav>. */
body.nav-overlay nav:not(.mobile-dock) { position: fixed; left: 0; right: 0; }
/* Brand = the Home button: logo pic collapsed, wordmark on hover/active */
nav .brand {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  overflow: hidden; white-space: nowrap;
  background: transparent;
  transition: background 0.35s ease;
}
nav .brand img {
  height: 36px; width: 36px; flex-shrink: 0;
  object-fit: cover; border-radius: 50%;
  border: 1px solid var(--green-border);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
nav .brand .label {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; color: var(--cream);
  /* brand wordmark stays constant on every page/size */
}
nav .brand:hover, nav .brand:focus-visible { outline: none; background: rgba(240,230,204,0.04); }
nav .brand:hover .label, nav .brand:focus-visible .label {
  max-width: 340px; opacity: 1; transform: translateX(0);
}
nav .brand:hover img, nav .brand:focus-visible img {
  border-color: var(--green); box-shadow: 0 0 18px rgba(127,176,105,0.25);
}
nav .brand.active .label { max-width: 340px; opacity: 1; transform: translateX(0); }
nav .brand.active img { border-color: var(--gold); box-shadow: 0 0 16px rgba(201,168,76,0.30); }
/* ── Expanding icon nav (desktop) ─────────────────── */
nav .nav-links { display: flex; align-items: center; gap: 0.3rem; }
nav .nav-links a {
  --accent: var(--green);
  height: 44px;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted); text-decoration: none;
  overflow: hidden; white-space: nowrap;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, color 0.3s ease;
}
nav .nav-links a svg {
  width: 20px; height: 20px; flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.45s cubic-bezier(.22,1,.36,1);
}
nav .nav-links a .label {
  font-size: 0.7rem; letter-spacing: 0.13em;
  text-transform: uppercase; font-weight: 400;
  max-width: 0; opacity: 0; transform: translateX(-6px);
  transition: max-width 0.45s cubic-bezier(.22,1,.36,1),
              opacity 0.25s ease, transform 0.35s ease;
}
nav .nav-links a:hover,
nav .nav-links a:focus-visible {
  color: var(--accent);
  background: var(--green-dim);
  box-shadow: 0 0 22px rgba(127,176,105,0.18), inset 0 0 0 1px var(--green-border);
  outline: none;
}
nav .nav-links a:hover svg,
nav .nav-links a:focus-visible svg { transform: translateY(-1px) scale(1.06); }
nav .nav-links a:hover .label,
nav .nav-links a:focus-visible .label { max-width: 220px; opacity: 1; transform: translateX(0); }
nav .nav-links a.active {
  --accent: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.12);
  box-shadow: inset 0 0 0 1px rgba(201,168,76,0.28);
}
nav .nav-links a.active .label { max-width: 220px; opacity: 1; transform: translateX(0); }
nav .nav-links a.active:hover { box-shadow: 0 0 22px rgba(201,168,76,0.18), inset 0 0 0 1px rgba(201,168,76,0.32); }
@media (prefers-reduced-motion: reduce) {
  nav .nav-links a, nav .nav-links a svg, nav .nav-links a .label { transition: none !important; }
}

/* ── HAMBURGER & MOBILE NAV ──────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(20,20,16,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav.open { display: flex !important; }
.mobile-nav a {
  color: var(--cream);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--green); }
.mobile-nav-footer {
  position: absolute; bottom: 2.5rem;
  font-size: 0.65rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim-text);
}

/* ── Scroll reveal ────────────────────────────────────
   Sections fade + rise as they enter the viewport. Pure CSS via
   scroll-driven animations, so there is no JS, no flash-of-hidden-content,
   and no dependency: browsers without `animation-timeline` (guarded by
   @supports) simply show everything statically, and crawlers read the
   real server-rendered text regardless of opacity. Gated on
   prefers-reduced-motion so it collapses to static for motion-sensitive
   readers. Scoped to the marketing surfaces (home / about / contact) —
   deliberately not the shop grid, which the page's own JS re-renders. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .gallery-grid img,
    .stats-bar .stat,
    .reviews-section,
    .homestead-card,
    .pig-gallery img,
    .story-split,
    .contact-card {
      animation: cds-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
    @keyframes cds-reveal {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* ── Mobile floating dock ─────────────────────────── */
.mobile-dock { display: none; }

@media (max-width: 640px) {
  .hamburger { display: none !important; }
  nav .nav-links { display: none !important; }
  /* centre the brand in the top bar (only the logo + wordmark show here) */
  nav { padding: 0.85rem 1.2rem; justify-content: center; }
  body { padding-bottom: 76px; }

  .mobile-dock {
    display: flex; align-items: center; gap: 0.1rem;
    position: fixed; left: 50%; transform: translateX(-50%);
    top: auto; bottom: 16px; z-index: 160;
    max-width: calc(100vw - 20px);
    overflow-x: auto; overflow-y: visible;
    scrollbar-width: none;
    background: rgba(24,26,18,0.9);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--green-border);
    border-radius: 999px; padding: 0.35rem;
    box-shadow: 0 14px 34px rgba(0,0,0,0.5), inset 0 1px 0 rgba(240,230,204,0.04);
  }
  .mobile-dock::-webkit-scrollbar { display: none; }
  .mobile-dock a {
    height: 44px; min-width: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0 8px; border-radius: 999px;
    color: var(--muted); text-decoration: none;
    white-space: nowrap; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.25s ease, color 0.25s ease;
  }
  .mobile-dock a svg {
    width: 20px; height: 20px; flex-shrink: 0;
    stroke: currentColor; fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  }
  .mobile-dock a .label {
    font-size: 0.62rem; letter-spacing: 0.1em;
    text-transform: uppercase; font-weight: 400;
    max-width: 0; opacity: 0;
    transition: max-width 0.35s cubic-bezier(.22,1,.36,1), opacity 0.2s ease;
  }
  .mobile-dock a.expanded .label,
  .mobile-dock a:focus-visible .label { max-width: 150px; opacity: 1; }
  .mobile-dock a.expanded, .mobile-dock a.active,
  .mobile-dock a:focus-visible {
    color: var(--gold);
    background: rgba(201,168,76,0.14);
    box-shadow: inset 0 0 0 1px rgba(201,168,76,0.3);
    outline: none;
  }
  .mobile-dock a:active { color: var(--green); background: var(--green-dim); }
  /* logo pic as the Home item */
  .mobile-dock a.brand-dot { padding-left: 5px; }
  .mobile-dock a.brand-dot img {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--green-border);
  }
  .mobile-dock a.brand-dot.active img,
  .mobile-dock a.brand-dot.expanded img,
  .mobile-dock a.brand-dot:focus-visible img {
    border-color: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.35);
  }
}
