/**
 * VELORA COMPREHENSIVE LAYOUT STYLES
 * 
 * This is the consolidated, authoritative layout file for Velora.
 * It merges and organizes all layout styles from:
 * - calculator-themes.css
 * - editorial-hero.css
 * - section-banding.css
 * - home-sections.css
 * - cozy-surfaces.css
 * 
 * ⚠️  LARGE ADDITIONS - REGRESSION TEST COVERAGE REQUIRED
 * ============================================================
 * This file has significant layout additions (1,515 lines total).
 * All changes require comprehensive testing before production deployment.
 * 
 * REQUIRED VERIFICATION:
 * - ✓ Responsive design testing: mobile (320px), tablet (768px), desktop (1024px+)
 * - ✓ Layout utilities: grid, flexbox, positioning on all page types
 * - ✓ Section banding: proper spacing and visual hierarchy
 * - ✓ Hero sections: responsive behavior across all screen sizes
 * - ✓ Dark mode: all layout adjustments visible and functional
 * - ✓ Cross-browser testing: Chrome, Firefox, Safari, Edge
 * - ✓ Touch device testing: layout behavior on tablets and phones
 * 
 * TEST MATRIX:
 * - Homepage: hero, sections, responsive layout
 * - Calculator pages: dual-form layout, result display, responsiveness
 * - Zodiac pages: detail page layouts, responsiveness
 * - Blog pages: article layout, responsive typography
 * - All breakpoints: 320px, 480px, 768px, 1024px, 1200px+
 * - Dark mode: all backgrounds, overlays, spacing
 * 
 * See CSS_CONSOLIDATION_REGRESSION_TESTING.md for detailed verification steps.
 * - atmospheric-surfaces.css
 * 
 * All layouts use CSS variables from velora-design-tokens.css
 * 
 * Structure:
 * 1. Calculator Layout & Theming
 * 2. Editorial Hero Layouts
 * 3. Section Banding & Background Patterns
 * 4. Homepage Sections
 * 5. Atmospheric Surfaces (4 types)
 * 6. Cozy Surfaces & Chapter Rhythm
 * 7. Responsive & Accessibility
 */

/* ========================================
   1. CALCULATOR LAYOUT & THEMING
   ======================================== */

/* Calculator Section */
.calculator-section {
    padding: var(--space-4xl) 0;
    background: var(--paper);
}

/* Deprecated calculator hero styles removed from layouts. */

/* Calculator Wrapper */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.calculator-form-card,
.chart-result-card {
    background: var(--paper);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-normal);
}

