/* =====================================================================
   Universal Intelligence — shared stylesheet
   Black & gold. Editorial serif display + clean sans body.
   ===================================================================== */

:root {
    /* surfaces */
    --black: #050505;
    --black-2: #0b0a08;
    --panel: rgba(24, 21, 14, 0.55);
    --panel-solid: #100e0a;

    /* gold system */
    --gold: #d4af37;
    --gold-bright: #f4e2a1;
    --gold-deep: #a9842b;
    --gold-line: rgba(212, 175, 55, 0.20);
    --gold-line-strong: rgba(212, 175, 55, 0.45);
    --gold-grad: linear-gradient(135deg, #9b7b22 0%, #f4e2a1 48%, #d4af37 100%);

    /* text */
    --cream: #f4eedd;
    --soft: #cfc7b4;
    --muted: #948c79;
    --faint: #5d564a;

    /* type */
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
        Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --radius: 4px;
    --maxw: 1120px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--black);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* fixed cosmic backdrop */
#starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(
            1100px 620px at 50% -8%,
            rgba(212, 175, 55, 0.10),
            transparent 60%
        ),
        radial-gradient(
            900px 700px at 100% 110%,
            rgba(212, 175, 55, 0.06),
            transparent 55%
        );
}

/* keep content above the backdrop */
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ---------- type helpers ---------- */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0.005em;
    margin: 0;
}
p {
    margin: 0 0 1em;
}
a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.18s var(--ease);
}
a:hover {
    color: var(--gold-bright);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 18px;
}
.gold-text {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lead {
    color: var(--soft);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.7;
}
.muted {
    color: var(--muted);
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    /* responsive side gutters — more breathing room from the edges,
       scaling up on wider screens, still comfortable on phones */
    padding: 0 clamp(28px, 6vw, 64px);
}
.section {
    /* vertical only — do NOT set horizontal padding here, or it would
       override .container's side gutters (these elements are both
       .section and .container) */
    padding-top: clamp(64px, 10vw, 120px);
    padding-bottom: clamp(64px, 10vw, 120px);
}
.section-head {
    max-width: 680px;
    margin: 0 auto clamp(36px, 5vw, 56px);
    /* headings centered to echo the hero; long paragraphs stay
       left-aligned below (see .section-head .lead) for readability */
    text-align: center;
}
.section-head .lead {
    text-align: left;
    /* breathing room between the heading and the body paragraph */
    margin-top: 18px;
}
/* left-aligned readable body block below a centered section head */
.section-body {
    max-width: 680px;
    margin: 0 auto;
    color: var(--soft);
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.75;
}
.section-body p {
    margin: 0 0 1.1em;
}
.section-body p:last-child {
    margin-bottom: 0;
}
.section-body strong {
    color: var(--cream);
    font-weight: 600;
}

/* Contact is a centered call-to-action — center its intro line too */
#contact .section-head .lead {
    text-align: center;
}
/* short one-line subhead under a heading — stays centered.
   Italic display serif for an editorial, elegant feel. */
.section-head .section-sub {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--soft);
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.5;
    margin: 10px auto 0;
    max-width: 620px;
}
.section-head h2 {
    font-size: clamp(30px, 4.4vw, 46px);
}
.divider {
    height: 1px;
    border: 0;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-line-strong),
        transparent
    );
    margin: 0;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        transform 0.12s var(--ease),
        background 0.2s var(--ease),
        color 0.2s var(--ease),
        border-color 0.2s var(--ease),
        box-shadow 0.2s var(--ease);
}
.btn:active {
    transform: translateY(1px);
}
.btn-gold {
    background: var(--gold-grad);
    color: #1a1407;
    box-shadow: 0 8px 30px -12px rgba(212, 175, 55, 0.6);
}
.btn-gold:hover {
    color: #120d04;
    box-shadow: 0 10px 36px -10px rgba(212, 175, 55, 0.85);
}
.btn-ghost {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold-line-strong);
}
.btn-ghost:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.07);
}

