/* transactology.org - Seapunk Ocean-Warm Transaction Chronicle */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Inter (body), Playfair Display (headings/serif-classic) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grid Background */
#grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(74, 144, 217, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 217, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Sunset Overlay */
#sunset-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(232, 184, 75, 0.08) 0%, transparent 60%);
}

/* Hero Section */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1a1a2e 0%, #1e2240 40%, #1a1a2e 100%);
    overflow: hidden;
    z-index: 1;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(232, 184, 75, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(74, 144, 217, 0.1) 0%, transparent 50%);
    z-index: 0;
}

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

.hero-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
    animation: heroFloat 6s ease-in-out infinite;
}

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

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #f5f0e8;
}

.hero-dot {
    color: #e8b84b;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 0.02em;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Sections */
.section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
}

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

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: #f5f0e8;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #e8b84b, #4a90d9);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-text {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* Intro Section */
#intro {
    background: linear-gradient(180deg, #1a1a2e 0%, #1c1f35 50%, #1a1a2e 100%);
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.intro-card {
    background: rgba(74, 144, 217, 0.06);
    border: 1px solid rgba(74, 144, 217, 0.15);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.intro-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.intro-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(74, 144, 217, 0.15);
    border-color: rgba(232, 184, 75, 0.3);
}

.intro-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
}

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

.intro-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e8b84b;
    margin-bottom: 0.75rem;
}

.intro-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
}

/* Timeline Section */
#timeline {
    background: linear-gradient(180deg,
        #1a1a2e 0%,
        rgba(232, 184, 75, 0.04) 30%,
        rgba(74, 144, 217, 0.04) 70%,
        #1a1a2e 100%);
}

.timeline-intro {
    margin-bottom: 4rem;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        #4a90d9 10%,
        #e8b84b 50%,
        #4a90d9 90%,
        transparent 100%);
    transform: translateX(-50%);
}

.timeline-glow {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(74, 144, 217, 0.3) 10%,
        rgba(232, 184, 75, 0.3) 50%,
        rgba(74, 144, 217, 0.3) 90%,
        transparent 100%);
    transform: translateX(-50%);
    filter: blur(4px);
}

.timeline-node {
    position: relative;
    width: 50%;
    padding: 1.5rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-left {
    padding-right: 3rem;
    text-align: right;
}

.timeline-right {
    margin-left: 50%;
    padding-left: 3rem;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: #4a90d9;
    border: 3px solid #1a1a2e;
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-left .timeline-dot {
    right: -8px;
}

.timeline-right .timeline-dot {
    left: -8px;
}

.timeline-dot-key {
    background: #e8b84b;
    width: 20px;
    height: 20px;
    box-shadow: 0 0 20px rgba(232, 184, 75, 0.5);
}

.timeline-left .timeline-dot-key {
    right: -10px;
}

.timeline-right .timeline-dot-key {
    left: -10px;
}

.timeline-content {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(74, 144, 217, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.timeline-content-key {
    border-color: rgba(232, 184, 75, 0.35);
    box-shadow: 0 0 30px rgba(232, 184, 75, 0.08);
}

.timeline-node:hover .timeline-content {
    box-shadow: 0 8px 30px rgba(74, 144, 217, 0.15);
}

.timeline-node[data-key]:hover .timeline-content {
    box-shadow: 0 8px 30px rgba(232, 184, 75, 0.2);
}

.timeline-node.zoom-active .timeline-content {
    transform: scale(1.05);
}

.timeline-node.zoom-active .timeline-dot {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(74, 144, 217, 0.6);
}

.timeline-node[data-key].zoom-active .timeline-dot {
    box-shadow: 0 0 25px rgba(232, 184, 75, 0.7);
}

.timeline-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a90d9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.timeline-content-key .timeline-date {
    color: #e8b84b;
}

.timeline-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #f5f0e8;
    margin-bottom: 0.75rem;
}

.timeline-media {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-media svg {
    width: 100%;
    height: auto;
    display: block;
}

.timeline-desc {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.timeline-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-left .timeline-meta {
    justify-content: flex-end;
}

.meta-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #4a90d9;
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid rgba(74, 144, 217, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content-key .meta-tag:last-child {
    color: #e8b84b;
    background: rgba(232, 184, 75, 0.1);
    border-color: rgba(232, 184, 75, 0.3);
}

/* Data Viz Section */
#data-viz {
    background: linear-gradient(180deg, #1a1a2e 0%, #181a30 50%, #1a1a2e 100%);
}

.viz-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

#flow-canvas {
    width: 100%;
    height: 300px;
    display: block;
    border-radius: 12px;
    background: rgba(74, 144, 217, 0.03);
    border: 1px solid rgba(74, 144, 217, 0.1);
}

.viz-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.stat-item {
    opacity: 0;
    transform: translateY(20px);
}

.stat-item.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #e8b84b;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Methodology Section */
#methodology {
    background: linear-gradient(180deg,
        #1a1a2e 0%,
        rgba(232, 184, 75, 0.03) 50%,
        #1a1a2e 100%);
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.method-card {
    background: rgba(74, 144, 217, 0.04);
    border: 1px solid rgba(74, 144, 217, 0.12);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.method-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.method-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 184, 75, 0.3);
    box-shadow: 0 8px 30px rgba(232, 184, 75, 0.08);
}

.method-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(74, 144, 217, 0.2);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.method-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #e8b84b;
    margin-bottom: 0.75rem;
}

.method-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
}

/* Footer */
#footer {
    position: relative;
    z-index: 1;
    background: #1a1a2e;
    border-top: 1px solid rgba(74, 144, 217, 0.1);
}

.footer-inner {
    position: relative;
}

.footer-wave {
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.footer-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    text-align: center;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5f0e8;
}

.footer-dot {
    color: #e8b84b;
}

.footer-tagline {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

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

.footer-link {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #e8b84b;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(108, 117, 125, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-line,
    .timeline-glow {
        left: 20px;
    }

    .timeline-left,
    .timeline-right {
        width: 100%;
        margin-left: 0;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-left .timeline-dot,
    .timeline-right .timeline-dot {
        left: 12px;
        right: auto;
    }

    .timeline-left .timeline-dot-key,
    .timeline-right .timeline-dot-key {
        left: 10px;
        right: auto;
    }

    .timeline-left .timeline-meta {
        justify-content: flex-start;
    }

    .viz-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .intro-cards {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        width: 100px;
        height: 100px;
    }

    .section {
        padding: 3rem 1rem;
    }
}
