/* ══════════════════════════════════════
   SITE 40 — "Nexus"
   Midnight blue + warm amber
   Boska (display) + Synonym (body)
   Diagonal geometry, zigzag sections
   ══════════════════════════════════════ */

:root {
    --midnight: #0A1628;
    --midnight-mid: #121F36;
    --midnight-light: #1B2D4A;
    --amber: #D97706;
    --amber-light: #F59E0B;
    --amber-pale: #FEF3C7;
    --snow: #F9FAFB;
    --white: #FFFFFF;
    --text-dark: #111827;
    --text-mid: #6B7280;
    --border: #E5E7EB;
    --border-dark: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; margin: 0; }

body {
    font-family: 'Synonym', sans-serif;
    background: var(--snow);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.display-font { font-family: 'Boska', serif; }

/* ── Nav offset right ── */
.nav-nexus {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(249, 250, 251, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-nexus-inner {
    max-width: 1440px; margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex; align-items: center;
}
.nav-nexus-logo {
    font-family: 'Boska', serif;
    font-size: 1.3rem; font-weight: 700;
    margin-right: auto;
}
.nav-nexus-logo span { color: var(--amber); }
.nav-nexus-links {
    display: flex; gap: 2rem; list-style: none;
    padding: 0; margin-right: 2rem;
}
.nav-nexus-links a {
    font-size: 0.82rem; font-weight: 500;
    color: var(--text-mid); text-decoration: none;
    transition: color 0.3s;
}
.nav-nexus-links a:hover { color: var(--amber); }
.nav-nexus-cta {
    background: var(--midnight); color: white;
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem; font-weight: 600;
    text-decoration: none;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    transition: all 0.3s;
}
.nav-nexus-cta:hover {
    background: var(--amber);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25);
}

/* ── Hero: diagonal split ── */
.hero-nexus {
    min-height: 100vh;
    display: flex; align-items: center;
    position: relative; overflow: hidden;
    padding: 6rem 0 0;
}
.hero-nexus-bg {
    position: absolute; inset: 0;
    background: var(--midnight);
    clip-path: polygon(0 0, 55% 0, 42% 100%, 0 100%);
    z-index: 0;
}
.hero-nexus-bg::after {
    content: ''; position: absolute;
    top: 20%; left: 10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.12), transparent 70%);
    border-radius: 50%;
}
.hero-nexus-inner {
    max-width: 1440px; margin: 0 auto; width: 100%;
    padding: 4rem 2rem;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
    position: relative; z-index: 1;
}
.hero-left { color: white; }
.hero-right {}
.hero-eyebrow-n {
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 1.5rem;
}
.hero-h1-n {
    font-family: 'Boska', serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700; line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.hero-h1-n .amber { color: var(--amber-light); }
.hero-desc-n {
    font-size: 1.05rem; color: rgba(255,255,255,0.55);
    line-height: 1.75; max-width: 420px; margin-bottom: 2rem;
}
.btn-amber {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--amber); color: white;
    padding: 1rem 2rem;
    font-weight: 600; font-size: 0.85rem;
    text-decoration: none; border: none; cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-amber:hover {
    background: var(--amber-light);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.3);
    transform: translateY(-2px);
}

/* Hero right: stat blocks */
.hero-stat-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.hero-stat-block {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 2rem 1.5rem;
    transition: all 0.3s;
}
.hero-stat-block:hover {
    border-color: var(--amber);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.08);
    transform: translateY(-3px);
}
.hsb-num {
    font-family: 'Boska', serif;
    font-size: 2.5rem; font-weight: 700;
    color: var(--midnight); line-height: 1;
}
.hsb-label {
    font-size: 0.78rem; color: var(--text-mid);
    margin-top: 0.25rem;
}

