/* =========================================
   Raíz Digital — Coming Soon
   ========================================= */

:root {
    --primary-dark: #1e4a5f;
    --primary-light: #2a6a7a;
    --accent-orange: #e89b3c;
    --teal: #3d8b8b;
    --light-blue: #7ec8e3;
    --bg-deep: #ffffff;
    --bg-underground: #0f2a30;
    --ground-color: #1a3a2a;
    --root-color: #c49a2a;
    --root-color-light: #e8b830;
    --text-primary: #1a2e38;
    --text-muted: #4a6a78;
    --font-stack: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background: #ffffff;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    position: relative;
    text-align: center;
}

main {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 1rem;
    flex: 1;
    margin: 0 auto;
}

/* ---- Floating Particles ---- */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0;
    animation: float-up 8s infinite ease-in;
}

.particle:nth-child(1)  { left: 8%;  animation-delay: 0s;    animation-duration: 9s;   background: var(--accent-orange); width: 4px; height: 4px; }
.particle:nth-child(2)  { left: 18%; animation-delay: 1.2s;  animation-duration: 7s; }
.particle:nth-child(3)  { left: 30%; animation-delay: 2.8s;  animation-duration: 10s;  background: var(--light-blue); width: 4px; height: 4px; }
.particle:nth-child(4)  { left: 42%; animation-delay: 0.6s;  animation-duration: 8s; }
.particle:nth-child(5)  { left: 55%; animation-delay: 3.5s;  animation-duration: 9s;   background: var(--accent-orange); }
.particle:nth-child(6)  { left: 68%; animation-delay: 1.8s;  animation-duration: 7.5s; }
.particle:nth-child(7)  { left: 82%; animation-delay: 4.2s;  animation-duration: 11s;  background: var(--light-blue); }
.particle:nth-child(8)  { left: 38%; animation-delay: 5s;    animation-duration: 8.5s; }
.particle:nth-child(9)  { left: 12%; animation-delay: 3s;    animation-duration: 10s;  background: var(--accent-orange); width: 4px; height: 4px; }
.particle:nth-child(10) { left: 50%; animation-delay: 6s;    animation-duration: 9s; }
.particle:nth-child(11) { left: 73%; animation-delay: 2s;    animation-duration: 8s;   background: var(--light-blue); }
.particle:nth-child(12) { left: 25%; animation-delay: 4.5s;  animation-duration: 7s; }
.particle:nth-child(13) { left: 60%; animation-delay: 1s;    animation-duration: 9.5s; background: var(--accent-orange); }
.particle:nth-child(14) { left: 90%; animation-delay: 3.2s;  animation-duration: 8s;   background: var(--light-blue); width: 4px; height: 4px; }
.particle:nth-child(15) { left: 5%;  animation-delay: 5.5s;  animation-duration: 10s; }
.particle:nth-child(16) { left: 78%; animation-delay: 0.3s;  animation-duration: 7s;   background: var(--accent-orange); }

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-20vh) scale(1);
        opacity: 0;
    }
}

/* ---- Logo ---- */
.logo-container {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    animation: fadeInDown 1.5s ease-out;
}

.logo {
    width: 200px;
    height: auto;
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 8px rgba(61, 139, 139, 0.3));
}

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

/* ---- Tree Scene ---- */
.tree-scene-wrap {
    width: 100vw;
    max-width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.tree-scene-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    bottom: 0;
    background: var(--bg-underground);
    z-index: 0;
}