/* Calculator Instrument */
.calculator-instrument {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Calculator Result Page */
.calculator-result-page {
    padding: 0;
    background: var(--surface-base, var(--paper));
}

/* Calculator Result Deepening */
.calculator-result-deepening {
    background: var(--paper-hover);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
}

/* ========================================
   CALCULATOR THEME SYSTEM
   Planet-specific color schemes
   ======================================== */

:root {
    --calc-theme-primary: var(--purple-primary);
    --calc-theme-accent: var(--purple-light);
    --calc-theme-gradient: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(139, 92, 246, 0.4);
    --calc-theme-button-bg: var(--purple-primary);
    --calc-theme-button-hover: var(--purple-light);
}

/* Theme: Synastry (Pink) */
.theme-synastry {
    --calc-theme-primary: #E879F9;
    --calc-theme-accent: #F472B6;
    --calc-theme-gradient: linear-gradient(135deg, #E879F9 0%, #F472B6 50%, #FCA5A5 100%);
    --calc-theme-glow: 0 0 20px rgba(232, 121, 249, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, #E879F9 0%, #F472B6 100%);
    --calc-theme-button-hover: linear-gradient(135deg, #F472B6 0%, #FCA5A5 100%);
}

/* Theme: Birth Chart (Orange) */
.theme-birth-chart {
    --calc-theme-primary: var(--theme-birth-chart-primary);
    --calc-theme-accent: var(--theme-birth-chart-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-birth-chart-primary) 0%, var(--theme-birth-chart-accent) 50%, var(--theme-birth-chart-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(255, 140, 66, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-birth-chart-primary) 0%, var(--theme-birth-chart-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-birth-chart-accent) 0%, var(--theme-birth-chart-light) 100%);
}

/* Theme: Moon (Purple) */
.theme-moon {
    --calc-theme-primary: var(--purple-primary);
    --calc-theme-accent: var(--purple-light);
    --calc-theme-gradient: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(139, 92, 246, 0.4);
    --calc-theme-button-bg: var(--purple-primary);
    --calc-theme-button-hover: var(--purple-light);
}

/* Theme: Venus (Pink) */
.theme-venus {
    --calc-theme-primary: var(--theme-venus-primary);
    --calc-theme-accent: var(--theme-venus-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-venus-primary) 0%, var(--theme-venus-accent) 50%, var(--theme-venus-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(232, 121, 249, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-venus-primary) 0%, var(--theme-venus-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-venus-accent) 0%, var(--theme-venus-light) 100%);
}

/* Theme: Mars (Red) */
.theme-mars {
    --calc-theme-primary: var(--theme-mars-primary);
    --calc-theme-accent: var(--theme-mars-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-mars-primary) 0%, var(--theme-mars-accent) 50%, var(--theme-mars-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(220, 38, 38, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-mars-primary) 0%, var(--theme-mars-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-mars-accent) 0%, var(--theme-mars-light) 100%);
}

/* Theme: Mercury (Blue) */
.theme-mercury {
    --calc-theme-primary: var(--theme-mercury-primary);
    --calc-theme-accent: var(--theme-mercury-light);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-mercury-primary) 0%, var(--theme-mercury-accent) 50%, var(--theme-mercury-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(74, 95, 191, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-mercury-primary) 0%, var(--theme-mercury-light) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-mercury-light) 0%, var(--theme-mercury-light) 100%);
}

/* Theme: Jupiter (Purple) */
.theme-jupiter {
    --calc-theme-primary: var(--theme-jupiter-primary);
    --calc-theme-accent: var(--theme-jupiter-light);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-jupiter-primary) 0%, var(--theme-jupiter-accent) 50%, var(--theme-jupiter-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(124, 58, 237, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-jupiter-primary) 0%, var(--theme-jupiter-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-jupiter-accent) 0%, var(--theme-jupiter-light) 100%);
}

/* Theme: Saturn (Gray) */
.theme-saturn {
    --calc-theme-primary: var(--theme-saturn-primary);
    --calc-theme-accent: var(--theme-saturn-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-saturn-primary) 0%, var(--theme-saturn-accent) 50%, var(--theme-saturn-light) 100%);
    --calc-theme-glow: 0 0 15px rgba(71, 85, 105, 0.3);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-saturn-primary) 0%, var(--theme-saturn-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-saturn-accent) 0%, var(--theme-saturn-light) 100%);
}

/* Theme: Rising (Gold) */
.theme-rising {
    --calc-theme-primary: var(--theme-rising-primary);
    --calc-theme-accent: var(--theme-rising-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-rising-primary) 0%, var(--theme-rising-accent) 50%, var(--theme-rising-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(201, 169, 97, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-rising-primary) 0%, var(--theme-rising-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-rising-accent) 0%, var(--theme-rising-light) 100%);
}

/* Theme: Transit (Cyan) */
.theme-transit {
    --calc-theme-primary: var(--theme-transit-primary);
    --calc-theme-accent: var(--theme-transit-accent);
    --calc-theme-gradient: linear-gradient(135deg, var(--theme-transit-primary) 0%, var(--theme-transit-accent) 50%, var(--theme-transit-light) 100%);
    --calc-theme-glow: 0 0 20px rgba(79, 195, 220, 0.4);
    --calc-theme-button-bg: linear-gradient(135deg, var(--theme-transit-primary) 0%, var(--theme-transit-accent) 100%);
    --calc-theme-button-hover: linear-gradient(135deg, var(--theme-transit-accent) 0%, var(--theme-transit-light) 100%);
}

/* Deprecated hero styles removed. Use editorial hero instead. */
.theme-synastry .calculator-hero--deprecated,
.theme-birth-chart .calculator-hero--deprecated,
.theme-moon .calculator-hero--deprecated,
.theme-venus .calculator-hero--deprecated,
.theme-mars .calculator-hero--deprecated,
.theme-mercury .calculator-hero--deprecated,
.theme-jupiter .calculator-hero--deprecated,
.theme-saturn .calculator-hero--deprecated,
.theme-rising .calculator-hero--deprecated,
.theme-transit .calculator-hero--deprecated {
    /* intentionally empty - deprecated hero styling */
}

