/* tanso.news - Carbon News Platform */
/* Design Colors: #1a1a2e (deep base), #e8b84b (accent gold), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #6c757d (muted gray) */
/* Fonts: Inter, Nunito (rounded-sans) */

:root {
    --deep-base: #1a1a2e;
    --accent-gold: #e8b84b;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --muted-gray: #6c757d;
    --policy-color: #4a90d9;
    --innovation-color: #e8b84b;
    --nature-color: #5a9a6b;
    --data-color: #7b6fb6;
    --community-color: #d4836d;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--warm-white);
    color: var(--deep-base);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Noise Texture Overlay */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ==================== HEADER ==================== */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 26, 46, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 2px 20px rgba(26, 26, 46, 0.08);
}

#site-header.hidden {
    transform: translateY(-100%);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--deep-base);
    letter-spacing: -0.02em;
}

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

.main-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted-gray);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: var(--deep-base);
    background: rgba(26, 26, 46, 0.05);
}

.nav-link.active {
    color: var(--deep-base);
    background: rgba(232, 184, 75, 0.15);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--muted-gray);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.search-btn:hover {
    color: var(--deep-base);
    background: rgba(26, 26, 46, 0.05);
}

.subscribe-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--deep-base);
    background: var(--accent-gold);
    border: none;
    padding: 8px 20px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: #d4a63d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 184, 75, 0.35);
}

/* ==================== HERO ==================== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 32px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 40%, #1a1a2e 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: radial-gradient(circle at 25% 25%, #e8b84b 1px, transparent 1px),
                      radial-gradient(circle at 75% 75%, #4a90d9 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(232, 184, 75, 0.15);
    border: 1px solid rgba(232, 184, 75, 0.25);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 32px;
    animation: fadeInDown 0.8s ease forwards;
}

.hero-tag span {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.1;
    color: var(--warm-white);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s 0.15s ease both;
}

.hero-excerpt {
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem;
    color: rgba(245, 240, 232, 0.7);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.7;
    animation: fadeInUp 0.8s 0.3s ease both;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    animation: fadeInUp 0.8s 0.45s ease both;
}

.hero-meta span {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    color: rgba(245, 240, 232, 0.5);
}

.meta-author {
    font-weight: 600;
    color: rgba(232, 184, 75, 0.8) !important;
}

.hero-cta {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--deep-base);
    background: var(--accent-gold);
    border: none;
    padding: 14px 36px;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s 0.6s ease both;
    position: relative;
    overflow: hidden;
}

.hero-cta:hover {
    background: #d4a63d;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 184, 75, 0.35);
}

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

.floating-leaf {
    position: absolute;
    animation: floatLeaf 8s ease-in-out infinite;
}

.leaf-1 {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.leaf-2 {
    bottom: 20%;
    left: 8%;
    animation-delay: -3s;
}

.leaf-3 {
    top: 60%;
    right: 20%;
    animation-delay: -5s;
}

/* ==================== CATEGORIES ==================== */
.section {
    padding: 0 32px;
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
}

#categories {
    padding-top: 48px;
    padding-bottom: 16px;
}

.category-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-pill {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted-gray);
    background: rgba(26, 26, 46, 0.04);
    border: 1px solid rgba(26, 26, 46, 0.08);
    padding: 8px 20px;
    border-radius: 24px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-pill:hover {
    color: var(--deep-base);
    background: rgba(26, 26, 46, 0.08);
    border-color: rgba(26, 26, 46, 0.12);
}

.category-pill.active {
    color: var(--deep-base);
    background: rgba(232, 184, 75, 0.15);
    border-color: rgba(232, 184, 75, 0.3);
}

.pill-leaf {
    opacity: 0.7;
}

/* ==================== STORIES GRID ==================== */
#stories {
    padding-top: 24px;
    padding-bottom: 64px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.story-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
}

.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(26, 26, 46, 0.12);
}

.story-card.featured-card {
    grid-column: span 2;
    grid-row: span 2;
}

