/* ═══════════════════════════════════════════════════════════
   PALMELLE CORE v5 — LOCKED to PALMELLE-BRAND-LOCK.md
   Fonts: Fraunces (wonky serif) + Outfit (geometric sans) + DM Mono
   Palette: ONLY 5 hex codes allowed sitewide:
     #071528  navy-deep   (primary dark)
     #12314C  navy-mid    (secondary dark)
     #2B5D7A  navy-light  (accent dark)
     #D2B34C  gold        (accent — only true gold)
     #F4F0E2  parchment   (background light)
   2026-05-05: Killed the old verde/sand/sunset palette (was drift-source #1).
   Every legacy var name now points at the locked palette so existing pages
   don't break — semantic names map to brand colors.
   ═══════════════════════════════════════════════════════════ */

/* ── COLOR SYSTEM — LOCKED palette only ── */
:root {
  /* The 5 locked colors — single source of truth */
  --navy-deep:  #071528;
  --navy-mid:   #12314C;
  --navy-light: #2B5D7A;
  --gold:       #D2B34C;
  --parchment:  #F4F0E2;

  /* Semantic aliases — every legacy var name remapped to a locked color so
     pages still using the old names render in-brand without code changes. */
  --ink:               var(--navy-deep);
  --ink-soft:          var(--navy-mid);
  --bg:                var(--parchment);
  --rule:              rgba(7, 21, 40, 0.18);
  --rule-on-dark:      rgba(244, 240, 226, 0.18);

  /* Legacy var compatibility shims — all collapse to locked palette */
  --sand:              var(--parchment);
  --sand-dark:         var(--parchment);
  --ivory:             var(--parchment);
  --ivory-dark:        var(--parchment);
  --verde:             var(--navy-deep);
  --midnight:          var(--navy-deep);
  --navy:              var(--navy-deep);
  --verde-mid:         var(--navy-mid);
  --sage:              var(--navy-mid);
  --sunset:            var(--navy-light);
  --terra:             var(--navy-light);
  --sunset-light:      var(--navy-light);
  --accent-text:       var(--gold);
  --accent-text-light: var(--navy-deep);
  --clay:              var(--navy-mid);
  --taupe:             var(--navy-mid);
  --warm:              var(--navy-deep);
}

/* ═══════════════════════════════════════════
   FONT SYSTEM — Fraunces + Outfit + DM Mono
   Overrides inline font-family with !important
   ═══════════════════════════════════════════ */

/* FRAUNCES — Display + Headings (wonky serif) */
.nav-logo,
.f-logo,
h1, h2, h3, h4,
.hero-wordmark,
.stat-number,
.score-big,
.clarity-score,
.card-title,
.section-title,
.page-title {
  font-family: "Fraunces", serif !important;
  font-variation-settings: "WONK" 1, "SOFT" 50 !important;
}

/* OUTFIT — Body text + UI (geometric sans) */
body,
p,
.f-sub,
.f-opt-text,
.btn,
button,
input,
select,
textarea,
.nav-links a,
.card-text,
.step-text,
label,
.toggle-label,
li,
td,
th,
.breadcrumb a {
  font-family: "Outfit", sans-serif !important;
}

/* DM MONO — Labels + Numbers (monospace) */
.eyebrow,
.svc-num,
.number-label,
.trust-val,
.f-note,
code,
pre,
.mono {
  font-family: "DM Mono", monospace !important;
}

/* ── SITE-WIDE READABILITY ── 2026-05-05 typography pass ──
   Mint Mobile-grade reference: body 18-20px, nav 18px, footer 16px+, captions 14px+.
   Founder ask: "the text is small and hard to read" — applied across every page
   that links palmelle-core.css (about / contact / awards / assessment / claim /
   concierge / directory / faq / for-facilities / payment / read / etc). */
html {
  font-size: 18px;
}

body {
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body text — bumped 16 → 18px, line-height tightened from 1.85 (too airy) to 1.65 */
p,
li,
td,
th,
label,
.card-text,
.step-text,
.breadcrumb a {
  font-size: 18px !important;
  line-height: 1.65 !important;
}

/* Eyebrows & labels — bumped 13 → 15px. Slightly less letter-spacing so the
   words don't smear at the larger size. Heavier weight for readability. */
.eyebrow,
.svc-num,
.number-label,
.a-label,
.c-num,
.stat-l,
.cta-note,
.f-note {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em;
}

/* Display sizes — Fraunces */
h1 {
  font-size: 48px !important;
  line-height: 1.2;
}

h2 {
  font-size: 36px !important;
  line-height: 1.3;
}

h3 {
  font-size: 30px !important;
  line-height: 1.3;
}

h4 {
  font-size: 24px !important;
  line-height: 1.4;
}

.page-title {
  font-size: 42px !important;
}

.section-title {
  font-size: 32px !important;
}

.card-title {
  font-size: 20px !important;
}

/* Stat numbers — prominent */
.stat-number {
  font-size: 48px !important;
  font-weight: bold;
}

.score-big {
  font-size: 64px !important;
  font-weight: bold;
}

.clarity-score {
  font-size: 52px !important;
}

/* Nav & footer links — bumped 15/14 → 18/17px (2026-05-05 readability pass).
   Founder: "footer looks like legal disclaimer" — fixed by going up TWO sizes
   AND switching footer links to the Outfit sans (was implicit DM Mono). */
.nav-links a {
  font-size: 18px !important;
  font-weight: 500 !important;
}

.f-links a {
  font-size: 17px !important;
  font-weight: 500 !important;
  font-family: "Outfit", sans-serif !important;
  letter-spacing: 0.01em !important;
}

/* ═══════════════════════════════════════════
   CUSTOM CURSOR — Handled by /static/cursor.js
   CSS cursor:none is set by JS only when cursor
   elements are injected, so native cursor still
   works if JS fails to load.
   ═══════════════════════════════════════════ */

/* Buttons get pointer cursor (fallback when custom cursor is off) */
button,
a,
.btn,
[role="button"] {
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sunset-light), var(--sunset));
  z-index: 9999;
  width: 0%;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════ */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left {
  transform: translateX(-30px) translateY(0);
}

