/* Wingman SMS public site
   Look: night ops over a sectional chart. Dark navy "cockpit" bands, light chart-paper
   bands with contour lines, runway-amber for action, glass-cockpit cyan for detail,
   small monospaced labels like avionics annunciators. */

:root {
    --night: #08131f;
    --night-2: #0d1d2e;
    --panel: #122a40;
    --panel-line: #1e3d5a;
    --ink-on-dark: #e9f0f7;
    --muted-on-dark: #9db2c6;
    --paper: #f3f0e8;
    --paper-2: #e9e4d7;
    --ink: #13202d;
    --muted: #4c5d6d;
    --chart-line: #c9d6df;
    --amber: #ffb000;
    --amber-deep: #b87a00;
    --cyan: #47d3e6;
    --magenta: #b3458a;      /* sectional-chart magenta, for route lines only */
    --good: #2fbf71;
    --radius: 14px;
    --max: 1160px;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font: 17px/1.6 var(--sans);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }

.skip {
    position: absolute; left: -999px; top: 8px;
    background: var(--amber); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 8px; z-index: 100; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- Annunciator labels ---------- */

.tag {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 12px/1 var(--mono);
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--amber); max-width: 100%;
}
.tag::before {
    content: ""; width: 8px; height: 8px; border-radius: 2px;
    background: currentColor; box-shadow: 0 0 10px currentColor;
}
.on-paper .tag { color: var(--amber-deep); }
.on-paper .tag::before { box-shadow: none; }

.reg {
    font: 500 12px/1 var(--mono); letter-spacing: .06em;
    color: var(--muted); white-space: nowrap;
}
.on-dark .reg { color: var(--muted-on-dark); }

/* ---------- Header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(8, 19, 31, .86);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(157, 178, 198, .14);
    color: var(--ink-on-dark);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.brand small { font: 600 11px/1 var(--mono); letter-spacing: .16em; color: var(--amber); margin-left: 2px; }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
    text-decoration: none; color: var(--muted-on-dark); font-size: 15px; font-weight: 550;
    padding: 8px 12px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink-on-dark); background: rgba(157, 178, 198, .1); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--night); background: var(--amber); margin-left: 8px; }

.nav-toggle {
    display: none; margin-left: auto; background: none; border: 1px solid var(--panel-line);
    color: var(--ink-on-dark); border-radius: 8px; padding: 8px 12px; font: 600 14px var(--sans);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 22px; border-radius: 10px;
    font: 650 16px/1 var(--sans); text-decoration: none; cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--night); }
.btn-primary:hover { background: #ffc233; }
.btn-ghost { border-color: rgba(233, 240, 247, .35); color: var(--ink-on-dark); }
.btn-ghost:hover { border-color: var(--ink-on-dark); }
.on-paper .btn-ghost { border-color: rgba(19, 32, 45, .3); color: var(--ink); }
.on-paper .btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Bands ---------- */

.on-dark { background: var(--night); color: var(--ink-on-dark); }
.on-paper { background: var(--paper); color: var(--ink); }

.band { padding: 96px 0; position: relative; overflow: hidden; }

/* Contour lines on chart paper */
.contours::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
    background-image: url("../images/contours.svg");
    background-size: 900px auto; background-position: right -120px top -60px; background-repeat: no-repeat;
}
.contours > * { position: relative; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 780; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 760; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }

.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 60ch; }
.on-dark .lede { color: var(--muted-on-dark); }

