/* ==========================================================================
   Lucky Lane — venue site
   Design language adapted from janavu.com ("Living System"): deep forest/canopy
   dark ground, bone text, a vivid green primary accent with a sky-blue second,
   warm paper light bands, and a green->blue "grow" gradient. Manrope display,
   Inter body, IBM Plex Mono labels. Motion: rise-on-scroll, idle float, hairline
   sweeps, a dimensional four-leaf clover — all gated and reduced-motion safe.
   ========================================================================== */

/* ---------------------------------------------------------------- *
 * 1. TOKENS — colour (from the inspected Janavu palette)           *
 * ---------------------------------------------------------------- */
:root {
  /* Grounds */
  --canopy: #04140d;        /* deepest dark ground (hero/footer) */
  --understory: #071f17;    /* second dark band */
  --moss: #0c2c21;          /* dark surface / card */
  --forest: #063b27;
  --paper: #f2f4ee;         /* warm off-white light band */
  --paper-2: #e6ece3;       /* contrasting light surface */

  /* Foregrounds */
  --bone: #f3f6f1;          /* light text on dark */
  --mist: #a8bcb0;          /* muted text on dark */
  --soil: #0b1a14;          /* dark text on light */
  --soil-muted: #44574d;    /* muted text on light */

  /* Accents */
  --green: #19b94d;         /* primary accent */
  --green-700: #0a7a2f;
  --green-ink: #0b6b30;     /* green text on light (AA) */
  --sprout: #6fe08f;        /* green accent on dark */
  --blue: #087dce;          /* secondary accent */
  --blue-ink: #0665a8;      /* blue text on light (AA) */
  --sky: #6bb8f0;           /* blue accent on dark */
  --navy: #082d70;

  --grad-grow: linear-gradient(90deg, var(--blue), var(--green));

  /* Semantic defaults (paper-like, used outside a band) */
  --bg: var(--paper);
  --fg: var(--soil);
  --fg-muted: var(--soil-muted);
  --acc: var(--green-ink);
  --acc-2: var(--blue-ink);
  --rule: rgb(11 26 20 / 0.14);
  --surface: var(--paper-2);
  --focus: var(--navy);

  /* ---- Type scale (fluid clamps, mirroring Janavu steps) ---- */
  --step-mega: clamp(2.6rem, 1.5rem + 5vw, 6rem);
  --step-h2: clamp(2rem, 1.3rem + 3.25vw, 4rem);
  --step-h3: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  --step-lead: clamp(1.0625rem, 0.98rem + 0.4vw, 1.3125rem);
  --step-body: 1.0625rem;
  --step-small: 0.9375rem;
  --step-label: 0.75rem;

  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Space / layout ---- */
  --gutter: clamp(1rem, 4vw, 3rem);
  --wrap-max: 82rem;
  --section: clamp(4rem, 2.8rem + 6vw, 8rem);
  --header-h: 4.5rem;
  --radius-pill: 999px;
  --radius-l: 1.75rem;
  --radius-leaf: 0 2.5rem 0 2.5rem; /* asymmetric "leaf cut" */

  /* ---------------------------------------------------------------- *
   * 2. TOKENS — motion                                               *
   * ---------------------------------------------------------------- */
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 520ms;
  --dur-draw: 720ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  --ease-press: cubic-bezier(0.3, 0, 0.5, 1);
  --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --rise: 16px;
}
@media (min-width: 768px) { :root { --rise: 24px; } }

/* ---- Bands: each section declares exactly one ground ---- */
[data-band] { background-color: var(--bg); color: var(--fg); }
[data-band="canopy"], [data-band="understory"] {
  --bg: var(--canopy);
  --fg: var(--bone);
  --fg-muted: var(--mist);
  --acc: var(--sprout);
  --acc-2: var(--sky);
  --rule: rgb(243 246 241 / 0.14);
  --surface: var(--moss);
  --focus: var(--sprout);
  color-scheme: dark;
  /* Static film grain at ~6% (no element, no animation). */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-band="understory"] { --bg: var(--understory); }
