/* ═══════════════════════════════════════════════════════════════
   Design tokens
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg:            #fafafa;
    --bg-2:          #f4f4f5;
    --surface:       #ffffff;
    --border:        rgba(0,0,0,0.07);
    --border-strong: rgba(0,0,0,0.13);
    --text:          #09090b;
    --text-2:        #52525b;
    --text-3:        #a1a1aa;
    --accent:        #3b82f6;
    --radius:        12px;
    --nav-h:         60px;
}
html.dark {
    --bg:            #09090b;
    --bg-2:          #101012;
    --surface:       #141417;
    --border:        rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.11);
    --text:          #fafafa;
    --text-2:        #a1a1aa;
    --text-3:        #3f3f46;
}

/* ═══════════════════════════════════════════════════════════════
   js-anim initial states (gated — visible without JS)
   ═══════════════════════════════════════════════════════════════ */
html.js-anim .nav-header,
html.js-anim .hero-tag,
html.js-anim .line-1,
html.js-anim .line-2,
html.js-anim .hero-footer,
html.js-anim .bridge-inner,
html.js-anim .founder-visual,
html.js-anim .founder-meta,
html.js-anim .founder-name,
html.js-anim .founder-bio,
html.js-anim .founder-email,
html.js-anim .members-hd,
html.js-anim .member-wall-card,
html.js-anim .join-headline,
html.js-anim .join-form,
html.js-anim .projects-hd,
html.js-anim .project-card { opacity: 0; }

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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2 { font-family: 'Orbitron', monospace; line-height: 1.0; letter-spacing: -0.025em; }
h3      { font-family: 'Inter', system-ui, sans-serif; font-weight: 600; }
a       { color: inherit; text-decoration: none; }
img     { display: block; }

/* ═══════════════════════════════════════════════════════════════
   Scroll progress line (top of viewport)
   ═══════════════════════════════════════════════════════════════ */
