/**
 * ARISTÉ v9.7.1 Incremental CSS Module
 * Contains styles for: Provenance, Network, FAQ, Service Icons, 
 * Mobile Optimization, Responsive Images
 * 
 * Installation: Add this file reference to your HTML <head>
 * <link rel="stylesheet" href="css/modules-v971.css">
 * 
 * Changelog v9.7.1:
 * - Mobile spacing optimization (15-20% reduction <768px)
 * - Responsive hero image support
 * - Touch target optimization (44px minimum)
 * - Points of Clarity expansion support
 */

/* ========================================
   Base Variables (ensure these exist)
   ======================================== */
:root {
    --color-gold: #B89B5F;
    --color-gold-primary: #C4A962;
    --color-gold-light: #D4C4A0;
    --color-gold-dark: #A68B4B;
    --color-cream: #FAF8F4;
    --color-cream-dark: #F0EBE0;
    --color-charcoal: #1A1A1A;
    --color-charcoal-light: #3A3A3A;
    --color-navy: #0F1419;
    --color-navy-light: #1C2536;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: Georgia, 'Times New Roman', serif;
    --font-accent: 'Playfair Display', serif;
}

/* ========================================
   Provenance Section Styles
   ======================================== */
.provenance-section {
    padding: 7rem 4rem;
    background: linear-gradient(180deg, var(--color-cream) 0%, rgba(250, 248, 244, 0.97) 100%);
    border-top: 1px solid rgba(184, 155, 95, 0.08);
}

.provenance-content {
    max-width: 680px;
    margin: 0 auto;
}

.section-marker {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-gold);
    margin-bottom: 4rem;
    opacity: 0.6;
}

.provenance-text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2.1;
    color: var(--color-charcoal);
    margin-bottom: 1.8rem;
    text-align: left;
}

.provenance-text p:first-of-type {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    text-align: center;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.provenance-closing {
    font-family: var(--font-display);
    font-size: 0.95rem;
    text-align: center !important;
    margin-top: 2.5rem !important;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(184, 155, 95, 0.12);
    color: var(--color-charcoal);
    opacity: 0.7;
    letter-spacing: 0.02em;
}

/* ========================================
   FAQ Section Styles - Mode A
   ======================================== */
.faq-section {
    padding: 6rem 4rem;
    background: var(--color-cream);
    border-top: 1px solid rgba(184, 155, 95, 0.08);
}

.faq-container {
    max-width: 760px;
    margin: 0 auto;
}

.faq-section .section-marker {
    margin-bottom: 1.5rem;
}

.faq-intro {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    color: var(--color-charcoal);
    opacity: 0.6;
    margin-bottom: 4rem;
}

.faq-list {
    border-top: 1px solid rgba(184, 155, 95, 0.15);
}

.faq-item {
    border-bottom: 1px solid rgba(184, 155, 95, 0.15);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-charcoal);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--color-gold);
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 2rem;
}

.faq-icon {
    position: relative;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--color-gold);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-icon::before {
    width: 12px;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-icon::after {
    width: 1px;
    height: 12px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.faq-answer[hidden] {
    display: block;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
}

.faq-answer:not([hidden]) {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

.faq-answer p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--color-charcoal);
    padding-bottom: 1.75rem;
    opacity: 0.85;
}

/* ========================================
   Clarity Section Styles - Mode B
   ======================================== */
.clarity-section {
    padding: 6rem 4rem;
    background: var(--color-cream);
    border-top: 1px solid rgba(184, 155, 95, 0.08);
}

.clarity-container {
    max-width: 640px;
    margin: 0 auto;
}

.clarity-section .section-marker {
    margin-bottom: 4rem;
}

.clarity-statements {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.statement-item {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(184, 155, 95, 0.1);
    transition: background 0.4s ease;
}

.statement-item:first-child {
    border-top: 1px solid rgba(184, 155, 95, 0.1);
}

.statement-item:hover {
    background: rgba(184, 155, 95, 0.03);
}

.statement-item:hover .statement-text {
    color: var(--color-gold);
    transition: color 0.4s ease;
}

.statement-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-charcoal);
    text-align: center;
    margin: 0;
    letter-spacing: 0.01em;
}

