/**
 * 111 International Spa — Main Stylesheet Entry Point
 *
 * Import order matters — do not reorder.
 * 1. Design tokens  (variables)
 * 2. Reset          (normalize)
 * 3. Layout         (container, grid, section)
 * 4. Utilities      (helpers)
 * 5. Components     (UI components)
 * 6. Navigation     (header/nav)
 * 7. Forms          (inputs, validation)
 * 8. Footer         (footer)
 * 9. Responsive     (breakpoint overrides)
 *
 * @package 111InternationalSpa
 */

@import url('variables.css');
@import url('reset.css');
@import url('layout.css');
@import url('utilities.css');
@import url('components.css');
@import url('navigation.css');
@import url('forms.css');
@import url('footer.css');
@import url('responsive.css');

/* ════════════════════════════════════════════════════════════
   GLOBAL PAGE TRANSITIONS
   ════════════════════════════════════════════════════════════ */

body {
  opacity: 0;
  transition: opacity 200ms ease;
}

body.loaded {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   SELECTION
   ════════════════════════════════════════════════════════════ */

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--color-black);
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR (WebKit)
   ════════════════════════════════════════════════════════════ */

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-warm); }
::-webkit-scrollbar-thumb { background: var(--color-gold-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* ════════════════════════════════════════════════════════════
   SKIP LINK
   ════════════════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-4);
  z-index: var(--z-skip);
  padding: var(--space-2) var(--space-5);
  background: var(--color-gold);
  color: var(--color-black);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════
   FOCUS-VISIBLE — WCAG AA keyboard navigation
   Applies only to keyboard users, not mouse clicks.
   ════════════════════════════════════════════════════════════ */

/* Remove default outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Buttons — override to match button radius */
.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.2);
}

/* Navigation links */
.nav-link:focus-visible,
.nav-dropdown__link:focus-visible,
.nav-mobile__link:focus-visible,
.nav-mobile__sub-link:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

/* Form inputs */
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 0;
}

/* Card links */
.card--link:focus-visible,
.experience-nav-card:focus-visible,
.contact-card:focus-visible,
.gallery-card:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* FAQ buttons */
.faq-question:focus-visible,
.gallery-filter-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Footer links */
.footer-link:focus-visible,
.footer-contact-link:focus-visible,
.footer-social__link:focus-visible,
.footer-bottom__link:focus-visible {
  outline: 1px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   REDUCED MOTION — Respect user preference
   WCAG 2.1 SC 2.3.3 & 2.3.3 (Animation from Interactions)
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep page load visible immediately — no fade-in delay */
  body {
    opacity: 1 !important;
    transition: none !important;
  }

  /* Disable parallax / transform animations */
  .treatment-card:hover,
  .feature-card:hover,
  .review-card:hover,
  .experience-nav-card:hover,
  .floating-contact__btn:hover {
    transform: none !important;
  }

  /* Disable image zoom on hover */
  .treatment-card:hover .treatment-card__img,
  .gallery-card:hover .gallery-card__img {
    transform: none !important;
  }

  /* Still show reveal elements immediately */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ════════════════════════════════════════════════════════════
   SCROLL-REVEAL ANIMATION
   JS adds `is-revealed` class via IntersectionObserver.
   Elements with [data-reveal] start hidden.
   ════════════════════════════════════════════════════════════ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
  will-change: opacity, transform;
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal="left"] {
  transform: translateX(-24px);
}

[data-reveal="right"] {
  transform: translateX(24px);
}