.scroll-track {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    z-index: 200;
}
.scroll-progress {
    height: 100%;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.05s linear;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════════ */
.nav-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
html.dark .nav-header.scrolled {
    background-color: rgba(9,9,11,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}
html:not(.dark) .nav-header.scrolled {
    background-color: rgba(250,250,250,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}

.nav-container {
    max-width: 1280px; margin: 0 auto; padding: 0 2rem;
    height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav-logo img { width: 90px; cursor: pointer; transition: opacity 200ms ease; }
.nav-logo:hover img { opacity: 0.7; }

.nav-links { display: flex; align-items: center; gap: 0.125rem; list-style: none; }
.nav-links li a {
    display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-2);
    padding: 0.45rem 0.7rem; border-radius: 7px;
    transition: color 180ms ease, background-color 180ms ease; cursor: pointer;
}
.nav-links li a:hover { color: var(--text); background-color: var(--surface); }

.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; min-height: 34px; border-radius: 7px;
    border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
    cursor: pointer; transition: color 180ms ease, background-color 180ms ease;
}
.theme-toggle:hover { color: var(--text); background-color: var(--surface); }
.theme-toggle svg { pointer-events: none; }

.hamburger {
    display: none; flex-direction: column; justify-content: space-between;
    width: 22px; height: 15px; background: none; border: none; cursor: pointer; padding: 0; z-index: 200;
}
.hamburger span {
    display: block; width: 100%; height: 1.5px; background-color: var(--text-2);
    border-radius: 2px; transition: all 280ms ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════
   Shared label
   ═══════════════════════════════════════════════════════════════ */
.section-label {
    display: inline-block;
    font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 0.625rem;
}

/* ═══════════════════════════════════════════════════════════════
   1. HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: stretch;
    padding-top: var(--nav-h); overflow: hidden;
    background-color: var(--bg);
}

.hero-inner {
    position: relative; z-index: 2;
    width: 100%; max-width: 1280px; margin: 0 auto;
    padding: 5rem 2rem 3.5rem;
    display: flex; flex-direction: column;
}

.hero-tag {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; font-weight: 500; color: var(--text-2);
    border: 1px solid var(--border-strong); border-radius: 100px;
    padding: 0.3rem 0.875rem; width: fit-content; margin-bottom: 3rem;
}
.badge-dot {
    width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #22c55e;
    animation: badge-pulse 2.5s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.35); }
    50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 9.5rem);
    font-weight: 900; color: var(--text);
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    gap: 0.1em;
}
.title-line { display: block; }

.hero-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    padding-top: 3rem; gap: 2rem; flex-wrap: wrap;
}

.hero-socials { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hero-socials a {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.875rem; font-weight: 500; color: var(--text-3);
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.hero-socials a:hover { color: var(--text-2); border-color: var(--border-strong); background-color: var(--surface); }
.hero-socials a svg { flex-shrink: 0; }

.scroll-hint {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.8125rem; font-weight: 500; color: var(--text-3);
    transition: color 200ms ease; cursor: pointer; white-space: nowrap;
}
.scroll-hint:hover { color: var(--text-2); }
.scroll-arrow { animation: scroll-bounce 1.8s ease-in-out infinite; }
@keyframes scroll-bounce {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/* dot grid */
.hero-grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, var(--border-strong) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 65% 90% at 80% 50%, black 15%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 65% 90% at 80% 50%, black 15%, transparent 70%);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   2. INTRO — word reveal
   ═══════════════════════════════════════════════════════════════ */
.intro-section {
    min-height: 100vh; background-color: var(--bg-2);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 2rem;
}
.intro-inner { max-width: 860px; margin: 0 auto; }
.intro-body {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 500; line-height: 1.65; color: var(--text);
    text-align: center;
}
.intro-body .w { display: inline; opacity: 0.12; }

/* ═══════════════════════════════════════════════════════════════
   3. FOUNDERS BRIDGE
   ═══════════════════════════════════════════════════════════════ */
.founders-bridge {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 7rem 2rem 5rem;
}
.bridge-inner {
    max-width: 1280px; margin: 0 auto; text-align: center;
}
.bridge-title {
    font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; color: var(--text);
    margin-bottom: 1rem;
}
.bridge-sub { font-size: 1rem; color: var(--text-2); }

/* ═══════════════════════════════════════════════════════════════
   4. FOUNDER SECTIONS (each 100vh, split layout)
   ═══════════════════════════════════════════════════════════════ */
.founder-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "content visual";
    border-bottom: 1px solid var(--border);
    background-color: var(--bg);
}
.founder-section.is-reversed {
    grid-template-areas: "visual content";
    background-color: var(--bg-2);
}

.founder-content {
    grid-area: content;
    display: flex; flex-direction: column; justify-content: center;
    padding: 6rem 5rem;
}
.founder-visual {
    grid-area: visual;
    overflow: hidden; position: relative;
    background-color: var(--surface);
    min-height: 50vh;
}
.founder-visual img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    display: block;
}

.founder-meta {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.founder-index {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--text-3);
}
.founder-badge {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent);
    border: 1px solid rgba(59,130,246,0.3); border-radius: 4px;
    padding: 0.25rem 0.6rem;
}

.founder-name {
    font-size: clamp(2.75rem, 4.5vw, 4.5rem);
    font-weight: 900; color: var(--text);
    margin-bottom: 1.75rem; letter-spacing: -0.03em;
    line-height: 0.95;
}

.founder-bio {
    font-size: 1rem; color: var(--text-2); line-height: 1.8;
    margin-bottom: 2.25rem; max-width: 380px;
}

.founder-email {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 0.875rem; font-weight: 500; color: var(--text-3);
    transition: color 200ms ease;
}
.founder-email:hover { color: var(--accent); }
.founder-email svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   5. MEMBERS WALL
   ═══════════════════════════════════════════════════════════════ */