.clarity-footer {
    margin-top: 4rem;
    text-align: center;
}

.clarity-footer p {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-charcoal);
    opacity: 0.5;
    margin: 0;
}

/* ========================================
   Service Domain Icons
   ======================================== */
.service-domain-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-domain-icon svg {
    width: 100%;
    height: 100%;
}

.service-domain-icon.small {
    width: 48px;
    height: 48px;
}

.service-domain-icon.large {
    width: 96px;
    height: 96px;
}

/* ========================================
   Form Validation Styles (injected by JS)
   Backup styles if JS fails to load
   ======================================== */
.form-group {
    position: relative;
}

.field-error {
    border-color: rgba(139, 58, 58, 0.6) !important;
    background: rgba(139, 58, 58, 0.03) !important;
}

.field-error:focus {
    border-color: rgba(139, 58, 58, 0.8) !important;
    box-shadow: 0 0 0 2px rgba(139, 58, 58, 0.08) !important;
}

.field-valid {
    border-color: rgba(184, 155, 95, 0.4) !important;
}

.validation-message {
    display: none;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: #8B3A3A;
    margin-top: 0.5rem;
}

.privacy-consent .validation-message {
    display: block;
    margin-top: 0.75rem;
    margin-left: calc(18px + 0.75rem);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .provenance-section {
        padding: 4rem 1.5rem; /* Reduced from 5rem */
    }
    
    .provenance-text p:first-of-type,
    .provenance-opening {
        font-size: 1.05rem;
    }
    
    .provenance-text p {
        font-size: 0.95rem;
        line-height: 1.9; /* Slightly tighter */
        margin-bottom: 1.4rem; /* Reduced from 1.8rem */
    }
    
    .faq-section {
        padding: 3.5rem 1.5rem; /* Reduced from 4rem */
    }
    
    .faq-question {
        font-size: 0.95rem;
        padding: 1.25rem 0; /* Reduced from 1.5rem */
        min-height: 44px; /* Touch target */
    }
    
    .faq-answer p {
        font-size: 0.9rem;
    }
    
    .clarity-section {
        padding: 3.5rem 1.5rem; /* Reduced from 4rem */
    }
    
    .statement-text {
        font-size: 1rem;
    }
    
    .statement-item {
        padding: 1.25rem 0; /* Reduced from 1.5rem */
        min-height: 44px; /* Touch target */
    }
    
    .network-section {
        padding: 4rem 1.5rem; /* Reduced from 5rem */
    }
    
    .network-text p {
        font-size: 0.95rem;
        margin-bottom: 1.4rem;
    }
    
    .capabilities-section {
        padding: 3.5rem 1.5rem; /* Reduced from 4rem */
    }
    
    .capability-phrase {
        font-size: 0.85rem;
    }
    
    /* v9.7.1 Mobile Domain Cards Optimization */
    .domains-grid {
        gap: 1rem; /* Reduced from var(--space-md) */
    }
    
    .domain-card {
        height: 260px; /* Reduced from 300px */
    }
    
    .domain-content {
        padding: 1rem; /* Tighter padding */
    }
    
    .domain-title {
        font-size: 1.1rem;
    }
    
    .domain-tagline {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .domain-outcome {
        font-size: 0.7rem;
        margin-top: 0.35rem;
    }
    
    /* v9.7.1 Mobile Protocol/Tier Cards */
    .protocol-list {
        gap: 1.5rem; /* Reduced from var(--space-lg) */
    }
    
    .protocol-item {
        padding: 1.5rem; /* Reduced padding */
    }
    
    .tier-card {
        padding: 1.5rem 1rem; /* Reduced from var(--space-lg) */
    }
    
    .tier-name {
        font-size: 1.3rem;
    }
    
    .tier-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .tier-cta {
        padding: 0.9rem 1.5rem;
        min-height: 44px; /* Touch target */
        font-size: 0.85rem;
    }
    
    /* v9.7.1 Mobile Hero Optimization */
    .hero-content {
        padding: 1.5rem; /* Reduced from var(--space-lg) */
    }
    
    .hero .cta-primary {
        padding: 1rem 2rem;
        min-height: 48px; /* Larger touch target for primary CTA */
        font-size: 0.9rem;
    }
    
    /* v9.7.1 Mobile Section Spacing */
    .intro-section,
    .domains,
    .protocol,
    .circle,
    .private-cta {
        padding-top: 4rem; /* Reduced from 6rem typical */
        padding-bottom: 4rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem; /* Slightly smaller on mobile */
        margin-bottom: 1rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* v9.7.1 Mobile Points of Clarity */
    .clarity-inline {
        margin-top: 2rem !important;
        padding-top: 1.5rem !important;
    }
    
    .clarity-inline p {
        font-size: 0.85rem !important;
        line-height: 2 !important;
        margin-bottom: 0.6rem !important;
    }
}

/* v9.7.1 Extra Small Screens (<480px) */
@media (max-width: 480px) {
    .provenance-section,
    .network-section {
        padding: 3rem 1rem;
    }
    
    .provenance-text p,
    .network-text p {
        font-size: 0.9rem;
        line-height: 1.85;
    }
    
    .domain-card {
        height: 220px;
    }
    
    .domain-title {
        font-size: 1rem;
    }
    
    .section-marker {
        font-size: 0.65rem;
        margin-bottom: 2.5rem;
    }
    
    .tier-card {
        padding: 1.25rem 0.75rem;
    }
}

/* ========================================
   v9.7.1 Responsive Hero Image Support
   ======================================== */
.hero-responsive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-responsive-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-responsive-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(20%) contrast(0.95);
}

/* ========================================
   Network Section Styles (v9.7.0)
   ======================================== */
.network-section {
    padding: 5rem 4rem;
    background: linear-gradient(180deg, rgba(250, 248, 244, 0.97) 0%, var(--color-cream) 100%);
    border-top: 1px solid rgba(184, 155, 95, 0.06);
}

.network-content {
    max-width: 680px;
    margin: 0 auto;
}

.network-text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2.1;
    color: var(--color-charcoal);
    margin-bottom: 1.8rem;
    text-align: left;
}

