/* ==========================================================================
   aligné PILATES STUDIO - Premium Styling & Mobile-Optimized Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Root Variables
   -------------------------------------------------------------------------- */
:root {
  /* High-end Color Palette (Neutral Sand, Earthy Taupe, Charcoal) */
  --bg-primary: #F7F4F0;     /* Extremely soft, warm off-white cream */
  --bg-secondary: #EAE6E1;   /* Soft warm stone */
  --bg-dark: #4A413A;        /* Deep chocolate-taupe charcoal */
  
  --accent-primary: #8E7E72; /* Curated earthy warm taupe (logo color) */
  --accent-dark: #3D352F;    /* Rich organic dark soil */
  --accent-light: #DFDCD6;   /* Pale stone gray border */
  --accent-gold: #BBAEA1;    /* Warm brass gold */
  
  /* Text colors */
  --text-main: #4A413A;
  --text-muted: #84766C;
  --text-light: #F7F4F0;
  
  /* Fonts */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Layout Spacing */
  --header-height: 85px;
  --announcement-height: 0px;
  --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  /* Shadows & Radius */
  --shadow-premium: 0 10px 30px -15px rgba(74, 65, 58, 0.08);
  --shadow-hover: 0 20px 40px -20px rgba(74, 65, 58, 0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  /* Container sizes */
  --container-width: 1200px;
}

/* --------------------------------------------------------------------------
   2. Reset & Browser Compatibility Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Prevent default gray highlights on mobile tap in Safari & Chrome */
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  /* Premium iOS smooth inertial scroll support */
  -webkit-overflow-scrolling: touch;
}

main, section, footer {
  max-width: 100%;
  overflow-x: clip;
}

section {
  padding: 100px 0;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--accent-dark);
  font-weight: 400;
  text-wrap: balance; /* Balance short heading wraps nicely */
}

p {
  font-weight: 300;
  color: var(--text-muted);
  text-wrap: pretty; /* Prevents orphaned words */
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Clear all Safari button & input shadows/rounding defaults */
button, select, input, textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Custom Utilities & Global Aesthetics
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.full-width-btn { width: 100%; }

.divider {
  width: 60px;
  height: 1px;
  background-color: var(--accent-primary);
  margin: 20px auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-subtitle {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent-primary);
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.8rem); /* Fluid responsive typography */
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.15rem;
  max-width: 650px;
  margin: 20px auto 0;
  font-weight: 300;
}

.max-width-p {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Tap Targets
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  min-height: 48px; /* Apple Human Interface Guideline compliant target */
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  touch-action: manipulation;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--bg-dark);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn-dark {
  background-color: var(--bg-dark);
  color: var(--bg-primary);
}

.btn-dark:hover {
  background-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Active click states for all tap targets */
.btn:active, .utility-btn:active, .time-slot:active, .filter-btn:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   5. Announcement Bar & Navigation Header
   -------------------------------------------------------------------------- */
.announcement-bar {
  height: var(--announcement-height);
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0 16px;
  z-index: 1000;
  position: relative;
  text-align: center;
}

.announcement-bar .cta-link {
  text-decoration: underline;
  margin-left: 4px;
  font-weight: 600;
}

.main-header {
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  background: rgba(247, 244, 240, 0.92); /* Glassmorphic blur */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(142, 126, 114, 0.12);
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.main-header.scrolled {
  height: calc(68px + env(safe-area-inset-top, 0px));
  background: rgba(247, 244, 240, 0.96);
  box-shadow: var(--shadow-premium);
}

.header-container {
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand logo styling */
.logo-brand {
  display: inline-flex;
  align-items: center;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  letter-spacing: -0.015em;
  color: var(--accent-primary);
  font-weight: 400;
  line-height: 1.15; /* Full leading so the 'g' descender is never clipped */
}

/* Nav Menu */
.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-link {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-main);
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-primary);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Utilities */
.header-utilities {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-btn {
  cursor: pointer;
  color: var(--text-main);
  width: 44px; /* Minimum tap size */
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-fast);
  touch-action: manipulation;
}

.utility-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
}

/* Hamburger mobile button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.hamburger-line {
  width: 18px;
  height: 1.5px;
  background-color: var(--text-main);
  transition: var(--transition-smooth);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Mobile Nav Overlay
   -------------------------------------------------------------------------- */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  background-color: var(--bg-primary);
  z-index: 998;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-menu {
  padding: 28px 24px 36px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.mobile-nav-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent-dark);
  font-weight: 400;
  display: block;
  padding: 4px 0;
  border-bottom: 1px solid rgba(223, 220, 214, 0.45);
}

