/* ============================================================
   FONTS — Self-hosted
   ============================================================ */
@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-v20-latin_latin-ext-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-v20-latin_latin-ext-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-v20-latin_latin-ext-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-v21-latin_latin-ext-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-v21-latin_latin-ext-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-v21-latin_latin-ext-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-v21-latin_latin-ext-300italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-v21-latin_latin-ext-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   DESIGN TOKENS — Light Mode
   ============================================================ */
:root {
  --bg:           #F7F3EE;
  --surface:      #EDE6DC;
  --surface-alt:  #E0D5C5;

  --text-primary:   #1C1612;
  --text-secondary: #4A3F32;
  --text-muted:     #7A6E60;
  --text-faint:     #B8AFA5;

  --accent:       #A8824A;
  --accent-light: #C9A870;
  --accent-dark:  #7A5C2E;

  --inv-bg:       #1C1612;
  --inv-text:     #F7F3EE;
  --inv-muted:    #7A6E60;
}

/* ============================================================
   DESIGN TOKENS — Dark Mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #121008;
    --surface:      #1A1610;
    --surface-alt:  #242018;

    --text-primary:   #F0EAE0;
    --text-secondary: #C0B090;
    --text-muted:     #8A7A65;
    --text-faint:     #4A4035;

    --accent:       #C9A870;
    --accent-light: #E0C090;
    --accent-dark:  #A8824A;

    --inv-bg:       #0A0806;
    --inv-text:     #F0EAE0;
    --inv-muted:    #4A4035;
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Jost', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 3rem;
  border-bottom: 0.5px solid var(--accent-light);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Logo — text branding, matches old site */
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

