:root {
    --gold: #D4A853;
    --gold-light: #E8C97A;
    --gold-dark: #B8923F;
    --deep-earth: #1A1512;
    --volcanic: #2D2520;
    --sand: #F5F0E6;
    --sand-dark: #E8E0D0;
    --ocean: #1E4D5C;
    --ocean-light: #2A6B7C;
    --terracotta: #C65D3B;
    --jungle: #2D5A3D;
    --tunnel: #0D0B09;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--sand);
    color: var(--deep-earth);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Batik-inspired pattern */
.batik-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30L30 0z' fill='none' stroke='%231A1512' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='%231A1512' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='3' fill='%231A1512'/%3E%3C/svg%3E");
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(180deg, var(--deep-earth) 0%, var(--volcanic) 50%, var(--ocean) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(212, 168, 83, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 20% 20%, rgba(46, 90, 61, 0.2) 0%, transparent 40%);
}

/* Animated tunnel rings */
.tunnel-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tunnel-ring {
    position: absolute;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 50%;
    animation: tunnel-expand 8s ease-out infinite;
}

.tunnel-ring:nth-child(1) { animation-delay: 0s; }
.tunnel-ring:nth-child(2) { animation-delay: 2s; }
.tunnel-ring:nth-child(3) { animation-delay: 4s; }
.tunnel-ring:nth-child(4) { animation-delay: 6s; }

@keyframes tunnel-expand {
    0% {
        width: 50px;
        height: 50px;
        opacity: 0.8;
    }
    100% {
        width: 150vmax;
        height: 150vmax;
        opacity: 0;
    }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 168, 83, 0.15);
    border: 1px solid var(--gold);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--terracotta);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 400;
    color: var(--sand);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(245, 240, 230, 0.7);
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

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

.hero-stat-value {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    color: var(--gold);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(245, 240, 230, 0.5);
    margin-top: 0.25rem;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(245, 240, 230, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
}

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

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

.section-header {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.section-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-title em {
    font-style: italic;
    color: var(--gold-dark);
}

/* Timeline Section */
.timeline-section {
    background: var(--sand);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--ocean) 50%, var(--sand-dark) 100%);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-marker {
    width: 50px;
    height: 50px;
    background: var(--sand);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background: var(--gold);
    color: var(--deep-earth);
}

.timeline-item.completed .timeline-marker {
    background: var(--jungle);
    border-color: var(--jungle);
    color: white;
}

.timeline-item.current .timeline-marker {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: white;
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 93, 59, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(198, 93, 59, 0); }
}

.timeline-item.future .timeline-marker {
    border-style: dashed;
    opacity: 0.5;
}

.timeline-content {
    flex: 1;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(26, 21, 18, 0.05);
    border: 1px solid var(--sand-dark);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    box-shadow: 0 8px 30px rgba(26, 21, 18, 0.1);
    transform: translateX(8px);
}

.timeline-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ocean);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: rgba(26, 21, 18, 0.6);
}

.timeline-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-dark);
    border-radius: 100px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1rem;
}

.timeline-tag.official {
    background: rgba(30, 77, 92, 0.1);
    color: var(--ocean);
}

.timeline-tag.uncertain {
    background: rgba(198, 93, 59, 0.1);
    color: var(--terracotta);
}

.timeline-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.timeline-source-link {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--sand-dark);
    color: var(--ocean);
    border-radius: 100px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.timeline-source-link:hover {
    background: var(--ocean);
    color: white;
}

/* Map Section */
.map-section {
    background: var(--volcanic);
    color: var(--sand);
    padding: 6rem 2rem;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .map-container {
        grid-template-columns: 1fr;
    }
}

.map-visual {
    background: var(--deep-earth);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 168, 83, 0.2);
}

.map-svg {
    width: 100%;
    height: auto;
}

