/* ==========================================================
   pages/spoke.css — Regional Spoke Landing Pages
   Three-theme variant system with shared core layout,
   scroll-driven reveals, and premium interactive card behaviors.
   ========================================================== */

/* Core Structural Wrapper */
.spoke-page-wrapper {
    background-color: #0b0b0b;
    color: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
}

/* Ensure the parent theme containers don't collapse visibility or trap layout height */
.spoke-theme-variant {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #0b0b0b; /* Prevent raw black canvas drop */
    opacity: 1 !important; 
    visibility: visible !important;
}

.spoke-main {
  position: relative;
  z-index: 30;
  min-height: 100vh;
  min-height: 100svh;
}

/* ── Ambient Background Layer ────────────────────────── */
.spoke-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
  /* Decoupled global background plate */
  background-image: var(--spoke-hero-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.spoke-page-wrapper .spoke-ambient {
  opacity: 1;
}

/* The High-End Scrim Overlays (Guarantees Text Readability) */
.spoke-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Radial spotlight effect to pull emphasis to center typography */
  background: radial-gradient(circle at center, rgba(11, 11, 11, 0.4) 0%, rgba(11, 11, 11, 0.85) 100%);
  z-index: 1;
}

.spoke-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Linear transition to blend the bottom seamlessly into the dark page body */
  background: linear-gradient(to bottom, transparent 40%, #0b0b0b 100%);
  z-index: 2;
}


/* Enhanced Interactive Hero Container */
.spoke-hero {
    position: relative;
    padding: clamp(4rem, 8vh, 6.5rem) 1.5rem clamp(2rem, 4vh, 3.5rem) 1.5rem;
    text-align: center;
    overflow: hidden;
    background: transparent;
    z-index: 1;
}

/* Protect Text Layer Stack Execution */
.editorial-eyebrow, 
.spoke-hero h1, 
.spoke-hero .subtitle,
.maps-inline-token {
    position: relative;
    z-index: 2;
}

.editorial-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--spoke-accent);
    margin-bottom: 1rem;
    position: relative;
}

.spoke-hero h1 {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 auto 1.5rem auto;
    max-width: 800px;
}

.spoke-hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-on-surface-variant, #dbc2b0);
    max-width: clamp(28rem, 45vw, 36rem);
    margin: 0 auto;
    line-height: 1.6;
}

/* Premium Balanced Grid Layout */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.5vh, 2rem);
    padding: 0 clamp(1.5rem, 4vw, 4rem) clamp(2rem, 5vh, 3.5rem) clamp(1.5rem, 4vw, 4rem);
    max-width: clamp(64rem, 85vw, 85rem);
    margin: 0 auto;
    position: relative;
    z-index: 30;
}

/* Glassmorphism Luxury Info Card Components */
.luxury-info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: clamp(1.25rem, 3vh, 2rem) clamp(1.25rem, 2.5vw, 2rem);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.5s var(--spoke-easing, cubic-bezier(0.16, 1, 0.3, 1)),
                border-color 0.5s var(--spoke-easing, cubic-bezier(0.16, 1, 0.3, 1)),
                box-shadow 0.5s var(--spoke-easing, cubic-bezier(0.16, 1, 0.3, 1));
}

.luxury-info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--spoke-glow);
}