.reveal-right {
  transform: translateX(30px) translateY(0);
}

.reveal.in-view,
.reveal-left.in-view,
.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* ═══════════════════════════════════════════
   NAVIGATION — Top nav with scrolled state
   ═══════════════════════════════════════════ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.3s ease;
}

.top-nav.scrolled {
  background: rgba(27, 58, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 165, 214, 0.1);
}

.nav-logo {
  font-size: 20px !important;
  color: var(--sand);
}

.nav-links a {
  position: relative;
  color: var(--sand);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sunset);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ── MOBILE BOTTOM NAV — Frosted Glass ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9500;
  background: rgba(27, 58, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 0 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(184, 165, 214, 0.15);
}

.mobile-bottom-nav ul {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  flex-wrap: nowrap;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  /* Mobile bottom nav — bumped 11px → 13px so labels are actually readable
     on phones. Locked palette parchment for the text color (was off-brand). */
  color: rgba(244, 240, 226, 0.92);
  font-family: "Outfit", sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  transition: color 0.3s;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
  color: var(--accent-text);
}

.mobile-bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════
   FOOTER — Shared styles
   ═══════════════════════════════════════════ */
.footer-inner {
  background: var(--verde);
  color: var(--sand);
  padding: 40px 24px;
}

.f-logo {
  font-size: 18px !important;
  color: var(--sand);
  margin-bottom: 20px;
  display: block;
}

.f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.f-links a {
  color: var(--parchment);
  text-decoration: none;
  /* Footer links — bumped 14 → 17px so they don't read as legal disclaimer */
  font-size: 17px !important;
  font-weight: 500 !important;
  opacity: 1;
  transition: opacity 0.3s;
}

.f-links a:hover {
  opacity: 1;
}

.f-social {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.f-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(250, 247, 242, 0.1);
  border-radius: 50%;
  color: var(--sand);
  text-decoration: none;
  transition: background 0.3s;
}

.f-social a:hover {
  background: rgba(250, 247, 242, 0.2);
}

.f-note {
  font-size: 13px !important;
  font-weight: 400 !important;
  opacity: 0.85;
  font-family: "Outfit", sans-serif !important;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════
   GRAIN OVERLAY — Subtle texture
   ═══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3CfeColorMatrix in='noise' type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* ═══════════════════════════════════════════
   SELECTION COLOR
   ═══════════════════════════════════════════ */
::selection {
  background: var(--sunset-light);
  color: var(--verde);
}

::-moz-selection {
  background: var(--sunset-light);
  color: var(--verde);
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE — 768px breakpoint
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Show mobile bottom nav */
  .mobile-bottom-nav {
    display: flex !important;
    max-height: 64px;
    overflow: hidden;
  }

  /* Space for bottom nav + adjust body */
  body {
    padding-bottom: 76px;
    font-size: 16px;
  }

  /* Hide desktop nav links on mobile */
  .nav-links {
    display: none !important;
  }

  /* Tap targets — 48px minimum */
  button,
  .btn,
  [role="button"] {
    min-height: 52px;
    padding: 16px 28px;
  }

  /* Stats wrap on small screens */
  .stat-strip {
    flex-wrap: wrap;
    gap: 20px;
  }

  /* Footer social icons — bigger tap targets */
  .f-social a {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Headings scale down */
  h1 {
    font-size: 32px !important;
  }

  h2 {
    font-size: 28px !important;
  }

  h3 {
    font-size: 24px !important;
  }

  .page-title {
    font-size: 28px !important;
  }

  /* Hide cursor on touch devices */
  body {
    cursor: auto;
  }

  body::before {
    display: none;
  }
}

/* ── DIRECTORY/SEARCH RESPONSIVE — 900px ── */
@media (max-width: 900px) {
  .search-row {
    flex-direction: column !important;
  }

  input[type="search"],
  .search-input {
    width: 100% !important;
    font-size: 16px !important; /* prevents iOS zoom */
  }

  .btn-search {
    width: 100% !important;
    min-height: 52px;
  }

  .autocomplete-box {
    right: 0 !important;
  }

  /* Horizontal scroll filters */
  .filters-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    scrollbar-width: none;
  }

  .filters-bar::-webkit-scrollbar {
    display: none;
  }

  .chip,
  .filter-select {
    flex-shrink: 0;
    min-height: 44px;
  }

  /* Single column layout */
  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* ── FUNNEL MOBILE — Full screen ── */
@media (max-width: 768px) {
  .funnel-panel {
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    min-height: 100vh;
  }

  .funnel-overlay {
    align-items: stretch !important;
  }

  .f-body {
    padding: 28px 24px 100px !important;
  }

  .f-question {
    font-size: 28px !important;
  }

  .f-opt-text {
    font-size: 16px !important;
  }

  /* Fixed bottom action bar in funnel */
  .f-nav {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sand);
    padding: 14px 24px !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    margin-top: 0 !important;
    z-index: 100;
  }
}

/* ── SAFE AREA (notched phones) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── PRINT ── */
@media print {
  .mobile-bottom-nav, nav, .funnel-overlay {
    display: none !important;
  }
  body { padding-bottom: 0; }
}