/* Deprecated hero icon selectors neutralized */
.calculator-hero--deprecated-icon-container,
.calculator-hero--deprecated-icon-image,
.calculator-hero--deprecated-illustration-bg {
    display: none !important;
}

    /* ==========================================================================
       Calculator hero — make consistent with editorial hero (neutral header look)
       - Override themed gradients/overlays so calculator pages use the same
         padding, container sizing and readable text color as other hero headers.
       - Keep theme variables for accents (buttons/icons) but remove full-bleed
         colored backgrounds which caused the odd padding/contrast.
       ========================================================================== */
    .calculator-hero,
    .calculator-hero *:where(.calculator-hero::before) {
        background: transparent !important;
        background-image: none !important;
    }
    .calculator-hero {
        padding: var(--space-2xl) 0 !important;
        color: var(--text-strong) !important;
        position: relative;
    }
    .calculator-hero:before { display: none !important; }
    .calculator-hero > .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--space-lg);
    }
    .calculator-hero .calculator-hero-title,
    .calculator-hero .calculator-hero-subtitle {
        color: inherit !important;
    }

    @media (max-width: 768px) {
        .calculator-hero { padding: var(--space-lg) 0 !important; }
        .calculator-hero .calculator-hero-title { font-size: 1.75rem; }
    }

/* ========================================
   2. EDITORIAL HERO LAYOUTS
   ======================================== */

.editorial-hero {
    background: var(--paper);
    padding: var(--space-2xl) 0 var(--space-2xl);
}

.editorial-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Breadcrumb */
.editorial-hero-breadcrumb {
    margin-bottom: var(--space-2xl);
}

.editorial-hero-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.editorial-hero-breadcrumb a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color var(--motion-ritual) var(--ease-in-out);
}

.editorial-hero-breadcrumb a:hover {
    color: var(--purple-primary);
}

/* ========================================
   HOMEPAGE: Zodiac grid and card fixes
   - Ensure grid is responsive with auto-fit columns
   - Allow cards to shrink (min-width:0) to avoid overflow
   - Make sure page sections don't allow horizontal overflow
   ======================================== */
.zodiac-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-8);
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}
.zodiac-grid a,
.zodiac-grid .zodiac-card,
.zodiac-grid .zodiac-card * {
    min-width: 0 !important;
}
.zodiac-card {
    display: block;
}

/* Prevent section-level overflow that shows the page-edge banding */
.page-section {
    overflow-x: hidden;
}

/* Ensure velora cards allow internal content to wrap instead of expanding */
.velora-card,
.velora-card * {
    min-width: 0 !important;
}
}

/* Typography */
.editorial-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 3vw, 3.2rem);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-bottom: var(--space-xl);
}

.editorial-hero p {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink-base);
    max-width: 65ch;
    margin: 0;
}

/* Editorial Variant */
.editorial-hero--editorial h1,
.editorial-hero--editorial p {
    text-align: left;
}

.editorial-hero-illustration-accent {
    margin-top: var(--space-2xl);
    max-width: 200px;
}

.editorial-hero-illustration-accent img {
    width: 100%;
    height: auto;
    display: block;
}

/* Split Variant */
.editorial-hero.editorial-hero--split .editorial-hero-split {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3xl, 2.5rem);
    align-items: center;
}

.editorial-hero.editorial-hero--split .editorial-hero-text {
    max-width: 600px;
}

/* Page-specific modifier: birth-chart uses slightly wider text column to match calculator layout */
.editorial-hero.editorial-hero--split.editorial-hero--split--wide .editorial-hero-split {
    grid-template-columns: 1.2fr 0.8fr; /* text : illustration */
}

.editorial-hero-illustration {
    max-width: 360px; /* increased by +80px for larger desktop hero illustrations */
    min-width: 180px;
    justify-self: end;
}

.editorial-hero-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

/* Minimal Variant */
.editorial-hero--minimal {
    padding: var(--space-2xl) 0 var(--space-lg);
}

.editorial-hero--minimal h1 {
    margin-bottom: var(--space-lg);
}

