/* ============================================================
   sections.css — homepage layout
   ============================================================ */

/* Base section spacing */
.section {
    padding: 5rem 0;
    width: 100%;
}
@media (max-width: 768px) {
    .section { padding: 3rem 0; }
}

/* ========== HERO ========== */
.hero {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
    background: radial-gradient(ellipse 800px 600px at 50% -200px, rgba(139,92,246,0.2), transparent 70%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.hero-content {
    min-width: 0;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 1.25rem 0 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 540px;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green);
}
.status-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }

/* ========== HERO TERMINAL — CONTAINED ========== */
.hero-terminal-wrap {
    min-width: 0;
    width: 100%;
}

.hero-terminal {
    background: #0c0c22;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 60px rgba(139,92,246,0.15);
    width: 100%;
    max-width: 100%;
}

.term-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.red    { background: #ff5f57; }
.term-dot.yellow { background: #febc2e; }
.term-dot.green  { background: #28c840; }
.term-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.term-body {
    padding: 16px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #cdd6f4;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: pre;
    max-height: 380px;
    min-height: 320px;
}

.t-prompt { color: var(--purple-3); font-weight: 600; }
.t-ok     { color: var(--green); }
.t-err    { color: var(--red); }
.t-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #cdd6f4;
    vertical-align: middle;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
    .term-body {
        font-size: 0.7rem;
        padding: 12px 14px;
        min-height: 240px;
        max-height: 300px;
    }
}

/* ========== SECTION HEADER ========== */
.section-header {
    margin-bottom: 3rem;
}
.section-header.text-center {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== CROSSLINK TABS ========== */
.crosslink-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}
.crosslink-tab {
    display: block;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.crosslink-tab:hover {
    border-color: var(--purple-3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 40px rgba(139,92,246,0.1);
}
.cl-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}
.cl-head h3 { margin-bottom: 0; }
.cl-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.cl-icon.cl-purple { background: rgba(139,92,246,0.12); color: var(--purple-3); }
.cl-icon.cl-cyan   { background: rgba(34,211,238,0.12);  color: var(--cyan); }
.cl-icon svg { width: 24px; height: 24px; }
.crosslink-tab h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.crosslink-tab p  { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
.cl-cta { color: var(--purple-3); font-weight: 600; font-size: 0.9rem; }

/* ========== FEATURES ========== */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}
.features-grid .feature-card {
    flex: 0 1 calc(33.333% - 1.5rem);
    min-width: 260px;
    box-sizing: border-box;
}
.feature-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
/* Icon + title side by side */
.feature-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}
.feature-head h3 { margin-bottom: 0; }
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.feature-purple { background: rgba(139,92,246,0.12); color: var(--purple-3); }
.feature-icon.feature-cyan   { background: rgba(34,211,238,0.12);  color: var(--cyan); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; }
.feature-card p  { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; margin: 0; }

/* ========== DATACENTERS ========== */
.dc-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.dc-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.dc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.dc-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--purple-3);
    letter-spacing: 0.04em;
}
.dc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.dot-green, .dot-orange, .dot-red {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.dot-green { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.dot-orange{ background: #f59e0b; }
.dot-red   { background: var(--red); }

.dc-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.dc-country {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.dc-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ========== CTA BOX ========== */
.cta-box {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(34,211,238,0.08));
    border: 1px solid var(--border-strong);
    border-radius: 16px;
}
.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== CATEGORY TABS ========== */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}
.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}
.category-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.category-tab.active {
    background: var(--gradient-purple);
    color: #fff;
    border-color: transparent;
}

/* ========== GRID ========== */
.grid {
    display: grid;
    gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
