/* ===================================
   Consumer Transparency Report
   Earthy Corporate Design System
   =================================== */

/* CSS Custom Properties - Color Palette */
:root {
    /* Primary Colors - Earthy Corporate */
    --color-forest-green: #2d5016;
    --color-slate-gray: #475569;
    --color-cream: #fef9f3;
    --color-rust: #b45309;

    /* Neutral Tones */
    --color-charcoal: #1e293b;
    --color-soft-gray: #64748b;
    --color-light-gray: #e2e8f0;
    --color-white: #ffffff;

    /* Semantic Colors */
    --color-warning: #d97706;
    --color-critical: #dc2626;
    --color-success: #059669;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;

    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-base: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Global Reset & Base Styles
   =================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-charcoal);
    background-color: var(--color-slate-gray);
    background-image: url('../assets/background.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fixed background overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(71, 85, 105, 0.85);
    backdrop-filter: blur(4px);
    z-index: -1;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-forest-green);
    margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-forest-green);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-rust);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* ===================================
   Layout Components
   =================================== */

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

/* ===================================
   Header
   =================================== */

.site-header {
    background-color: rgba(254, 249, 243, 0.95);
    backdrop-filter: blur(8px);
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--color-forest-green);
}

.header-title {
    font-size: 2.5rem;
    color: var(--color-forest-green);
    margin-bottom: var(--space-xs);
    text-align: center;
}

.header-subtitle {
    font-size: 1.25rem;
    color: var(--color-slate-gray);
    text-align: center;
    font-weight: 400;
}

/* ===================================
   Content Cards
   =================================== */

section {
    background-color: rgba(254, 249, 243, 0.97);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-xl);
}

.section-title {
    font-size: 2rem;
    color: var(--color-forest-green);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-light-gray);
}

.section-intro {
    color: var(--color-slate-gray);
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

/* ===================================
   Hero Summary Card
   =================================== */

.hero-card {
    background: linear-gradient(135deg, rgba(254, 249, 243, 0.98) 0%, rgba(226, 232, 240, 0.95) 100%);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.metric-card {
    background-color: var(--color-white);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-light-gray);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

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

.metric-card.warning {
    border-color: var(--color-rust);
    background-color: rgba(217, 119, 6, 0.05);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-forest-green);
    margin-bottom: var(--space-xs);
}

.metric-card.warning .metric-value {
    color: var(--color-rust);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--color-soft-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-charcoal);
}

/* ===================================
   Timeline
   =================================== */

.timeline {
    position: relative;
    padding-left: var(--space-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-forest-green), var(--color-rust));
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-xl);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.375rem;
    top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background-color: var(--color-forest-green);
    border: 3px solid var(--color-cream);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.timeline-item.warning .timeline-marker {
    background-color: var(--color-warning);
}

.timeline-item.critical .timeline-marker {
    background-color: var(--color-critical);
}

.timeline-marker.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.timeline-content {
    background-color: var(--color-white);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-forest-green);
    box-shadow: var(--shadow-sm);
}

.timeline-item.warning .timeline-content {
    border-left-color: var(--color-warning);
    background-color: rgba(217, 119, 6, 0.03);
}

.timeline-item.critical .timeline-content {
    border-left-color: var(--color-critical);
    background-color: rgba(220, 38, 38, 0.03);
}

.timeline-title {
    font-size: 1.25rem;
    color: var(--color-forest-green);
    margin-bottom: var(--space-xs);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--color-rust);
    font-weight: 600;
    font-family: var(--font-mono);
    margin-bottom: var(--space-sm);
}

.timeline-description {
    color: var(--color-slate-gray);
    line-height: 1.7;
}

