/* =====================================================================
   EVER RISE ELITE — THEME SETTINGS & PRODUCTION STYLESHEET
   Brand: Teal #0E5C56 · Amber #E2872D · Paper #EDEFEA · Stone #C9C2B4 · Ink #16231F
   Colours are stored as "R G B" triplets so Tailwind utilities support
   opacity modifiers (e.g. bg-bg/60) via rgb(var(--c-*) / <alpha-value>).
   ===================================================================== */

:root,
[data-theme="light"] {
  /* Surfaces + paired text */
  --c-bg:          237 239 234;   /* paper            */
  --c-on-bg:        22 35 31;     /* ink              */
  --c-surface:     255 255 255;   /* white card       */
  --c-on-surface:   22 35 31;
  --c-inverse:      18 32 28;      /* dark band        */
  --c-on-inverse:  237 239 234;

  /* Brand + paired text */
  --c-brand:        14 92 86;      /* teal             */
  --c-brand-600:    11 74 69;
  --c-brand-300:    62 144 137;
  --c-on-brand:    244 246 241;
  --c-accent:      226 135 45;     /* amber button bg  */
  --c-accent-600:  201 116 30;
  --c-accent-text: 143 79 15;      /* #8F4F0F: 5.1:1 AAA contrast on paper */
  --c-on-accent:    26 43 22;

  /* Support */
  --c-muted:        95 107 100;
  --c-stone:       201 194 180;
  --c-warning:     180 68 47;

  /* Alpha tokens */
  --color-line:        rgba(22,35,31,0.12);
  --color-line-strong: rgba(22,35,31,0.22);
  --color-warning:     rgb(180 68 47);
  --color-scrim:        rgba(10,24,20,0.46);
  --color-scrim-strong: rgba(10,24,20,0.72);
  --color-ring:         rgba(14,92,86,0.55);

  /* Radii + shadow + rhythm */
  --radius-sm: 6px;  --radius: 14px;  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(22,35,31,0.06), 0 2px 8px rgba(22,35,31,0.05);
  --shadow-md: 0 10px 30px rgba(22,35,31,0.10);
  --shadow-lg: 0 24px 60px rgba(22,35,31,0.16);
  --section-y: clamp(3.5rem, 2rem + 7vw, 8rem);

  /* Fonts */
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

[data-theme="dark"] {
  --c-bg:           13 24 21;
  --c-on-bg:       231 235 228;
  --c-surface:      22 35 31;
  --c-on-surface:  237 239 234;
  --c-inverse:       6 14 12;
  --c-on-inverse:  237 239 234;

  --c-brand:        46 126 118;
  --c-brand-600:    37 106 99;
  --c-brand-300:   111 183 175;
  --c-on-brand:    244 246 241;
  --c-accent:      233 149 74;
  --c-accent-600:  208 126 51;
  --c-accent-text: 233 149 74;     /* 7.84:1 contrast on dark */
  --c-on-accent:    20 33 15;

  --c-muted:       159 170 162;
  --c-stone:        74 85 78;
  --c-warning:     230 121 95;

  --color-line:        rgba(231,235,228,0.14);
  --color-line-strong: rgba(231,235,228,0.26);
  --color-warning:     rgb(230 121 95);
  --color-scrim:        rgba(3,10,8,0.58);
  --color-scrim-strong: rgba(3,10,8,0.78);
  --color-ring:         rgba(111,183,175,0.6);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 12px 34px rgba(0,0,0,0.5);
  --shadow-lg: 0 26px 64px rgba(0,0,0,0.6);
}

@media (prefers-contrast: more) {
  :root, [data-theme="light"] { --c-on-bg: 10 18 15; --c-muted: 51 64 58; --color-line: rgba(22,35,31,0.4); }
  [data-theme="dark"]        { --c-on-bg: 255 255 255; --c-muted: 214 222 216; --color-line: rgba(255,255,255,0.4); }
}

/* Base defaults */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: rgb(var(--c-bg)); color: rgb(var(--c-on-bg)); }
h1, h2, h3 { font-family: var(--font-heading); text-wrap: balance; }
p { text-wrap: pretty; }

/* Focus ring (keyboard users & accessibility) */
:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* Interactive touch target baseline (WCAG AAA >= 44px) */
a, button, input, select, textarea {
  touch-action: manipulation;
}

/* Keyframes */
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ken-burns { from { transform: scale(1.02); } to { transform: scale(1.10); } }
@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(226, 135, 45, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(226, 135, 45, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(226, 135, 45, 0); }
}
@keyframes veil-out {
  0% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

.reveal { opacity: 1; transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-visible { opacity: 1 !important; transform: none !important; }
.hero-media img { animation: ken-burns 18s ease-out both; }

@media (prefers-reduced-data: reduce) { .hero-media img { animation: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .js .reveal { opacity: 1 !important; }
  .hero-media img { animation: none; }
  #page-veil { display: none !important; }
}

/* Sticky-header scroll state (opaque baseline + luxury frosted glass) */
[data-header] {
  position: sticky;
  top: 0;
  z-index: 100 !important;
  background-color: rgb(var(--c-bg));
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
[data-header][data-scrolled] {
  background-color: color-mix(in srgb, rgb(var(--c-bg)) 96%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-line);
}

/* Google Map embed */
.map-embed {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 480px;
}
@media (min-width: 640px) {
  .map-embed {
    height: 580px;
  }
}
@media (min-width: 1024px) {
  .map-embed {
    height: 640px;
  }
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.95);
}
[data-theme="dark"] .map-embed iframe { filter: invert(0.9) hue-rotate(180deg) saturate(0.7) brightness(0.9); }

/* Form validation styling */
.field-invalid input, .field-invalid textarea, .field-invalid select { border-color: var(--color-warning) !important; }
[data-error] { color: var(--color-warning); min-height: 1em; }

/* Readable measure */
.measure { max-width: 62ch; }

/* Photo scrims (contrast protection) */
.scrim-strong { background: var(--color-scrim-strong); }
.scrim-fade   { background: linear-gradient(to top, var(--color-scrim), transparent 55%); }
.scrim-card   { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.40) 50%, transparent 100%); }

/* Page Transition Veil */
#page-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgb(var(--c-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
#page-veil.veil-hidden {
  opacity: 0;
  visibility: hidden;
}
#page-veil.veil-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.veil-emblem {
  height: 64px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.08));
  transition: transform 0.4s ease;
}