[data-band="paper"] { --bg: var(--paper); --surface: var(--paper-2); }
[data-band="paper-2"] { --bg: var(--paper-2); --surface: var(--paper); --rule: rgb(11 26 20 / 0.16); }

/* ---------------------------------------------------------------- *
 * 3. BASE                                                          *
 * ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html:has(dialog[open]) { overflow: hidden; }
body {
  background: var(--canopy);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: inherit;
  text-wrap: balance;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 500;
}
p { text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sprout); color: var(--canopy); }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure { max-width: 60ch; }
.measure-lead { max-width: 42ch; }
.section { padding-block: var(--section); position: relative; }

/* ---- Type helpers ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fg-muted);
}
.eyebrow::before {
  content: "";
  width: 0.8rem; height: 0.8rem;
  border-radius: 0 100% 0 100%;         /* leaf marker */
  background: var(--green);
  flex: none;
}
.t-mega {
  font-family: var(--font-display);
  font-size: var(--step-mega);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 400;
}
.t-h2 { font-size: var(--step-h2); letter-spacing: -0.035em; font-weight: 450; }
.t-lead { font-size: var(--step-lead); line-height: 1.55; color: var(--fg-muted); }
.t-small { font-size: var(--step-small); }

/* Accent phrase: weight + colour + green->blue underline (Janavu .acc). */
.acc {
  font-weight: 600;
  color: var(--acc);
  background-image: var(--grad-grow);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 3px;
  padding-bottom: 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Skip link */
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 60;
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding-inline: 1.25rem; border-radius: var(--radius-pill);
  background: var(--sprout); color: var(--canopy);
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: calc(0.75rem + env(safe-area-inset-top, 0px)); }

/* ---------------------------------------------------------------- *
 * 4. BUTTONS                                                        *
 * ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.7rem 1.4rem; white-space: nowrap;
  border: 0; border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-display); font-weight: 650; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-std),
              color var(--dur-fast) var(--ease-std),
              border-color var(--dur-fast) var(--ease-std),
              scale var(--dur-fast) var(--ease-press);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { scale: 0.97; }
.btn svg { width: 1.15rem; height: 1.15rem; flex: none; transition: translate var(--dur-fast) var(--ease-std); }
.btn:hover svg, .btn:focus-visible svg { translate: 3px 0; }
.btn-primary { background: var(--green); color: var(--canopy); }
.btn-primary:hover { background: #2bd05f; }
.btn-secondary { background: transparent; color: var(--fg); border: 1px solid rgb(from var(--fg) r g b / 0.4); }
.btn-secondary:hover { border-color: var(--fg); background: rgb(from var(--fg) r g b / 0.08); }
.btn-lg { min-height: 3.2rem; padding-inline: 1.7rem; }

/* Underlined arrow link */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem;
  font-family: var(--font-display); font-weight: 650; color: var(--fg); text-decoration: none;
}
.link-arrow span { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.link-arrow:hover span, .link-arrow:focus-visible span { text-decoration-color: currentColor; }
.link-arrow svg { width: 1.1rem; height: 1.1rem; transition: translate var(--dur-fast) var(--ease-std); }
.link-arrow:hover svg { translate: 3px 0; }

/* ---------------------------------------------------------------- *
 * 5. HEADER + NAV                                                   *
 * ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.header-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: calc(var(--header-h) - 1rem); margin-top: 0.5rem; padding: 0 0.5rem 0 1rem;
  border-radius: var(--radius-pill);
  background: rgb(6 28 19 / var(--glass-a, 0.3));
  border: 1px solid rgb(243 246 241 / 0.14);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  color: var(--bone);
  transition: background-color var(--dur-base) var(--ease-std);
}
.site-header[data-scrolled="true"] .header-pill { --glass-a: 0.66; }
.site-header :focus-visible { outline: 2px solid var(--sprout); outline-offset: 3px; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--bone); text-decoration: none; letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; }
.nav-desktop { display: none; align-items: center; gap: 0.25rem; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; color: var(--mist);
  text-decoration: none; transition: color var(--dur-fast) var(--ease-std);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--bone); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.menu-toggle {
  display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem;
  border: 1px solid rgb(243 246 241 / 0.2); border-radius: var(--radius-pill);
  background: transparent; color: var(--bone); cursor: pointer;
}
.menu-toggle svg { width: 1.3rem; height: 1.3rem; }
.header-cta { display: none; }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .header-cta { display: inline-flex; }
}

/* Full-screen mobile menu (native <dialog>) */
.site-menu {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain;
  background-color: rgb(4 20 13 / 0.82);
  background-image: linear-gradient(160deg, rgb(25 185 77 / 0.1), transparent 45%, rgb(8 125 206 / 0.1));
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  color: var(--bone); color-scheme: dark;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out), overlay var(--dur-base) allow-discrete, display var(--dur-base) allow-discrete;
}
.site-menu[open] { opacity: 1; }
@starting-style { .site-menu[open] { opacity: 0; } }
.site-menu::backdrop { background: rgb(4 20 13 / 0.4); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-menu { background-color: var(--canopy); } }
.site-menu :focus-visible { outline: 2px solid var(--sprout); outline-offset: 3px; }
.menu-inner { min-height: 100%; display: flex; flex-direction: column; padding: var(--gutter); }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: calc(var(--header-h) - 1rem); margin-top: 0.5rem; }
.menu-routes { display: flex; flex-direction: column; gap: 0.25rem; margin-top: auto; margin-bottom: auto; padding-block: 2rem; }
.menu-route-link {
  display: inline-block; width: max-content; padding-block: 0.4rem;
  font-family: var(--font-display); font-weight: 400; letter-spacing: -0.035em; line-height: 1.1;
  font-size: clamp(2rem, 1.3rem + 3.5vw, 3.25rem); color: var(--bone); text-decoration: none;
}
.menu-route-link:hover, .menu-route-link[aria-current="page"] { color: var(--sprout); }
.menu-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--mist); font-size: var(--step-small); }

