/* tanso.day - Daily Carbon Intelligence */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --font-main: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--deep-base);
    color: var(--warm-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 50%, #1a1a2e 100%);
    overflow: hidden;
}

.hero-bg-molecules {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--warm-white);
    margin-bottom: 0.25em;
    line-height: 1;
}

.hero-dot {
    color: var(--accent-gold);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--muted-gray);
    margin-bottom: 2.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-metric {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid rgba(74, 144, 217, 0.3);
    border-radius: 16px;
    padding: 2rem 3rem;
    backdrop-filter: blur(10px);
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.metric-unit {
    font-size: 1rem;
    font-weight: 400;
    color: var(--primary-blue);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    z-index: 1;
    animation: scrollBounce 2s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ===== PULSE ATTENTION ANIMATION ===== */
.pulse-attention {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.02); filter: brightness(1.15); }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--deep-base);
    letter-spacing: -0.02em;
}

.section-title--light {
    color: var(--warm-white);
}

/* ===== METRICS / HONEYCOMB ===== */
.section-metrics {
    background: var(--warm-white);
    padding: 5rem 2rem;
    position: relative;
}

.honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hex-cell {
    position: relative;
    transition: transform 0.3s ease;
}

.hex-cell:hover {
    transform: scale(1.08);
    z-index: 2;
}

.hex-cell--large { width: 220px; height: 190px; }
.hex-cell--medium { width: 180px; height: 156px; }
.hex-cell--small { width: 150px; height: 130px; }

.hex-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hex-shape polygon {
    fill: var(--deep-base);
    stroke: var(--primary-blue);
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.hex-cell:hover .hex-shape polygon {
    fill: #22223d;
    stroke: var(--accent-gold);
}

.hex-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hex-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
}

.hex-cell--medium .hex-value { font-size: 1.5rem; }
.hex-cell--small .hex-value { font-size: 1.3rem; }

.hex-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warm-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

.hex-unit {
    font-size: 0.65rem;
    color: var(--primary-blue);
    font-weight: 400;
}

/* ===== MOLECULAR SECTION ===== */
.section-molecular {
    background: linear-gradient(180deg, #0d0d1a 0%, var(--deep-base) 100%);
    padding: 5rem 2rem;
}

.molecular-canvas {
    max-width: 800px;
    margin: 0 auto 3rem;
}

#molecular-svg {
    width: 100%;
    height: auto;
}

.mol-bonds line {
    stroke: var(--primary-blue);
    stroke-width: 2;
    opacity: 0.6;
}

.mol-atoms circle {
    fill: var(--accent-gold);
    stroke: var(--primary-blue);
    stroke-width: 1.5;
}

.molecular-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.mol-fact {
    text-align: center;
}

.mol-fact-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.mol-fact-text {
    font-size: 0.85rem;
    color: var(--muted-gray);
    max-width: 180px;
    display: block;
}

/* ===== DAILY BRIEFING ===== */
.section-daily {
    background: var(--warm-white);
    padding: 5rem 2rem;
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.daily-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.daily-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26, 26, 46, 0.15);
}

.daily-card--featured {
    border-left: 4px solid var(--accent-gold);
}

.daily-card-hexbadge {
    position: relative;
    width: 48px;
    height: 42px;
    margin-bottom: 1rem;
}

.badge-hex {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.badge-hex polygon {
    fill: var(--deep-base);
}

.badge-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.daily-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-base);
    margin-bottom: 0.75rem;
}

.daily-card-body {
    font-size: 0.9rem;
    color: var(--muted-gray);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.daily-card-bar {
    width: 100%;
    height: 6px;
    background: #e8e3da;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.daily-card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
    border-radius: 3px;
    width: 0%;
    transition: width 1.2s ease-out;
}

.daily-card-stat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== DATA VISUALIZATION ===== */
.section-dataviz {
    background: linear-gradient(180deg, var(--deep-base) 0%, #0d0d1a 100%);
    padding: 5rem 2rem;
}

.dataviz-container {
    max-width: 900px;
    margin: 0 auto;
}

.retro-chart {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: rgba(74, 144, 217, 0.05);
    border: 1px solid rgba(74, 144, 217, 0.15);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    min-height: 300px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    padding-right: 0.5rem;
    border-right: 1px solid rgba(108, 117, 125, 0.3);
}

.chart-y-axis span {
    font-size: 0.7rem;
    color: var(--muted-gray);
    font-weight: 500;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    flex: 1;
    height: 220px;
    gap: 0.5rem;
}

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

.chart-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--accent-gold), var(--primary-blue));
    border-radius: 4px 4px 0 0;
    height: 0%;
    transition: height 1s ease-out;
    position: relative;
}

.chart-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: inherit;
}

.chart-bar-label {
    font-size: 0.7rem;
    color: var(--muted-gray);
    font-weight: 500;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

.dataviz-summary {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.summary-stat {
    text-align: center;
}

.summary-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.summary-value--down {
    color: #5cb85c;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--muted-gray);
    font-weight: 500;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0d0d1a;
    padding: 4rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.footer-hex-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--warm-white);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--muted-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-link:hover {
    color: var(--accent-gold);
}

.footer-copy {
    color: rgba(108, 117, 125, 0.5);
    font-size: 0.75rem;
}

/* ===== SCROLL REVEAL ===== */
.hex-cell,
.daily-card,
.mol-fact,
.summary-stat {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hex-cell.visible,
.daily-card.visible,
.mol-fact.visible,
.summary-stat.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .honeycomb-grid {
        gap: 1rem;
    }
    .hex-cell--large { width: 180px; height: 156px; }
    .hex-cell--medium { width: 150px; height: 130px; }
    .hex-cell--small { width: 130px; height: 113px; }
    .hex-value { font-size: 1.4rem; }
    .hex-cell--medium .hex-value { font-size: 1.2rem; }
    .hex-cell--small .hex-value { font-size: 1rem; }
    .molecular-info { gap: 1.5rem; }
    .daily-grid { grid-template-columns: 1fr; }
    .dataviz-summary { gap: 1.5rem; }
    .footer-links { gap: 1rem; }
}

@media (max-width: 480px) {
    .hero-metric { padding: 1.5rem 2rem; }
    .retro-chart { padding: 1rem; }
    .chart-y-axis { display: none; }
}