.mobile-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--accent-light);
}

.mobile-nav-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.mobile-nav-meta a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
}

/* Mobile Sticky Bottom Quick-Action Bar (hidden on desktop) */
.mobile-bottom-bar {
  display: none;
}

/* --------------------------------------------------------------------------
   7. Hero Section (Dynamic Viewport Height optimized)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  /* Use dvh (Dynamic Viewport Height) to prevent sizing stutters in Safari when navigation bars compress */
  height: calc(100dvh - var(--header-height) - var(--announcement-height));
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
  padding: 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-img,
.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center center;
  animation: heroSlowZoom 25s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse 80% 70% at 50% 50%,
      rgba(35, 30, 26, 0.42) 0%,
      rgba(35, 30, 26, 0.25) 55%,
      rgba(35, 30, 26, 0.55) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(35, 30, 26, 0.45) 0%,
      rgba(35, 30, 26, 0.22) 50%,
      rgba(35, 30, 26, 0.65) 100%
    );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 24px;
  max-width: 800px;
}

.hero-tagline {
  font-size: 11px;
  letter-spacing: 0.3em;
  font-weight: 600;
  color: var(--bg-primary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.8rem); /* Responsive fluid scaling */
  line-height: 1.05;
  color: var(--bg-primary);
  margin-bottom: 24px;
  font-weight: 300;
}

.hero-title em {
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 300;
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 40px;
  color: rgba(247, 244, 240, 0.9);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-ctas .btn-outline {
  border-color: var(--bg-primary);
  color: var(--bg-primary);
}

.hero-ctas .btn-outline:hover {
  background-color: var(--bg-primary);
  color: var(--text-main);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-text {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(247, 244, 240, 0.8);
  font-weight: 500;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background-color: rgba(247, 244, 240, 0.4);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15px;
  background-color: var(--bg-primary);
  animation: scrollDown 2s infinite;
}

/* Animations for Hero and content load */
@keyframes heroSlowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-img,
  .hero-bg-video {
    animation: none !important;
    transform: scale(1) !important;
  }
}

@keyframes scrollDown {
  0% { top: -20px; }
  100% { top: 40px; }
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-up-delayed {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.animate-fade-up-delayed-2 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.animate-fade-up-delayed-3 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

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

/* Scroll reveal sections */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   8. Philosophy Section
   -------------------------------------------------------------------------- */
.about-section {
  background-color: var(--bg-primary);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.philosophy-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  padding: 38px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.philosophy-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
  border-color: var(--accent-primary);
}

.philosophy-icon {
  color: var(--accent-primary);
  margin-bottom: 24px;
}

.philosophy-card h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.philosophy-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.vibe-story-card {
  max-width: 860px;
  margin: 0 auto 36px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: 40px 44px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.vibe-story-card p {
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 18px;
}

.vibe-story-card p:last-child {
  margin-bottom: 0;
}

.vibe-story-lead {
  font-family: var(--font-serif);
  font-size: 1.45rem !important;
  color: var(--accent-dark) !important;
  font-style: italic;
}

.what-to-bring-banner {
  max-width: 860px;
  margin: 0 auto 20px;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 28px 36px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow-soft);
}

.what-to-bring-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-light);
}

.what-to-bring-content h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.what-to-bring-content p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-main);
  margin: 0;
}

.square-secure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-light);
  padding: 8px 14px;
  border-radius: 20px;
  margin-top: 14px;
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .vibe-story-card {
    padding: 28px 22px;
  }
  .what-to-bring-banner {
    flex-direction: column;
    padding: 24px 22px;
    align-items: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   9. Booking Section
   -------------------------------------------------------------------------- */
.booking-section {
  background-color: var(--bg-secondary);
}

.class-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  min-height: 44px; /* Touch target optimized */
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
  touch-action: manipulation;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

/* Flex rather than grid so the trailing row centres instead of leaving a hole —
   the class list is an odd count and rarely divides evenly by the column count. */
.schedule-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.schedule-grid > .class-card {
  flex: 1 1 340px;
  max-width: calc((100% - 60px) / 3);
}

.class-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.class-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
}