.timeline-photo {
    margin-top: var(--space-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.timeline-photo img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    background-color: var(--color-light-gray);
}

/* ===================================
   Photo Sections (How It Started / How It's Going)
   =================================== */

.photo-section {
    margin-bottom: var(--space-xl);
}

.photo-section-title {
    font-size: 1.75rem;
    color: var(--color-forest-green);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.photo-grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.photo-item-pano {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.photo-item-pano:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.photo-item-pano img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background-color: var(--color-light-gray);
    min-height: 200px;
}

.photo-item-pano figcaption {
    padding: var(--space-md);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-forest-green);
    text-align: center;
    border-top: 2px solid var(--color-light-gray);
}

.photo-item {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.photo-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.photo-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background-color: var(--color-light-gray);
    min-height: 250px;
}

.photo-item figcaption {
    padding: var(--space-md);
    font-weight: 600;
    color: var(--color-charcoal);
    text-align: center;
    border-top: 2px solid var(--color-light-gray);
}

/* ===================================
   Evidence Gallery (Legacy - keeping for compatibility)
   =================================== */

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.evidence-item {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.evidence-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.evidence-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    background-color: var(--color-light-gray);
}

.evidence-item figcaption {
    padding: var(--space-md);
    font-weight: 600;
    color: var(--color-charcoal);
    text-align: center;
    border-top: 2px solid var(--color-light-gray);
}

/* ===================================
   Alternatives Table
   =================================== */

.alternatives-table {
    overflow-x: auto;
    margin-top: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
}

thead {
    background-color: var(--color-forest-green);
}

thead th {
    color: var(--color-cream);
    font-weight: 600;
    text-align: left;
    padding: var(--space-md);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr {
    border-bottom: 1px solid var(--color-light-gray);
    transition: background-color var(--transition-base);
}

tbody tr:hover {
    background-color: rgba(45, 80, 22, 0.03);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: var(--space-md);
    color: var(--color-charcoal);
}

.business-name {
    font-weight: 600;
    color: var(--color-forest-green);
}

tbody td a {
    color: var(--color-forest-green);
    font-weight: 500;
    text-decoration: underline;
}

tbody td a:hover {
    color: var(--color-rust);
}

/* ===================================
   Call to Action Section
   =================================== */

.cta-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.08) 0%, rgba(180, 83, 9, 0.08) 100%);
}

.cta-description {
    font-size: 1.125rem;
    color: var(--color-slate-gray);
    margin-bottom: var(--space-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.share-button {
    background-color: var(--color-forest-green);
    color: var(--color-cream);
    font-size: 1.125rem;
    font-weight: 600;
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    font-family: var(--font-primary);
}

.share-button:hover {
    background-color: var(--color-rust);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.share-button:active {
    transform: translateY(0);
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(8px);
    color: var(--color-light-gray);
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
    border-top: 3px solid var(--color-forest-green);
}

.disclaimer {
    background-color: rgba(254, 249, 243, 0.1);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-rust);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.disclaimer strong {
    color: var(--color-cream);
}

.footer-meta {
    font-size: 0.875rem;
    color: var(--color-soft-gray);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.footer-meta a {
    color: var(--color-cream);
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-soft-gray);
    text-align: center;
}

/* ===================================
   Share Modal (Fallback for older browsers)
   =================================== */

.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background-color: var(--color-cream);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.share-modal-title {
    font-size: 1.5rem;
    color: var(--color-forest-green);
    margin-bottom: var(--space-md);
    text-align: center;
}

.share-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-slate-gray);
    cursor: pointer;
    line-height: 1;
    padding: var(--space-xs);
    transition: color var(--transition-base);
}

.share-modal-close:hover {
    color: var(--color-rust);
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.share-option-button {
    background-color: var(--color-forest-green);
    color: var(--color-cream);
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color var(--transition-base);
    font-family: var(--font-primary);
}

.share-option-button:hover {
    background-color: var(--color-rust);
}

.copy-link-container {
    margin-top: var(--space-md);
}

.copy-link-input {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--color-light-gray);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.copy-success {
    color: var(--color-success);
    font-size: 0.875rem;
    text-align: center;
    font-weight: 600;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1.125rem;
    }

    section {
        padding: var(--space-lg);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: var(--space-lg);
    }

    .timeline-marker {
        left: -1.625rem;
    }

    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .alternatives-table {
        font-size: 0.875rem;
    }

    thead th,
    tbody td {
        padding: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .site-header {
        padding: var(--space-lg) 0;
    }

    .header-title {
        font-size: 1.75rem;
    }

    section {
        padding: var(--space-md);
        margin-bottom: var(--space-lg);
    }

    .metric-value {
        font-size: 2rem;
    }
}

/* ===================================
   Accessibility & WCAG Compliance
   =================================== */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--color-rust);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-forest-green: #1a3a0a;
        --color-charcoal: #000000;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    body::before {
        display: none;
    }

    section {
        background-color: white;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .share-button {
        display: none;
    }
}
