/* ==========================================================================
   Nightward — brand stylesheet
   Palette and type per the Nightward Brand Identity Pack.
   Dark-first by design; cyan is a signal colour, never decoration.
   ========================================================================== */

:root {
    /* Base */
    --midnight:   #0B0F19;   /* Midnight Charcoal - dominant base */
    --abyss:      #121E36;   /* Deep Abyss Blue  - cards, nav, structure */
    --abyss-lift: #16243F;   /* hover state derived from abyss */

    /* Accents — used sparingly, to direct the eye */
    --cyan:       #00F0FF;   /* Electric Cyan   - primary CTA, active state */
    --teal:       #00D2A0;   /* Illuminated Teal - secure/success indicators */

    /* Text */
    --starlight:  #F4F6FC;   /* Crisp Starlight - headings, primary copy */
    --steel:      #8A99AD;   /* Steel Slate     - subheads, meta, borders */

    --border:     rgba(138, 153, 173, 0.18);
    --border-lit: rgba(0, 240, 255, 0.35);

    --font-display: "Space Grotesk", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --font-body:    "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --wrap: 1140px;
    --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    margin: 0;
    background: var(--midnight);
    color: var(--starlight);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--steel); max-width: 62ch; }

/* Section eyebrow — small monospace label above headings */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    margin: 0 0 0.9rem;
    display: block;
}

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-head { max-width: 68ch; margin-bottom: 3rem; }

/* ---------- Header ---------------------------------------------------- */
header.site {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 15, 25, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 2rem; height: 72px; }

.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--starlight); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--cyan); flex: none; }

nav.main { margin-left: auto; display: flex; align-items: center; gap: 2rem; }
nav.main a { color: var(--steel); font-size: 0.94rem; font-weight: 500; }
nav.main a:hover { color: var(--starlight); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--starlight); border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer; margin-left: auto; }

/* ---------- Buttons --------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600; font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #04121A; }
.btn-primary:hover { background: #4ff5ff; }
.btn-ghost { border-color: var(--border); color: var(--starlight); background: transparent; }
.btn-ghost:hover { border-color: var(--border-lit); background: rgba(0, 240, 255, 0.06); }

/* ---------- Hero ------------------------------------------------------ */
.hero { position: relative; padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(4rem, 8vw, 6.5rem); overflow: hidden; }
.hero::before {
    /* Radar sweep glow — the brand's "constant monitoring" motif, kept subtle */
    content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%;
    background:
        radial-gradient(closest-side at 72% 22%, rgba(0, 240, 255, 0.13), transparent 70%),
        radial-gradient(closest-side at 20% 8%, rgba(0, 210, 160, 0.08), transparent 70%);
    pointer-events: none;
}
.hero::after {
    /* Faint technical grid */
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(138,153,173,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138,153,173,0.055) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
.hero h1 .accent { color: var(--cyan); }
.hero .lede { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* The tagline sits under the concrete headline rather than replacing it — brand
   line, not the thing that has to explain the business to a stranger. */
.hero .kicker {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    letter-spacing: -0.01em;
    margin: 1.75rem 0 0;
    padding-left: 1rem;
    border-left: 2px solid var(--cyan);
    color: var(--starlight);
}
.hero .kicker span { color: var(--cyan); }

/* Live status pill */
.status {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
    color: var(--steel);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 0.4rem 0.9rem; margin-bottom: 1.75rem;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(0,210,160,0.6); animation: pulse 2.6s infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 210, 160, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(0, 210, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 210, 160, 0); }
}

/* ---------- Capability strip ------------------------------------------ */
.strip { border-block: 1px solid var(--border); background: rgba(18, 30, 54, 0.4); }
.strip .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; padding: 2.25rem 0; }
.strip .item { display: flex; flex-direction: column; gap: 0.25rem; }
.strip .k { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--starlight); }
.strip .v { font-size: 0.88rem; color: var(--steel); }