.editorial-hero--minimal p {
    font-size: 1rem;
}

/* Responsive: collapse split hero into stacked layout on small screens to avoid overflow */
@media (max-width: 980px) {
    .editorial-hero.editorial-hero--split .editorial-hero-split {
        grid-template-columns: 1fr !important;
        gap: var(--space-8) !important;
        align-items: start;
    }
    .editorial-hero.editorial-hero--split .editorial-hero-text { max-width: 100% !important; }
    .editorial-hero-illustration {
        justify-self: center !important;
        max-width: 85% !important;
        min-width: 0 !important;
    }
    .editorial-hero-illustration img { width: 100%; height: auto; display: block; }
}

/* Ensure calculator pages use page-safe horizontal padding so hero assets don't push layout */
.calculator-result-page {
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Editorial Illustration Sizes */
.editorial-illustration--small {
    max-width: 100px;
}

.editorial-illustration--medium {
    max-width: 280px; /* increased by +80px */
}

.editorial-illustration--large {
    max-width: 480px; /* increased by +80px */
}

/* Editorial Illustration Opacity */
.editorial-illustration-image {
    opacity: 1;
}

[data-theme="dark"] .editorial-illustration-image {
    opacity: 0.85;
}

/* ========================================
   3. SECTION BANDING & BACKGROUND PATTERNS
   ======================================== */

/* Section Background Utilities */
.section-bg-parchment {
    background-color: var(--paper);
    position: relative;
}

.section-bg-mist {
    background-color: var(--paper-hover);
    position: relative;
}

.section-bg-clear {
    background-color: var(--paper);
    position: relative;
}

/* Section Banding Container */
.section-banding-container > section:nth-child(odd) {
    background-color: var(--paper);
}

.section-banding-container > section:nth-child(even) {
    background-color: var(--paper-hover);
}

/* Prevent 3 identical backgrounds */
.section-bg-parchment + .section-bg-parchment + .section-bg-parchment {
    background-color: var(--paper-hover) !important;
}

.section-bg-mist + .section-bg-mist + .section-bg-mist {
    background-color: var(--paper) !important;
}

/* Section Padding */
.section-bg-parchment,
.section-bg-mist,
.section-bg-clear {
    padding: var(--space-4xl) var(--space-lg);
}

/* Cozy Chapter Band */
.cozy-chapter-band {
    padding: var(--space-4xl) var(--space-lg);
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-hover) 100%);
    position: relative;
}

.cozy-chapter-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--purple-pale) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, var(--gold-pale) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
}

.cozy-chapter-band > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   4. HOMEPAGE SECTIONS
   ======================================== */

/* Intro Content */
.intro-content {
    padding: var(--space-4xl) 0;
    background: var(--paper);
    position: relative;
}

.intro-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Intro Card */
.intro-card {
    text-align: center;
    margin-bottom: var(--space-4xl);
    position: relative;
}

/* Intro Typography */
.intro-title {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink-strong);
    margin-bottom: var(--space-2xl);
    line-height: 1.2;
}

.intro-lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--ink-base);
    max-width: 800px;
    margin: 0 auto;
}

/* Intro Grid */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

/* Intro Feature Icon */
.intro-feature-icon {
    font-size: 3rem;
    color: var(--purple-primary);
    margin-bottom: var(--space-2xl);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--motion-ritual) var(--ease-in-out);
}

/* Features Section */
.features {
    padding: var(--space-4xl) 0;
    background: var(--paper);
}

.features .section-title {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink-strong);
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
    display: inline-block;
    width: 100%;
}

.features .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--purple-primary);
}

/* Section Subtitle */
.section-subtitle {
    font-size: 1.125rem;
    color: var(--ink-base);
    text-align: center;
    margin-bottom: var(--space-4xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-2xl);
}

/* Feature Icon */
.feature-icon {
    font-size: 4rem;
    margin-bottom: var(--space-2xl);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Feature Link */
.feature-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--purple-primary);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all var(--motion-ritual) var(--ease-in-out);
    margin-top: auto;
}

.feature-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple-primary);
    transition: width var(--motion-ritual) var(--ease-in-out);
}

.feature-link:hover::after {
    width: 100%;
}

