/* ============================================================
   ZEYATEK — INDEX (HOMEPAGE) STYLES
   Requires: shared.css loaded first
   ============================================================ */

/* ────────────────── HERO ────────────────── */
.hero {
    padding: clamp(120px, 8vw, 140px) 0 clamp(80px, 10vw, 140px);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 1; /* Establishes a local stacking context */
    overflow: hidden; /* Prevents overflow from the absolute glow */
}
.hero::after {
    content: '';
    position: absolute; /* FIXED: Changed from relative */
    top: -200px; right: -200px;
    width: 700px; height: 700px;
    background: radial-gradient(ellipse at center, rgba(0,71,179,0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1; /* Send behind content */
}

/* ── Neural canvas (particle layer) ── */
#neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* FIXED: Forces canvas strictly behind the hero content */
    pointer-events: none; /* canvas is visual-only; clicks fall through */
}

@media (max-width: 991px) {
    #neural-canvas { display: none; }
}

/* Ensure all direct hero children stack above the canvas */
.hero > *:not(#neural-canvas) {
    position: relative;
    z-index: 2; /* Elevated to ensure top-level stacking */
}
.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02px;
    color: var(--black);
    margin-bottom: 36px;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}
.hero h1 span { color: var(--blue); }
.hero p {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    color: var(--gray);
    max-width: 480px;
    margin-bottom: 48px;
    font-weight: 300;
    line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ────────────────── STATS ────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--line);
}
.stat {
    padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px);
    border-right: 1px solid var(--line);
    transition: background .25s ease;
    cursor: default;
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--off-white); }
.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2.6rem; font-weight: 800;
    line-height: 1; color: var(--black);
    margin-bottom: 6px;
    transition: color .25s ease;
}
.stat:hover .stat-num { color: var(--blue); }
.stat-lbl { font-size: 0.78rem; color: var(--gray); font-weight: 400; }

/* ────────────────── MANIFESTO (DARK) ────────────────── */
.manifesto {
    padding: var(--space-lg) 0;
    background: var(--black);
    position: relative;
    overflow: hidden;
}
.manifesto::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(0,71,179,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.manifesto h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.25;
    max-width: 960px;
    color: var(--white);
}
.manifesto h2 span { color: var(--blue); }
.manifesto-method {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line-dark);
    padding-top: 48px;
    gap: 1px;
}
.method-step { padding: 0 40px 0 0; }
.method-step:not(:last-child) { border-right: 1px solid var(--line-dark); padding-right: 40px; }
.method-step:not(:first-child) { padding-left: 40px; }
.method-num {
    font-family: 'Syne', sans-serif;
    font-size: 0.62rem; letter-spacing: 3px;
    text-transform: uppercase; color: var(--blue);
    margin-bottom: 12px; font-weight: 600;
}
.method-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    color: var(--white); margin-bottom: 8px;
}
.method-desc {
    font-size: .99rem; color: rgba(255,255,255,0.45);
    line-height: 1.65; font-weight: 300;
}

/* ────────────────── SERVICES / ADVISORY SECTIONS ────────────────── */
section.services,
section.advisory {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--line);
}
.section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: clamp(32px, 5vw, 56px); flex-wrap: wrap; gap: 20px;
}
.section-head h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700; color: var(--black);
}

/* ────────────────── BENTO RAIL ────────────────── */
.rail-wrapper { position: relative; margin: 0 52px; }
.rail-fade-right {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 80px;
    background: linear-gradient(to right, transparent, var(--white));
    pointer-events: none; z-index: 5;
    transition: opacity .3s ease;
}
.rail-fade-right.hidden { opacity: 0; }

.rail-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    background: var(--white); color: var(--black);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; font-size: 0.75rem;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.rail-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.left-btn { left: -52px; }
.right-btn { right: -52px; }
.rail-btn.hidden { opacity: 0; pointer-events: none; }

.bento-rail {
    display: flex; gap: 1px;
    overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
    scroll-behavior: smooth;
    border: 1px solid var(--line);
}
.bento-rail::-webkit-scrollbar { display: none; }

@media (scripting: none) {
    .bento-rail { flex-wrap: wrap; }
    .rail-btn { display: none; }
}

.bento-card {
    flex: 0 0 280px; min-height: 280px;
    padding: 32px 28px;
    background: var(--white);
    border-right: 1px solid var(--line);
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: background .25s ease;
    position: relative;
}
.bento-card:last-child { border-right: none; }
.bento-card:hover { background: var(--off-white); }
.bento-icon {
    font-size: 4.0rem; color: var(--black);
    margin-bottom: auto;
}
.bento-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    margin: 28px 0 5px; color: var(--black);
}
.bento-card p { font-size: 0.76rem; color: var(--gray-light); line-height: 1.5; }
.card-arrow {
    position: absolute; top: 28px; right: 28px;
    font-size: 0.7rem; color: var(--gray-light);
    opacity: 0; transition: opacity .2s ease, transform .25s ease;
}
.bento-card:hover .card-arrow { opacity: 1; transform: translate(2px, -2px); }