[data-reveal="scale"] {
  transform: scale(0.95);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Stagger delay for grid children */
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ════════════════════════════════════════════════════════════
   LAZY IMAGE LOADED STATE
   ════════════════════════════════════════════════════════════ */

img[loading="lazy"] {
  background: var(--color-bg-warm);
}

img[loading="lazy"].is-loaded {
  background: transparent;
}

/* ════════════════════════════════════════════════════════════
   CARD LINK — generic clickable card (used in 404, etc.)
   ════════════════════════════════════════════════════════════ */

.card--link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-card);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.card--link:hover {
  border-color: var(--color-gold-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════
   INTRO TEXT — common lead paragraph class
   ════════════════════════════════════════════════════════════ */

.intro-text {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 64ch;
}

/* ════════════════════════════════════════════════════════════
   HIGH CONTRAST SUPPORT
   ════════════════════════════════════════════════════════════ */

@media (forced-colors: active) {
  .btn {
    border: 2px solid ButtonText;
  }

  .btn--primary,
  .btn--gold {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }

  .gold-line {
    background: Highlight;
  }

  :focus-visible {
    outline: 3px solid Highlight;
  }
}



/* =========================================================
   BOOKING ENGINE
   Standalone CSS - No Tailwind Required
========================================================= */

.booking-section {
    background: hsl(35, 15%, 25%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6rem 1rem;
    color: #fff;
}

.booking-container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.booking-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.booking-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;

    color: hsl(38, 50%, 65%);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.booking-eyebrow-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.booking-title {
    margin: 0 0 1rem;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}

.booking-title span {
    color: hsl(38, 50%, 65%);
    font-style: italic;
}

.booking-description {
    margin: 0;

    color: rgba(253, 250, 244, 0.7);

    font-size: 1rem;
    line-height: 1.6;
}


/* =========================================================
   PROGRESS BAR
========================================================= */

.booking-progress {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.5rem;
    margin-bottom: 2.5rem;

    width: 100%;
}

.booking-progress-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    min-width: 0;
}

.booking-progress-dot {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);
    color: rgba(253, 250, 244, 0.6);

    font-size: 0.75rem;
    font-weight: 700;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.booking-progress-item span {
    color: rgba(253, 250, 244, 0.5);

    font-size: 0.75rem;
    white-space: nowrap;

    transition: color 0.3s ease;
}

.booking-progress-item.active .booking-progress-dot {
    background: hsl(38, 40%, 45%);
    color: hsl(40, 33%, 98%);
    transform: scale(1.05);
}

.booking-progress-item.active span {
    color: #fff;
    font-weight: 600;
}

.booking-progress-item.completed .booking-progress-dot {
    background: hsl(38, 40%, 45%);
    color: #fff;
}

.booking-progress-item.completed span {
    color: rgba(253, 250, 244, 0.85);
}

.booking-progress-line {
    width: 24px;
    height: 1px;

    flex: 0 0 24px;

    background: rgba(255, 255, 255, 0.15);
}


/* =========================================================
   BOOKING CARD
========================================================= */

.booking-card {
    padding: 2.5rem;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;

    box-sizing: border-box;
}


/* =========================================================
   STEPS
========================================================= */

.booking-step {
    display: none;

    animation: bookingFadeIn 0.35s ease;
}

.booking-step.active {
    display: block;
}

@keyframes bookingFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-step-title {
    margin: 0 0 1.5rem;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.booking-selected-text {
    margin: -0.75rem 0 1.5rem;

    color: rgba(253, 250, 244, 0.6);

    font-size: 0.875rem;
    line-height: 1.5;
}

.booking-selected-text strong {
    color: #fff;
    font-weight: 600;
}


/* =========================================================
   TREATMENTS
========================================================= */

.booking-treatment-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0.75rem;
}

.booking-treatment-btn {
    width: 100%;

    padding: 0.75rem 1rem;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;

    background: rgba(255, 255, 255, 0.05);
    color: rgba(253, 250, 244, 0.8);

    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.booking-treatment-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.booking-treatment-btn.selected {
    background: rgba(173, 137, 72, 0.2);
    border-color: hsl(38, 40%, 55%);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(190, 154, 88, 0.15);
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.booking-primary-btn {
    width: 100%;

    min-height: 52px;

    margin-top: 1.5rem;
    padding: 0.85rem 1rem;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    border: 0;
    border-radius: 0.75rem;

    background: hsl(38, 40%, 45%);
    color: hsl(40, 33%, 98%);

    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.booking-primary-btn:not(:disabled):hover {
    background: hsl(38, 40%, 50%);
    transform: translateY(-1px);
}

.booking-primary-btn:not(:disabled):active {
    transform: translateY(0);
}

.booking-primary-btn.booking-disabled,
.booking-primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.booking-flex-btn {
    flex: 1;
    margin-top: 0;
}


/* =========================================================
   DATE & TIME
========================================================= */

.booking-date-time-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 1.5rem;

    margin-bottom: 1.5rem;
}

.booking-field-label {
    display: block;

    margin-bottom: 0.5rem;

    color: #fff;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.booking-date-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 0.5rem;
}

.booking-time-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0.5rem;
}

.booking-date-btn,
.booking-time-btn {
    min-height: 44px;

    padding: 0.5rem;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.65rem;

    background: rgba(255, 255, 255, 0.05);
    color: rgba(253, 250, 244, 0.75);

    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.booking-date-btn:hover,
.booking-time-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.booking-date-btn.selected,
.booking-time-btn.selected {
    background: hsl(38, 40%, 45%);
    border-color: hsl(38, 40%, 55%);
    color: #fff;
}


/* =========================================================
   NAVIGATION
========================================================= */

.booking-navigation {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;

    width: 100%;
}

.booking-back-btn {
    min-height: 52px;

    padding: 0.75rem 1.5rem;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;

    background: transparent;
    color: rgba(253, 250, 244, 0.7);

    font-family: inherit;
    font-size: 0.875rem;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.booking-back-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}


/* =========================================================
   NAME INPUT
========================================================= */

.booking-name-input {
    display: block;

    width: 100%;
    height: 52px;

    box-sizing: border-box;

    margin-bottom: 1.5rem;
    padding: 0 1rem;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    outline: none;

    background: rgba(255, 255, 255, 0.08);
    color: #fff;

    font-family: inherit;
    font-size: 0.875rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.booking-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.booking-name-input:focus {
    border-color: hsl(38, 40%, 55%);
    background: rgba(255, 255, 255, 0.1);

    box-shadow: 0 0 0 3px rgba(190, 154, 88, 0.15);
}


/* =========================================================
   SUMMARY
========================================================= */

.booking-summary {
    padding: 1.25rem;

    margin-bottom: 1.5rem;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.booking-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 1rem;

    padding: 0.45rem 0;

    font-size: 0.875rem;
}

.booking-summary-row span {
    color: rgba(253, 250, 244, 0.6);
}

.booking-summary-row strong {
    color: #fff;

    font-weight: 600;

    text-align: right;
}


/* =========================================================
   WHATSAPP BUTTON
========================================================= */

.booking-whatsapp-btn {
    flex: 1;

    min-height: 52px;

    padding: 0.75rem 1rem;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    box-sizing: border-box;

    border-radius: 0.75rem;

    background: #22c55e;
    color: #fff;

    font-size: 0.875rem;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.booking-whatsapp-btn:hover {
    background: #16a34a;
    color: #fff;
    transform: translateY(-1px);
}

.booking-whatsapp-btn svg {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {

    .booking-section {
        padding: 4rem 1rem;
    }

    .booking-card {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }

    .booking-progress {
        gap: 0.35rem;
    }

    .booking-progress-line {
        width: 12px;
        flex-basis: 12px;
    }

    .booking-progress-item {
        gap: 0;
    }

    .booking-progress-item span {
        display: none;
    }

    .booking-progress-dot {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .booking-treatment-grid {
        grid-template-columns: 1fr;
    }

    .booking-date-time-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .booking-navigation {
        gap: 0.5rem;
    }

    .booking-back-btn {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .booking-whatsapp-btn {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}


@media (max-width: 420px) {

    .booking-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .booking-card {
        padding: 1.25rem;
    }

    .booking-progress-line {
        width: 8px;
        flex-basis: 8px;
    }

    .booking-progress-dot {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .booking-summary-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .booking-summary-row strong {
        text-align: left;
    }

    .booking-navigation {
        flex-wrap: wrap;
    }

    .booking-back-btn {
        flex: 0 0 auto;
    }

    .booking-flex-btn,
    .booking-whatsapp-btn {
        min-width: 0;
    }
}


/* =========================================================
   BOOKING BUTTON FIX
========================================================= */

.booking-primary-btn:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}

.booking-primary-btn.booking-disabled,
.booking-primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* Selected treatment */
.booking-treatment-btn.selected {
    background: hsl(38, 40%, 45%);
    border-color: hsl(38, 50%, 65%);
    color: #fff;
}


/* Make sure buttons are actually clickable */
.booking-treatment-btn,
.booking-date-btn,
.booking-time-btn,
.booking-primary-btn,
.booking-back-btn {
    position: relative;
    z-index: 5;
    pointer-events: auto;
}



/* =========================================================
   BOOKING CLICK / LAYER FIX
   Put this at the VERY END of your CSS
========================================================= */

#book.booking-section {
    position: relative !important;
    z-index: 100 !important;
    isolation: isolate !important;
}

#book .booking-container {
    position: relative !important;
    z-index: 101 !important;
}

#book .booking-card {
    position: relative !important;
    z-index: 102 !important;
}

#book .booking-treatment-grid,
#book .booking-treatment-btn {
    position: relative !important;
    z-index: 103 !important;
}

#book .booking-treatment-btn {
    display: block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Make absolutely sure no pseudo element blocks clicks */
#book::before,
#book::after,
#book .booking-card::before,
#book .booking-card::after {
    pointer-events: none !important;
}


/* Selected treatment */
#book .booking-treatment-btn.selected {
    background: hsl(38, 40%, 45%) !important;
    border-color: hsl(38, 50%, 65%) !important;
    color: #fff !important;
}


/* Active next button */
#book .booking-primary-btn:not(:disabled) {
    opacity: 1 !important;
    cursor: pointer !important;
}


/* Disabled next button */
#book .booking-primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