/* ---------- Cards ----------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
    background: var(--abyss);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--border-lit); transform: translateY(-3px); background: var(--abyss-lift); }
.card .icon { width: 38px; height: 38px; color: var(--cyan); margin-bottom: 1.1rem; }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--steel); font-size: 0.95rem; margin: 0; }
.card ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--steel); font-size: 0.92rem; }
.card li { margin-bottom: 0.35rem; }

/* The flagship service gets weight — a uniform grid of identical boxes reads as
   filler and gives the eye nowhere to land first. */
.card.feature {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--abyss), #0D1729);
    border-color: var(--border-lit);
    border-radius: 16px;
    padding: 2.3rem;
}
.card.feature h3 { font-size: 1.45rem; font-family: var(--font-display); }
.card.feature p { font-size: 1.02rem; max-width: 56ch; }
.card.feature .icon { width: 44px; height: 44px; }
.card .tag {
    display: inline-block;
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--cyan);
    border: 1px solid var(--border-lit); border-radius: 999px;
    padding: 0.2rem 0.7rem; margin-bottom: 0.8rem;
}
@media (max-width: 900px) { .card.feature { grid-column: span 1; } }

/* ---------- Process --------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; counter-reset: step; }
.step { position: relative; padding-top: 2.75rem; }
.step::before {
    counter-increment: step; content: "0" counter(step);
    position: absolute; top: 0; left: 0;
    font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
    color: var(--cyan);
    border: 1px solid var(--border-lit); border-radius: 6px;
    padding: 0.25rem 0.55rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--steel); font-size: 0.95rem; margin: 0; }

/* ---------- Terminal panel -------------------------------------------- */
.terminal {
    background: #070A11;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.83rem;
    line-height: 1.85;
    overflow: hidden;
}
.terminal .bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: rgba(18,30,54,0.5); }
.terminal .bar i { width: 9px; height: 9px; border-radius: 50%; background: #2A3648; display: block; }
.terminal .bar span { margin-left: 0.5rem; color: var(--steel); font-size: 0.75rem; letter-spacing: 0.05em; }
.terminal .body { padding: 1.2rem 1.3rem; overflow-x: auto; }
.terminal .line { white-space: pre; color: var(--steel); }
.terminal .t  { color: #56637A; }
.terminal .ok { color: var(--teal); }
.terminal .hi { color: var(--cyan); }
.terminal .w  { color: var(--starlight); }

/* ---------- Split ----------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: 0.85rem; color: var(--steel); font-size: 0.97rem; }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 0.55em;
    width: 9px; height: 9px; border-radius: 2px;
    background: var(--teal); box-shadow: 0 0 10px rgba(0,210,160,0.5);
}
.checklist strong { color: var(--starlight); font-weight: 600; }

/* ---------- CTA band -------------------------------------------------- */
.cta-band {
    background: linear-gradient(135deg, var(--abyss), #0D1729);
    border: 1px solid var(--border-lit);
    border-radius: 16px;
    padding: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}
.cta-band h2 { margin-bottom: 1rem; }
.cta-band .lede { margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------------------------------------------------- */
footer.site { border-top: 1px solid var(--border); padding: 3rem 0 2.5rem; color: var(--steel); font-size: 0.9rem; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
footer.site a { color: var(--steel); }
footer.site a:hover { color: var(--starlight); }
footer.site h4 { font-family: var(--font-display); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--starlight); margin: 0 0 1rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 0.55rem; }
.footer-base { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-top: 1.75rem; border-top: 1px solid var(--border); font-size: 0.85rem; }

/* ---------- Responsive ------------------------------------------------ */
@media (max-width: 860px) {
    nav.main {
        position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch;
        gap: 0; background: var(--abyss); border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.5rem 1.5rem; display: none;
    }
    nav.main.open { display: flex; }
    nav.main a { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
    nav.main .btn { margin-top: 1rem; justify-content: center; }
    .nav-toggle { display: block; }
    footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    footer.site .cols { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}