/* ---------- header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    /* fully opaque solid — no backdrop-filter and no transparency.
       Blurring/showing the animated starfield canvas through the header
       caused a constant flicker, so it sits on its own solid surface. */
    background: linear-gradient(180deg, #080807, #050505);
    border-bottom: 1px solid var(--gold-line);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 88px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img {
    width: 66px;
    height: 66px;
    object-fit: contain;
    border-radius: 6px;
}
.brand .brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.brand .brand-name b {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 19px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream);
    white-space: nowrap;
}
.brand .brand-name span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
}
.nav-links {
    /* always tucked behind the hamburger (small site) */
    display: none;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--soft);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}
.nav-cta {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--gold-line-strong);
    border-radius: var(--radius);
    color: var(--gold);
    padding: 8px 10px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* hamburger dropdown — applies at all widths */
.site-header.open .nav-links {
    display: flex;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px clamp(28px, 6vw, 64px) 20px;
    background: rgba(5, 5, 5, 0.97);
    border-bottom: 1px solid var(--gold-line);
}
.site-header.open .nav-links li {
    width: 100%;
}
.site-header.open .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--gold-line);
    font-size: 13px;
}

/* keep the primary CTA in the bar on desktop; below tablet width the
   header would cram, so drop it there (still reachable via the hero
   button and the hamburger menu) */
@media (max-width: 860px) {
    .nav-cta .btn {
        display: none;
    }
}
/* shrink the brand lockup on phones so it never overflows */
@media (max-width: 480px) {
    .brand img {
        width: 46px;
        height: 46px;
    }
    .brand {
        gap: 9px;
    }
    .brand .brand-name b {
        font-size: 14px;
        letter-spacing: 0.13em;
    }
    .brand .brand-name span {
        font-size: 8px;
        letter-spacing: 0.19em;
    }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: clamp(70px, 12vw, 140px) 0 clamp(54px, 8vw, 96px);
}
.hero-logo {
    /* sized so the embedded "INTELLIGENCE" wordmark (~2.63% of the
       image height) renders near body-text size (~16px) on desktop */
    width: clamp(300px, 55vw, 600px);
    max-width: 100%;
    height: auto;
    margin: 0 auto 26px;
    display: block;
    filter: drop-shadow(0 0 36px rgba(212, 175, 55, 0.30));
}
.hero h1 {
    font-size: clamp(44px, 8vw, 86px);
    letter-spacing: 0.01em;
    margin: 0 0 18px;
}
.hero .lead {
    max-width: 600px;
    margin: 0 auto 34px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
/* equal-width hero buttons, labels centered */
.hero-actions .btn {
    min-width: 250px;
    max-width: 100%;
    justify-content: center;
}

/* page hero (interior pages) */
.page-hero {
    text-align: center;
    padding: clamp(64px, 10vw, 110px) 0 clamp(28px, 5vw, 48px);
}
.page-hero h1 {
    font-size: clamp(38px, 6.5vw, 68px);
    margin: 0 0 16px;
}
.page-hero .lead {
    max-width: 620px;
    margin: 0 auto;
}

/* ---------- card grid ---------- */
.grid {
    display: grid;
    gap: 22px;
}
.grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 880px) {
    .grid.cols-3 {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .grid.cols-3,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--panel);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    padding: 30px 28px;
    transition:
        border-color 0.25s var(--ease),
        transform 0.25s var(--ease),
        background 0.25s var(--ease);
}
.card:hover {
    border-color: var(--gold-line-strong);
    transform: translateY(-3px);
    background: rgba(28, 24, 16, 0.6);
}
.card .num {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 16px;
}
.card h3 {
    font-size: 25px;
    margin: 0 0 10px;
}
.card p {
    color: var(--soft);
    font-size: 15px;
    margin: 0;
}

/* ---------- simple service list (lean home) ---------- */
.svc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 48px;
}
@media (max-width: 640px) {
    .svc-list {
        grid-template-columns: 1fr;
    }
}
.svc {
    display: flex;
    gap: 16px;
    padding: 22px 0;
    border-top: 1px solid var(--gold-line);
}
/* close the bottom edge of the list to mirror the top line.
   last-child covers single-column (mobile); the 2nd-to-last item
   closes the other column of the final row on the two-column layout */
