/* ===========================================================================
   Hale Nani Awamoa — v2 "Retro Surf, forward-looking" design system
   Vintage Hawaiiana surf-poster soul, executed clean & modern.
   Loaded only by base_v2.html. v1 is untouched (it uses custom.css).
   =========================================================================== */

:root {
  --sand:        #EDF4F1; /* beachy sea-glass page bg */
  --sand-deep:   #DFEAE5; /* deeper seafoam for alt sections */
  --cream:       #FFFFFF; /* crisp white cards/nav */
  --ink:         #2C1E14;
  --sunset:      #E2622E; /* burnt orange — primary  */
  --tangerine:   #F0913E; /* light orange            */
  --palm:        #1F8A7C; /* teal — secondary        */
  --palm-deep:   #166458;
  --gold:        #E7B23B; /* mustard — sun accent    */
  --coral:       #D6453B; /* pop accent              */
  --lani:        #84B6C4; /* dusty sky               */
  --shadow-hard: 4px 4px 0 var(--ink);
}

/* --- Base ------------------------------------------------------------------ */
html { scroll-behavior: smooth; }
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .display {
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
  letter-spacing: -0.01em;
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--palm); outline-offset: 2px; border-radius: 4px; }

/* --- Analog grain overlay (subtle warmth, sits above content, never blocks) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Retro motifs --------------------------------------------------------- */
/* Sunburst rays — drop behind a hero or section accent */
.sunburst {
  background: repeating-conic-gradient(
    from 0deg,
    var(--gold) 0deg 7deg,
    transparent 7deg 14deg
  );
}

/* Arched (70s) top frame for media/cards */
.arch {
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  overflow: hidden;
}

/* --- Sticker / badge chip ------------------------------------------------- */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s ease;
}
.sticker--tilt    { transform: rotate(-3deg); }
.sticker--tilt-r  { transform: rotate(2.5deg); }
.sticker:hover    { transform: translateY(-2px) rotate(0deg); }
.sticker--gold    { background: var(--gold); }
.sticker--teal    { background: var(--palm); color: #fff; }
.sticker--coral   { background: var(--coral); color: #fff; }
.sticker--sunset  { background: var(--sunset); color: #fff; }

/* --- Retro card ----------------------------------------------------------- */
.retro-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.retro-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

/* --- Buttons -------------------------------------------------------------- */
.btn-retro {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sunset);
  color: #fff;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-retro:hover  { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-retro:active { transform: translate(2px, 2px);  box-shadow: 1px 1px 0 var(--ink); }
.btn-retro--ghost { background: var(--cream); color: var(--ink); }
.btn-retro--teal  { background: var(--palm);  color: #fff; }
.btn-retro--gold  { background: var(--gold);  color: var(--ink); }

/* --- Carousel hooks (main.js toggles .active) ----------------------------- */
.hero-slide        { opacity: 0; transition: opacity 1s ease; }
.hero-slide.active { opacity: 1; }
.hero-dot          { transition: transform 0.2s ease, background 0.2s ease; }
.hero-dot.active   { background: #fff; transform: scale(1.4); }

/* --- Nav active link ------------------------------------------------------ */
.nav-link-active { background: var(--gold) !important; color: var(--ink) !important; }

/* --- Accordion (House Guide) — driven by main.js -------------------------- */
.accordion-arrow { display: inline-block; transition: transform 0.3s ease; }
.accordion-item.open .accordion-arrow { transform: rotate(180deg); }

/* --- Gallery + lightbox hooks (main.js toggles .active/.hidden) ------------ */
.gallery-item img        { transition: transform 0.4s ease; }
.gallery-item:hover img  { transform: scale(1.08); }
#lightbox.active         { display: flex; }

/* --- Motion: page-load stagger + scroll reveal ---------------------------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.rise   { opacity: 0; animation: riseIn 0.8s ease forwards; }
.rise-1 { animation-delay: 0.10s; }
.rise-2 { animation-delay: 0.25s; }
.rise-3 { animation-delay: 0.40s; }
.rise-4 { animation-delay: 0.55s; }
.rise-5 { animation-delay: 0.70s; }

/* scroll-reveal (retro_v2.js adds .in when in view) */
.sr   { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.sr.in { opacity: 1; transform: none; }

/* --- Respect reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .sr   { opacity: 1; transform: none; }
  .rise { opacity: 1; animation: none; }
  .hero-slide { opacity: 1; }
}

/* --- Floating version toggle (shared by v1 & v2, self-contained styles) ---- */
.ver-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(44, 30, 20, 0.92);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.ver-toggle a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.ver-toggle a:hover { color: #fff; }
.ver-toggle a.is-active { background: #E7B23B; color: #2C1E14; }