/* Staggered route reveal (motion only) */
html.motion .site-menu[open] .menu-route-link {
  transition: translate var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
@starting-style { html.motion .site-menu[open] .menu-route-link { translate: 0 14px; opacity: 0; } }

/* ---------------------------------------------------------------- *
 * 6. HERO                                                           *
 * ---------------------------------------------------------------- */
.hero { position: relative; margin-top: calc(-1 * (var(--header-h) + env(safe-area-inset-top, 0px))); }
.hero-stage {
  position: relative; display: grid; align-items: center; gap: var(--gutter);
  min-height: 100svh;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(2rem, 6svh, 4rem));
  padding-bottom: clamp(2.5rem, 6svh, 4rem);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(50% 45% at 72% 42%, rgb(8 125 206 / 0.2), transparent 70%),
    radial-gradient(42% 42% at 86% 82%, rgb(25 185 77 / 0.16), transparent 70%);
}
.hero-copy { position: relative; z-index: 2; }
.hero-h1 { margin-top: 0.9rem; }
.hero-h1 > span { display: block; }
.hero-lead { margin-top: 1.6rem; color: rgb(243 246 241 / 0.86); }
.hero-ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Clover stage */
.clover-stage {
  position: relative; z-index: 1; justify-self: center;
  width: min(78vw, 24rem); aspect-ratio: 1 / 1.04;
  --tilt-x: 0deg; --tilt-y: 0deg;
}
.clover-stage svg { width: 100%; height: 100%; overflow: visible; }
.clover-spin { transform-box: fill-box; transform-origin: 50% 46%; }

@media (min-width: 980px) {
  .hero-stage { grid-template-columns: 1.05fr 0.95fr; }
  .clover-stage { width: min(42vw, 34rem); }
  .hero-copy { max-width: 40rem; }
}

/* ---------------------------------------------------------------- *
 * 7. ABOUT                                                          *
 * ---------------------------------------------------------------- */
.about-grid { display: grid; gap: var(--gutter); align-items: start; }
.about-body { font-size: var(--step-lead); line-height: 1.6; color: var(--fg); }
.about-aside {
  border-left: 2px solid var(--green);
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--fg-muted); font-family: var(--font-mono); font-size: var(--step-small);
  letter-spacing: 0.04em;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); }
}

