/* ========================================
   TUBUENCAMINO API LANDING — Custom Styles
   ======================================== */

:root {
    --deep-space: #050810;
    --night: #0a0f1a;
    --path-bg: #0c1b3a;
    --stats-bg: #0f2847;
    --primary: #1f5da6;
    --secondary: #facd01;
    --text: #f5f5f5;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --glass-bg: rgba(31, 93, 166, 0.12);
    --glass-border: rgba(250, 205, 1, 0.15);
    --glow-yellow: rgba(250, 205, 1, 0.4);
    --glow-blue: rgba(31, 93, 166, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    background: var(--deep-space);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Particles Background ---- */
#tsparticles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ---- Intro Veil ---- */
#intro-veil {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

#intro-veil.fade-out {
    opacity: 0;
    pointer-events: none;
}

#intro-veil .intro-dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--glow-yellow), 0 0 60px var(--glow-yellow);
}

#intro-veil .intro-text {
    margin-top: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-muted);
    letter-spacing: 0.05em;
    overflow: hidden;
}

#intro-veil .intro-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

#intro-veil .skip-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: none;
    border: 1px solid var(--text-subtle);
    color: var(--text-subtle);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

#intro-veil .skip-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ---- Sections Common ---- */
.landing-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.section-headline {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-sub {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    line-height: 1.7;
}

/* ---- HERO ---- */
#hero {
    background: radial-gradient(ellipse at 50% 40%, var(--night) 0%, var(--deep-space) 70%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-shell-watermark {
    position: absolute;
    width: clamp(300px, 50vw, 700px);
    height: clamp(300px, 50vw, 700px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.04;
    color: var(--primary);
    pointer-events: none;
}

.hero-logo {
    width: clamp(120px, 15vw, 200px);
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 800px;
}

.hero-headline .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--text-muted);
    text-align: center;
    opacity: 0;
    max-width: 600px;
}

.hero-arrow {
    margin-top: 3rem;
    color: var(--secondary);
    animation: arrow-bounce 2.5s ease-in-out infinite;
    opacity: 0;
}

.hero-arrow svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--glow-yellow));
}

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

/* ---- THE PATH ---- */
#the-path {
    background: linear-gradient(180deg, var(--deep-space) 0%, var(--path-bg) 30%, var(--path-bg) 70%, var(--stats-bg) 100%);
    min-height: 150vh;
    padding: 6rem 2rem;
    position: relative;
}

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

.path-svg-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
}

.path-svg-wrapper svg {
    width: 100%;
    height: 100%;
}

.path-line {
    stroke: var(--secondary);
    stroke-width: 3;
    fill: none;
    filter: drop-shadow(0 0 6px var(--glow-yellow));
}

.waypoints {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    padding: 4rem 0;
}

.waypoint {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    opacity: 0;
    transform: translateY(40px);
}

.waypoint:nth-child(odd) {
    flex-direction: row;
    padding-right: 55%;
}

.waypoint:nth-child(even) {
    flex-direction: row-reverse;
    padding-left: 55%;
}

/* ---- Waypoint Dot (improved with pulse ring) ---- */
.waypoint-dot {
    width: 16px;
    height: 16px;
    min-width: 16px;
    background: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--glow-yellow), 0 0 30px rgba(250, 205, 1, 0.2);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.waypoint-dot-ring {
    position: absolute;
    inset: -6px;
    border: 1.5px solid rgba(250, 205, 1, 0.3);
    border-radius: 50%;
    animation: dot-pulse 2.5s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.6); opacity: 0; }
}

/* ---- Waypoint Card (improved) ---- */
.waypoint-card {
    background: linear-gradient(135deg, rgba(31, 93, 166, 0.1) 0%, rgba(15, 40, 71, 0.4) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(250, 205, 1, 0.1);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    flex: 1;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.waypoint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(250, 205, 1, 0.3) 50%, transparent 100%);
}

.waypoint-card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), transparent);
    transition: width 0.6s ease;
}

.waypoint-card:hover .waypoint-card-accent {
    width: 100%;
}

.waypoint-card:hover {
    border-color: rgba(250, 205, 1, 0.25);
    box-shadow: 0 8px 40px rgba(250, 205, 1, 0.06), 0 0 0 1px rgba(250, 205, 1, 0.08);
    transform: translateY(-2px);
}

