/* ==========================================================================
   VERSA TILE & STONE (versasurfaces.ca) — EDITORIAL LUXURY LIGHT THEME
   Warm Ivory (#FAF8F5 / #F4F1EA) + Crisp Alabaster (#FFFFFF) +
   Deep Obsidian Navy Headings (#0B1528) + Royal Sapphire Kickers (#1E40AF / #1B365D) +
   Royal Bronze Italic Accents (#8C6239) + Warm Slate Grey Body Copy (#525866)
   ========================================================================== */

:root {
  --ivory-bg: #FAF8F5;
  --ivory-alt: #F4F1EA;
  --alabaster-card: #FFFFFF;
  --stone-border: #E4DFD5;
  --champagne-border: #D5C7AD;
  --heading-navy: #0B1528;
  --kicker-sapphire: #1E40AF;
  --royal-primary: #1B365D;
  --royal-hover: #0F2342;
  --royal-slate: #2C4D75;
  --royal-bronze: #8C6239;
  --body-slate: #525866;
  --ambient-shadow: 0 12px 32px rgba(20, 35, 60, 0.06);
  --ambient-shadow-hover: 0 18px 42px rgba(20, 35, 60, 0.11);
}

* {
  box-sizing: border-box;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  background-color: var(--ivory-bg);
  color: var(--body-slate);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-x: hidden;
}

::selection {
  background: var(--royal-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   CLEAR THREE-TIER EDITORIAL TYPOGRAPHY HIERARCHY
   1. Eyebrow Kickers (.eyebrow-kicker): Plus Jakarta Sans, 700, 0.78rem, 0.18em, #1E40AF
   2. Main Headings (h1, h2, h3, .font-display): Cormorant Garamond, 600-700, 1.12, #0B1528
   3. Body Paragraphs (p, .body-copy): Plus Jakarta Sans, 400, 1.05rem, 1.75, #525866
   ========================================================================== */

/* Tier 1: Eyebrow / Section Subheadings (Kicker Labels above H2s) */
.eyebrow-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--kicker-sapphire) !important;
  background: linear-gradient(135deg, #FFFFFF 0%, #F7F3EB 100%);
  border: 1px solid var(--champagne-border);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(27, 54, 93, 0.05);
}

/* Tier 2: Main Section Headings (h1, h2, h3) */
h1,
h2,
h3,
.font-display {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.12 !important;
  letter-spacing: -0.005em;
  color: var(--heading-navy);
}

/* Key Italicized / Accent Words Inside Headings */
.heading-accent,
.text-gold-gradient,
.text-royal-gradient {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--royal-bronze) !important;
  -webkit-text-fill-color: var(--royal-bronze);
  background: none;
}

.heading-accent-sapphire {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--royal-primary) !important;
}

/* Tier 3: Body Paragraphs & Descriptions */
p,
.body-copy {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--body-slate);
}

.font-mono-tech {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Custom Editorial Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F4F1EA;
}
::-webkit-scrollbar-thumb {
  background: #1B365D;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0F2342;
}

/* Subtle Ambient Canvas */
#webgl-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
}

/* Warm Ivory Section Accents */
.arch-grid-bg {
  background: linear-gradient(180deg, #FAF8F5 0%, #F4F1EA 100%);
}

/* High-Performance Hero Canvas Rendering (Zero SVG Filter Overhead) */
#hero-sequence-canvas {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Clean, Unobstructed Hero Framing */
.hero-mobile-vignette {
  background: linear-gradient(
    180deg,
    rgba(250, 248, 245, 0.22) 0%,
    rgba(250, 248, 245, 0.04) 22%,
    rgba(250, 248, 245, 0.04) 78%,
    rgba(250, 248, 245, 0.78) 100%
  );
}

/* Wide, Centered, Symmetrical Editorial Hero Overlay Card */
#hero-intro-crest {
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.hero-editorial-spread {
  max-width: 1120px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  background: rgba(250, 248, 245, 0.88);
  border: 1px solid var(--champagne-border);
  box-shadow: 0 22px 54px rgba(11, 21, 40, 0.12);
}

/* Royal Sapphire Primary Button */
.btn-gold,
.btn-royal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1B365D;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid #1B365D;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 6px 18px rgba(27, 54, 93, 0.16);
}

.btn-gold:hover,
.btn-royal:hover {
  background-color: #0F2342;
  border-color: #0F2342;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 35, 66, 0.24);
}

/* Secondary Outline Royal Button */
.btn-royal-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  color: #1B365D;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid #1B365D;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-royal-outline:hover {
  background-color: #1B365D;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(27, 54, 93, 0.14);
}

/* Crisp Alabaster White Surface Cards */
.glass-panel,
.glass-panel-gold {
  background: #FFFFFF;
  border: 1px solid #E4DFD5;
  box-shadow: 0 12px 32px rgba(20, 35, 60, 0.06);
  color: var(--body-slate);
}

/* Hero Scroll Callouts — Crisp Alabaster Editorial Cards Without Blur */
#hero-callout-30,
#hero-callout-60,
#hero-callout-85 {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--champagne-border);
  box-shadow: 0 18px 44px rgba(11, 21, 40, 0.14);
}