.luxury-info-card h3 {
    font-family: var(--font-serif, serif);
    color: #ffffff;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.luxury-info-card p {
    font-size: 0.95rem;
    color: var(--color-on-surface-variant, #dbc2b0);
    line-height: 1.6;
    margin: 0;
}

/* Core Flex Preservation For Link Containers */
.spoke-card-link-wrapper {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex: 1;
    width: 100%;
    cursor: pointer;
}

/* Ensure Inner Card Stretches To Fill Link Wrapper Bound */
.spoke-card-link-wrapper .luxury-info-card.map-trigger-card,
.luxury-info-card.map-trigger-card {
    width: 100%;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

/* High-Touch Micro-Interactions on Interactive Route Maps Cards */
.spoke-card-link-wrapper:hover .luxury-info-card.map-trigger-card,
.luxury-info-card.map-trigger-card:hover {
    transform: translateY(-5px);
    border-color: var(--spoke-accent);
    box-shadow: var(--spoke-glow);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
}

/* Card CTA button styles */
.luxury-info-card.map-trigger-card {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.luxury-info-card.map-trigger-card p {
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
}

.luxury-info-card.map-trigger-card .card-cta-btn {
    align-self: center;
    padding: 0 1.5rem;
}

.card-cta-btn {
    align-self: stretch;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: transparent;
    color: var(--spoke-accent);
    border: 1px solid var(--spoke-accent);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    margin-top: auto; /* push to bottom */
}

.card-cta-btn:hover {
    background: var(--spoke-accent);
    color: #0b0b0b;
    box-shadow: var(--spoke-glow);
}

@media (min-width: 768px) {
    .card-cta-btn {
        align-self: flex-start;
        display: inline-flex;
        padding: 0 1.5rem;
        white-space: nowrap; /* Prevent text wrapping on larger viewports */
    }
}

/* Accent Dynamic Token Arrow Modifiers */
.maps-arrow-token {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--spoke-accent);
    margin-left: 0.35rem;
    transition: transform 0.4s var(--spoke-easing);
}

.spoke-card-link-wrapper:hover .maps-arrow-token {
    transform: translate(3px, -3px);
}

/* Sophisticated High-Touch CTA Layer */
.spoke-cta {
    text-align: center;
    padding: 4rem 1.5rem 6rem 1.5rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    position: relative;
    z-index: 30;
}

.spoke-cta p {
    font-size: 1.1rem;
    color: #e5e5ea;
    margin-bottom: 2rem;
}

.premium-interactive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 2.5rem;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.premium-interactive-btn:hover {
    border-color: var(--spoke-accent);
    box-shadow: var(--spoke-glow), inset 0 0 12px rgba(255, 255, 255, 0.02);
}


/* Responsiveness Engine Bridge */
@media (min-width: 768px) {
    .info-grid {
        flex-direction: row;
    }
    .info-grid > * {
        flex: 1 1 50%;
    }
}

@media (min-width: 1025px) {
    .info-grid {
        display: grid;
        grid-template-columns: 1.25fr minmax(0, 1.5fr); /* Optimized 45% / 55% split; minmax(0) prevents carousel content blowup */
    }
    
    .spoke-card-link-wrapper {
        height: 100%;
    }

    .luxury-info-card.map-trigger-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        box-sizing: border-box;
    }
}

/* Height-restricted landscape orientation adjustments */
@media (max-width: 1024px) and (max-height: 640px) {
    .info-grid {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding-bottom: 2rem !important;
    }
    .info-grid > * {
        flex: 1 1 auto !important;
        width: 100% !important;
    }
    .spoke-hero {
        padding: 5rem 1.5rem 2.5rem 1.5rem !important;
    }
}

/* ==========================================================
   Scroll-Driven Reveal Animations
   ========================================================== */

/* Fluid, graceful fade-up default */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Triggered State */
.reveal-on-scroll.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Safety: fallback to fully visible without JS */
.spoke-js-ready .reveal-on-scroll {
    /* controlled by scroll observer */
}

/* ==========================================================
   THEME VARIANT 1: Coastal Core
   High-End Coastal Sanctuary / Maritime Haven
   Ultra-smooth liquid transitions, high blur glassmorphism filters.
   ========================================================== */
.spoke-theme-coastal {
    --spoke-accent: #8ab4f8;
    --spoke-glow: 0 8px 32px rgba(138, 180, 248, 0.08);
    --spoke-easing: cubic-bezier(0.25, 0.8, 0.25, 1);
    --spoke-glow-ambient: rgba(138, 180, 248, 0.04);
}



.spoke-theme-coastal .luxury-info-card {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: transform 0.8s var(--spoke-easing),
                border-color 0.8s var(--spoke-easing),
                box-shadow 0.8s var(--spoke-easing);
}

/* ==========================================================
   THEME VARIANT 2: I-75 Corridor
   Streamlined Luxury Oasis / High-Speed Transit
   Sharp geometric borders, precise vector hover states, fast acceleration timings.
   ========================================================== */
.spoke-theme-streamlined {
    --spoke-accent: #ffb74d;
    --spoke-glow: 0 4px 20px rgba(255, 183, 77, 0.12);
    --spoke-easing: cubic-bezier(0.16, 1, 0.3, 1);
    --spoke-glow-ambient: rgba(255, 183, 77, 0.03);
}



.spoke-theme-streamlined .luxury-info-card {
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s var(--spoke-easing),
                border-color 0.3s var(--spoke-easing),
                box-shadow 0.3s var(--spoke-easing);
}

.spoke-theme-streamlined .luxury-info-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(255, 183, 77, 0.3);
}

/* ==========================================================
   THEME VARIANT 3: Metro Conduit
   Historic Heritage Elegance / Collector's Vault
   Intricate editorial font leading, deep ambient glow blooms, classic lounge aesthetics.
   ========================================================== */
.spoke-theme-heritage {
    --spoke-accent: #d4af37;
    --spoke-glow: 0 12px 40px rgba(212, 175, 55, 0.15);
    --spoke-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spoke-glow-ambient: rgba(212, 175, 55, 0.05);
}



.spoke-theme-heritage .spoke-hero h1 {
    font-family: var(--font-serif, "Playfair Display", serif);
    letter-spacing: 0.03em;
    line-height: 1.35;
}

.spoke-theme-heritage .luxury-info-card {
    font-family: var(--font-serif, "Playfair Display", serif);
    letter-spacing: 0.02em;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: transform 0.7s var(--spoke-easing),
                border-color 0.7s var(--spoke-easing),
                box-shadow 0.7s var(--spoke-easing);
}

.spoke-theme-heritage .luxury-info-card h3 {
    letter-spacing: 0.05em;
}

.spoke-theme-heritage .luxury-info-card p {
    line-height: 1.8;
    letter-spacing: 0.03em;
}

/* Lightweight spoke-page carousel adjustments */
.luxury-info-card .carousel-container {
    margin-top: clamp(1rem, 2vh, 1.5rem);
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.luxury-info-card .carousel-card {
    flex: 0 0 clamp(11.5rem, 16vw, 14.5rem) !important; /* Premium fluid scaling for cards */
    height: clamp(14.5rem, 31vh, 18rem) !important; /* Fluid height linked to viewport to guarantee fitting on all displays */
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.luxury-info-card .carousel-card-image {
    height: 55% !important; /* Balanced proportion */
}

.luxury-info-card .carousel-card-body {
    padding: clamp(0.75rem, 1.2vw, 1.25rem) !important;
    height: 45% !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.luxury-info-card .carousel-card-title {
    font-size: 0.85rem !important;
    margin-top: 0;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.luxury-info-card .carousel-card-desc {
    font-size: 0.75rem !important;
    line-height: 1.35;
    color: var(--color-on-surface-variant, #dbc2b0);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.luxury-info-card .carousel-card-strength {
    font-size: 0.7rem !important;
    color: var(--spoke-accent);
    margin: 0;
    font-weight: 700;
}

/* ── Reduced Motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
