/* ===== Design Tokens (shared with /minecraft-plugins/, purple accent) ===== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #151d2e;
    --bg-card-hover: #1a2540;
    --bg-surface: rgba(255, 255, 255, 0.03);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #a259ff;
    --accent-2: #63b3ed;
    --accent-gradient: linear-gradient(135deg, #a259ff, #7c3aed);

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-default: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(162, 89, 255, 0.08);
    color: #c4a2ff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(162, 89, 255, 0.15);
}

/* ===== Header ===== */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-default);
}
#site-header.scrolled { background: rgba(10, 14, 23, 0.92); }
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.logo-accent { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
#main-nav { display: flex; gap: 6px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-surface); }
.nav-plugins { color: #68d391; }
.nav-plugins:hover { color: var(--text-primary); background: rgba(104, 211, 145, 0.08); }

/* ===== Hero ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 92vh;
    min-height: 92dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(162, 89, 255, 0.1), transparent);
}
.hero-content { max-width: 820px; }
.hero-logo { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: var(--radius-md); border: 2px solid var(--border-medium); box-shadow: 0 0 40px rgba(162, 89, 255, 0.2); }
.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(162, 89, 255, 0.08);
    border: 1px solid rgba(162, 89, 255, 0.25);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c4a2ff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    text-wrap: balance;
}
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-value { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font-mono); color: #c4a2ff; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.stat-divider { width: 1px; height: 30px; background: var(--border-medium); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-default);
    white-space: nowrap;
    font-family: var(--font-sans);
}
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(162, 89, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(162, 89, 255, 0.45); }
.btn-ghost {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); transform: translateY(-2px); }

/* ===== Section shell ===== */
section { position: relative; z-index: 1; }
.section-inner { max-width: 1100px; margin: 0 auto; padding: 90px 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .kicker {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c4a2ff;
    margin-bottom: 10px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    text-wrap: balance;
}
.section-header p { color: var(--text-secondary); font-size: 1.02rem; max-width: 560px; margin: 0 auto; }

/* ===== Features (asymmetric grid — two large, rest regular) ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}
.feature-card {
    grid-column: span 3;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-default);
}
.feature-card:hover { border-color: var(--border-medium); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card.wide .feature-icon { flex-shrink: 0; }
/* Equal specificity with .wide below (two classes vs. one class + one pseudo-class), so order
   matters here — this must come before .wide's own span:6 or a wide card at position 4+ would
   get shrunk back down to span:2 by this rule instead. */
.feature-card:nth-child(n+4) { grid-column: span 2; }
.feature-card.wide { grid-column: span 6; display: flex; align-items: center; gap: 28px; }
.feature-icon {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    background: rgba(162, 89, 255, 0.1);
    border: 1px solid rgba(162, 89, 255, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.feature-card.wide .feature-icon { margin-bottom: 0; width: 60px; height: 60px; font-size: 1.8rem; }
.feature-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-desc { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== Setup steps ===== */
#setup { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.setup-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.steps-list { display: flex; flex-direction: column; gap: 4px; }
.step {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.step:last-child { border-bottom: none; }
.step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(162, 89, 255, 0.1);
    border: 1px solid rgba(162, 89, 255, 0.25);
    color: #c4a2ff;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; padding-top: 4px; }
.step-text code { font-size: 0.85em; }

.config-block {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre;
}
.config-block .cf-key { color: #c4a2ff; }
.config-block .cf-str { color: #68d391; }
.config-block .cf-comment { color: var(--text-muted); }

/* ===== Console commands ===== */
/* Table rows like "tunnel playit <claim|status|unlink>" have a real minimum content width —
   auto table layout will grow past 100% of the container to fit them rather than wrap, which
   on a narrow phone pushed the whole page into horizontal scroll. Contain that overflow to the
   table itself instead, same pattern as .config-block's own overflow-x:auto below. */
.commands-table-wrap { overflow-x: auto; }
.commands-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.commands-table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.commands-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.commands-table td:first-child { font-family: var(--font-mono); font-size: 0.8rem; color: #c4a2ff; white-space: nowrap; }

/* ===== Compatibility strip ===== */
#compatibility { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.compat-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.compat-item {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-default);
}
.compat-item:hover { border-color: var(--border-medium); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.compat-icon { font-size: 1.3rem; }
.compat-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }

/* ===== Cross-link to plugins ===== */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: all var(--transition-default);
}
.related-card:hover { border-color: var(--border-medium); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.related-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Footer ===== */
#site-footer { padding: 48px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--transition-fast); font-weight: 500; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .features-grid { grid-template-columns: 1fr 1fr; }
    .feature-card { grid-column: span 1 !important; }
    .feature-card.wide { grid-column: span 2 !important; flex-direction: column; text-align: center; }
    .setup-layout { grid-template-columns: 1fr; gap: 32px; }
    .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .section-inner { padding: 64px 20px; }
}