.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.class-type-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 6px 12px;
  border-radius: 20px;
}

.class-difficulty {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.class-name {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.class-desc {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex: 1;
}

.class-details {
  border-top: 1px solid var(--accent-light);
  border-bottom: 1px solid var(--accent-light);
  padding: 16px 0;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-item svg {
  color: var(--accent-primary);
}

.class-schedule-times {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  min-height: 48px; /* Touch target optimized */
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  touch-action: manipulation;
}

.time-slot:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

.time-slot span {
  font-size: 13px;
  font-weight: 600;
}

.spots-count {
  font-size: 11px !important;
  font-weight: 400 !important;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   10. Instructors Section
   -------------------------------------------------------------------------- */
.instructors-section {
  background-color: var(--bg-secondary);
}

/* A single guide reads better as centred copy than as one lonely card. */
.instructor-profile {
  max-width: 660px;
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.instructor-profile .instructor-avatar-placeholder {
  width: 132px;
  height: 132px;
  margin-bottom: 26px;
}

.instructor-profile .instructor-initials {
  font-size: 2.8rem;
}

.instructor-profile .instructor-role {
  margin-bottom: 22px;
}

.instructor-profile-bio {
  font-size: 1rem;
  line-height: 1.8;
}

.instructor-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.instructor-initials {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-primary);
}

.instructor-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   11. Membership Pricing Section
   -------------------------------------------------------------------------- */
.pricing-section {
  background-color: var(--bg-primary);
}

.price-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  background-color: var(--bg-secondary);
  padding: 6px;
  border-radius: 30px;
}

.toggle-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 10px;
  transition: var(--transition-fast);
}

.toggle-label.active {
  color: var(--accent-dark);
}

.price-toggle-btn {
  width: 44px;
  height: 24px;
  background-color: var(--accent-primary);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

.price-toggle-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: var(--bg-primary);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.price-toggle-btn.annual::after {
  transform: translateX(20px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.pricing-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: 42px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}

.pricing-card.recommended {
  background-color: var(--bg-secondary);
  border-color: var(--accent-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}

.recommended-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
}

.pricing-header h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.pricing-price {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--accent-dark);
  text-align: center;
  line-height: 1;
}

.pricing-price small {
  font-size: 1.1rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-period {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

.pricing-features {
  list-style: none;
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.pricing-features li {
  font-size: 13.5px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-primary);
  font-weight: 700;
}

.pricing-features li.disabled {
  opacity: 0.4;
}

.pricing-features li.disabled::before {
  content: '✕';
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   12. Testimonials Section
   -------------------------------------------------------------------------- */
.testimonials-section {
  background-color: var(--bg-dark);
  color: var(--bg-primary);
}

.testimonial-slider-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  text-align: center;
}

.testimonial-slider {
  position: relative;
  min-height: 250px;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.quote-icon {
  font-family: var(--font-serif);
  font-size: 6rem;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: -15px;
  opacity: 0.5;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  line-height: 1.45;
  color: var(--bg-primary);
  font-weight: 300;
  margin-bottom: 24px;
}

.testimonial-author {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent-gold);
}

.testimonial-author-title {
  font-size: 11px;
  color: rgba(247, 244, 240, 0.6);
  margin-top: 4px;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

.control-btn {
  cursor: pointer;
  color: rgba(247, 244, 240, 0.6);
  width: 44px; /* Touch target optimized */
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.control-btn:hover {
  background-color: rgba(247, 244, 240, 0.1);
  color: var(--bg-primary);
}

.slider-dots {
  display: flex;
  gap: 8px;
}

.slider-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(247, 244, 240, 0.3);
  cursor: pointer;
  transition: var(--transition-fast);
}

.slider-dots .dot.active {
  background-color: var(--bg-primary);
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   13. FAQ Accordion Section
   -------------------------------------------------------------------------- */
.faq-section {
  background-color: var(--bg-primary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--accent-light);
}

.faq-question-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  min-height: 54px; /* Touch target optimized */
  cursor: pointer;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--accent-dark);
  transition: var(--transition-fast);
}

.faq-question-btn:hover {
  color: var(--accent-primary);
}

.faq-icon {
  color: var(--accent-primary);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer-wrapper {
  height: 0;
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer {
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 14.5px;
  line-height: 1.7;
}

.faq-answer strong {
  color: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   14. Contact & Concierge Section
   -------------------------------------------------------------------------- */
.contact-section {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--accent-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}

.contact-desc {
  font-size: 1.1rem;
  margin: 16px 0 40px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-item {
  display: flex;
  gap: 20px;
  align-items: start;
}

.info-icon {
  width: 44px;
  height: 44px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.info-item h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent-primary);
}

.info-item p {
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text-main);
}

/* Concierge form */
.studio-form {
  background-color: var(--bg-secondary);
  padding: 40px;
  border-radius: var(--radius-md);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* input focus & iOS standard font sizing to prevent automatic auto-zooms */
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 14px 18px;
  min-height: 48px; /* Compliance standard touch */
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  color: var(--text-main);
  font-size: 16px; /* CRITICAL: Font-size must be at least 16px to prevent iOS Safari auto-zooming on focus! */
  transition: var(--transition-fast);
}

.form-group select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E7E72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(142, 126, 114, 0.05);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  min-height: 44px;
}

.form-checkbox-group input {
  width: 20px; /* Enhanced tap targets */
  height: 20px;
  accent-color: var(--accent-primary);
}

.form-checkbox-group label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
}

.form-section-title {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 8px;
  margin: 10px 0 20px;
}

/* Newsletter Subscription Banner */
.newsletter-banner {
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.newsletter-content h3 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.newsletter-content h3 em {
  font-style: italic;
  font-weight: 300;
}

.newsletter-content p {
  font-size: 14.5px;
  max-width: 500px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  flex-shrink: 0;
}

.newsletter-form input {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  padding: 14px 20px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: 16px; /* No iOS auto-zoom */
  color: var(--text-main);
  transition: var(--transition-fast);
}

.newsletter-form input:focus {
  border-color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   15. Footers
   -------------------------------------------------------------------------- */
.main-footer {
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  padding: 80px 0 40px;
}

.main-footer p {
  color: rgba(247, 244, 240, 0.65);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand-col .logo-brand {
  margin-bottom: 24px;
}

.logo-brand.invert .logo-title {
  color: var(--bg-primary);
}

.brand-bio {
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  background-color: rgba(247, 244, 240, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 244, 240, 0.7);
  transition: var(--transition-fast);
}

.footer-socials a:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-links-col h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 24px;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links-col a {
  font-size: 13.5px;
  color: rgba(247, 244, 240, 0.6);
  font-weight: 400;
  min-height: 32px; /* Apple target compliant */
  display: inline-block;
}

.footer-links-col a:hover {
  color: var(--bg-primary);
  padding-left: 4px;
}

.footer-hours li {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(247, 244, 240, 0.6);
  border-bottom: 1px solid rgba(247, 244, 240, 0.05);
  padding-bottom: 10px;
}

.footer-hours li:last-child {
  border-bottom: none;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 244, 240, 0.08);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.footer-bottom a {
  text-decoration: underline;
}

.footer-credits {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   16. Interactive Modals (Booking & Schedule confirmations)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  background: rgba(61, 53, 47, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1004;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(-45%);
  width: calc(100% - 24px);
  max-width: 580px;
  max-height: 90dvh; /* dvh compatible */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-light);
  box-shadow: 0 30px 60px -20px rgba(61, 53, 47, 0.3);
  z-index: 1005;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  -webkit-overflow-scrolling: touch; /* smooth iOS scroll within modal */
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  pointer-events: auto;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  cursor: pointer;
  color: var(--text-main);
  width: 44px; /* Touch target compliant */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--accent-primary);
  transform: rotate(90deg);
}

.modal-header {
  padding: 40px 40px 0;
}

.modal-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 2.2rem;
  color: var(--accent-dark);
}

.modal-body {
  padding: 30px 40px 40px;
}

.modal-session-details {
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}

.detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.modal-detail-item span {
  font-weight: 600;
  color: var(--accent-dark);
}

.modal-notice-text {
  font-size: 13px;
  color: var(--accent-dark);
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 18px 0;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   17. Toast Notification Banners
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  margin-left: auto;
  z-index: 1006;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  width: auto;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 30px -10px rgba(61, 53, 47, 0.25);
  font-size: 13px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-close-btn {
  color: rgba(247, 244, 240, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 32px;
}

.toast-close-btn:hover {
  color: var(--bg-primary);
}

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

/* --------------------------------------------------------------------------
   18. Complete Responsive Layouts (Mobile / Tablet Queries)
   -------------------------------------------------------------------------- */

/* Medium Devices (Tablets, less than 1024px) */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2.3rem;
  }

  /* Drop to two class cards per row before they get squeezed */
  .schedule-grid > .class-card {
    max-width: calc((100% - 30px) / 2);
  }

  .philosophy-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 10px;
  }
  
  .philosophy-card {
    padding: 30px 20px;
  }
  
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .pricing-card {
    padding: 40px 24px;
  }
  
  .newsletter-banner {
    padding: 40px;
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .newsletter-form {
    max-width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Devices (Landscape Phones / Tablets, less than 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .container {
    padding: 0 18px;
  }

  .header-container {
    padding: 0 18px;
  }

  .logo-title {
    font-size: 1.85rem;
  }

  .main-header.scrolled {
    height: calc(68px + env(safe-area-inset-top, 0px));
  }

  /* Navigation mobile menu activation */
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Sections global spacing */
  section {
    padding: 64px 0;
  }

  /* Mobile Sticky Bottom Quick-Action Bar */
  .mobile-bottom-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(247, 244, 240, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(142, 126, 114, 0.18);
    box-shadow: 0 -8px 24px -10px rgba(61, 53, 47, 0.16);
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-bottom-bar.visible {
    transform: translateY(0);
  }

  .mobile-bottom-bar .btn {
    flex: 1;
    padding: 11px 12px;
    min-height: 44px;
    font-size: 11px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .main-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .toast-container {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
    max-width: calc(100vw - 28px);
  }

  /* Single column of class cards on phones */
  .schedule-grid > .class-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .class-card {
    padding: 24px 20px;
  }

  /* Hero typography & height resize so content never clips on mobile */
  .hero-section {
    height: auto;
    min-height: calc(100dvh - var(--header-height));
    padding: 56px 0 92px;
  }

  .hero-content {
    padding: 0 18px;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(2.15rem, 8.5vw, 3rem);
    margin-bottom: 18px;
  }
  
  .hero-desc {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 28px;
  }
  
  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  /* Philosophy stacked */
  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
  }
  
  /* Pricing stacked */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .pricing-card.recommended {
    transform: none;
  }

  .price-toggle-wrapper {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  /* Contact Details stacked */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  
  .studio-form {
    padding: 24px 18px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Newsletter banner & form stacked cleanly on mobile */
  .newsletter-banner {
    padding: 28px 20px;
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .newsletter-form input {
    width: 100%;
    min-width: 0;
  }

  .newsletter-form button {
    width: 100%;
  }
  
  /* Footer stacked */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  /* Modal responsive sizing overrides */
  .modal {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }

  .modal-header {
    padding: 26px 20px 0;
  }
  
  .modal-body {
    padding: 20px 20px 26px;
  }
  
  .modal-close {
    top: 14px;
    right: 14px;
  }
  
  .modal-title {
    font-size: 1.65rem;
  }
}

/* --------------------------------------------------------------------------
   18. Specialized Embedded Digital Waiver System & E-Sign Studio
   -------------------------------------------------------------------------- */

/* Header & Nav Quick Action */
.header-waiver-btn {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  letter-spacing: 0.04em;
  border-color: var(--accent-gold);
  color: var(--accent-dark);
  border-radius: 30px;
  transition: var(--transition-fast);
}

.header-waiver-btn:hover {
  background: var(--accent-dark);
  color: var(--bg-primary);
  border-color: var(--accent-dark);
}

@media (max-width: 768px) {
  .header-waiver-btn {
    display: none; /* Accessible in mobile overlay menu */
  }
}

/* Wide Modal Variant for Documents */
.modal-wide {
  width: calc(100% - 24px);
  max-width: 820px;
  max-height: 93dvh;
}

/* Security Header Badge */
.waiver-modal-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--accent-light);
}

.waiver-security-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(187, 174, 161, 0.18);
  border: 1px solid rgba(187, 174, 161, 0.45);
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.security-lock-icon {
  display: flex;
  align-items: center;
  color: var(--accent-primary);
}

.waiver-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 18px;
}

/* Stepper Progress Bar */
.waiver-progress-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-light);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.stepper-step.active {
  color: var(--accent-dark);
  font-weight: 700;
}

.stepper-step.completed {
  color: #4A7A54;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.stepper-step.active .step-num {
  background: var(--accent-dark);
  color: var(--bg-primary);
}

.stepper-step.completed .step-num {
  background: #4A7A54;
  color: #FFF;
}

.stepper-divider {
  flex: 1;
  height: 1px;
  background: var(--accent-light);
  margin: 0 14px;
}

/* Sections Inside Waiver Form */
.waiver-modal-body {
  padding: 24px 36px 36px;
}

.waiver-form-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(223, 220, 214, 0.7);
}

.waiver-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 16px;
}

.waiver-section-heading {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 16px;
}

/* Document Reader Embed Viewport */
.document-reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.document-source-badge {
  font-size: 11px;
  font-family: monospace;
  background: rgba(74, 65, 58, 0.07);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  margin-left: 6px;
}

.scroll-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 20px;
}

.scroll-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  transition: background 0.3s ease;
}

.scroll-status-badge.reviewed .scroll-dot {
  background: #4A7A54;
}

.scroll-status-badge.reviewed {
  color: #4A7A54;
}

.document-reader-wrapper {
  position: relative;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-md);
  background: #FCFAF7; /* Warm legal parchment */
  box-shadow: inset 0 2px 8px rgba(74, 65, 58, 0.03);
  overflow: hidden;
}

.document-progress-bar-track {
  height: 3px;
  background: rgba(223, 220, 214, 0.5);
  width: 100%;
}

.document-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-primary));
  transition: width 0.15s ease-out;
}