.network-text p:first-of-type {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.85;
}

.network-closing {
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-align: center !important;
    margin-top: 2rem !important;
    padding-top: 2rem;
    border-top: 1px solid rgba(184, 155, 95, 0.1);
    color: var(--color-gold);
    opacity: 0.8;
    letter-spacing: 0.03em;
    font-style: italic;
}

/* ========================================
   Capabilities Demonstrated Styles (v9.7.0)
   ======================================== */
.capabilities-section {
    padding: 5rem 4rem;
    background: var(--color-cream);
    border-top: 1px solid rgba(184, 155, 95, 0.06);
}

.capabilities-container {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.capabilities-section .section-marker {
    margin-bottom: 3rem;
    opacity: 0.5;
}

.capabilities-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.capability-phrase {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--color-charcoal);
    opacity: 0.65;
    line-height: 1.6;
    letter-spacing: 0.01em;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.capability-phrase:hover {
    opacity: 0.9;
    color: var(--color-gold);
}

/* Domain Card Outcome Phrases (v9.7.0) */
.domain-outcome {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--color-gold);
    opacity: 0;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
    transition: opacity 0.5s ease;
}

.domain-card:hover .domain-outcome {
    opacity: 0.7;
}

/* ========================================
   v9.7.2 Video Background Styles
   ======================================== */

/* Hero Video - Desktop Only */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    filter: grayscale(20%) contrast(0.95);
    z-index: 1;
    object-fit: cover;
}

/* Chinese Hero Video */
.hero-video-zh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
}

/* Hide video on mobile to save bandwidth */
@media (max-width: 768px) {
    .hero-video,
    .hero-video-zh {
        display: none !important;
    }
    
    /* Ensure static image is visible on mobile */
    .hero-responsive-bg {
        display: block !important;
    }
}

/* Ensure video plays smoothly */
@media (prefers-reduced-motion: reduce) {
    .hero-video,
    .hero-video-zh {
        display: none !important;
    }
}
