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

:root {
    --bg: #0a0a0f;
    --bg-light: #12121a;
    --accent: #4361ee;
    --accent-glow: rgba(67, 97, 238, 0.15);
    --text: #ffffff;
    --text-muted: #8a8a9a;
    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
}

/* ── Button ── */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}

.btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 24px rgba(67, 97, 238, 0.4), 0 0 40px rgba(67, 97, 238, 0.15);
}

.btn-nav {
    padding: 10px 24px;
    font-size: 0.85rem;
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ── Hero ── */
.hero {
    padding: 110px 40px 50px;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    white-space: nowrap;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.7;
}

.hero-text strong {
    color: var(--accent);
    font-weight: 500;
}

.hero-image {
    flex: 0 0 380px;
}

.hero-image img {
    width: 100%;
    object-fit: contain;
    object-position: center bottom;
    max-height: 600px;
    filter: drop-shadow(0 0 30px rgba(67,97,238,0.3));
}

/* ── Stats ── */
.stats {
    padding: 40px 40px;
}

.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--accent);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Building Now ── */
.building-now {
    padding: 58px 40px;
}

.building-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.building-text {
    flex: 1;
}

.building-text h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
}

.metrux-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.metrux-pitch {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
}

.building-image {
    flex: 0 0 340px;
}

.building-image img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* ── Career ── */
.career {
    padding: 50px 40px;
}

.career h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.career-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background: var(--bg-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(67, 97, 238, 0.3);
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 1;
    transition: opacity 0.2s;
}

.card:hover .card-accent {
    opacity: 1;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.card-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── About ── */
.about {
    padding: 50px 40px;
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 0 0 320px;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    object-position: center top;
    aspect-ratio: 1 / 1;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 540px;
}

.education {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

/* ── Press & Media ── */
.press { padding: 60px 0; overflow: hidden; }
.press-inner { max-width: 1100px; margin: 0 auto 32px; padding: 0 5%; }
.section-label { font-size: 0.75rem; letter-spacing: 0.15em; color: #4361ee; text-transform: uppercase; margin-bottom: 0; }
.press-track-wrapper { overflow: hidden; position: relative; }
.press-track-wrapper::before,
.press-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.press-track-wrapper::before { left: 0; background: linear-gradient(to right, #0a0a0f, transparent); }
.press-track-wrapper::after  { right: 0; background: linear-gradient(to left, #0a0a0f, transparent); }
.press-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: pressScroll 30s linear infinite;
    padding: 10px 20px;
}
.press-track:hover { animation-play-state: paused; }
@keyframes pressScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.press-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    min-width: 280px;
    max-width: 280px;
    background: #12121a;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: border-color 0.3s, transform 0.3s;
    flex-shrink: 0;
}
.press-item:hover { border-color: #4361ee; transform: translateY(-4px); }
.press-outlet { font-size: 0.85rem; font-weight: 700; color: #4361ee; text-transform: uppercase; letter-spacing: 0.08em; }
.press-title { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.4; }

/* ── Footer ── */
footer {
    padding: 50px 40px 30px;
    text-align: center;
}

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

footer h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-links a {
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Floaters ── */
.floaters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floater {
    position: absolute;
    animation: floater-bob ease-in-out infinite alternate;
}

.floater-1 {
    top: 12%;
    right: 6%;
    opacity: 0.18;
    transform: rotate(15deg);
    animation-duration: 5s;
    animation-delay: 0s;
}

.floater-2 {
    top: 32%;
    left: 4%;
    opacity: 0.14;
    transform: rotate(-12deg);
    animation-duration: 4s;
    animation-delay: 1.2s;
}

.floater-3 {
    top: 48%;
    right: 5%;
    opacity: 0.2;
    transform: rotate(20deg);
    animation-duration: 6s;
    animation-delay: 0.5s;
}

.floater-4 {
    top: 62%;
    left: 6%;
    opacity: 0.16;
    transform: rotate(-18deg);
    animation-duration: 3.5s;
    animation-delay: 2s;
}

.floater-5 {
    top: 76%;
    right: 7%;
    opacity: 0.15;
    transform: rotate(25deg);
    animation-duration: 7s;
    animation-delay: 0.8s;
}

.floater-6 {
    top: 88%;
    left: 5%;
    opacity: 0.12;
    transform: rotate(-10deg);
    animation-duration: 5.5s;
    animation-delay: 1.5s;
}

@keyframes floater-bob {
    0%   { translate: 0 0; }
    100% { translate: 0 -15px; }
}

/* ── Hero background text ── */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg-text {
    position: absolute;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20vw;
    line-height: 1;
    color: var(--text);
    opacity: 0.025;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.hero-bg-grow {
    top: 5%;
    left: -3%;
}

.hero-bg-build {
    bottom: -5%;
    right: -3%;
}

/* ── Gradient dividers ── */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
    margin: 0;
}

/* ── Cycling word ── */
#cycling-word {
    display: inline-block;
    color: #4361ee;
    position: relative;
    text-align: left;
}

#cycling-word + span {
    color: white !important;
}

.word-exit {
    animation: wordExit 0.4s ease-in forwards;
}

.word-enter {
    animation: wordEnter 0.4s ease-out forwards;
}

@keyframes wordExit {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-30px); }
}

@keyframes wordEnter {
    0%   { opacity: 1; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ── Animations ── */

/* Hero entrance — CSS only */
.hero-text {
    opacity: 1;
    transform: translateX(-30px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.hero-image {
    opacity: 1;
    transform: translateX(30px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.hero-text.animate-in,
.hero-image.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Section fade-up */
.fade-up {
    opacity: 1;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.fade-exit {
    opacity: 0.3;
    transform: translateY(20px);
    transition: opacity 0.4s ease-in, transform 0.4s ease-in;
}

/* Stats auto-reveal — pure CSS */
.stat {
    opacity: 1;
    transform: translateY(25px);
    animation: sectionReveal 0.6s ease forwards;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }
.stat:nth-child(4) { animation-delay: 0.4s; }

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

/* Building section auto-reveal */
.building-text, .building-image {
    opacity: 1;
    transform: translateY(25px);
    animation: sectionReveal 0.7s ease forwards;
}

.building-text { animation-delay: 0.1s; }
.building-image { animation-delay: 0.25s; }

/* Nav scroll state */
nav {
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-bottom-color 0.4s ease;
}

nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* ── Mobile ── */
@media (max-width: 900px) {
    .floaters {
        display: none;
    }

    .hero-bg-text {
        display: none;
    }

    .hero-inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto;
    }

    .hero-image {
        flex: none;
        width: 280px;
    }

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

    .building-inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .building-image {
        flex: none;
        width: 260px;
    }

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

    .about-inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .about-image {
        flex: none;
        width: 260px;
    }

    .about-text p {
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .nav-inner {
        padding: 16px 20px;
    }

    .hero {
        padding: 90px 20px 40px;
    }

    .stats,
    .building-now,
    .career,
    .about,
    footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-image {
        width: 220px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

/* ── Card entrance animation (must be last to override) ── */
.card {
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation: cardReveal 0.7s ease-out both;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.35s; }
@keyframes cardReveal {
    from { opacity: 1; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}