/* ---------------------------------------------------------------- *
 * 8. GALLERY (conditional)                                         *
 * ---------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.gallery-item { overflow: hidden; border-radius: var(--radius-leaf); background: var(--surface); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: scale var(--dur-slow) var(--ease-out); }
.gallery-item:hover img { scale: 1.04; }

/* ---------------------------------------------------------------- *
 * 9. VISIT                                                          *
 * ---------------------------------------------------------------- */
.visit-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.visit-address { font-style: normal; font-size: var(--step-lead); line-height: 1.7; }
.visit-address span { display: block; }
.visit-actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.visit-contact { margin-top: 1.8rem; display: grid; gap: 0.4rem; list-style: none; padding: 0; color: var(--fg-muted); font-size: var(--step-small); }
.visit-contact a { color: var(--acc); }
.copied-msg { font-family: var(--font-mono); font-size: var(--step-small); color: var(--acc); letter-spacing: 0.04em; }
.map-frame {
  position: relative;
  border-radius: var(--radius-leaf); overflow: hidden; border: 1px solid var(--rule);
  background: var(--surface); aspect-ratio: 4 / 3; width: 100%;
}
.map-frame iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; }
/* Fallback behind the embed: the map covers it when it loads; if the embed is
   blocked or fails, this stays visible as a working link to the map. */
.map-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 1.5rem; text-align: center; text-decoration: none;
  color: var(--fg-muted); font-size: var(--step-small);
  background:
    radial-gradient(70% 70% at 50% 40%, rgb(25 185 77 / 0.1), transparent 70%),
    var(--surface);
}
.map-fallback svg { width: 2rem; height: 2rem; color: var(--acc); }
.map-fallback:hover span { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 860px) {
  .visit-grid { grid-template-columns: 5fr 7fr; }
}

/* ---------------------------------------------------------------- *
 * 10. FOOTER                                                        *
 * ---------------------------------------------------------------- */
.site-footer { padding-block: clamp(3rem, 5vw, 5rem) 2.5rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-logo { display: inline-block; text-decoration: none; }
.footer-logo img { width: auto; height: auto; max-width: 15rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-nav a { color: var(--mist); text-decoration: none; min-height: 2.5rem; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: var(--bone); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-meta { color: var(--mist); font-size: var(--step-small); }
.footer-copy { color: var(--mist); }
.footer-rule { border: 0; border-top: 1px solid var(--rule); margin-block: 2rem; }
.footer-base { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; justify-content: space-between; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: auto auto; align-items: center; justify-content: space-between; }
}

/* ---------------------------------------------------------------- *
 * 11. MOTION — reveal, float, sweep (all gated by html.motion)      *
 * ---------------------------------------------------------------- */
/* Default (no JS / reduced motion): everything visible, no transforms. */
[data-reveal] { opacity: 1; }

html.motion [data-reveal] {
  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
html.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Clover idle + pointer response (motion only). */
html.motion .clover-stage {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform var(--dur-base) var(--ease-out);
}
html.motion .clover-stage svg { animation: ll-float 6s var(--ease-quint) infinite; }
html.motion .clover-spin { animation: ll-spin 26s linear infinite; }

@keyframes ll-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ll-spin { from { rotate: 0deg; } to { rotate: 360deg; } }

/* Hairline sweep under section headings on reveal. */
.sweep-rule { position: relative; height: 1px; background: var(--rule); overflow: hidden; margin-top: 1.5rem; }
.sweep-rule::after {
  content: ""; position: absolute; inset: 0; background: var(--grad-grow);
  transform: scaleX(0); transform-origin: left;
}
html.motion .sweep-rule.is-in::after { transform: scaleX(1); transition: transform var(--dur-draw) var(--ease-out); }
html:not(.motion) .sweep-rule::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- *
 * 12. Reduced motion & forced colours                               *
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.motion [data-reveal] { opacity: 1; transform: none; transition: none; }
  html.motion .clover-stage svg, html.motion .clover-spin { animation: none; }
  html.motion .clover-stage { transform: none; }
  * { scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .header-pill, .btn { border: 1px solid ButtonText; }
  .acc { background-image: none; }
  .clover-stage { forced-color-adjust: none; }
}