.document-reader-content {
  max-height: 240px;
  overflow-y: auto;
  padding: 22px 24px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-main);
  scroll-behavior: smooth;
}

.document-reader-content h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: 18px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.document-reader-content h4:first-child {
  margin-top: 0;
}

.document-reader-content p {
  margin-bottom: 12px;
}

.document-reader-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.document-reader-content li {
  margin-bottom: 6px;
}

.document-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-style: italic;
}

.scroll-instruction-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Custom Checkboxes */
.waiver-checkboxes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.custom-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--accent-light);
  transition: var(--transition-fast);
}

.custom-checkbox-row:hover {
  background: rgba(234, 230, 225, 0.8);
  border-color: var(--accent-gold);
}

.custom-checkbox-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid var(--accent-primary);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-checkbox-row input[type="checkbox"]:checked ~ .checkbox-box {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.custom-checkbox-row input[type="checkbox"]:checked ~ .checkbox-box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #FFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.custom-checkbox-row input[type="checkbox"]:focus-visible ~ .checkbox-box {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Signature Studio */
.signature-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.signature-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.signature-mode-tabs {
  display: inline-flex;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: 30px;
  border: 1px solid var(--accent-light);
}

.sig-mode-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sig-mode-tab.active {
  background: var(--accent-dark);
  color: var(--bg-primary);
  box-shadow: 0 2px 6px rgba(61, 53, 47, 0.15);
}

/* Canvas Box */
.canvas-glass-card {
  position: relative;
  background: #FFF;
  border: 1.5px solid var(--accent-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(74, 65, 58, 0.04);
}

#waiver-canvas {
  width: 100%;
  height: 160px;
  display: block;
  cursor: crosshair;
  touch-action: none; /* Crucial: stops touch drag from scrolling page on mobile */
  background: #FFF;
}

.canvas-baseline {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  border-bottom: 1px dashed rgba(187, 174, 161, 0.6);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 4px;
}

.signature-x {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
}

.signature-sign-here {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(132, 118, 108, 0.6);
}

.canvas-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.canvas-status-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Typed Mode Preview */
.type-preview-box {
  background: #FFF;
  border: 1.5px solid var(--accent-light);
  border-radius: var(--radius-md);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(74, 65, 58, 0.04);
}

.type-signature-preview {
  font-family: 'Caveat', cursive;
  font-size: 2.8rem;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
  text-align: center;
  transform: rotate(-1.5deg);
}

.type-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

.signature-metadata-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}