.members-section {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}
.members-inner {
    max-width: 1280px; margin: 0 auto; padding: 7rem 2rem;
}
.members-hd { margin-bottom: 3rem; }
.members-title {
    font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; color: var(--text);
}

/* Grid wall — 1px gaps become borders via background-color trick */
.members-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--border-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
}

.member-wall-card {
    background-color: var(--surface);
    padding: 2.25rem 1.5rem 2rem;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: background-color 250ms ease;
    cursor: default;
}
.member-wall-card:hover { background-color: var(--bg-2); }

.mwc-img {
    width: 88px; height: 88px; margin-bottom: 1rem; flex-shrink: 0;
}
.mwc-img img {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover; object-position: center top;
    border: 2px solid var(--border-strong);
}

.member-wall-card h3 {
    font-size: 0.9375rem; color: var(--text);
    margin-bottom: 0.375rem;
}
.mwc-email {
    font-size: 0.72rem; color: var(--text-3);
    transition: color 180ms ease; word-break: break-all;
}
.mwc-email:hover { color: var(--accent); }

/* ═════════════════════════════════════════════════════════════════
   6. PROJECTS
   ═════════════════════════════════════════════════════════════════ */
.projects-section {
    background-color: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.projects-inner {
    max-width: 1280px; margin: 0 auto; padding: 7rem 2rem;
}
.projects-hd { margin-bottom: 3rem; }
.projects-title {
    font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; color: var(--text);
}
.projects-sub {
    font-size: 1rem; color: var(--text-2); margin-top: 0.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* --- Project card --- */
.project-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 300ms ease, box-shadow 300ms ease;
}
.project-card:hover {
    border-color: rgba(59,130,246,0.25);
    box-shadow: 0 8px 40px rgba(59,130,246,0.06);
}

.project-img {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}
.project-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms ease;
}
.project-card:hover .project-img img {
    transform: scale(1.04);
}
.project-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, var(--surface) 100%);
    pointer-events: none;
}

.project-body {
    padding: 2.5rem 2.5rem 2.25rem;
    display: flex; flex-direction: column; justify-content: center;
}

.project-tag {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: #22c55e;
    margin-bottom: 1.25rem; width: fit-content;
}
.project-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    animation: badge-pulse 2.5s ease-in-out infinite;
}

.project-name {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 900; color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.875rem;
}

.project-desc {
    font-size: 0.9375rem; color: var(--text-2);
    line-height: 1.75; max-width: 420px;
    margin-bottom: 2rem;
}

.project-links {
    display: flex; gap: 0.625rem; flex-wrap: wrap;
}
.project-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; font-weight: 500; color: var(--text-2);
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--border-strong); border-radius: 8px;
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.project-link:hover {
    color: var(--text); border-color: var(--text-3);
    background-color: var(--bg-2);
}
.project-link svg { flex-shrink: 0; }

.project-link--primary {
    background-color: var(--text); color: var(--bg);
    border-color: var(--text);
}
.project-link--primary:hover {
    opacity: 0.85; background-color: var(--text); color: var(--bg);
    border-color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   6. JOIN
   ═══════════════════════════════════════════════════════════════ */
.join-section {
    min-height: 100vh; background-color: var(--bg-2);
    border-top: 1px solid var(--border);
    display: flex; align-items: center;
}
.join-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 7rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    width: 100%;
}

.join-headline h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900;
    color: var(--text); margin-bottom: 1.25rem; line-height: 1.0;
}
.join-headline p {
    font-size: 1rem; color: var(--text-2); line-height: 1.75;
}

.field-group {
    display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1.125rem;
}
.field-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-2); }
.field-group input,
.field-group textarea {
    padding: 0.6rem 0.875rem;
    background-color: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 8px; color: var(--text); font-size: 0.9375rem;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none; resize: vertical;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field-group input:focus,
.field-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--text-3); }