/* Nav list */
.nav-list {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

/* Nav item */
.nav-item { position: relative; display: flex; align-items: center; }

/* Plain link and button-as-link */
.nav-link {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-item.is-active > .nav-link { color: var(--accent); }

/* Active parent: typographic only — accent color + slight weight lift, no container shape.
   Scoped strictly to the top-level .nav-link; does not affect dropdown or arrow. */
.nav-item.is-active > .nav-link { font-weight: 500; letter-spacing: 0.11em; }

/* Split item: link + separate arrow button side by side */
.nav-item--split { gap: 0; }
.nav-item--split .nav-link { padding-right: 0.2rem; }

/* Arrow toggle button */
.nav-dropdown-toggle {
  background: none;
  border: none;
  padding: 0 0.6rem 0 0.2rem;
  cursor: pointer;
  height: 100%;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-dropdown-toggle:hover,
.nav-item--split:hover .nav-dropdown-toggle { color: var(--accent); }

/* Arrow indicator — ▾ character, matches old site */
.drop-arrow {
  font-size: 9px;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
  line-height: 1;
}
.nav-item:hover .drop-arrow { transform: rotate(180deg); }

/* Dropdown panel — hidden with opacity/transform for smooth fade+slide (matches old site) */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: var(--bg);
  border: 0.5px solid var(--surface-alt);
  border-top: 2px solid var(--accent);
  min-width: 240px;
  max-height: none;
  padding: 0.4rem 0;
  list-style: none;
  z-index: 300;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

/* Desktop: show on hover */
.nav-item:hover > .nav-dropdown { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }

.nav-dropdown li a {
  display: block;
  padding: 0.5rem 1.2rem;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-dropdown li a:hover { background: var(--surface); color: var(--accent); }

/* Section label inside dropdown (no link) */
.nav-section-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.6rem 1.2rem 0.2rem;
  pointer-events: none;
}

/* Nav right: lang switcher + WhatsApp CTA */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lang-sw {
  display: flex;
  border: 0.5px solid var(--accent-light);
  border-radius: 2px;
  overflow: hidden;
}

.lb {
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.lb.active { background: var(--accent); color: var(--inv-text); }
.lb:not(.active):hover { background: var(--surface); }
.lb.unavailable { opacity: 0.35; cursor: default; pointer-events: none; }

.nav-cta {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inv-text);
  background: var(--accent);
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 1px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.88; }

/* Mobile hamburger — hidden on desktop */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0.5px solid var(--accent-light);
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 1px;
}
.nav-mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: opacity 0.15s;
}

/* ============================================================
   NAV — Responsive (≤900px)
   ============================================================ */
@media (max-width: 900px) {
  .site-nav { padding: 1rem 1.2rem; flex-wrap: wrap; gap: 0.8rem; }

  /* Pin hamburger and lang-sw to top row by ordering them before nav-list */
  .nav-logo          { order: 1; font-size: 17px; }
  .nav-right         { order: 2; display: flex; margin-left: auto; }
  .nav-mobile-toggle { order: 3; display: flex; }
  .nav-list          { order: 4; }

  /* On mobile: show only lang-sw in nav-right, hide WhatsApp CTA */
  .nav-cta { display: none; }

  /* Nav list: absolute overlay so the sticky nav bar height never changes during animation.
     This prevents page content below from shifting (fixes the line-flash artifact). */
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-top: 0.5px solid var(--surface-alt);
    border-bottom: 0.5px solid var(--surface-alt);
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    /* Close: height leads, content follows */
    transition: max-height 0.4s ease,
                opacity 0.2s ease,
                transform 0.2s ease;
  }
  .nav-list.is-open {
    max-height: 560px;
    opacity: 1;
    transform: translateY(0);
    /* Open: content appears slightly after height starts, feels more deliberate */
    transition: max-height 0.45s ease,
                opacity 0.25s ease 0.05s,
                transform 0.25s ease 0.05s;
  }

  /* On mobile all items stack vertically */
  .nav-item { flex-direction: row; flex-wrap: wrap; border-top: 0.5px solid var(--surface-alt); align-items: center; }
  .nav-item--split .nav-link,
  .nav-item > .nav-link { padding: 0.75rem 0 0.75rem 1rem; flex: 1; font-size: 11px; }

  /* Arrow toggle: matching vertical padding keeps all rows the same height */
  .nav-dropdown-toggle {
    padding: 0.75rem 0.9rem;
    border-left: 0.5px solid var(--surface-alt);
    min-width: 44px;
    justify-content: center;
  }
  /* Arrow character: legible size, full opacity on mobile so it reads as an affordance */
  .nav-dropdown-toggle .drop-arrow { font-size: 11px; opacity: 0.85; }
  .nav-item.is-open > .nav-dropdown-toggle .drop-arrow { transform: rotate(180deg); opacity: 1; }

  /* Mobile: reset desktop opacity/transform, use JS-driven exact max-height for smooth reveal.
     Easing: gentle S-curve — slow start so opening doesn't snap, slow end so close doesn't cut off. */
  .nav-dropdown {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.65, 0, 0.35, 1);
    border: none;
    width: 100%;
    /* Always include bottom padding so scrollHeight measurement includes it */
    padding: 0 0 0.6rem 0.8rem;
    background: transparent;
  }
  /* Suppress desktop hover on mobile */
  .nav-item:hover > .nav-dropdown { visibility: visible; opacity: 1; transform: none; max-height: 0; }
  /* CSS fallback only — JS overrides max-height with exact scrollHeight value */
  .nav-item.is-open > .nav-dropdown { max-height: 400px; }

  .nav-dropdown li a { font-size: 12px; padding: 0.4rem 0; }
  .nav-section-label { font-size: 10px; padding: 0.5rem 0 0.1rem; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: 1rem 3.5rem;
  border-bottom: 0.5px solid var(--surface-alt);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bc-item {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.15s;
}
.bc-item:hover { color: var(--accent); }
.bc-sep { font-size: 11px; color: var(--text-faint); }
.bc-current { font-size: 11px; color: var(--accent); letter-spacing: 0.08em; }

/* ============================================================
   SHARED SECTION TYPOGRAPHY
   ============================================================ */
.sec-eye {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.sec-h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.35rem;
}
.sec-h2 em { font-style: italic; color: var(--accent); }
.body-text {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.95;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--inv-text);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: none;
  cursor: pointer;
  border-radius: 1px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-p:hover { opacity: 0.88; }

.btn-s {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--accent);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 0.5px solid var(--accent);
  cursor: pointer;
  border-radius: 1px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-s:hover { background: var(--surface); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-block { margin-top: 4.9rem; }
.faq-item { border-bottom: 0.5px solid var(--surface-alt); }
.faq-q {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  transition: color 0.15s;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  outline: none;
}
.faq-q:hover { color: var(--accent); }
.faq-icon {
  color: var(--accent);
  font-size: 22px;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  line-height: 1;
  aria-hidden: true;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 600px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.65, 0, 0.35, 1),
              padding-bottom 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  padding-bottom: 0;
}
.faq-a.open { padding-bottom: 1.3rem; }

/* ============================================================
   UTILITY
   ============================================================ */
.mt-section { margin-top: 4.9rem; }

/* ============================================================
   FOOTER — minimal single-row (matches old site)
   ============================================================ */
.footer {
  background: var(--inv-bg);
  padding: 2rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 0.5px solid var(--accent);
}

/* Branding */
.fl { font-family: 'Cormorant Garamond', serif; font-size: 15px; color: var(--inv-text); }
.fl span { color: var(--accent); }

/* Footer nav links */
.fn { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.fn a { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inv-muted); text-decoration: none; transition: color 0.15s; }
.fn a:hover { color: var(--accent); }

/* Lang switch inside footer */
.footer-lang-switch { display: flex; gap: 1rem; }
.footer-lang-switch a { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inv-muted); text-decoration: none; transition: color 0.15s; }
.footer-lang-switch a:hover,
.footer-lang-switch a[aria-current="page"] { color: var(--accent); }