.waiver-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

/* Booking Modal Waiver Integration Banner */
.booking-waiver-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-light);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin: 18px 0;
  transition: var(--transition-fast);
}

.booking-waiver-banner.verified {
  background: rgba(74, 122, 84, 0.08);
  border-color: rgba(74, 122, 84, 0.3);
}

.waiver-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.waiver-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(187, 174, 161, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.booking-waiver-banner.verified .waiver-badge-icon {
  background: #4A7A54;
  color: #FFF;
}

.waiver-banner-heading {
  font-size: 13.5px;
  color: var(--accent-dark);
  display: block;
}

.waiver-banner-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.booking-waiver-banner.verified .waiver-banner-sub {
  color: #4A7A54;
  font-weight: 600;
}

.btn-xs {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
}

/* --------------------------------------------------------------------------
   19. Confirmation & Transactional Email Mockup System
   -------------------------------------------------------------------------- */
.confirmation-modal-header {
  padding: 36px 36px 0;
}

.success-badge-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(74, 122, 84, 0.12);
  border: 2px solid #4A7A54;
  color: #4A7A54;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 122, 84, 0.3); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(74, 122, 84, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 122, 84, 0); }
}

.verification-certificate-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-gold);
  border-radius: 30px;
  padding: 6px 16px;
  margin-top: 16px;
}