.tree-scene {
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.tree-svg {
    width: 100%;
    height: auto;
    overflow: visible;
    display: block;
}

/* Underground soil zone */
.underground-fill {
    fill: var(--bg-underground);
    opacity: 0;
    animation: fadeIn 2.5s ease-out 0.3s forwards;
}

/* Ground line */
.ground-line-bg {
    stroke: rgba(61, 139, 139, 0.15);
    stroke-width: 1;
    opacity: 0;
    animation: fadeIn 2s ease-out 0.5s forwards;
}

.ground-line {
    stroke: url(#ground-line-glow);
    stroke-width: 2.5;
    opacity: 0;
    filter: url(#glow-ground);
    animation: fadeIn 2s ease-out 0.5s forwards;
}

/* Roots */
.root {
    fill: none;
    stroke: var(--root-color);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: growPath 3s ease-out forwards;
}

.root-main { stroke-width: 4; animation-delay: 0.8s; }
.root-left-1 { animation-delay: 1.2s; }
.root-left-2 { animation-delay: 1.5s; stroke-width: 2.2; }
.root-left-3 { animation-delay: 1.8s; stroke-width: 2; }
.root-left-4 { animation-delay: 2.1s; stroke-width: 1.8; }
.root-left-5 { animation-delay: 1.6s; stroke-width: 1.8; }
.root-left-6 { animation-delay: 2.0s; stroke-width: 1.5; }
.root-left-7 { animation-delay: 2.3s; stroke-width: 1.5; }
.root-right-1 { animation-delay: 1.3s; }
.root-right-2 { animation-delay: 1.6s; stroke-width: 2.2; }
.root-right-3 { animation-delay: 1.9s; stroke-width: 2; }
.root-right-4 { animation-delay: 2.2s; stroke-width: 1.8; }
.root-right-5 { animation-delay: 1.7s; stroke-width: 1.8; }
.root-right-6 { animation-delay: 2.1s; stroke-width: 1.5; }
.root-right-7 { animation-delay: 2.4s; stroke-width: 1.5; }

.root-node {
    fill: var(--root-color-light);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards, pulseRoot 4s ease-in-out infinite;
    animation-delay: 3s, 3.5s;
}

@keyframes pulseRoot {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Trunk */
.trunk-line {
    fill: none;
    stroke: var(--primary-dark);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: growPath 2s ease-out 1s forwards;
    filter: drop-shadow(0 0 4px rgba(30, 74, 95, 0.3));
}

/* Branches */
.branch {
    fill: none;
    stroke: var(--primary-dark);
    stroke-width: 2;
    stroke-linecap: square;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: growPath 2s ease-out forwards;
}

.branch-l1 { animation-delay: 2.0s; }
.branch-l2 { animation-delay: 2.2s; }
.branch-l3 { animation-delay: 2.4s; }
.branch-l4 { animation-delay: 2.6s; }
.branch-l5 { animation-delay: 2.8s; stroke-width: 1.5; }
.branch-l6 { animation-delay: 3.0s; stroke-width: 1.5; }
.branch-l7 { animation-delay: 3.2s; stroke-width: 1.3; }
.branch-l8 { animation-delay: 2.9s; stroke-width: 1.5; }
.branch-l9 { animation-delay: 3.4s; stroke-width: 1.2; }
.branch-l10 { animation-delay: 3.3s; stroke-width: 1.2; }

.branch-r1 { animation-delay: 2.1s; }
.branch-r2 { animation-delay: 2.3s; }
.branch-r3 { animation-delay: 2.5s; }
.branch-r4 { animation-delay: 2.7s; }
.branch-r5 { animation-delay: 2.9s; stroke-width: 1.5; }
.branch-r6 { animation-delay: 3.1s; stroke-width: 1.5; }
.branch-r7 { animation-delay: 3.3s; stroke-width: 1.3; }
.branch-r8 { animation-delay: 3.0s; stroke-width: 1.5; }
.branch-r9 { animation-delay: 3.5s; stroke-width: 1.2; }
.branch-r10 { animation-delay: 3.4s; stroke-width: 1.2; }

.branch-t1 { animation-delay: 2.3s; }
.branch-t2 { animation-delay: 3.0s; stroke-width: 1.5; }
.branch-t3 { animation-delay: 3.1s; stroke-width: 1.5; }
.branch-t4 { animation-delay: 3.3s; stroke-width: 1.3; }
.branch-t5 { animation-delay: 3.4s; stroke-width: 1.3; }

/* Glowing Nodes */
.node {
    opacity: 0;
    animation: nodeAppear 0.6s ease-out forwards, nodePulse 3s ease-in-out infinite;
}

.node-teal {
    fill: var(--teal);
    filter: url(#glow-teal);
    animation-delay: 3.5s, 4s;
}

.node-orange {
    fill: var(--accent-orange);
    filter: url(#glow-orange);
    animation-delay: 3.7s, 4.2s;
}

/* Stagger specific nodes for organic feel */
.nodes circle:nth-child(1)  { animation-delay: 3.4s, 4.0s; }
.nodes circle:nth-child(2)  { animation-delay: 3.6s, 4.3s; }
.nodes circle:nth-child(3)  { animation-delay: 3.5s, 4.1s; }
.nodes circle:nth-child(4)  { animation-delay: 3.8s, 4.5s; }
.nodes circle:nth-child(5)  { animation-delay: 4.0s, 4.6s; }
.nodes circle:nth-child(6)  { animation-delay: 3.5s, 4.2s; }
.nodes circle:nth-child(7)  { animation-delay: 3.7s, 4.4s; }
.nodes circle:nth-child(8)  { animation-delay: 3.6s, 4.0s; }
.nodes circle:nth-child(9)  { animation-delay: 3.9s, 4.3s; }
.nodes circle:nth-child(10) { animation-delay: 4.1s, 4.7s; }
.nodes circle:nth-child(11) { animation-delay: 3.4s, 4.0s; }
.nodes circle:nth-child(12) { animation-delay: 3.6s, 4.3s; }
.nodes circle:nth-child(13) { animation-delay: 3.5s, 4.1s; }
.nodes circle:nth-child(14) { animation-delay: 3.8s, 4.5s; }
.nodes circle:nth-child(15) { animation-delay: 4.0s, 4.6s; }
.nodes circle:nth-child(16) { animation-delay: 3.5s, 4.2s; }
.nodes circle:nth-child(17) { animation-delay: 3.7s, 4.4s; }
.nodes circle:nth-child(18) { animation-delay: 3.6s, 4.0s; }
.nodes circle:nth-child(19) { animation-delay: 3.9s, 4.3s; }
.nodes circle:nth-child(20) { animation-delay: 4.1s, 4.7s; }
.nodes circle:nth-child(21) { animation-delay: 3.3s, 3.9s; }
.nodes circle:nth-child(22) { animation-delay: 3.4s, 4.1s; }
.nodes circle:nth-child(23) { animation-delay: 3.6s, 4.2s; }
.nodes circle:nth-child(24) { animation-delay: 3.8s, 4.4s; }
.nodes circle:nth-child(25) { animation-delay: 3.9s, 4.5s; }
.nodes circle:nth-child(26) { animation-delay: 3.2s, 3.8s; }
.nodes circle:nth-child(27) { animation-delay: 3.5s, 4.0s; }
.nodes circle:nth-child(28) { animation-delay: 3.7s, 4.3s; }
.nodes circle:nth-child(29) { animation-delay: 3.4s, 4.1s; }
.nodes circle:nth-child(30) { animation-delay: 3.6s, 4.2s; }
.nodes circle:nth-child(31) { animation-delay: 3.3s, 3.9s; }

@keyframes growPath {
    to { stroke-dashoffset: 0; }
}

@keyframes nodeAppear {
    from { opacity: 0; r: 0; }
    to { opacity: 1; }
}

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- Teaser Text ---- */
.teaser {
    text-align: center;
    margin: 1.5rem 0 1rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 2s forwards;
}

.teaser-headline {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-shadow: none;
}

.teaser-tagline {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent-orange);
    min-height: 1.6em;
    transition: opacity 0.6s ease;
    letter-spacing: 0.02em;
    text-shadow: none;
}

.teaser-tagline.fade-out {
    opacity: 0;
}

.teaser-tagline.fade-in {
    opacity: 1;
}

/* ---- Coming Soon Banner ---- */
.coming-soon {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0 2rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 2.5s forwards;
}

.coming-soon-line {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--teal), transparent);
}

.coming-soon-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--primary-dark);
    white-space: nowrap;
    text-shadow: none;
}

/* ---- Email Signup ---- */
.signup {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 3s forwards;
}

.signup-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.signup-form {
    display: flex;
    gap: 0;
    max-width: 440px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.signup-input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    border: 1px solid rgba(30, 74, 95, 0.3);
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: #f5f8fa;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.signup-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.signup-input:focus {
    border-color: var(--teal);
    box-shadow: inset 0 0 0 1px var(--teal), 0 0 8px rgba(61, 139, 139, 0.15);
}

.signup-button {
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 0 6px 6px 0;
    background: var(--accent-orange);
    color: #fff;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.signup-button:hover {
    background: #d68a2e;
    box-shadow: 0 0 20px rgba(232, 155, 60, 0.5);
}

.signup-button:active {
    background: #c57a24;
}

/* ---- Footer ---- */
.footer {
    width: 100%;
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid rgba(30, 74, 95, 0.15);
    position: relative;
    z-index: 1;
}

.footer-contact {
    margin-bottom: 1rem;
}

.footer-contact a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--teal);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    margin-bottom: 1.2rem;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-social a:hover {
    color: var(--accent-orange);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(74, 106, 120, 0.6);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    main {
        padding: 1.5rem 1rem 1rem;
    }

    .logo {
        width: 160px;
    }

    .tree-scene {
        max-width: 100%;
    }

    .teaser-headline {
        font-size: 2.2rem;
    }

    .teaser-tagline {
        font-size: 1.2rem;
    }

    .signup-form {
        flex-direction: column;
        border-radius: 6px;
    }

    .signup-input {
        border-right: 1px solid rgba(30, 74, 95, 0.3);
        border-bottom: none;
        border-radius: 6px 6px 0 0;
    }

    .signup-button {
        border-radius: 0 0 6px 6px;
        padding: 0.85rem;
    }

    .coming-soon-line {
        width: 50px;
    }
}

@media (max-width: 380px) {
    .teaser-headline {
        font-size: 1.8rem;
    }

    .logo {
        width: 130px;
    }
}
