/* ==========================================================
   BUTTONS — unified editorial button system
   ----------------------------------------------------------
   Variants:
     .btn--solid    — ink fill, bone text, oxblood ink-fill from
                      bottom on hover. Arrow icon slides 4px right.
     .btn--ghost    — outlined, ink text. Ink fills from left on hover.
     .btn--text     — text link with hairline underline that
                      draws in from the left on hover.
     .btn--small    — compact (filter pills, admin tabs).
     .btn--icon     — square icon-only (lightbox arrows, scroll-top,
                      accordion). 44×44px hit-area minimum.
   Driven entirely by tokens — never hardcode hex.
   ========================================================== */

/* ---------- Base ---------- */
.btn,
.btn--solid,
.btn--ghost,
.btn--text,
.btn--icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 16px 32px;
  font-family: var(--ds-font-sans, 'Inter Tight', sans-serif);
  font-size: 0.7rem;
  font-weight: var(--ds-fw-medium, 500);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-ink, #1a1614);
  cursor: pointer;
  user-select: none;
  isolation: isolate;
  overflow: hidden;
  min-height: 44px;
  transition:
    color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    border-color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    transform var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  will-change: transform;
}
.btn:focus-visible,
.btn--solid:focus-visible,
.btn--ghost:focus-visible,
.btn--text:focus-visible,
.btn--icon:focus-visible {
  outline: 2px solid var(--ds-oxblood, #8d2f2a);
  outline-offset: 3px;
}
.btn[disabled],
.btn--solid[disabled],
.btn--ghost[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- .btn--solid: ink fill + oxblood ink-rise ---------- */
.btn--solid {
  background: var(--ds-ink, #1a1614);
  color: var(--ds-bone, #f4f0e8);
  border-color: var(--ds-ink, #1a1614);
}
.btn--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-oxblood, #8d2f2a);
  transform: translateY(101%);
  transition: transform var(--ds-dur-slow, 600ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  pointer-events: none;
}
.btn--solid:hover,
.btn--solid:focus-visible {
  border-color: var(--ds-oxblood, #8d2f2a);
  color: var(--ds-bone, #f4f0e8);
}
.btn--solid:hover::before,
.btn--solid:focus-visible::before {
  transform: translateY(0);
}

/* ---------- .btn--ghost: outlined, fills from left ---------- */
.btn--ghost {
  background: transparent;
  color: var(--ds-ink, #1a1614);
  border-color: var(--ds-ink, #1a1614);
}
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-ink, #1a1614);
  transform: translateX(-101%);
  transition: transform var(--ds-dur-slow, 600ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  pointer-events: none;
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--ds-bone, #f4f0e8);
  border-color: var(--ds-ink, #1a1614);
}
.btn--ghost:hover::before,
.btn--ghost:focus-visible::before {
  transform: translateX(0);
}

/* ---------- .btn--text: hairline underline draw-in ---------- */
.btn--text {
  padding: 8px 0;
  background: transparent;
  border: none;
  color: var(--ds-ink, #1a1614);
  min-height: 0;
  letter-spacing: 0.24em;
}
.btn--text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.btn--text:hover,
.btn--text:focus-visible { color: var(--ds-oxblood, #8d2f2a); }
.btn--text:hover::after,
.btn--text:focus-visible::after { transform: scaleX(1); }

/* ---------- .btn--small: filter pills, admin tabs ---------- */
.btn--small {
  padding: 10px 18px;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  min-height: 36px;
}

/* ---------- .btn--icon: square icon-only ---------- */
.btn--icon {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  font-size: 0;
  letter-spacing: 0;
  background: transparent;
  color: var(--ds-ink, #1a1614);
  border: 1px solid var(--ds-border-strong, rgba(26,22,20,0.18));
}
.btn--icon > svg,
.btn--icon .ds-icon {
  width: 18px;
  height: 18px;
}
.btn--icon:hover,
.btn--icon:focus-visible {
  background: var(--ds-ink, #1a1614);
  color: var(--ds-bone, #f4f0e8);
  border-color: var(--ds-ink, #1a1614);
}

/* ===========================================================
   Bind the system to existing component classes (overrides only —
   does not redefine layout owned by hero.css / sections.css).
   =========================================================== */

/* ---- Hero CTAs: ensure arrow slides ---- */
.hero-cta .ds-icon { transition: transform var(--ds-dur-normal, 320ms)
  var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)); }
.hero-cta:hover .ds-icon,
.hero-cta:focus-visible .ds-icon { transform: translateX(4px); }

/* Add the rising-oxblood layer to the primary hero CTA without
   breaking its existing dark fill. Keeps hero.css authoritative. */
.hero-cta--primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-cta--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-oxblood, #8d2f2a);
  transform: translateY(101%);
  transition: transform var(--ds-dur-slow, 600ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  pointer-events: none;
}
.hero-cta--primary:hover::before,
.hero-cta--primary:focus-visible::before {
  transform: translateY(0);
}
/* Cancel hero.css's plain background swap so ::before reveals through */
.hero-cta--primary:hover { background: var(--ds-ink, #1a1614); }

/* Ghost hero CTA: ink fills from left (matches .btn--ghost) */
.hero-cta--ghost {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-cta--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-ink, #1a1614);
  transform: translateX(-101%);
  transition: transform var(--ds-dur-slow, 600ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  pointer-events: none;
}
.hero-cta--ghost:hover::before,
.hero-cta--ghost:focus-visible::before { transform: translateX(0); }
.hero-cta--ghost:hover { background: transparent; color: var(--ds-bone, #f4f0e8); }

/* ---- Pricing card CTA — add arrow slide & oxblood fill ---- */
.pricing-card-cta { isolation: isolate; overflow: hidden; }
.pricing-card-cta .ds-icon {
  margin-left: 0.5em;
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.pricing-card-cta:hover .ds-icon,
.pricing-card-cta:focus-visible .ds-icon { transform: translateX(4px); }

/* ---- Booking submit + nav CTA — align hover behaviour ---- */
.btn-submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-oxblood, #8d2f2a);
  transform: translateY(101%);
  transition: transform var(--ds-dur-slow, 600ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.btn-submit:hover::before,
.btn-submit:focus-visible::before { transform: translateY(0); }
.btn-submit:hover { background: var(--ds-ink, #1a1614); }
.btn-submit .ds-icon {
  margin-left: 0.6em;
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.btn-submit:hover .ds-icon,
.btn-submit:focus-visible .ds-icon { transform: translateX(4px); }

.nav-link.nav-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.nav-link.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-oxblood, #8d2f2a);
  transform: translateY(101%);
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.nav-link.nav-cta:hover::before { transform: translateY(0); }
.nav-link.nav-cta:hover { background: var(--ds-ink, #1a1614); }

/* ---- Filter buttons — Acne Studios pill-style ---- */
.gallery-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--ds-border-strong, rgba(26,22,20,0.18));
  border-radius: 999px;
  font-family: var(--ds-font-sans, 'Inter Tight', sans-serif);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ds-ink, #1a1614);
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  min-height: 36px;
  transition:
    color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    border-color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.filter-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ds-ink, #1a1614);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  border-radius: 999px;
}
.filter-btn:hover { color: var(--ds-bone, #f4f0e8); border-color: var(--ds-ink, #1a1614); }
.filter-btn:hover::before { transform: scaleX(1); }
.filter-btn.active {
  color: var(--ds-bone, #f4f0e8);
  background: var(--ds-oxblood, #8d2f2a);
  border-color: var(--ds-oxblood, #8d2f2a);
}
.filter-btn.active::before { display: none; }
/* Cancel legacy underline marker from style.css */
.filter-btn.active::after { display: none !important; }

/* ---- Scroll-top — minimal bone disc with thin oxblood outline ---- */
.scroll-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ds-bone, #f4f0e8);
  color: var(--ds-oxblood, #8d2f2a);
  border: 1px solid rgba(141, 47, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  letter-spacing: 0;
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 900;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    visibility var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    background var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    border-color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    transform var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
  box-shadow: 0 4px 14px rgba(26,22,20,0.10);
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover {
  background: var(--ds-oxblood, #8d2f2a);
  border-color: var(--ds-oxblood, #8d2f2a);
  color: var(--ds-bone, #f4f0e8);
  transform: translateY(-2px);
}
.scroll-top .ds-icon { width: 18px; height: 18px; }
.scroll-top svg { width: 18px; height: 18px; }

/* ---- Lightbox controls ---- */
.lightbox-close,
.lightbox-nav {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto !important;
  height: auto !important;
  min-width: 72px;
  min-height: 64px;
  padding: 10px 14px;
  background: rgba(26,22,20,0.78) !important;
  border: 1px solid rgba(244,240,232,0.55) !important;
  color: var(--ds-bone, #f4f0e8) !important;
  border-radius: 0;
  cursor: pointer;
  font-size: 0;
  letter-spacing: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  transition:
    background var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    border-color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    color var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    transform var(--ds-dur-normal, 320ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.lightbox-close .ds-icon,
.lightbox-nav .ds-icon { width: 22px; height: 22px; display: inline-flex; }
.lightbox-close svg,
.lightbox-nav svg { width: 22px; height: 22px; stroke-width: 2; }
.lightbox-btn-label {
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: inherit;
}
.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: var(--ds-oxblood, #8d2f2a) !important;
  border-color: var(--ds-oxblood, #8d2f2a) !important;
  color: var(--ds-bone, #f4f0e8) !important;
}
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

/* ---- Admin photo action buttons (★ ☺ ✕ replaced by SVG) ---- */
.admin-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    border-color var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
    color var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.admin-photo-btn svg { width: 16px; height: 16px; }
.admin-photo-btn.hero:hover {
  background: var(--ds-champagne, #b89968);
  border-color: var(--ds-champagne, #b89968);
  color: #fff;
}
.admin-photo-btn.delete:hover {
  background: var(--ds-error, #b13838);
  border-color: var(--ds-error, #b13838);
  color: #fff;
}

/* ---- Admin category remove (✕) ---- */
.admin-cat-tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0 0 0 6px;
  color: var(--ds-text-muted, #4a4641);
  cursor: pointer;
}
.admin-cat-tag button svg { width: 12px; height: 12px; }
.admin-cat-tag button:hover { color: var(--ds-error, #b13838); }

/* ---- Admin panel close (already SVG via static markup) ---- */
.admin-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 0;
  background: transparent;
  border: 1px solid var(--ds-border-strong, rgba(26,22,20,0.18));
  color: var(--ds-text, #1a1614);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
              color var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1)),
              border-color var(--ds-dur-fast, 180ms) var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
.admin-panel-close svg { width: 16px; height: 16px; }
.admin-panel-close:hover {
  background: var(--ds-ink, #1a1614);
  color: var(--ds-bone, #f4f0e8);
  border-color: var(--ds-ink, #1a1614);
}

/* ---- FAQ icon: replace pseudo-element +/× with our SVG ---- */
.faq-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-oxblood, #8d2f2a);
  transition: transform var(--ds-dur-normal, 320ms)
    var(--ds-ease-luxury, cubic-bezier(.25,.1,.25,1));
}
/* Drop legacy pseudo-element bars whenever the SVG hydrates this slot.
   Two strategies for max browser coverage:
     - :has() — modern (Safari/Chrome/Firefox 2024+)
     - data-icon attribute — universal fallback */
.faq-icon[data-icon]::before,
.faq-icon[data-icon]::after,
.faq-icon:has(svg)::before,
.faq-icon:has(svg)::after { content: none !important; display: none !important; }
.faq-icon svg { width: 18px; height: 18px; }
.faq-item[open] .faq-icon,
.faq-item.is-open .faq-icon { transform: rotate(45deg); }

/* ============================================
   Reduced-motion: kill the slide/fill choreography
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn--solid,
  .btn--ghost,
  .btn--text,
  .btn--icon,
  .hero-cta,
  .hero-cta--primary,
  .hero-cta--ghost,
  .pricing-card-cta,
  .btn-submit,
  .nav-link.nav-cta,
  .filter-btn,
  .scroll-top,
  .lightbox-close,
  .lightbox-nav,
  .admin-photo-btn,
  .admin-cat-tag button,
  .admin-panel-close,
  .faq-icon {
    transition: none !important;
  }
  .btn--solid::before,
  .btn--ghost::before,
  .hero-cta--primary::before,
  .hero-cta--ghost::before,
  .btn-submit::before,
  .nav-link.nav-cta::before,
  .filter-btn::before,
  .btn--text::after {
    transition: none !important;
  }
  .btn:hover,
  .btn--solid:hover,
  .btn--ghost:hover,
  .scroll-top:hover,
  .lightbox-prev:hover,
  .lightbox-next:hover { transform: none !important; }
  .hero-cta:hover .ds-icon,
  .pricing-card-cta:hover .ds-icon,
  .btn-submit:hover .ds-icon { transform: none !important; }
}

/* ============================================
   Mobile: keep hit areas >= 44×44
   ============================================ */
@media (max-width: 600px) {
  .btn,
  .btn--solid,
  .btn--ghost,
  .btn--icon,
  .filter-btn,
  .scroll-top { min-height: 44px; }
  .filter-btn { padding: 12px 18px; }
  .scroll-top { width: 44px; height: 44px; bottom: 20px; right: 20px; }
}

/* ============================================
   Lightbox controls — mobile (Android / iPhone)
   Side arrows shrink and dock to bottom corners so
   they don't overlap the photo. Close stays top-right.
   Counter moves to top-left, caption above arrows.
   Respects iOS safe-area (notch + home bar).
   ============================================ */
@media (max-width: 600px) {
  .lightbox-close,
  .lightbox-nav {
    min-width: 56px !important;
    min-height: 52px !important;
    padding: 8px 10px !important;
    gap: 3px !important;
    background: rgba(26,22,20,0.88) !important;
  }
  .lightbox-close .ds-icon,
  .lightbox-nav .ds-icon,
  .lightbox-close svg,
  .lightbox-nav svg { width: 18px !important; height: 18px !important; }
  .lightbox-btn-label { font-size: 0.52rem !important; letter-spacing: 0.16em !important; }

  .lightbox-close {
    top: max(12px, env(safe-area-inset-top, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }

  .lightbox-nav {
    top: auto !important;
    transform: none !important;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .lightbox-prev { left: max(16px, env(safe-area-inset-left, 0px)) !important; }
  .lightbox-next { right: max(16px, env(safe-area-inset-right, 0px)) !important; }
  .lightbox-prev:hover,
  .lightbox-next:hover { transform: none !important; }
}

@media (max-width: 600px) and (orientation: portrait) {
  .lightbox-img-wrap {
    max-width: 96vw !important;
    max-height: 70vh !important;
    margin-bottom: 60px;
  }
  .lightbox-img-wrap img { max-height: 70vh !important; }
  .lightbox-caption {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 90px;
    text-align: center;
  }
  .lightbox-counter {
    top: calc(18px + env(safe-area-inset-top, 0px)) !important;
    left: 16px !important;
    font-size: 0.7rem !important;
  }
}

/* Very narrow phones (≤380px): hide labels to save space, keep icons */
@media (max-width: 380px) {
  .lightbox-btn-label { display: none !important; }
  .lightbox-close,
  .lightbox-nav {
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 12px !important;
  }
}