/* Why Velora Section */
.why-velora {
    padding: var(--space-4xl) 0;
    background: var(--paper-hover);
    position: relative;
}

.why-velora::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(59, 130, 246, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(212, 175, 55, 0.1), transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.3;
    pointer-events: none;
}

.why-velora h2 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink-strong);
    text-align: center;
    margin-bottom: var(--space-4xl);
    position: relative;
}

/* Why Grid */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
    position: relative;
    z-index: 1;
}

/* Why Item Title */
.why-item h3 {
    color: var(--purple-primary);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-left: 2rem;
}

.why-item h3::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--purple-primary);
    font-size: 1.2rem;
}

/* Additional Info Section */
.additional-info {
    padding: var(--space-4xl) 0;
    background: var(--paper);
}

.additional-info h2 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink-strong);
    text-align: center;
    margin-bottom: var(--space-4xl);
}

/* Info Boxes Grid */
.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

/* CTA Section */
.cta-section {
    padding: var(--space-5xl) 0;
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.5;
    animation: twinkle 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Zodiac Grid - responsive column layout */
.zodiac-grid {
    display: grid;
    /* Prefer cards roughly 220px wide, fill available columns */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-2xl);
    align-items: start;
    justify-items: center;
}

/* Constrain zodiac-card size inside the grid so multiple columns show */
.zodiac-grid .zodiac-card {
    max-width: 340px;
    width: 100%;
}

/* Hero Section */
.hero {
    padding: var(--space-4xl) var(--space-lg);
    background: linear-gradient(135deg, var(--purple-pale) 0%, var(--gold-pale) 100%);
    text-align: center;
    position: relative;
}

/* ========================================
   5. ATMOSPHERIC SURFACES (4 Types)
   ======================================== */

/* Surface Type 1: Paper Surface */
.surface-paper {
    background: var(--paper);
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--motion-ritual) var(--ease-in-out);
    position: relative;
}

.surface-paper--spacious {
    padding: var(--space-4xl) var(--space-2xl);
}

.surface-paper--compact {
    padding: var(--space-lg) var(--space-md);
}

/* Surface Type 2: Outline Surface */
.surface-outline {
    background: transparent;
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    background-color: rgba(0, 0, 0, 0.01);
    transition: all var(--motion-ritual) var(--ease-in-out);
}

/* Surface Type 3: Inset Note */
.surface-inset {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    transition: all var(--motion-ritual) var(--ease-in-out);
}

/* Surface Type 4: Ritual Surface */
.surface-ritual {
    background: linear-gradient(135deg, 
        rgba(250, 248, 245, 0.95) 0%,
        rgba(245, 243, 255, 0.95) 100%
    );
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-2xl);
    padding: var(--space-4xl) var(--space-2xl);
    box-shadow: var(--shadow-md);
    transition: all var(--motion-ritual-slow) var(--ease-in-out);
    position: relative;
}

.surface-ritual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--purple-primary) 0%,
        var(--purple-light) 50%,
        var(--gold-warm) 100%
    );
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    opacity: 0.6;
}

/* ========================================
   6. COZY SURFACES & CHAPTER RHYTHM
   ======================================== */

/* Chapter Heading */
.chapter-heading {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
    margin-bottom: var(--space-2xl);
    position: relative;
}

.chapter-heading::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--purple-primary) 0%, transparent 100%);
    border-radius: 1px;
}

/* Chapter Title */
.chapter-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-strong);
    margin-bottom: var(--space-xl);
}

/* Chapter Eyebrow */
.chapter-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--purple-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

/* Chapter Subtitle */
.chapter-subtitle {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: var(--space-2xl);
    font-style: italic;
}

/* Pause Moment */
.pause-moment {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(212, 175, 55, 0.03) 100%);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
    position: relative;
    text-align: center;
    transition: all var(--motion-ritual) var(--ease-in-out);
}

.pause-moment::before {
    content: '✦';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--purple-primary);
    background: var(--paper);
    padding: 0.5rem;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.2);
}

.pause-moment:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.pause-moment p {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--ink-strong);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Pause Ornament */
.pause-ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-lg) 0;
    opacity: 0.3;
    transition: opacity var(--motion-ritual) var(--ease-in-out);
}

.pause-moment:hover .pause-ornament {
    opacity: 0.5;
}