/* ── Scrolling partner ribbon ── */
.ribbon {
    overflow: hidden;
    background: var(--midnight);
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}
.ribbon-track {
    display: flex; gap: 4rem; align-items: center;
    animation: ribbonSlide 30s linear infinite;
    white-space: nowrap;
}
@keyframes ribbonSlide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.ribbon-name {
    font-family: 'Boska', serif;
    font-size: 1.5rem; font-weight: 600;
    color: rgba(255,255,255,0.12);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* ── Zigzag sections ── */
.zigzag {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0; align-items: stretch;
}
.zigzag-text {
    padding: 5rem 4rem;
    display: flex; flex-direction: column; justify-content: center;
}
.zigzag-visual {
    padding: 5rem 4rem;
    display: flex; flex-direction: column; justify-content: center;
    background: var(--snow);
}
.zigzag-visual.dark-bg {
    background: var(--midnight);
    color: white;
}
.zigzag:nth-child(even) .zigzag-text { order: 2; }
.zigzag:nth-child(even) .zigzag-visual { order: 1; }

.zz-tag {
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 1rem;
}
.zz-heading {
    font-family: 'Boska', serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700; line-height: 1.1;
    margin-bottom: 1.25rem;
}
.zz-body {
    font-size: 0.95rem; color: var(--text-mid);
    line-height: 1.75; max-width: 480px;
}
.dark-bg .zz-body { color: rgba(255,255,255,0.5); }

/* ── Service tiles diagonal ── */
.service-tiles {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
    background: var(--border);
}
.s-tile {
    background: var(--white); padding: 3rem 2.5rem;
    position: relative; overflow: hidden;
    transition: all 0.4s;
}
.s-tile::before {
    content: ''; position: absolute;
    top: 0; left: 0;
    width: 0; height: 4px;
    background: linear-gradient(to right, var(--amber), var(--midnight-light));
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.s-tile:hover { background: var(--amber-pale); }
.s-tile:hover::before { width: 100%; }
.st-num {
    font-family: 'Boska', serif;
    font-size: 3.5rem; font-weight: 700;
    color: var(--border); line-height: 1;
    margin-bottom: 1rem;
    transition: color 0.3s;
}
.s-tile:hover .st-num { color: var(--amber); opacity: 0.4; }
.st-title {
    font-weight: 600; font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.st-desc {
    font-size: 0.85rem; color: var(--text-mid); line-height: 1.65;
}

/* ── QEHS bar ── */
.qehs-bar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0; background: var(--midnight);
}
.qb-cell {
    padding: 3rem 2rem; text-align: center;
    border-right: 1px solid var(--border-dark);
    color: rgba(255,255,255,0.7);
    transition: background 0.3s;
}
.qb-cell:last-child { border-right: none; }
.qb-cell:hover { background: var(--midnight-mid); }
.qb-letter {
    font-family: 'Boska', serif;
    font-size: 2.5rem; font-weight: 700;
    color: var(--amber); margin-bottom: 0.75rem; line-height: 1;
}
.qb-title {
    font-weight: 600; font-size: 0.95rem;
    margin-bottom: 0.5rem; color: white;
}
.qb-text {
    font-size: 0.8rem; color: rgba(255,255,255,0.4); line-height: 1.6;
}

/* ── Contact diagonal ── */
.contact-diag {
    position: relative; overflow: hidden;
    padding: 6rem 2rem;
    background: var(--snow);
}
.contact-diag::before {
    content: ''; position: absolute;
    bottom: 0; right: 0;
    width: 55%; height: 100%;
    background: var(--midnight);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}
.contact-diag-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
    position: relative; z-index: 1;
}
.cd-left {}
.cd-right { color: white; }
.cd-title {
    font-family: 'Boska', serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700; line-height: 1.1;
    margin-bottom: 1rem;
}
.cd-text {
    font-size: 0.95rem; color: var(--text-mid);
    line-height: 1.7; margin-bottom: 2rem; max-width: 400px;
}
.cd-right .cd-text { color: rgba(255,255,255,0.5); }
.cd-info { font-size: 0.85rem; line-height: 2; color: rgba(255,255,255,0.45); }
.cd-info strong { color: rgba(255,255,255,0.75); display: block; margin-top: 0.75rem; }

/* ── Footer ── */
.footer-nexus {
    background: var(--midnight);
    border-top: 1px solid var(--border-dark);
    padding: 2rem; text-align: center;
    font-size: 0.8rem; color: rgba(255,255,255,0.3);
}

/* ── Animations ── */
.drift {
    opacity: 0; transform: translateY(35px);
    animation: driftUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.drift-left {
    opacity: 0; transform: translateX(-30px);
    animation: driftLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes driftUp { to { opacity: 1; transform: none; } }
@keyframes driftLeft { to { opacity: 1; transform: none; } }
.t1 { animation-delay: 0.1s; } .t2 { animation-delay: 0.2s; }
.t3 { animation-delay: 0.3s; } .t4 { animation-delay: 0.4s; }
.t5 { animation-delay: 0.5s; } .t6 { animation-delay: 0.6s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .nav-nexus-links { display: none; }
    .hero-nexus-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hero-nexus-bg { clip-path: polygon(0 0, 100% 0, 100% 50%, 0 60%); }
    .hero-right { order: -1; }
    .zigzag { grid-template-columns: 1fr; }
    .zigzag:nth-child(even) .zigzag-text { order: 1; }
    .zigzag:nth-child(even) .zigzag-visual { order: 2; }
    .zigzag-text, .zigzag-visual { padding: 3rem 2rem; }
    .service-tiles { grid-template-columns: 1fr 1fr; }
    .qehs-bar { grid-template-columns: 1fr 1fr; }
    .contact-diag::before { width: 100%; clip-path: none; opacity: 0.97; }
    .contact-diag-inner { grid-template-columns: 1fr; }
    .cd-left { color: white; }
    .cd-left .cd-text { color: rgba(255,255,255,0.5); }
}
@media (max-width: 640px) {
    .hero-nexus { padding: 5rem 0 0; }
    .hero-nexus-inner { padding: 3rem 1.25rem; }
    .hero-stat-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .service-tiles { grid-template-columns: 1fr; }
    .qehs-bar { grid-template-columns: 1fr; }
    .qb-cell { border-right: none; border-bottom: 1px solid var(--border-dark); }
    .zigzag-text, .zigzag-visual { padding: 2.5rem 1.25rem; }
    .contact-diag { padding: 4rem 1.25rem; }
    .btn-amber { width: 100%; justify-content: center; }
}

::selection { background: var(--amber); color: white; }
