/* ============================================
   recycle.report — Frutiger Aero Aesthetic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --aurora-teal: #2DD4BF;
    --aurora-violet: #8B5CF6;
    --aurora-green: #34D399;
    --sky-white: #F0F8FF;
    --crystal-ice: #E0F0F8;
    --deep-ocean: #1E3A5F;
    --grain-warm: #F5F0E8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--deep-ocean);
    background-color: var(--sky-white);
    overflow-x: hidden;
}

/* --- Grain Overlay (Global) --- */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
}

/* --- Aurora Background (shared) --- */
.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2DD4BF, #8B5CF6, #34D399, #2DD4BF);
    background-size: 400% 400%;
    animation: aurora 20s ease infinite;
    z-index: 0;
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

/* --- Aurora Header --- */
#aurora-header {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--grain-warm);
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.wordmark {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(40px, 8vw, 80px);
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15), 0 0 60px rgba(255, 255, 255, 0.2);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.tagline {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 2.5vw, 22px);
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.scroll-indicator {
    margin-top: 60px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

.scroll-arrow {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    transform: rotate(45deg);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Crystalline SVG Decorations --- */
.crystal {
    position: absolute;
    z-index: 1;
    opacity: 0;
    animation: crystalFadeIn 1.5s ease forwards;
    pointer-events: none;
}

.crystal-1 {
    top: 8%;
    left: 5%;
    width: 120px;
    animation-delay: 0.5s;
}

.crystal-2 {
    top: 15%;
    right: 8%;
    width: 100px;
    animation-delay: 0.8s;
}

.crystal-3 {
    bottom: 20%;
    left: 10%;
    width: 80px;
    animation-delay: 1.1s;
}

.crystal-4 {
    bottom: 12%;
    right: 5%;
    width: 90px;
    animation-delay: 1.4s;
}

.crystal-5 {
    top: 50%;
    right: 15%;
    width: 70px;
    animation-delay: 1.7s;
    transform: translateY(-50%);
}

@keyframes crystalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* crystal-5 needs special handling because of translateY */
.crystal-5 {
    animation-name: crystalFadeIn5;
}

@keyframes crystalFadeIn5 {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* --- Report Body --- */
#report-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* --- Report Sections --- */
.report-section {
    position: relative;
    background: var(--sky-white);
    border-radius: 12px;
    padding: 48px 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(30, 58, 95, 0.1);
}

.section-crystal {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 40px;
    height: 50px;
    opacity: 0.7;
}

.section-crystal svg {
    width: 100%;
    height: 100%;
}

.report-section h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--deep-ocean);
    margin-bottom: 24px;
    line-height: 1.3;
}

.report-section p {
    margin-bottom: 16px;
    color: var(--deep-ocean);
}

.report-section p:last-child {
    margin-bottom: 0;
}

.report-section em {
    font-weight: 500;
    color: var(--aurora-teal);
}

.report-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--crystal-ice);
    font-size: 0.9em;
    color: rgba(30, 58, 95, 0.7);
}

.report-note em {
    color: rgba(30, 58, 95, 0.7);
    font-weight: 400;
}

/* --- Crystal Data Panels --- */
.crystal-data-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(224, 240, 248, 0.8), rgba(240, 248, 255, 0.9));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 16px;
    padding: 48px 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crystal-data-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(30, 58, 95, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.crystal-data-panel h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--deep-ocean);
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.3;
}

/* --- Stats Row --- */
.stats-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 32px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 42px;
    color: var(--aurora-teal);
    display: block;
    line-height: 1.2;
}

.stat-unit {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--aurora-violet);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-top: 4px;
}

.stat-label {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--deep-ocean);
    opacity: 0.7;
    display: block;
    margin-top: 8px;
}

/* --- Material Bars --- */
.material-bars {
    margin-top: 32px;
}

.material-bar-item {
    margin-bottom: 20px;
}

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

.bar-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.material-name {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--deep-ocean);
}

.material-pct {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 14px;
    color: var(--aurora-violet);
}

.bar-track {
    width: 100%;
    height: 12px;
    background: var(--crystal-ice);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: var(--bar-color);
    border-radius: 6px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Trend Chart --- */
.trend-chart {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    height: 260px;
    padding: 20px 0;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 200px;
    padding-right: 8px;
    border-right: 1px solid var(--crystal-ice);
}

.chart-y-axis span {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--deep-ocean);
    opacity: 0.5;
    text-align: right;
    min-width: 32px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: 1;
    height: 200px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.chart-bar {
    width: 100%;
    max-width: 36px;
    height: 0;
    background: var(--bar-hue);
    border-radius: 4px 4px 0 0;
    transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.85;
    position: relative;
}

.chart-bar:hover {
    opacity: 1;
    filter: brightness(1.1);
}

.chart-label {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--deep-ocean);
    opacity: 0.6;
    margin-top: 8px;
    text-align: center;
}

/* --- Impact Grid --- */
.impact-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 32px;
}

.impact-item {
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.impact-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

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

.impact-value {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 32px;
    color: var(--aurora-green);
    display: block;
    line-height: 1.2;
}

.impact-value .stat-value {
    display: inline;
    font-size: inherit;
    color: inherit;
}

.impact-label {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: var(--deep-ocean);
    opacity: 0.7;
    display: block;
    margin-top: 8px;
}

/* --- Data Table --- */
.data-table-wrapper {
    margin-top: 32px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table thead {
    border-bottom: 2px solid var(--aurora-teal);
}

.data-table th {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--deep-ocean);
    padding: 12px 16px;
    text-align: left;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--crystal-ice);
    color: var(--deep-ocean);
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(224, 240, 248, 0.5);
}

.mono {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

/* --- Aurora Footer --- */
#aurora-footer {
    position: relative;
    padding: 80px 24px;
    overflow: hidden;
    text-align: center;
}

.footer-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--grain-warm);
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
}

.crystal-footer-1 {
    bottom: 20%;
    left: 8%;
    width: 60px;
    animation-delay: 0.3s;
}

.crystal-footer-2 {
    top: 15%;
    right: 10%;
    width: 50px;
    animation-delay: 0.6s;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-wordmark {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 28px;
    color: #fff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

.footer-text {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.footer-date {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Scroll Reveal Animation --- */
.report-section,
.crystal-data-panel {
    opacity: 0;
    transform: translateY(30px);
}

.report-section.visible,
.crystal-data-panel.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #report-body {
        padding: 48px 16px;
    }

    .report-section,
    .crystal-data-panel {
        padding: 32px 24px;
    }

    .stats-row,
    .impact-grid {
        flex-direction: column;
        gap: 24px;
    }

    .stat-value {
        font-size: 36px;
    }

    .impact-value {
        font-size: 28px;
    }

    .crystal-1,
    .crystal-2,
    .crystal-3,
    .crystal-4,
    .crystal-5 {
        width: 50px;
    }

    .trend-chart {
        height: 200px;
    }

    .chart-y-axis {
        height: 150px;
    }

    .chart-bars {
        height: 150px;
        gap: 4px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 10px;
        font-size: 13px;
    }

    .mono {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .wordmark {
        font-size: clamp(32px, 10vw, 48px);
    }

    .report-section h2,
    .crystal-data-panel h2 {
        font-size: clamp(24px, 5vw, 32px);
    }

    .chart-label {
        font-size: 9px;
    }

    .chart-y-axis span {
        font-size: 9px;
        min-width: 24px;
    }
}