/* ========================================
   7. RESPONSIVE & ACCESSIBILITY
   ======================================== */

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .editorial-hero.editorial-hero--split .editorial-hero-split {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .editorial-hero-illustration {
        max-width: 300px;
        margin: 0 auto;
    }

    .features-grid,
    .info-boxes,
    .why-grid {
        grid-template-columns: 1fr;
    }

    .features .section-title,
    .why-velora h2,
    .additional-info h2 {
        font-size: 1.5rem;
    }

    .section-bg-parchment,
    .section-bg-mist,
    .section-bg-clear {
        padding: var(--space-2xl) var(--space-lg);
    }

    .chapter-heading {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    .chapter-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }
}

@media (max-width: 480px) {
    .intro-grid,
    .features-grid,
    .why-grid,
    .info-boxes,
    .zodiac-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .section-bg-parchment,
    .section-bg-mist,
    .section-bg-clear {
        padding: var(--space-lg) var(--space-md);
    }

    .surface-paper,
    .surface-outline,
    .surface-inset,
    .surface-ritual {
        padding: var(--space-lg) var(--space-md);
    }

    .chapter-heading {
        font-size: 2rem;
    }

    .chapter-title {
        font-size: 1.5rem;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .editorial-hero h1,
    .intro-title,
    .features .section-title,
    .why-velora h2,
    .additional-info h2,
    .chapter-heading,
    .chapter-title {
        color: var(--ink-strong);
    }

    .surface-ritual {
        background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.95) 0%,
            rgba(26, 31, 53, 0.95) 100%
        );
    }

    .pause-moment::before {
        background: var(--paper);
        border-color: rgba(139, 92, 246, 0.3);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .calculator-hero--deprecated,
    .editorial-hero,
    .surface-paper,
    .surface-outline,
    .surface-inset,
    .surface-ritual,
    .pause-moment,
    .intro-feature-icon,
    .feature-link {
        transition: none;
        animation: none;
    }
}

/* ========================================
   HOMEPAGE FEATURE CARDS & INTRO SECTIONS
   Migrated from legacy/home-sections.css
   ======================================== */

/* Intro Feature Cards */
.intro-feature-card {
    padding: 2.5rem;
    text-align: center;
}

.intro-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(12, 4, 40, 0.18);
}