.cert-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cert-code {
  font-family: monospace;
  font-size: 14px;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
}

.copy-code-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.2s ease;
}

.copy-code-btn:hover {
  color: var(--accent-dark);
}

/* Email Mockup Component */
.email-mockup-card {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-light);
  box-shadow: 0 10px 30px -10px rgba(61, 53, 47, 0.1);
  overflow: hidden;
  margin: 20px 0 24px;
}

.email-mockup-bar {
  background: #EAE6E1;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--accent-light);
}

.email-mockup-dots {
  display: flex;
  gap: 6px;
}

.email-mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D1CBC4;
}

.email-mockup-dots span:nth-child(1) { background: #E88B88; }
.email-mockup-dots span:nth-child(2) { background: #E6CA85; }
.email-mockup-dots span:nth-child(3) { background: #96D49F; }

.email-mockup-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.email-status-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(74, 122, 84, 0.15);
  color: #3F6A47;
  padding: 2px 8px;
  border-radius: 12px;
}

.email-mockup-meta {
  background: #FAF8F5;
  padding: 14px 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-main);
  border-bottom: 1px solid var(--accent-light);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.email-mockup-content {
  padding: 28px 24px;
  color: var(--text-main);
}

.email-brand-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--accent-gold);
  display: inline-block;
  padding-bottom: 4px;
}