.svc:last-child {
    border-bottom: 1px solid var(--gold-line);
}
@media (min-width: 641px) {
    .svc:nth-last-child(2) {
        border-bottom: 1px solid var(--gold-line);
    }
}
.svc .svc-mark {
    color: var(--gold);
    font-size: 18px;
    line-height: 1.5;
    flex-shrink: 0;
}
.svc h3 {
    font-size: 21px;
    margin: 0 0 4px;
}
.svc p {
    margin: 0;
    color: var(--soft);
    font-size: 14.5px;
}

/* ---------- feature / split ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 6vw, 72px);
    align-items: center;
}
@media (max-width: 820px) {
    .split {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}
.split h2 {
    font-size: clamp(30px, 4.4vw, 46px);
    margin-bottom: 18px;
}
.portrait-frame {
    border: 1px solid var(--gold-line-strong);
    border-radius: var(--radius);
    padding: 8px;
    background: linear-gradient(
        160deg,
        rgba(212, 175, 55, 0.14),
        rgba(10, 9, 6, 0.6)
    );
}
.portrait-frame img {
    width: 100%;
    display: block;
    border-radius: 2px;
    filter: grayscale(0.12) contrast(1.03);
}

/* ---------- stat row ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}
@media (max-width: 600px) {
    .stats {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
.stat .big {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 58px);
    line-height: 1;
    color: var(--gold);
}
.stat .label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 10px;
}

/* ---------- numbered process ---------- */
.steps {
    display: grid;
    gap: 0;
}
.step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 22px;
    padding: 28px 0;
    border-top: 1px solid var(--gold-line);
}
.step:last-child {
    border-bottom: 1px solid var(--gold-line);
}
.step .step-n {
    font-family: var(--font-display);
    font-size: 40px;
    color: var(--gold);
    line-height: 1;
}
.step h3 {
    font-size: 22px;
    margin-bottom: 6px;
}
.step p {
    color: var(--soft);
    margin: 0;
    font-size: 15px;
}

/* ---------- CTA band ---------- */
.cta-band {
    text-align: center;
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
    background: radial-gradient(
        700px 300px at 50% 0%,
        rgba(212, 175, 55, 0.08),
        transparent 70%
    );
}
.cta-band h2 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 16px;
}
.cta-band .lead {
    max-width: 560px;
    margin: 0 auto 30px;
}

/* ---------- forms ---------- */
.form-card {
    background: var(--panel);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    padding: clamp(26px, 4vw, 40px);
}
.field {
    margin-bottom: 18px;
}
.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 520px) {
    .row2 {
        grid-template-columns: 1fr;
    }
}
label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
input,
textarea,
select {
    width: 100%;
    background: var(--black-2);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 13px 15px;
    transition:
        border-color 0.18s var(--ease),
        box-shadow 0.18s var(--ease);
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
textarea {
    resize: vertical;
    min-height: 130px;
}
select {
    appearance: none;
    cursor: pointer;
}
.form-card .btn {
    width: 100%;
    justify-content: center;
}
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-status {
    display: none;
    font-family: var(--font-mono);
    font-size: 12px;
    margin-top: 16px;
    padding: 13px 15px;
    border-radius: var(--radius);
}
.form-status.show {
    display: block;
}
.form-status.ok {
    color: var(--gold-bright);
    border: 1px solid var(--gold-line-strong);
    background: rgba(212, 175, 55, 0.08);
}
.form-status.err {
    color: #e0a08f;
    border: 1px solid rgba(200, 90, 70, 0.5);
    background: rgba(200, 90, 70, 0.08);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(32px, 5vw, 60px);
    align-items: start;
}
@media (max-width: 820px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
.contact-aside dt {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 22px;
}
.contact-aside dd {
    margin: 6px 0 0;
    color: var(--soft);
}

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--gold-line);
    background: rgba(5, 5, 5, 0.6);
    padding: clamp(48px, 7vw, 72px) 0 40px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}
@media (max-width: 720px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
.footer-brand-blurb {
    max-width: 34ch;
    color: var(--muted);
    font-size: 14px;
    margin-top: 16px;
}
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 16px;
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.footer-col a {
    color: var(--soft);
    font-size: 14px;
}
.footer-col a:hover {
    color: var(--gold);
}
.footer-bottom {
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--gold-line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
}

/* ---------- reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s var(--ease),
        transform 0.7s var(--ease);
}
.reveal.in {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}
