:root {
    color-scheme: light;
    --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;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--sand);
    color: var(--deep-earth);
    line-height: 1.5;
}

/* Hero Section */
.hero {
    padding: clamp(1.75rem, 4vw, 2.5rem) 1.5rem;
    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%),
        linear-gradient(180deg, var(--deep-earth) 0%, var(--volcanic) 50%, var(--ocean) 100%);
    text-align: center;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    color: var(--sand);
    line-height: 1;
}

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

/* Section styling */
section {
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

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

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.section-title em {
    font-style: italic;
    color: #755714;
}

.section-note {
    color: var(--sand-dark);
}

/* Timeline Section */
.timeline {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.timeline-item {
    min-width: 0;
}

.timeline-content {
    height: 100%;
    background: white;
    border-radius: 0.65rem;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 10px rgba(26, 21, 18, 0.04);
    border: 1px solid var(--sand-dark);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    box-shadow: 0 5px 18px rgba(26, 21, 18, 0.09);
    transform: translateY(-2px);
}

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

.timeline-content h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

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

.timeline-content p a {
    color: var(--ocean);
    text-decoration-color: rgba(30, 77, 92, 0.35);
    text-underline-offset: 0.15em;
}

.timeline-content p a:hover {
    text-decoration-color: currentColor;
}

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

.map-section .section-title em {
    color: var(--gold-light);
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

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

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

.map-svg {
    display: block;
    width: 100%;
    height: min(48vw, 430px);
}

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

.legend-item {
    background: rgba(245, 240, 230, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    transition: background-color 0.3s ease, border-color 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.6rem;
    margin-bottom: 0.35rem;
}

.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: var(--font-serif);
    font-size: 1.1rem;
}

.legend-details {
    font-size: 0.8rem;
    color: var(--sand-dark);
}

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

.tips-widget {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 600px);
    gap: 1.25rem;
    align-items: start;
    justify-content: center;
}

.tips-widget.has-tips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: normal;
}

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

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--deep-earth);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group label span {
    color: #5d5651;
    font-weight: 400;
}

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

.form-group textarea:focus {
    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: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

[data-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: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 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;
}

.form-message.error {
    background: rgba(198, 93, 59, 0.1);
    color: #853419;
    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: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--sand-dark);
    margin-bottom: 0.65rem;
    transition: border-color 0.3s ease, box-shadow 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);
}

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

footer p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.85rem;
}

.not-found {
    min-height: 100vh;
    display: grid;
    place-content: center;
    padding: 2rem;
    background: var(--deep-earth);
    color: var(--sand);
    text-align: center;
}

.not-found main {
    display: grid;
    gap: 1rem;
}

.not-found-code {
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.not-found h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
}

.not-found a {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 769px) and (max-width: 1100px) {
    .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1101px) and (max-width: 1249px) {
    .timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1250px) {
    .timeline {
        display: flex;
        flex-wrap: wrap;
    }

    .timeline-item {
        flex: 1 1 calc(25% - 0.5625rem);
        max-width: calc(33.333% - 0.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