/* Intro Feature Icon */
.intro-feature-icon {
    font-size: 3rem;
    color: var(--primary-500);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.intro-feature-card:hover .intro-feature-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Mobile: editorial hero compact refinements (breadcrumb, h1 spacing, illustrations) */
@media (max-width: 600px) {
    .editorial-hero-breadcrumb {
        margin-bottom: 0.4rem !important;
    }

    .editorial-hero h1 {
        margin-top: 0.35rem !important;
        font-size: clamp(1.4rem, 4.5vw, 1.9rem) !important;
        line-height: 1.15 !important;
    }

    /* Reduce gap and spacing in split hero variant for compact headers */
    .editorial-hero--split .editorial-hero-split {
        gap: var(--space-6) !important;
    }

    /* Make hero illustrations smaller and remove extra top spacing */
    .editorial-hero-illustration-accent {
        max-width: 140px !important;
        margin-top: 0.35rem !important;
    }

    .editorial-hero-illustration {
        max-width: 220px !important;
        margin-top: 0.45rem !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    .editorial-hero-illustration img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}

/* Alternative mobile positioning for hero illustration
   - Use `position: absolute` anchored to the `.editorial-hero` container
   - Prefer `transform` and `bottom` to negative margins for more predictable layout
   - Reserve extra bottom padding on the hero so the illustration can overlap
   - Fallback: center the illustration on the smallest screens
*/
@media (max-width: 600px) {
    .editorial-hero { position: relative; }

    .editorial-hero { padding-bottom: 4.5rem; }

    .editorial-hero-illustration {
        position: absolute !important;
        right: 1rem !important;
        bottom: -55px !important; /* overlaps following section */
        max-width: 150px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        pointer-events: none !important;
        transform: translateZ(0);
    }

    /* Slightly smaller / more centered on very small screens */
    @media (max-width: 420px) {
        .editorial-hero-illustration {
            right: 0.5rem !important;
            bottom: -45px !important;
            max-width: 130px !important;
        }
    }
}

/* Feature Card */
.feature-card {
    min-height: 400px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(12, 4, 40, 0.18);
    border-color: var(--border-strong);
}

/* Feature Icon */
.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon i {
    --fa-primary-color: var(--velora-accent-primary);
    --fa-secondary-color: var(--velora-accent-secondary);
}

/* Feature Link */
.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-500);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.feature-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.feature-link:hover::after {
    width: 100%;
}

.feature-link i {
    transition: transform 0.3s ease;
}

.feature-link:hover i {
    transform: translateX(4px);
}

/* Intro Grid */
.intro-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .intro-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile Responsive for Feature Cards */
@media (max-width: 768px) {
    .intro-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        min-height: auto;
    }

    .feature-link {
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    .intro-feature-icon {
        font-size: 2.75rem;
    }

    .intro-grid,
    .features-grid {
        gap: 1.75rem;
    }
}

@media (max-width: 480px) {
    .feature-icon {
        font-size: 3rem;
    }

    .intro-feature-icon {
        font-size: 2.5rem;
    }

    .intro-grid,
    .features-grid {
        gap: 1rem;
    }

    .feature-link,
    .intro-feature-card {
        min-height: 44px;
    }
}

@media (max-width: 320px) {
    .intro-feature-icon {
        font-size: 2.25rem;
    }

    .intro-grid,
    .features-grid {
        gap: 0.875rem;
    }
}

/* Image Optimization */
.intro-feature-icon img,
.feature-icon img {
    max-width: 100%;
    height: auto;
}

.intro-feature-icon,
.feature-icon {
    aspect-ratio: 1 / 1;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .intro-feature-card,
[data-theme="dark"] .feature-card {
    border-color: var(--velora-border-primary);
}

[data-theme="dark"] .intro-feature-card:hover,
[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 24px 50px rgba(12, 4, 40, 0.18), 0 0 20px rgba(107, 70, 193, 0.15);
}

/* Accessibility - Focus States */
.intro-feature-card:focus,
.feature-card:focus {
    outline: 2px solid var(--velora-accent-primary);
    outline-offset: 2px;
}

.feature-link:focus {
    outline: 2px solid var(--velora-accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Touch Target Sizes */
@media (max-width: 768px) {
    .feature-link,
    .intro-feature-card {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .feature-link {
        padding: 0.5rem;
    }
}

/* ========================================
   COZY SURFACE SYSTEM
   Migrated from legacy/cozy-surfaces.css and atmospheric-surfaces.css
   ======================================== */

/* Cozy Surface Variables */
:root {
  --cozy-paper-bg: #fefdfb;
  --cozy-paper-border: #e8dcc0;
  --cozy-paper-shadow: rgba(139, 69, 19, 0.08);

  --cozy-outline-border: #d4af37;
  --cozy-outline-bg: rgba(212, 175, 55, 0.03);

  --cozy-inset-bg: #f7f3e9;
  --cozy-inset-border: #e6d7b3;
  --cozy-inset-shadow: inset 0 2px 4px rgba(139, 69, 19, 0.15);

  --cozy-ritual-bg: #2d1b4e;
  --cozy-ritual-border: #4a2c6d;
  --cozy-ritual-glow: rgba(107, 70, 193, 0.2);

  /* Dark mode variants */
  --cozy-paper-dark-bg: #1a1a1a;
  --cozy-paper-dark-border: #2d2d2d;
  --cozy-paper-dark-shadow: rgba(0, 0, 0, 0.3);

  --cozy-outline-dark-border: #6b46c1;
  --cozy-outline-dark-bg: rgba(107, 70, 193, 0.08);

  --cozy-inset-dark-bg: #262626;
  --cozy-inset-dark-border: #3d3d3d;
  --cozy-inset-dark-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);

  --cozy-ritual-dark-bg: #0f0f0f;
  --cozy-ritual-dark-border: #2d1b4e;
  --cozy-ritual-dark-glow: rgba(107, 70, 193, 0.4);
}

/* Surface Paper - Main content cards with parchment texture */
.surface-paper {
  background: var(--cozy-paper-bg);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(232, 220, 192, 0.3) 2px,
      rgba(232, 220, 192, 0.3) 4px
    ),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(139, 69, 19, 0.02) 100%);
  border: 1px solid var(--cozy-paper-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--cozy-paper-shadow);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.surface-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    rgba(139, 69, 19, 0.01) 20px,
    rgba(139, 69, 19, 0.01) 21px
  );
  border-radius: 12px;
  pointer-events: none;
}

/* Surface Outline - Secondary information with mystic border */
.surface-outline {
  background: var(--cozy-outline-bg);
  background-image: linear-gradient(45deg, transparent 0%, rgba(212, 175, 55, 0.1) 25%, transparent 50%);
  border: 2px solid var(--cozy-outline-border);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.surface-outline::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--cozy-outline-border), transparent, var(--cozy-outline-border));
  border-radius: 16px;
  opacity: 0.3;
  z-index: -1;
}