/* ────────────────── EXPERTISE (DARK) ────────────────── */
.expertise-section {
    padding: var(--space-lg) 0;
    background: var(--black);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 8vw, 100px);
    align-items: start;
}
.expertise-label {
    font-size: 0.62rem; letter-spacing: 3px; text-transform: uppercase;
    font-weight: 500; color: rgba(255,255,255,0.3); margin-bottom: 28px;
}
.expertise-text {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 400; line-height: 1.7;
    color: rgba(255,255,255,0.85);
}
.expertise-meta { margin-top: 56px; display: flex; flex-direction: column; gap: 24px; }
.meta-item { border-top: 1px solid var(--line-dark); padding-top: 20px; }
.meta-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem; font-weight: 800;
    color: var(--white); line-height: 1;
}
.meta-lbl { font-size: 0.76rem; color: rgba(255,255,255,0.4); margin-top: 4px; }

/* ────────────────── INSIGHTS TEASER ────────────────── */
.insights-section {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--line);
}
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border: 1px solid var(--line);
}
.insight-card {
    padding: 36px 32px;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    transition: background .25s ease;
    border-right: 1px solid var(--line);
}
.insight-card:last-child { border-right: none; }
.insight-card:hover { background: var(--off-white); }
.insight-tag {
    font-size: 0.62rem; letter-spacing: 2.5px;
    text-transform: uppercase; font-weight: 500;
    color: var(--blue); margin-bottom: 16px;
}
.insight-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem; font-weight: 700;
    line-height: 1.4; color: var(--black);
    margin-bottom: 12px; flex: 1;
}
.insight-meta {
    font-size: 0.75rem; color: var(--gray-light);
    margin-top: 24px; display: flex; align-items: center; gap: 8px;
}
.insight-meta::before {
    content: '';
    display: inline-block;
    width: 20px; height: 1px;
    background: var(--gray-light);
}

/* ────────────────── SUBSCRIBE STRIP ────────────────── */
.subscribe-strip {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 48px 0;
    background: var(--off-white);
}
.subscribe-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 32px; flex-wrap: wrap;
}
.subscribe-copy h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    color: var(--black); margin-bottom: 4px;
}
.subscribe-copy p { font-size: 0.82rem; color: var(--gray); }
.subscribe-form { display: flex; gap: 0; }
.subscribe-form input {
    padding: 11px 18px;
    font-size: 0.84rem; font-family: 'DM Sans', sans-serif;
    border: 1px solid rgba(0,0,0,0.18);
    border-right: none;
    background: var(--white); color: var(--black);
    outline: none; width: 260px;
    transition: border-color .2s ease;
}
.subscribe-form input::placeholder { color: var(--gray-light); }
.subscribe-form input:focus { border-color: var(--black); }
.subscribe-form button {
    padding: 11px 22px;
    background: var(--black); color: var(--white);
    border: 1px solid var(--black);
    font-size: 0.82rem; font-family: 'DM Sans', sans-serif;
    font-weight: 400; cursor: pointer;
    transition: background .2s ease; white-space: nowrap;
}
.subscribe-form button:hover { background: #222; }

/* ────────────────── FOOTER CTA ────────────────── */
.footer-cta {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--line);
}
.footer-cta h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 800; line-height: 0.97;
    letter-spacing: -2px;
    color: var(--black);
    margin-bottom: 48px;
}
.footer-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer-cta-sub { font-size: 0.82rem; color: var(--gray-light); margin-left: 8px; }

/* ────────────────── SPACING TOKENS ────────────────── */
:root {
    --space-xs: clamp(12px, 2vw, 20px);
    --space-sm: clamp(24px, 4vw, 40px);
    --space-md: clamp(48px, 7vw, 80px);
    --space-lg: clamp(80px, 10vw, 140px);
}

/* ────────────────── RESPONSIVE ────────────────── */
@media (max-width: 1024px) {
    .hero { padding: 120px 0 80px;  }
    .hero h1 { letter-spacing: -1px; font-size: clamp(1.5rem, 12vw, 2rem); }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 120px 0 80px;  }
    .hero h1 { letter-spacing: -1px; font-size: clamp(2.2rem, 10vw, 3.5rem); }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat { padding: 28px 20px; }
    .bento-card { flex: 0 0 80vw; }
    .left-btn, .right-btn { display: none; }
    .manifesto { padding: 80px 0; }
    .manifesto-method { grid-template-columns: 1fr; gap: 32px; }
    .method-step {
        border-right: none !important;
        padding: 0 !important;
        border-bottom: 1px solid var(--line-dark);
        padding-bottom: 24px !important;
    }
    .expertise-section { padding: 80px 0; }
    .expertise-grid { grid-template-columns: 1fr; gap: 48px; }
    .footer-cta { padding: 80px 0; }
    .insights-grid { grid-template-columns: 1fr; }
    .insight-card { border-right: none; border-bottom: 1px solid var(--line); }
    .insight-card:last-child { border-bottom: none; }
    .subscribe-form input { width: 100%; }
    .subscribe-form { flex-direction: column; }
    .subscribe-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem; 
        letter-spacing: -0.5px;
    }
}