/* ==============================
   Threx — Coming Soon
   ============================== */

:root {
    --bg: #2F332F;
    --bg-light: #373B37;
    --bg-lighter: #3F433F;
    --accent: #244A17;
    --accent-mid: #2F6B1E;
    --accent-bright: #3A8025;
    --text: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.65);
    --text-dim: rgba(255, 255, 255, 0.35);

    --font-display: 'Syne', sans-serif;
    --font-body: 'Manrope', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset ---- */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---- Layers ---- */

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.noise {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
}

nav, section, footer, .section-divider {
    position: relative;
    z-index: 2;
}

/* ---- Navigation ---- */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

#nav.scrolled {
    background: rgba(47, 51, 47, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: text-shadow 0.3s ease;
}

.wordmark:hover {
    text-shadow: 0 0 24px rgba(47, 107, 30, 0.5);
}

.nav-cta {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.nav-cta:hover {
    color: var(--text);
    border-color: var(--accent-mid);
    background: rgba(36, 74, 23, 0.12);
}

/* ---- Hero ---- */

#hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 860px;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.75rem, 7vw, 5rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.75rem;
}

.hero-word {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeUp 0.9s var(--ease-out) forwards;
}

.hero-word:nth-child(1) { animation-delay: 0.15s; }
.hero-word:nth-child(2) { animation-delay: 0.45s; }
.hero-word:nth-child(3) { animation-delay: 0.75s; }

.hero-sub {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.005em;
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeUp 0.8s var(--ease-out) 1.15s forwards;
    max-width: 540px;
    margin: 0 auto;
}

/* Scroll indicator */

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.5s ease 2.2s forwards;
}

.scroll-line {
    width: 1px;
    height: 48px;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-bright), transparent);
    animation: scrollDrift 2.4s ease-in-out infinite;
}

/* ---- Section Divider ---- */

.section-divider {
    width: 48px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(to right, transparent, var(--accent-mid), transparent);
    opacity: 0.6;
}

/* ---- Pillars ---- */

#pillars {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pillar-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 16px;
    padding: 2.25rem;
    transition: all 0.45s var(--ease-out);
}

.pillar-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(47, 107, 30, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 74, 23, 0.15);
    border: 1px solid rgba(36, 74, 23, 0.2);
    border-radius: 11px;
    margin-bottom: 1.5rem;
    color: var(--accent-bright);
}

.pillar-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin-bottom: 0.625rem;
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* ---- Intrigue ---- */

#intrigue {
    padding: 7rem 2rem 8rem;
    text-align: center;
}

.intrigue-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1.45;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto;
    letter-spacing: -0.02em;
}

.accent-text {
    color: var(--text);
    background: linear-gradient(135deg, var(--text), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
}

/* ---- Signup ---- */

#signup {
    padding: 4rem 2rem 8rem;
    text-align: center;
}

.signup-content {
    max-width: 480px;
    margin: 0 auto;
}

.signup-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.625rem;
}

.signup-sub {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 0.625rem;
}

.form-row input {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-row input::placeholder {
    color: var(--text-dim);
}

.form-row input:focus {
    border-color: var(--accent-mid);
    box-shadow: 0 0 0 3px rgba(36, 74, 23, 0.15);
}

.form-row button {
    position: relative;
    background: var(--accent);
    color: var(--text);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.625rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.005em;
}

.form-row button:hover {
    background: var(--accent-mid);
    box-shadow: 0 0 24px rgba(36, 74, 23, 0.35);
}

.form-row button:active {
    transform: scale(0.97);
}

/* Button states */
.btn-spinner {
    display: none;
    animation: spin 0.8s linear infinite;
}

.form-row button.loading .btn-text { display: none; }
.form-row button.loading .btn-spinner { display: inline-block; }
.form-row button.loading { pointer-events: none; padding: 0.875rem 1.5rem; }

/* Success */
.form-success p {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--accent-bright);
    padding: 1rem 0;
    letter-spacing: -0.01em;
}

/* ---- Footer ---- */

footer {
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dim);
    letter-spacing: -0.03em;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* ---- Reveal Animation ---- */

[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger pillar cards */
.pillar-card[data-reveal]:nth-child(2) { transition-delay: 0.12s; }
.pillar-card[data-reveal]:nth-child(3) { transition-delay: 0.24s; }

/* ---- Keyframes ---- */

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollDrift {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pillar-card[data-reveal]:nth-child(3) {
        transition-delay: 0s;
    }
}

@media (max-width: 640px) {
    #nav {
        padding: 1rem 1.25rem;
    }

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

    .pillar-card[data-reveal]:nth-child(2),
    .pillar-card[data-reveal]:nth-child(3) {
        transition-delay: 0s;
    }

    #pillars {
        padding: 4rem 1.5rem;
    }

    #intrigue {
        padding: 5rem 1.5rem 6rem;
    }

    #signup {
        padding: 3rem 1.5rem 6rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row button {
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
    }
}

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