/* Surface Inset - Interpretations and notes with embossed texture */
.surface-inset {
  background: var(--cozy-inset-bg);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(139, 69, 19, 0.03) 0%, transparent 50%);
  border: 1px solid var(--cozy-inset-border);
  border-radius: 8px;
  box-shadow: var(--cozy-inset-shadow);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.surface-inset::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(139, 69, 19, 0.02) 100%);
  border-radius: 6px;
  pointer-events: none;
}

/* Surface Ritual - CTA moments with cosmic pattern */
.surface-ritual {
  background: var(--cozy-ritual-bg);
  background-image:
    radial-gradient(circle at 25% 25%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(74, 44, 109, 0.08) 0%, transparent 50%),
    linear-gradient(45deg, transparent 0%, rgba(107, 70, 193, 0.03) 50%, transparent 100%);
  border: 1px solid var(--cozy-ritual-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px var(--cozy-ritual-glow);
  padding: 3rem;
  position: relative;
  transition: all 0.3s ease;
}

.surface-ritual::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(107, 70, 193, 0.05) 100%);
  border-radius: 20px;
  pointer-events: none;
}

/* Dark Mode Surface Variants */
[data-theme="dark"] .surface-paper {
  background: var(--cozy-paper-dark-bg);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(45, 45, 45, 0.3) 2px,
      rgba(45, 45, 45, 0.3) 4px
    ),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  border-color: var(--cozy-paper-dark-border);
  box-shadow: 0 4px 12px var(--cozy-paper-dark-shadow);
}

[data-theme="dark"] .surface-paper::before {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.02) 20px,
    rgba(255, 255, 255, 0.02) 21px
  );
}

[data-theme="dark"] .surface-outline {
  background: var(--cozy-outline-dark-bg);
  background-image: linear-gradient(45deg, transparent 0%, rgba(107, 70, 193, 0.15) 25%, transparent 50%);
  border-color: var(--cozy-outline-dark-border);
}

[data-theme="dark"] .surface-outline::after {
  background: linear-gradient(45deg, var(--cozy-outline-dark-border), transparent, var(--cozy-outline-dark-border));
}

[data-theme="dark"] .surface-inset {
  background: var(--cozy-inset-dark-bg);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.05) 0%, transparent 50%);
  border-color: var(--cozy-inset-dark-border);
  box-shadow: var(--cozy-inset-dark-shadow);
}

[data-theme="dark"] .surface-inset::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.1) 100%);
}

[data-theme="dark"] .surface-ritual {
  background: var(--cozy-ritual-dark-bg);
  background-image:
    radial-gradient(circle at 25% 25%, rgba(107, 70, 193, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(74, 44, 109, 0.15) 0%, transparent 50%),
    linear-gradient(45deg, transparent 0%, rgba(107, 70, 193, 0.08) 50%, transparent 100%);
  border-color: var(--cozy-ritual-dark-border);
  box-shadow: 0 8px 32px var(--cozy-ritual-dark-glow);
}

[data-theme="dark"] .surface-ritual::after {
  background: radial-gradient(circle at center, transparent 0%, rgba(107, 70, 193, 0.1) 100%);
}

/* Surface Responsive Adjustments */
@media (max-width: 768px) {
  .surface-paper {
    padding: 1.25rem;
    border-radius: 8px;
  }

  .surface-outline {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .surface-inset {
    padding: 1.25rem;
    border-radius: 6px;
  }

  .surface-ritual {
    padding: 2rem;
    border-radius: 16px;
  }
}

/* ========================================
