/* Magnum's homepage, in the app's Light theme: perforated aluminium, espresso ink, signal orange,
   periwinkle; display lines in the app's own dot letters (scripts/dots.mjs). The site's other pages
   (Guide, privacy, enterprise) keep styles.css. */

:root {
    --alu: #E9E9ED;
    --alu-hi: #F2F2F5;
    --alu-lo: #E0E0E6;
    --sheet: #FFFFFF;
    --ink: #2A1810;
    --ink-2: #66564F;
    --ink-3: #8C7E77;
    --line: #D3D3DA;
    --line-soft: #DEDEE4;
    --signal: #FF3D00;
    --signal-ink: #C42E00;
    --peri: #8F8EE8;
    --peri-soft: #C5C5F7;
    --go: #1F9D55;
    --ghost: rgba(42, 24, 16, 0.055);

    --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --wrap: 1200px;
    --gutter: 16px;
    --pitch: min(13px, calc((100vw - 2 * var(--gutter)) / 74));
    --radius-plate: 16px;
    --shadow-plate: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(42, 24, 16, 0.06), 0 12px 32px -12px rgba(42, 24, 16, 0.18);
}

@media (min-width: 640px) {
    :root { --gutter: 32px; }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--alu);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--alu-lo);
    border-radius: 5px;
    padding: 0.1em 0.35em;
}