.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 48px; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 0; position: relative; overflow: hidden; isolation: isolate; }
.hero::before { /* night sky */
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(900px 500px at 78% 30%, rgba(71, 211, 230, .13), transparent 60%),
        radial-gradient(700px 420px at 10% 0%, rgba(255, 176, 0, .08), transparent 60%),
        linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.hero .compass { position: absolute; z-index: -1; right: -220px; top: -160px; width: 860px; opacity: .5; }
.hero .route { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; opacity: .55; }

.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-bottom: 72px; }
.hero-copy { display: grid; gap: 24px; }
.hero-copy h1 em { font-style: normal; color: var(--amber); white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-note { font-size: 14px; color: var(--muted-on-dark); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; gap: 8px; align-items: center; }
.hero-note svg { width: 16px; height: 16px; color: var(--cyan); }

/* ---------- Device mockup (pure CSS) ---------- */

.device {
    justify-self: center; width: 300px; height: 600px;
    border-radius: 46px; padding: 12px;
    background: linear-gradient(160deg, #2a3a4b, #0c1621);
    box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.screen {
    height: 100%; border-radius: 36px; overflow: hidden; padding: 46px 18px 18px;
    background: #f7f8fa; color: var(--ink); position: relative;
    display: flex; flex-direction: column; gap: 10px; font-size: 13px;
}
.screen::before { /* island */
    content: ""; position: absolute; top: 12px; left: 50%; translate: -50% 0;
    width: 92px; height: 26px; border-radius: 20px; background: #05090e;
}
.screen .s-title { display: flex; justify-content: space-between; align-items: baseline; font-weight: 750; font-size: 20px; letter-spacing: -.02em; }
.screen .s-title small { font: 600 10px var(--mono); color: var(--muted); letter-spacing: .08em; }
.screen .s-row { display: flex; gap: 8px; }
.screen .s-pill { flex: 1; background: #fff; border: 1px solid #dfe4ea; border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.screen .s-pill small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.screen .s-group { font: 650 10px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.screen .s-toggle { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #dfe4ea; border-radius: 10px; padding: 8px 10px; }
.screen .s-switch { width: 34px; height: 20px; border-radius: 20px; background: #d5dbe2; position: relative; flex: none; }
.screen .s-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.screen .s-switch.on { background: var(--good); }
.screen .s-switch.on::after { left: 16px; }
.screen .s-score {
    margin-top: auto; border-radius: 14px; padding: 12px 14px; background: var(--night); color: var(--ink-on-dark);
    display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center;
}
.screen .s-score b { grid-row: span 2; font-size: 34px; line-height: 1; color: var(--amber); font-weight: 750; }
.screen .s-score span { font-weight: 650; }
.screen .s-score small { color: var(--muted-on-dark); font-size: 11px; }
.screen .s-button { background: var(--amber); color: var(--night); text-align: center; font-weight: 750; border-radius: 12px; padding: 11px; }

/* ---------- Deadline strip ---------- */

.deadline { background: var(--amber); color: var(--night); }
.deadline .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; padding: 18px 0; }
.deadline p { margin: 0; font-weight: 650; }
.deadline .count { font: 700 14px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.deadline a { font-weight: 700; }

/* ---------- Intro ---------- */

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.intro-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.intro-points li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.intro-points .ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--night); color: var(--amber);
}
.intro-points .ico svg { width: 22px; height: 22px; }
.intro-points h3 { font-size: 18px; margin-bottom: 2px; }
.intro-points p { margin: 0; color: var(--muted); }

/* ---------- Modules ---------- */

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.module {
    background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
    padding: 26px; display: grid; gap: 12px; align-content: start; position: relative;
    transition: border-color .2s ease, transform .2s ease;
}
.module:hover { border-color: rgba(255, 176, 0, .6); transform: translateY(-2px); }
.module .num { font: 700 13px var(--mono); color: var(--cyan); letter-spacing: .1em; }
.module p { margin: 0; color: var(--muted-on-dark); font-size: 15.5px; }
.module .reg { margin-top: 6px; }

/* ---------- Flow (how modules connect) ---------- */

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; counter-reset: step; }
.flow li { list-style: none; position: relative; padding: 28px 22px 0 0; }
.flow li::before { /* waypoint */
    content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; rotate: 45deg;
    border: 2px solid var(--magenta); background: var(--paper);
}
.flow li::after { /* route line to the next waypoint */
    content: ""; position: absolute; top: 7px; left: 20px; right: 6px; border-top: 2px dashed var(--magenta);
}
.flow li:last-child::after { display: none; }
.flow h3 { font-size: 17px; margin-bottom: 4px; }
.flow p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Stats (stat tiles) ---------- */

.stats .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
    background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
    padding: 24px 26px; display: grid; gap: 6px;
}
.tile .label { color: var(--muted-on-dark); font-size: 15px; font-weight: 550; }
.tile .value { font-size: 52px; line-height: 1.05; font-weight: 650; letter-spacing: -.02em; color: var(--ink-on-dark); }
.stats .counted { margin-top: 16px; font-size: 13px; color: var(--muted-on-dark); }

/* ---------- Platforms ---------- */

.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.platform {
    background: #fff; border: 1px solid var(--paper-2); border-radius: var(--radius); padding: 24px; display: grid; gap: 8px;
}
.platform svg { width: 34px; height: 34px; color: var(--night); }
.platform p { margin: 0; color: var(--muted); font-size: 15px; }
.badge {
    justify-self: start; font: 650 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
    padding: 5px 8px; border-radius: 6px; background: var(--paper-2); color: var(--muted);
}
.badge.live { background: rgba(47, 191, 113, .15); color: #17703f; }

/* ---------- CTA ---------- */

.cta { text-align: center; }
.cta .wrap { display: grid; gap: 20px; justify-items: center; }
.cta .lede { margin-inline: auto; }

/* ---------- Product pages ---------- */

.page-hero { padding: 80px 0 72px; position: relative; overflow: hidden; }
.page-hero .wrap { display: grid; gap: 18px; max-width: 820px; margin-left: max(24px, (100% - var(--max)) / 2); }
.page-hero .compass { position: absolute; right: -260px; top: -260px; width: 760px; opacity: .35; }

.product { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 72px 0; border-bottom: 1px solid var(--paper-2); }
.product:last-child { border-bottom: 0; }
.product:nth-child(even) .product-art { order: -1; }
.product-copy { display: grid; gap: 16px; }
.product-copy ul { margin: 0; padding-left: 20px; color: var(--muted); }
.product-copy li { margin: 6px 0; }
.product-art {
    border-radius: 20px; background: var(--night); min-height: 320px; padding: 28px; position: relative; overflow: hidden;
    display: grid; place-items: center; color: var(--ink-on-dark);
}
.product-art .compass { position: absolute; width: 520px; opacity: .3; right: -160px; bottom: -200px; }

/* Risk matrix illustration */
.matrix { display: grid; grid-template-columns: 26px repeat(5, 46px); gap: 4px; font: 600 11px var(--mono); position: relative; }
.matrix span { height: 40px; border-radius: 6px; display: grid; place-items: center; }
.matrix .h { color: var(--muted-on-dark); }
.matrix .r { background: #7a2a36; }
.matrix .y { background: #7a5a1c; }
.matrix .g { background: #1d4d3b; }
.matrix .pick { outline: 2.5px solid var(--amber); outline-offset: -2.5px; color: #fff; }
.matrix-legend { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--muted-on-dark); justify-content: center; }
.matrix-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Window illustration (web / management) */
.window { width: 100%; max-width: 440px; border-radius: 12px; background: #f7f8fa; color: var(--ink); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); position: relative; }
.window .bar { display: flex; gap: 6px; padding: 10px 12px; background: #e6e9ee; }
.window .bar i { width: 10px; height: 10px; border-radius: 50%; background: #c4cad3; }
.window .body { display: grid; grid-template-columns: 110px 1fr; min-height: 220px; font-size: 12px; }
.window .side { background: var(--night-2); color: var(--muted-on-dark); padding: 12px; display: grid; gap: 8px; align-content: start; }
.window .side b { color: var(--ink-on-dark); }
.window .main { padding: 14px; display: grid; gap: 8px; align-content: start; }
.window .line { display: flex; justify-content: space-between; border: 1px solid #dfe4ea; background: #fff; border-radius: 8px; padding: 7px 9px; }
.window .st { font: 650 10px var(--mono); padding: 2px 6px; border-radius: 5px; background: #e9edf2; }
.window .st.due { background: #fff1cc; color: #7a5200; }
.window .st.ok { background: #dcf5e7; color: #17703f; }

/* ---------- Compliance table ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--paper-2); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
th { background: var(--night); color: var(--ink-on-dark); font-weight: 650; font-size: 14px; }
td:first-child { font: 600 14px var(--mono); white-space: nowrap; color: var(--amber-deep); }
tr:last-child td { border-bottom: 0; }

.callout { border-left: 4px solid var(--amber); background: #fff; padding: 18px 22px; border-radius: 0 12px 12px 0; color: var(--muted); }
.callout strong { color: var(--ink); }

/* ---------- About ---------- */

.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; }
.contact-card { background: var(--night); color: var(--ink-on-dark); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; }
.contact-card p { margin: 0; color: var(--muted-on-dark); }
.prose p { color: var(--muted); max-width: 66ch; }
.prose h2 { margin-bottom: 16px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: var(--muted-on-dark); padding: 56px 0 40px; font-size: 14.5px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { margin: 0 0 12px; color: var(--ink-on-dark); font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink-on-dark); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--panel-line); padding-top: 20px; margin-top: 12px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero-grid, .intro-grid, .product, .two-col { grid-template-columns: 1fr; }
    .product:nth-child(even) .product-art { order: 0; }
    .modules, .platforms { grid-template-columns: repeat(2, 1fr); }
    .flow { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
    .flow li:nth-child(2)::after { display: none; }
    .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .band { padding: 72px 0; }
    .nav-toggle { display: inline-block; }
    .nav {
        display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: var(--night); padding: 12px 24px 20px; border-bottom: 1px solid var(--panel-line);
    }
    .nav.open { display: flex; }
    .modules, .platforms, .stats .tiles { grid-template-columns: 1fr; }
    .flow { grid-template-columns: 1fr; }
    .flow li::after { display: none; }
    .device { width: 280px; height: 580px; }
    .tile .value { font-size: 44px; }
    .site-footer .wrap { grid-template-columns: 1fr; }
}

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

@media (forced-colors: active) {
    .tag::before, .screen .s-switch.on { forced-color-adjust: none; }
}