.map-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    background: rgba(245, 240, 230, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.legend-item:hover {
    border-color: var(--gold);
    background: rgba(212, 168, 83, 0.1);
}

.legend-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.line1 { background: var(--gold); }
.legend-color.line2 { background: var(--ocean-light); }
.legend-color.line3 { background: var(--terracotta); }
.legend-color.line4 { background: var(--jungle); }

.legend-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
}

.legend-details {
    font-size: 0.8rem;
    color: rgba(245, 240, 230, 0.5);
}

.legend-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(198, 93, 59, 0.2);
    color: var(--terracotta);
    border-radius: 100px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.legend-status.planning {
    background: rgba(212, 168, 83, 0.2);
    color: var(--gold);
}

/* Tips Section */
.tips-section {
    background: linear-gradient(180deg, var(--sand) 0%, var(--sand-dark) 100%);
}

.tips-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .tips-container {
        grid-template-columns: 1fr;
    }
}

.tip-form-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--sand-dark);
    box-shadow: 0 4px 20px rgba(26, 21, 18, 0.05);
}

.tip-form-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.tip-form-card > p {
    font-size: 0.9rem;
    color: rgba(26, 21, 18, 0.6);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--sand-dark);
    border-radius: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--sand-dark);
    border-radius: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
}

/* Honeypot field - hidden from users */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* Turnstile widget */
.cf-turnstile {
    margin-bottom: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--deep-earth);
    border: none;
    border-radius: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 168, 83, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

.form-message:not(:empty) {
    display: block;
}

.form-message.success {
    background: rgba(45, 90, 61, 0.1);
    color: var(--jungle);
    border: 1px solid rgba(45, 90, 61, 0.3);
}

.form-message.error {
    background: rgba(198, 93, 59, 0.1);
    color: var(--terracotta);
    border: 1px solid rgba(198, 93, 59, 0.3);
}

.form-message.info {
    background: rgba(30, 77, 92, 0.1);
    color: var(--ocean);
    border: 1px solid rgba(30, 77, 92, 0.3);
}

.tips-list h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.tips-loading,
.tips-empty,
.tips-error {
    color: rgba(26, 21, 18, 0.5);
    font-size: 0.9rem;
    font-style: italic;
}

.tip-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--sand-dark);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(26, 21, 18, 0.08);
}

.tip-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--deep-earth);
    margin-bottom: 0.75rem;
}

.tip-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(26, 21, 18, 0.5);
}

.tip-author {
    color: var(--ocean);
    font-weight: 500;
}

.tip-date {
    color: rgba(26, 21, 18, 0.4);
}

/* News Section */
.news-section {
    background: var(--deep-earth);
    color: var(--sand);
}

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

.news-card {
    background: linear-gradient(135deg, var(--volcanic) 0%, rgba(45, 37, 32, 0.3) 100%);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
}

.news-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.news-content {
    padding: 1.5rem;
}

.news-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(212, 168, 83, 0.2);
    color: var(--gold);
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.news-type.analysis {
    background: rgba(198, 93, 59, 0.2);
    color: var(--terracotta);
}

.news-type.official {
    background: rgba(42, 107, 124, 0.3);
    color: var(--ocean-light);
}

.news-type.reference {
    background: rgba(45, 90, 61, 0.3);
    color: var(--jungle);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-source {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.news-date {
    font-size: 0.75rem;
    color: rgba(245, 240, 230, 0.4);
}

.news-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.news-card p {
    font-size: 0.85rem;
    color: rgba(245, 240, 230, 0.6);
    line-height: 1.6;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.news-link:hover {
    gap: 0.75rem;
}

/* Footer */
footer {
    background: var(--tunnel);
    color: rgba(245, 240, 230, 0.4);
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

footer p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    font-size: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 240, 230, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-marker {
        width: 32px;
        height: 32px;
    }

    .timeline-item {
        gap: 1rem;
    }

    .timeline-content {
        padding: 1rem 1.25rem;
    }
}

/* Animations on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