.email-greeting {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--accent-dark);
}

.email-summary-box {
  background: var(--bg-primary);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.email-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(223, 220, 214, 0.7);
  padding-bottom: 8px;
}

.email-summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.email-summary-row.signature-row {
  align-items: flex-start;
  padding-top: 4px;
}

.badge-cleared {
  color: #3F6A47;
  font-weight: 700;
  background: rgba(74, 122, 84, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.email-signature-snapshot {
  max-width: 180px;
  max-height: 60px;
  background: #FFF;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-signature-snapshot img {
  max-width: 100%;
  max-height: 52px;
  display: block;
}

.email-next-steps {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.email-next-steps h4 {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.email-next-steps ul {
  padding-left: 18px;
  line-height: 1.6;
}

.confirmation-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

/* Responsive adjustments for waiver modal */
@media (max-width: 768px) {
  .waiver-modal-header {
    padding: 24px 20px 10px;
  }
  .waiver-modal-body {
    padding: 18px 20px 24px;
  }
  .waiver-progress-stepper {
    padding: 10px 12px;
  }
  .stepper-step span.step-label {
    display: none; /* Icon-only on mobile */
  }
  .signature-header {
    flex-direction: column;
    align-items: stretch;
  }
  .confirmation-modal-actions {
    flex-direction: column-reverse;
  }
  .confirmation-modal-actions .btn {
    width: 100%;
  }
  .email-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