/* Logo Plaque */
.logo-plaque {
  background: #FFFFFF;
  border: 1px solid #E4DFD5;
  box-shadow: 0 4px 14px rgba(20, 35, 60, 0.06);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-plaque:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27, 54, 93, 0.10);
}

/* Subtle Non-Mechanical Card Micro-Interactions */
.perspective-stage {
  perspective: none;
  transform-style: flat;
}

.card-3d-tilt {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-3d-tilt:hover {
  transform: translateY(-2px) !important;
  border-color: #2C4D75;
  box-shadow: 0 16px 36px rgba(20, 35, 60, 0.10);
}

/* Subtle Royal Sapphire Hover Glow on Cards */
.spotlight-card {
  position: relative;
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mouse-x) var(--mouse-y),
    rgba(27, 54, 93, 0.045),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Six Architectural Divisions Dual-Image Hover Crossfade */
.division-dual-media {
  position: relative;
  overflow: hidden;
}

.division-img-default {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.division-img-hover {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.division-card:not(.division-no-room):hover .division-img-hover,
.division-card:not(.division-no-room).is-room-preview .division-img-hover {
  opacity: 1;
  transform: scale(1);
}

.division-card:not(.division-no-room):hover .division-img-default,
.division-card:not(.division-no-room).is-room-preview .division-img-default {
  opacity: 0;
  transform: scale(1.02);
}

.division-card:not(.division-no-room):hover .division-preview-badge,
.division-card:not(.division-no-room).is-room-preview .division-preview-badge {
  background: #1B365D !important;
  color: #FFFFFF !important;
  border-color: #1B365D !important;
}

/* Catalogue Slab View vs. Room View Crossfade Switch */
.surface-image-stage {
  position: relative;
  overflow: hidden;
}

.surface-img-slab,
.surface-img-room {
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.surface-img-room {
  opacity: 0;
  transform: scale(1.03);
}

.surface-image-stage.is-room-view .surface-img-room {
  opacity: 1;
  transform: scale(1);
}

.surface-image-stage.is-room-view .surface-img-slab {
  opacity: 0;
  transform: scale(0.98);
}

/* Royal Sapphire Pulse Indicator */
@keyframes pulseRoyal {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(30, 64, 175, 0);
  }
}

.pulse-gold-dot,
.pulse-royal-dot {
  background-color: #1E40AF !important;
  animation: pulseRoyal 2.4s infinite;
}

/* Solid Opaque Mobile Navigation Drawer */
#mobile-menu-drawer,
#mobile-menu-drawer .mobile-menu-inner,
#mobile-menu-drawer .mobile-menu-nav,
#mobile-menu-drawer .mobile-menu-footer {
  background-color: #FAF8F5 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#mobile-menu-drawer {
  z-index: 99999 !important;
  border-left: 1px solid #D5C7AD !important;
  box-shadow: 0 15px 40px rgba(11, 21, 40, 0.18) !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow-y: auto;
}

#mobile-menu-drawer .mobile-nav-link {
  color: #0B1528;
  font-weight: 600;
  border-bottom: 1px solid #E4DFD5;
  background-color: #FAF8F5 !important;
  display: block;
}

/* Full-Color Google Map (No Grayscale / No Invert Filter) */
.map-obsidian-filter,
.map-full-color {
  filter: none !important;
}

/* Native HTML5 Reel Cards, Play Button & Mute Button */
.reel-card {
  position: relative;
  overflow: hidden;
  background-color: #0B1528;
  -webkit-tap-highlight-color: transparent;
}

.reel-card .reel-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-card .reel-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: rgba(250, 248, 245, 0.96);
  border: 2px solid #1B365D;
  color: #1B365D;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(11, 21, 40, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.reel-card .reel-play-btn:hover {
  background-color: #1B365D;
  color: #FFFFFF;
  transform: translate(-50%, -50%) scale(1.08);
}

.reel-card.is-playing .reel-play-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.88);
}

.reel-card .reel-mute-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background-color: rgba(27, 54, 93, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(11, 21, 40, 0.28);
  cursor: pointer;
}