/* Floating WhatsApp FAB */
.fab-whatsapp-container {
  position: fixed;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: 1.25rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.fab-whatsapp-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background-color: rgb(var(--c-accent));
  color: rgb(var(--c-on-accent));
  box-shadow: 0 4px 18px rgba(226, 135, 45, 0.45);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}
.fab-whatsapp-btn:hover {
  background-color: rgb(var(--c-accent-600));
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(226, 135, 45, 0.6);
}
.fab-whatsapp-btn:active {
  transform: scale(0.95);
}
.fab-pulse-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  background-color: #22c55e;
  border: 2px solid rgb(var(--c-bg));
  border-radius: 9999px;
  animation: pulse-ring 2.2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}
.fab-tooltip {
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.fab-whatsapp-container:hover .fab-tooltip,
.fab-whatsapp-container:focus-within .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Drawer Overlay & Scroll Lock */
body.drawer-open {
  overflow: hidden !important;
  touch-action: none;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 48;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}
#mobile-drawer {
  z-index: 50;
  max-height: calc(100vh - 4.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Accessible Contrast & Custom Utilities */
.site-logo {
  height: 40px;
  width: auto;
  max-height: 44px;
}
@media (min-width: 640px) {
  .site-logo {
    height: 48px;
    max-height: 52px;
  }
}
@media (min-width: 1024px) {
  .site-logo {
    height: 52px;
    max-height: 56px;
  }
}
.footer-logo {
  height: 42px;
  width: auto;
  max-height: 46px;
  display: block;
}
@media (min-width: 640px) {
  .footer-logo {
    height: 46px;
    max-height: 50px;
    display: block;
  }
}
.text-accent { color: rgb(var(--c-accent-text, var(--c-accent))) !important; }
.text-on-inverse\/60 { color: rgb(var(--c-on-inverse) / 0.76) !important; }
.min-h-\[44px\] { min-height: 44px; }
.min-w-\[44px\] { min-width: 44px; }
.min-h-\[32px\] { min-height: 32px; }
.bg-surface\/50 { background-color: color-mix(in srgb, rgb(var(--c-surface)) 50%, transparent); }

/* =====================================================================
   COMPACT & BALANCED FOOTER STYLING
   ===================================================================== */
.site-footer {
  background-color: rgb(var(--c-inverse));
  color: rgb(var(--c-on-inverse));
}
.site-footer .footer-container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 640px) {
  .site-footer .footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
.site-footer .footer-main {
  padding-top: 36px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .site-footer .footer-main {
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 36px;
  }
}
.site-footer .footer-logo-link {
  display: inline-block;
  margin-bottom: 12px;
}
.site-footer .footer-heading {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: rgb(var(--c-on-inverse));
  margin: 0 0 6px 0;
}
.site-footer .footer-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(var(--c-on-inverse), 0.72);
  max-width: 380px;
  margin: 0 0 8px 0;
}
.site-footer .footer-license {
  font-size: 0.75rem;
  color: rgba(var(--c-on-inverse), 0.55);
  margin: 0;
}
.site-footer .footer-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--c-on-inverse), 0.65);
  margin: 0 0 12px 0;
}
.site-footer .footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: rgba(var(--c-on-inverse), 0.85);
}
.site-footer .footer-nav-list a {
  color: rgba(var(--c-on-inverse), 0.85);
  text-decoration: none;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}
.site-footer .footer-nav-list a:hover {
  color: rgb(var(--c-accent));
}
.site-footer .footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  color: rgba(var(--c-on-inverse), 0.85);
}
.site-footer .footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.site-footer .footer-contact-item svg {
  color: rgb(var(--c-accent));
  margin-top: 2px;
  flex-shrink: 0;
}
.site-footer .footer-contact-item a {
  color: rgba(var(--c-on-inverse), 0.85);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer .footer-contact-item a:hover {
  color: rgb(var(--c-accent));
}
.site-footer .footer-legal-bar {
  border-top: 1px solid rgba(var(--c-on-inverse), 0.12);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(var(--c-on-inverse), 0.6);
}
@media (min-width: 640px) {
  .site-footer .footer-legal-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.site-footer .footer-legal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-footer .footer-legal-nav a {
  color: rgba(var(--c-on-inverse), 0.6);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer .footer-legal-nav a:hover {
  color: rgb(var(--c-accent));
}
.site-footer .footer-sub-strip {
  border-top: 1px solid rgba(var(--c-on-inverse), 0.08);
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(var(--c-on-inverse), 0.5);
}
.site-footer .footer-sub-strip a {
  color: rgba(var(--c-on-inverse), 0.75);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer .footer-sub-strip a:hover {
  color: rgb(var(--c-accent));
}