.btn-submit {
    display: inline-flex; align-items: center;
    margin-top: 0.375rem; padding: 0.7rem 1.5rem;
    background-color: var(--text); color: var(--bg);
    font-size: 0.9375rem; font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    border: none; border-radius: 8px; cursor: pointer;
    transition: opacity 200ms ease;
}
.btn-submit:hover { opacity: 0.82; }

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */
.footer { border-top: 1px solid var(--border); background-color: var(--bg); }
.footer-inner {
    max-width: 1280px; margin: 0 auto; padding: 2.25rem 2rem;
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.footer-logo { width: 72px; }
.footer-inner p { font-size: 0.8125rem; color: var(--text-3); flex: 1; }
.footer-socials { display: flex; gap: 0.5rem; }
.footer-socials a {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; min-height: 36px; border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-3); cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.footer-socials a:hover { color: var(--text-2); border-color: var(--border-strong); background-color: var(--surface); }

/* ═══════════════════════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html.js-anim .nav-header, html.js-anim .hero-tag, html.js-anim .line-1, html.js-anim .line-2,
    html.js-anim .hero-footer, html.js-anim .bridge-inner, html.js-anim .founder-visual,
    html.js-anim .founder-meta, html.js-anim .founder-name, html.js-anim .founder-bio,
    html.js-anim .founder-email, html.js-anim .members-hd, html.js-anim .member-wall-card,
    html.js-anim .join-headline, html.js-anim .join-form,
    html.js-anim .projects-hd, html.js-anim .project-card { opacity: 1 !important; transform: none !important; }
    .intro-body .w { opacity: 1 !important; }
}

/* ═══════════════════════════════════════════════════════════════
   Responsive — 1024px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .founder-content { padding: 4rem 3rem; }
    .join-inner { grid-template-columns: 1fr; gap: 3rem; }
    .members-wall { grid-template-columns: repeat(3, 1fr); }
    .project-card { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 769px) {
    .project-card--image-right .project-img { order: 2; }
    .project-card--image-right .project-body { order: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   Responsive — 768px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none; position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background-color: var(--bg); border-bottom: 1px solid var(--border);
        padding: 0.75rem; z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links li a { padding: 0.7rem 0.875rem; }
    .nav-links li:last-child { padding: 0.375rem 0.875rem; }
    .theme-toggle { width: 100%; justify-content: flex-start; gap: 0.5rem; }
    .theme-toggle::after { content: "Toggle theme"; font-size: 0.875rem; font-weight: 500; }

    /* Founder sections: stack vertically on mobile */
    .founder-section,
    .founder-section.is-reversed {
        grid-template-columns: 1fr;
        grid-template-areas: "visual" "content";
        min-height: auto;
    }
    .founder-visual { min-height: 45vh; max-height: 55vh; }
    .founder-content { padding: 2.5rem 1.5rem 3rem; }
    .founder-name { font-size: clamp(2rem, 8vw, 3rem); }
    .founder-bio { max-width: none; }

    .members-wall { grid-template-columns: repeat(2, 1fr); }

    .join-inner { padding: 4.5rem 1.25rem; gap: 2.5rem; }
    .bridge-inner { padding: 0 1.25rem; }
    .founders-bridge { padding: 5rem 1.25rem 4rem; }

    .hero-inner { padding: 4rem 1.25rem 3rem; }
    .hero-tag { font-size: 0.72rem; }
    .hero-socials a span { display: none; }
    .hero-socials a { padding: 0.5rem 0.65rem; }

    .intro-section { padding: 5rem 1.25rem; }
    .members-inner { padding: 5rem 1.25rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }

    .project-card {
        grid-template-columns: 1fr;
    }
    .project-img { min-height: 200px; max-height: 240px; }
    .project-body { padding: 1.75rem 1.5rem 2rem; }
    .projects-inner { padding: 5rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════
   Responsive — 480px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .members-wall { grid-template-columns: repeat(2, 1fr); }
    .join-inner { grid-template-columns: 1fr; }
    .hero-title { font-size: clamp(2.75rem, 13vw, 4.5rem); }
    .intro-body { font-size: 1.35rem; }
}