/* ==========================================================================
   MOBILE-ONLY OPTIMIZATIONS (@media (max-width: 768px))
   Does NOT alter desktop layout (> 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. MOBILE NAVIGATION MENU — 100% OPAQUE BACKGROUND */
  #mobile-menu-drawer,
  #mobile-menu-drawer > div,
  #mobile-menu-drawer nav {
    background-color: #FAF8F5 !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #mobile-menu-drawer {
    z-index: 99999 !important;
    box-shadow: 0 15px 40px rgba(11, 21, 40, 0.18) !important;
    border-left: 1px solid #D5C7AD !important;
  }

  #mobile-menu-drawer nav a {
    color: #0B1528 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #E4DFD5 !important;
    padding-top: 0.72rem !important;
    padding-bottom: 0.72rem !important;
  }

  #mobile-menu-drawer nav a:last-child {
    border-bottom: none !important;
  }

  /* 2. CONSOLIDATE STATS / PILLARS INTO A COMPACT 2x2 GRID ON MOBILE */
  .stats-pillars-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stats-pillar-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
  }

  .stats-pillar-card .stats-pillar-kicker {
    font-size: 0.62rem !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
  }

  .stats-pillar-card .stat-counter {
    font-size: 1.35rem !important;
    line-height: 1.1 !important;
    margin-bottom: 3px !important;
  }

  .stats-pillar-card .stats-pillar-title {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }

  .stats-pillar-card .stats-pillar-desc {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  /* 3. "FOUR-STEP PRECISION PROCESS" — COMPACT HORIZONTAL SWIPE CAROUSEL ON MOBILE */
  #process-timeline-section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  #process-timeline-section .process-timeline-line,
  #process-gold-line-fill {
    display: none !important;
  }

  .process-steps-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding: 4px 4px 16px 4px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
  }

  .process-steps-track::-webkit-scrollbar {
    display: none;
  }

  .process-steps-track > .process-step-card + .process-step-card {
    margin-top: 0 !important;
  }

  .process-step-card {
    flex: 0 0 78% !important;
    max-width: 280px !important;
    scroll-snap-align: center !important;
    padding: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: #FFFFFF !important;
    border: 1px solid #E4DFD5 !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 26px rgba(20, 35, 60, 0.06) !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .process-step-card .process-step-badge-wrap {
    position: static !important;
    transform: none !important;
    order: 1 !important;
    justify-content: flex-start !important;
  }

  .process-step-card .process-step-node {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 0.75rem !important;
    background-color: #1B365D !important;
    color: #FFFFFF !important;
  }

  .process-step-card .process-step-main {
    order: 2 !important;
    text-align: left !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .process-step-card .process-step-stage {
    font-size: 0.64rem !important;
    letter-spacing: 0.12em !important;
    display: block !important;
  }

  .process-step-card .process-step-title {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
    margin-top: 3px !important;
    margin-bottom: 4px !important;
  }

  .process-step-card .process-step-desc {
    font-size: 0.76rem !important;
    line-height: 1.38 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .process-step-card .process-step-checklist {
    order: 3 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .process-step-card .process-step-checklist .glass-panel {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: #FAF8F5 !important;
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
  }

  /* 4. INSTAGRAM REELS SHOWCASE — 2x2 COMPACT MOBILE GRID & PLAY OVERLAY */
  .reels-showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .reel-card,
  .inline-reel-card {
    aspect-ratio: 9 / 14 !important;
    max-height: 270px !important;
    width: 100% !important;
    border-radius: 12px !important;
  }

  .reel-card .reel-video,
  .inline-reel-card video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .reel-card .reel-play-btn {
    width: 46px !important;
    height: 46px !important;
  }

  .reel-card .reel-mute-btn {
    top: 8px !important;
    right: 8px !important;
    padding: 4px 8px !important;
    font-size: 0.56rem !important;
  }

  .reel-card .reel-bottom-caption,
  .inline-reel-card .reel-bottom-caption {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
  }

  .reel-card .reel-tag-pill,
  .inline-reel-card .reel-tag-pill {
    font-size: 0.54rem !important;
    padding: 1px 6px !important;
    margin-bottom: 3px !important;
  }

  .reel-card .reel-card-title,
  .inline-reel-card .reel-card-title {
    font-size: 0.85rem !important;
    line-height: 1.18 !important;
    margin-bottom: 2px !important;
  }

  .reel-card .reel-card-desc,
  .inline-reel-card .reel-card-desc {
    display: none !important;
  }

  /* 5. COMPACT MOBILE TABS & CARDS FOR HOMEPAGE INTERACTIVE CATALOGUE / SHOWROOM & CATALOGUE PAGE */
  #surface-categories {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
  }

  #surface-categories .division-card {
    border-radius: 18px !important;
  }

  #surface-categories .division-dual-media {
    height: 190px !important;
  }

  #surface-categories .division-card > div:last-child,
  #surface-categories .division-card .p-7 {
    padding: 16px 18px !important;
  }

  #surface-categories .division-card h3 {
    font-size: 1.32rem !important;
    margin-bottom: 6px !important;
  }

  #surface-categories .division-card p {
    font-size: 0.82rem !important;
    line-height: 1.48 !important;
    margin-bottom: 10px !important;
  }

  #surface-categories .division-preview-badge {
    top: 10px !important;
    right: 10px !important;
    padding: 3px 9px !important;
    font-size: 0.56rem !important;
  }

  #virtual-showroom-stage {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
  }

  .showroom-tabs-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 6px !important;
    margin-bottom: 14px !important;
  }

  .showroom-room-btn {
    padding: 7px 11px !important;
    font-size: 0.65rem !important;
    border-radius: 9px !important;
    letter-spacing: 0.06em !important;
    white-space: nowrap !important;
  }

  .cat-filter-btn {
    padding: 6px 11px !important;
    font-size: 0.65rem !important;
    border-radius: 9px !important;
    letter-spacing: 0.06em !important;
  }
}