.waypoint-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(250, 205, 1, 0.08);
    border: 1px solid rgba(250, 205, 1, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.waypoint-card-content {
    flex: 1;
}

.waypoint-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.waypoint-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- STATS — Mojones del Camino ---- */
#stats {
    background: linear-gradient(180deg, var(--stats-bg) 0%, #0a1a30 100%);
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 950px;
    width: 100%;
    margin-top: 3rem;
}

.stat-mojon {
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    justify-content: center;
}

.mojon-body {
    width: 100%;
    max-width: 180px;
    background:
        /* Granite texture layers */
        radial-gradient(ellipse at 30% 20%, rgba(120, 130, 140, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(100, 110, 120, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(140, 145, 150, 0.05) 0%, transparent 60%),
        linear-gradient(175deg, #5a6270 0%, #3d4550 25%, #4a525e 50%, #363e48 75%, #2d343c 100%);
    border-radius: 8px 8px 4px 4px;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(80, 90, 100, 0.3);
}

/* Stone top bevel */
.mojon-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(180deg, rgba(150, 160, 170, 0.2) 0%, transparent 100%);
    border-radius: 8px 8px 0 0;
}

/* Blue tile inset with shell */
.mojon-tile {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    background: linear-gradient(145deg, #1a4a8a, #0d3470);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(30, 80, 150, 0.5);
    position: relative;
}

/* Ceramic glaze shine on tile */
.mojon-tile::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    right: 60%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
    border-radius: 3px;
}

.mojon-shell {
    width: 28px;
    height: 26px;
}

.mojon-number {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.35rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mojon-label {
    font-size: 0.75rem;
    color: rgba(200, 210, 220, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* Yellow directional arrow on stone */
.mojon-arrow {
    width: 22px;
    margin: 0 auto;
    opacity: 0.7;
}

.mojon-arrow svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* ---- CONSTELLATION ---- */
#constellation {
    background: radial-gradient(ellipse at 50% 50%, #080e1e 0%, var(--deep-space) 70%);
    position: relative;
    overflow: hidden;
}

#constellation-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.constellation-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px;
}

.features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    width: 100%;
}

.feature-block {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.feature-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: rgba(31, 93, 166, 0.08);
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* ---- CTA / SHELL ---- */
#cta {
    background: linear-gradient(180deg, var(--deep-space) 0%, #0a1628 100%);
    text-align: center;
}

.cta-shell {
    width: clamp(180px, 25vw, 320px);
    height: clamp(180px, 25vw, 320px);
    margin-bottom: 2.5rem;
    color: var(--secondary);
    opacity: 0;
}

.cta-shell svg {
    width: 100%;
    height: 100%;
}

.cta-shell .shell-path {
    stroke: var(--secondary);
    stroke-width: 1.5;
    fill: none;
}

.cta-headline {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.cta-body {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 580px;
    margin: 0 auto 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 700;
    padding: 0.9rem 2.25rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 var(--glow-yellow);
    animation: btn-glow 3s ease-in-out infinite;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--glow-yellow);
}

@keyframes btn-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(250, 205, 1, 0.2); }
    50% { box-shadow: 0 0 20px rgba(250, 205, 1, 0.4); }
}

/* ---- FOOTER ---- */
#landing-footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(250, 205, 1, 0.15);
    padding: 3rem 2rem;
    text-align: center;
    background: transparent;
}

.footer-logo {
    width: 100px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-bottom: 1rem;
}

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

.footer-links a {
    color: var(--text-subtle);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-row {
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .landing-section {
        padding: 3rem 1.25rem;
    }

    .waypoint:nth-child(odd),
    .waypoint:nth-child(even) {
        flex-direction: column;
        padding: 0 0 0 3rem;
        text-align: left;
    }

    .waypoint-card {
        flex-direction: column;
        gap: 1rem;
    }

    .waypoint-dot {
        left: 0;
        transform: none;
    }

    .path-svg-wrapper {
        left: 9px;
        transform: none;
    }

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

    .mojon-body {
        padding: 1.25rem 0.75rem 1rem;
    }

    .features-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-headline {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }
}

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

    .hero-arrow {
        animation: none;
    }

    .waypoint, .stat-mojon, .feature-block,
    .hero-headline .word, .hero-sub, .hero-logo,
    .hero-arrow, .cta-shell {
        opacity: 1 !important;
        transform: none !important;
    }
}