/* Copyright */
.fc { font-size: 10px; color: var(--inv-muted); }

/* ============================================================
   RESPONSIVE — shared components (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .breadcrumb { padding: 0.8rem 1.2rem; }
  .sec-h2 { font-size: 26px; }
  .faq-q { font-size: 15px; }
  .footer { padding: 1.5rem 1.2rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ============================================================
   THEME SYSTEM — data-theme attribute (JS-controlled)
   Overrides the prefers-color-scheme media query when the
   user makes an explicit choice via the toggle.
   ============================================================ */

/* Explicit light — overrides OS dark preference */
html[data-theme="light"] {
  --bg:             #F7F3EE;
  --surface:        #EDE6DC;
  --surface-alt:    #E0D5C5;
  --text-primary:   #1C1612;
  --text-secondary: #4A3F32;
  --text-muted:     #7A6E60;
  --text-faint:     #B8AFA5;
  --accent:         #A8824A;
  --accent-light:   #C9A870;
  --accent-dark:    #7A5C2E;
  --inv-bg:         #1C1612;
  --inv-text:       #F7F3EE;
  --inv-muted:      #7A6E60;
}

/* Explicit dark — premium anthracite, not pure black */
html[data-theme="dark"] {
  --bg:             #121008;
  --surface:        #1A1610;
  --surface-alt:    #242018;
  --text-primary:   #F0EAE0;
  --text-secondary: #C0B090;
  --text-muted:     #8A7A65;
  --text-faint:     #4A4035;
  --accent:         #C9A870;
  --accent-light:   #E0C090;
  --accent-dark:    #A8824A;
  --inv-bg:         #0A0806;
  --inv-text:       #F0EAE0;
  --inv-muted:      #4A4035;
}

/* Smooth color transitions — applied only after JS initializes
   (.theme-ready class added by theme-handler.js on DOMContentLoaded)
   Scoped to structural surfaces only; does not affect existing
   opacity/transform/max-height animations on dropdowns or mobile nav. */
html.theme-ready body,
html.theme-ready .site-nav,
html.theme-ready .footer,
html.theme-ready .section-block,
html.theme-ready .side-card,
html.theme-ready .stay-item {
  transition:
    background-color 520ms cubic-bezier(0.22, 1, 0.36, 1),
    color 520ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 520ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Theme toggle button ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 3px;
  line-height: 1;
  transition: color 0.15s ease-out;
}

.theme-toggle:hover { color: var(--text-primary); }

/* Light mode default: show moon (invite user to go dark) */
.theme-toggle .tt-sun  { display: none; }
.theme-toggle .tt-moon { display: block; }

/* Dark mode via JS attribute: show sun (invite user to go light) */
html[data-theme="dark"] .theme-toggle .tt-sun  { display: block; }
html[data-theme="dark"] .theme-toggle .tt-moon { display: none; }

/* Dark mode via system preference (before JS sets data-theme) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .tt-sun  { display: block; }
  html:not([data-theme="light"]) .theme-toggle .tt-moon { display: none; }
}
