@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* variables */
:root {
    --bg:            #ffffff;
    --bg-off:        #f7f7f7;
    --text-primary:  #222222;
    --text-secondary:#444444;
    --text-muted:    #888888;
    --accent:        #27D3F5;
    --border:        #e0e0e0;
    --border-dark:   #444444;
    --font:          'Poppins', sans-serif;
    --r-sm:          4px;
    --r-md:          8px;
    --r-lg:          14px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-secondary);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: white; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* nav */
.nav {
    height: 72px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

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

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--r-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-links li a:hover {
    color: var(--text-primary);
    background: var(--bg-off);
}

.nav-links li a.nav-cta {
    background: var(--text-primary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--r-sm);
    font-weight: 600;
    transition: background 0.2s;
}

.nav-links li a.nav-cta:hover {
    background: var(--accent);
    color: white;
}

/* mobile menu */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-primary);
    border-radius: var(--r-sm);
    transition: background 0.15s;
}

.mobile-menu-btn:hover { background: var(--bg-off); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
    z-index: 150;
    padding: 8px 0 12px;
    animation: menuIn 0.18s ease;
}

.mobile-menu.open { display: block; }

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

.mobile-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.mobile-menu a:hover {
    background: var(--bg-off);
    color: var(--text-primary);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* hero */
.hero-section {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 72px);
}

.hero-badge {
    display: inline-block;
    background: var(--bg-off);
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.hero-tag {
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-des {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-form { margin-bottom: 12px; }

.hero-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.hero-input {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.hero-input:focus { border-color: var(--accent); }

.hero-btn,
.hero-btn-link {
    display: inline-block;
    padding: 12px 26px;
    background: var(--text-primary);
    color: white;
    border: 2px solid var(--text-primary);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
    white-space: nowrap;
    text-decoration: none;
}

.hero-btn:hover,
.hero-btn-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.hero-form-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.hero-success {
    display: none;
    align-items: center;
    gap: 10px;
    background: #f0faf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-success.show { display: flex; }

.code-block {
    background: #0d0f1a;
    border-radius: 12px;
    padding: 28px 32px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 13.5px;
    line-height: 2;
    color: #e2e8f0;
    border: 1px solid #1e2130;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.code-comment { color: #4b5268; }
.code-keyword { color: #c084fc; }
.code-string  { color: #86efac; }
.code-fn      { color: #67e8f9; }

.scroll-indicator {
    display: flex;
    justify-content: center;
    padding: 16px 0 32px;
    grid-column: 1 / -1;
}

.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--border-dark);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.scroll-mouse:hover { opacity: 0.7; }

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 2px;
    animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%   { transform: translateY(0);    opacity: 1; }
    60%  { transform: translateY(10px); opacity: 0; }
    61%  { transform: translateY(0);    opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* stats */
.stats-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-off);
    padding: 48px 0;
}

.stats-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-item span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* how it works */
.how-section { padding: 96px 0; }

.how-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.how-step { padding: 40px 36px; }

.how-step:not(:last-child) { border-right: 1px solid var(--border); }

.how-number {
    font-size: 52px;
    font-weight: 900;
    color: var(--text-secondary);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    opacity: 0.15;
}

.how-step h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.how-step p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.75;
}

.how-step code {
    background: var(--bg-off);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* relay */
.relay-section {
    padding: 96px 0;
    border-top: 1px solid var(--border);
}

.relay-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.relay-text p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.relay-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.relay-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.relay-list li svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.relay-diagram {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.relay-node {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.relay-node:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(39,211,245,0.08);
}

.relay-node--gameserver { border-color: var(--border-dark); }
.relay-node--nopternal  { border-color: var(--accent); }

.relay-node-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-off);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.relay-node--nopternal .relay-node-icon {
    background: #f0feff;
    border-color: var(--accent);
    color: var(--accent);
}

.relay-node-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.relay-node-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 1px;
}

.relay-arrow {
    position: relative;
    height: 44px;
}

.relay-arrow-line {
    position: absolute;
    left: 58%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: var(--border-dark);
}

.relay-arrow-line::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--border-dark);
}

.relay-arrow-label {
    position: absolute;
    left: calc(58% + 14px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}

/* features */
.features-section {
    background: var(--bg-off);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 96px 0;
}

.features-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.feature-card {
    background: white;
    padding: 32px 28px;
    transition: background 0.2s;
}

.feature-card:hover { background: #fffafa; }

.feature-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-off);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

.feature-card code {
    background: var(--bg-off);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* compat strip */
.compat-strip {
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
}

.compat-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.compat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.compat-engines {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compat-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-off);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* waitlist */
.cta-section {
    padding: 96px 0;
    text-align: center;
}

.cta-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px;
}

.cta-inner h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.cta-inner p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.cta-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cta-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    background: white;
    text-align: left;
}

.cta-input:focus { border-color: var(--accent); }

.cta-btn {
    width: 100%;
    padding: 13px;
    background: var(--text-primary);
    color: white;
    border: 2px solid var(--text-primary);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
}

.cta-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.cta-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f0faf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 14px 20px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.cta-success.show { display: flex; }

.tally-wrap {
    width: 100%;
    margin-bottom: 12px;
}

.cta-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0 !important;
}

/* footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    background: white;
    margin-top: auto;
}

.footer-inner {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-brand {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 15px;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* responsive */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 60px 0;
    }

    .hero-right { display: none; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }

    .how-grid { grid-template-columns: 1fr; }
    .how-step:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .relay-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero-section { padding: 40px 0 60px; }
    .hero-tag { font-size: 2.2rem; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero-form-row { flex-direction: column; }
    .hero-btn { width: 100%; }
}