.featured-card .card-image {
    height: 320px;
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.policy-bg {
    background: linear-gradient(135deg, #3a7bc8 0%, #4a90d9 50%, #5da0e9 100%);
    color: #4a90d9;
}

.innovation-bg {
    background: linear-gradient(135deg, #d4a63d 0%, #e8b84b 50%, #f0ca6e 100%);
    color: #e8b84b;
}

.nature-bg {
    background: linear-gradient(135deg, #4a8a5b 0%, #5a9a6b 50%, #6aaa7b 100%);
    color: #5a9a6b;
}

.data-bg {
    background: linear-gradient(135deg, #6b5fa6 0%, #7b6fb6 50%, #8b7fc6 100%);
    color: #7b6fb6;
}

.community-bg {
    background: linear-gradient(135deg, #c4735d 0%, #d4836d 50%, #e4937d 100%);
    color: #d4836d;
}

.card-leaf-motif {
    opacity: 0.6;
    transition: transform 0.6s ease;
}

.story-card:hover .card-leaf-motif {
    transform: scale(1.1) rotate(5deg);
}

.card-body {
    padding: 24px;
}

.featured-card .card-body {
    padding: 32px;
}

.card-category {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: inline-block;
}

.card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--deep-base);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.featured-card .card-title {
    font-size: 1.5rem;
}

.story-card:hover .card-title {
    color: var(--primary-blue);
}

.card-excerpt {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: var(--muted-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--muted-gray);
}

/* ==================== RIPPLE EFFECT ==================== */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 184, 75, 0.3) 0%, transparent 70%);
    transform: scale(0);
    animation: rippleAnim 0.7s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==================== CARBON TICKER ==================== */
#carbon-ticker {
    padding-top: 32px;
    padding-bottom: 64px;
}

.ticker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.ticker-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--deep-base);
    letter-spacing: -0.02em;
}

.ticker-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.ticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ticker-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
}

.ticker-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.08);
}

.ticker-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ticker-value {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--deep-base);
    letter-spacing: -0.02em;
}

.ticker-change {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
}

.ticker-change.positive {
    color: #4ade80;
}

.ticker-change.negative {
    color: #f87171;
}

/* ==================== NEWSLETTER ==================== */
#newsletter {
    padding-top: 32px;
    padding-bottom: 80px;
}

.newsletter-card {
    background: var(--deep-base);
    border-radius: 24px;
    padding: 64px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.newsletter-leaves {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nl-leaf {
    position: absolute;
}

.nl-leaf-1 {
    top: -20px;
    right: -10px;
    transform: rotate(30deg);
}

.nl-leaf-2 {
    bottom: -15px;
    left: -5px;
    transform: rotate(-20deg);
}

.newsletter-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    margin: 0 auto;
}

.newsletter-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--warm-white);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.newsletter-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 32px;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    padding: 14px 20px;
    border-radius: 28px;
    border: 1px solid rgba(245, 240, 232, 0.15);
    background: rgba(245, 240, 232, 0.08);
    color: var(--warm-white);
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(245, 240, 232, 0.35);
}

.newsletter-input:focus {
    border-color: var(--accent-gold);
    background: rgba(245, 240, 232, 0.12);
}

.newsletter-submit {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--deep-base);
    background: var(--accent-gold);
    border: none;
    padding: 14px 28px;
    border-radius: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-submit:hover {
    background: #d4a63d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 184, 75, 0.3);
}

.submit-leaf {
    transition: transform 0.3s ease;
}

.newsletter-submit:hover .submit-leaf {
    transform: rotate(15deg) scale(1.1);
}

/* ==================== FOOTER ==================== */
#site-footer {
    background: var(--deep-base);
    padding: 64px 32px 32px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo span {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--warm-white);
}

.footer-tagline {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.5);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--warm-white);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col a {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.5);
    text-decoration: none;
    transition: color 0.25s ease;
}

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

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(245, 240, 232, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.35);
}

.footer-sep {
    opacity: 0.5;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatLeaf {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(3deg);
    }
    50% {
        transform: translateY(-8px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(4deg);
    }
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Story card hide/show for category filter */
.story-card.hiding {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s ease;
}

.story-card.showing {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: all 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-card.featured-card {
        grid-column: span 2;
        grid-row: span 1;
    }

    .ticker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 20px;
    }

    .main-nav {
        display: none;
    }

    #hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    .hero-meta {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section {
        padding-left: 20px;
        padding-right: 20px;
    }

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

    .story-card.featured-card {
        grid-column: span 1;
    }

    .featured-card .card-image {
        height: 220px;
    }

    .ticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ticker-card {
        padding: 18px;
    }

    .ticker-value {
        font-size: 1.4rem;
    }

    .newsletter-card {
        padding: 40px 24px;
    }

    .newsletter-form {
        flex-direction: column;
    }

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

    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 32px;
    }

    #site-footer {
        padding: 48px 20px 24px;
    }
}

@media (max-width: 480px) {
    .ticker-grid {
        grid-template-columns: 1fr;
    }

    .category-bar {
        gap: 8px;
    }

    .category-pill {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}