::selection { background: var(--peri-soft); color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 6px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -60px;
    z-index: 20;
    background: var(--ink);
    color: var(--alu);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- dot letters ---------- */

.dots { display: block; height: auto; overflow: visible; }
.dots pattern circle { fill: var(--ghost); }
.dots-lit { stroke: currentColor; }

.display { color: var(--ink); line-height: 0; }
.display .dots {
    width: calc(var(--cols) * var(--pitch));
    max-width: 100%;
}
.display .dots + .dots { margin-top: calc(var(--pitch) * 2.4); }

@media (prefers-reduced-motion: no-preference) {
    /* The page's one moment: the headline's panel lights up column by column, as a display does. */
    .hero .display .dots { animation: scan 0.9s steps(24, end) both; }
    .hero .display .dots + .dots { animation-delay: 0.3s; }
}

@keyframes scan {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* ---------- top bar ---------- */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(233, 233, 237, 0.86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark { width: 30px; height: auto; }
.brand .dots { height: 14px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
}
.nav-link:hover { color: var(--ink); background: var(--alu-lo); }
.nav-install {
    margin-left: 8px;
    background: var(--ink);
    color: var(--alu-hi);
}
.nav-install:hover { background: #3b2419; color: #fff; }

@media (max-width: 860px) {
    .nav-optional { display: none; }
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(40px, 7vw, 88px); }

.backed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 9px;
    margin-bottom: clamp(28px, 4vw, 44px);
    border-radius: 999px;
    background: var(--alu-hi);
    box-shadow: 0 0 0 1px var(--line-soft);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
}
.backed:hover { color: var(--ink); }
.backed-mark { width: 15px; height: 15px; fill: #D97757; flex: none; }

.lede {
    max-width: 34em;
    margin-top: clamp(28px, 4vw, 40px);
    font-size: clamp(19px, 1.9vw, 22px);
    line-height: 1.45;
    color: var(--ink-2);
}

/* the install block (hero and closing) */
.get { margin-top: 32px; }
.get-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}
.os {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 12px;
    background: var(--alu-lo);
}
.os-tab {
    font: 500 15px/1 var(--sans);
    color: var(--ink-2);
    background: transparent;
    border: 0;
    border-radius: 9px;
    padding: 0 14px;
    min-height: 40px;
    cursor: pointer;
}
.os-tab:hover { color: var(--ink); }
.os-tab[aria-pressed="true"] {
    background: var(--sheet);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(42, 24, 16, 0.12);
}
.cmd {
    display: flex;
    align-items: center;
    flex: 1 1 420px;
    max-width: 720px;
    min-width: 0;
    border-radius: 12px;
    background: var(--sheet);
    box-shadow: var(--shadow-plate);
    padding: 4px 4px 4px 18px;
}
.cmd-text {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    background: none;
    padding: 0;
    font-size: 15px;
    color: var(--ink);
}
.cmd-text::-webkit-scrollbar { display: none; }
.cmd-text::before { content: "$ "; color: var(--ink-3); }
.copy {
    flex: none;
    margin-left: 12px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: var(--signal);
    color: #fff;
    font: 600 15px/1 var(--sans);
    cursor: pointer;
}
.copy:hover { background: #F03800; }
.copy:active { background: #D93300; }
.get-note {
    margin-top: 14px;
    font-size: 15px;
    color: var(--ink-2);
}
.get-note a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.get-note a:hover { color: var(--signal-ink); }

/* the hero's capture on a perforated plate */
.hero-plate {
    position: relative;
    margin-top: clamp(48px, 7vw, 88px);
    padding-bottom: clamp(56px, 8vw, 104px);
}
.hero-plate::before {
    content: "";
    position: absolute;
    inset: 12% 0 0 0;
    background-image: radial-gradient(circle, rgba(42, 24, 16, 0.12) 1.6px, transparent 1.9px);
    background-size: 13px 13px;
    background-position: center top;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 22%, #000 70%, transparent);
    pointer-events: none;
}
.hero-shot {
    position: relative;
    margin: 0 auto;
}
.hero-shot img, .fleet-shot img {
    width: 100%;
    filter: drop-shadow(0 2px 3px rgba(42, 24, 16, 0.14)) drop-shadow(0 30px 50px rgba(42, 24, 16, 0.2));
}

/* ---------- sections ---------- */

main > section:not(.hero) { padding: clamp(72px, 10vw, 128px) 0; }
main > section + section:not(.closing) { border-top: 1px solid var(--line-soft); }

h2 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.022em;
    text-wrap: balance;
}
h3 {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.005em;
}
.head { max-width: 46em; }
.head p, .split-text p {
    margin-top: 20px;
    color: var(--ink-2);
    max-width: 36em;
}
.split-text p + p { margin-top: 14px; }

.plate {
    margin: 0;
    border-radius: var(--radius-plate);
    background: var(--sheet);
    box-shadow: var(--shadow-plate);
    overflow: hidden;
}
.plate img { width: 100%; }

.split {
    display: grid;
    gap: 40px;
}
@media (min-width: 960px) {
    .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
}

/* the run */
.run-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) {
    .run-grid { grid-template-columns: 4fr 7fr; gap: 64px; }
}
.run-text p { margin-top: 20px; color: var(--ink-2); max-width: 30em; }
.film {
    position: relative;
    margin: 0;
    border-radius: var(--radius-plate);
    overflow: hidden;
    background: var(--ink);
    box-shadow: var(--shadow-plate);
    aspect-ratio: 16 / 9;
}
.film-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-play {
    position: absolute;
    left: 20px;
    top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px 0 14px;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--alu-hi);
    font: 600 16px/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(42, 24, 16, 0.3);
}
.film-play svg { width: 22px; height: 22px; fill: var(--signal); }
.film-time { font-family: var(--mono); font-weight: 400; font-size: 14px; color: var(--ink-3); }
.film-play:hover { background: #3b2419; }

/* how a run goes: three steps beside one capture */
.steps { margin-top: clamp(36px, 5vw, 56px); counter-reset: step; }
.step + .step { margin-top: 36px; }
.step-title {
    counter-increment: step;
    font: 600 22px/1.2 var(--sans);
    letter-spacing: -0.01em;
}
.step-head {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    text-decoration: none;
    cursor: default;
}
.step-head::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    flex: none;
    border-radius: 50%;
    font: 500 14px/1 var(--mono);
    background: var(--ink);
    color: var(--alu-hi);
}
.step-text {
    margin-top: 10px;
    padding-left: 44px;
    color: var(--ink-2);
    max-width: 30em;
}
.step-shot { margin-top: 20px; }

@media (min-width: 1024px) {
    .steps {
        display: grid;
        grid-template-columns: minmax(0, 4.4fr) minmax(0, 7fr);
        grid-auto-rows: auto;
        column-gap: 64px;
        align-items: start;
    }
    .step { display: contents; }
    .step-title, .step-text { grid-column: 1; }
    .step-title { padding-top: 22px; }
    .step:first-child .step-title { padding-top: 6px; }
    .step-head { cursor: pointer; }
    .step-text { margin-top: 8px; }
    .step-shot {
        grid-column: 2;
        grid-row: 1 / span 6;
        margin-top: 0;
    }
    .step:not(.is-active) .step-shot { display: none; }
    .step:not(.is-active) .step-head { color: var(--ink-3); }
    .step:not(.is-active) .step-head:hover { color: var(--ink); }
    .step:not(.is-active) .step-head::before { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px currentColor; }
    .step:not(.is-active) .step-text { color: var(--ink-3); }
    .step.is-active .step-head::before { background: var(--signal); color: #fff; }
}

/* the night */
.timeline {
    position: relative;
    padding: 28px 28px 28px 24px;
    border-radius: var(--radius-plate);
    background: var(--sheet);
    box-shadow: var(--shadow-plate);
}
.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    padding: 14px 0 14px 26px;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 22px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--ink-3);
}
.timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 36px;
    bottom: -14px;
    border-left: 2px dotted var(--line);
}
.timeline li.is-done::before { background: var(--go); }
.timeline li.is-asking::before { background: var(--signal); box-shadow: 0 0 0 4px rgba(255, 61, 0, 0.16); }
.timeline time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
}
.timeline span { color: var(--ink-2); }

/* machines */
.machines-shot { margin-top: clamp(36px, 5vw, 56px); }
.machines-shot img { min-width: 640px; }
.machines-shot { overflow-x: auto; }
.trio {
    display: grid;
    gap: 28px 48px;
    margin-top: clamp(36px, 5vw, 56px);
}
@media (min-width: 840px) {
    .trio { grid-template-columns: repeat(3, 1fr); }
}
.trio p, .agent-list p, .router p, .box-grid p {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
}

/* agents */
.agents-grid {
    display: grid;
    gap: 48px;
    margin-top: clamp(36px, 5vw, 56px);
}
@media (min-width: 960px) {
    .agents-grid { grid-template-columns: 1fr 440px; gap: 64px; align-items: start; }
}
.agent-list { display: grid; gap: 0; }
.agent-list > div { padding: 22px 0; border-top: 1px solid var(--line); }
.agent-list > div:last-child { border-bottom: 1px solid var(--line); }
.router h3 { margin-top: 24px; }
.router-shot { max-width: 440px; }

/* fleet */
.fleet-shot { margin: clamp(36px, 5vw, 56px) 0 0; }

/* everything around the agent */
.box-grid {
    display: grid;
    gap: 32px 48px;
    margin-top: clamp(36px, 5vw, 56px);
}
@media (min-width: 640px) { .box-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .box-grid { grid-template-columns: repeat(3, 1fr); } }
.box-grid a { color: var(--ink); text-underline-offset: 3px; }

/* specs */
.spec-table { border-top: 1px solid var(--line); }
.spec {
    display: grid;
    grid-template-columns: minmax(110px, 2fr) 5fr;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}
.spec span:first-child { color: var(--ink-3); }
.spec span:last-child { color: var(--ink); font-weight: 500; }

/* faq */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    position: relative;
    display: block;
    padding: 20px 44px 20px 0;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 12px; height: 12px;
    margin-top: -6px;
    background:
        linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 2px no-repeat,
        linear-gradient(var(--ink-2), var(--ink-2)) center / 2px 12px no-repeat;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    padding: 0 44px 22px 0;
    color: var(--ink-2);
    max-width: 40em;
}

/* closing */
.closing {
    position: relative;
    background: var(--alu-hi);
    border-top: 1px solid var(--line-soft);
    overflow: hidden;
}
.closing::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(42, 24, 16, 0.1) 1.6px, transparent 1.9px);
    background-size: 13px 13px;
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    pointer-events: none;
}
.closing .wrap { position: relative; }
.closing .get { margin-top: clamp(32px, 4vw, 44px); }

/* footer */
.foot {
    padding: 56px 0 64px;
    background: var(--alu-lo);
    font-size: 15px;
}
.foot-grid {
    display: grid;
    gap: 36px;
}
@media (min-width: 720px) {
    .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.foot-brand img { width: 46px; }
.foot-brand p { margin-top: 16px; color: var(--ink-2); line-height: 1.6; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink-3);
}
.foot-col ul { margin-top: 12px; display: grid; gap: 8px; }

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

/* how Magnum compares: rows like the specs */
.compare-note { font-size: 15px; color: var(--ink-3) !important; }
.compare-table { border-top: 1px solid var(--line); }
.compare-table .spec { grid-template-columns: minmax(96px, 1.3fr) 5fr; }
.compare-table .spec span:first-child a { color: var(--ink); font-weight: 600; text-decoration: none; }
.compare-table .spec span:first-child a:hover { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 3px; }
.compare-table .spec span:last-child { font-weight: 400; color: var(--ink-2); }
.faq-item p a { color: var(--ink); text-underline-offset: 3px; }
