/* MVS website.
   Colours come from the MVS logo and editor: ink navy, MVS blue, the red of the logo's fold
   (used for the caret only), and the editor's syntax colours. Type: Bricolage Grotesque for
   reading and headlines, JetBrains Mono for code (the editor's own font). */

@font-face {
    font-family: "Bricolage";
    src: url("/public/fonts/bricolage-latin-var.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("/public/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
}

:root {
    --ink: #070a12;
    --night: #0d1320;
    --raise: #121a2b;
    --rule: #1e283c;
    --paper: #e9eef6;
    --fog: #919db2;
    --blue: #2f6bff;
    --blue-deep: #1a3fb8;
    --ember: #f2333d;
    --sky: #6fcfff;
    --syn-key: #c792ea;
    --syn-type: #82d8c8;
    --syn-str: #b9e08e;
    --syn-fn: #7fb6ff;
    --syn-dim: #5b6780;
    --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --wrap: 1160px;
    --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font: 400 1.0625rem/1.62 var(--font);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 14px; background: var(--paper); color: var(--ink); border-radius: 8px; }
.skip:focus { left: 8px; }

/* honeypot block (TrapService): never visible, never focusable */
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
    background: var(--blue); color: #fff; font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
    transition: background-color 0.16s ease, transform 0.16s ease;
}
.btn:hover { background: #2a60e8; }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; border-color: var(--rule); color: var(--paper); }
.btn-quiet:hover { background: var(--raise); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 0.9375rem; }

/* ------------------------------------------------------------------ header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 88%, transparent); border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
@supports (backdrop-filter: blur(1px)) { .top { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
.top.is-scrolled { border-bottom-color: var(--rule); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand img { width: 40px; height: auto; }
.top-nav { display: flex; gap: 22px; margin-left: auto; }
.top-nav a { color: var(--fog); text-decoration: none; font-size: 0.9375rem; }
.top-nav a:hover { color: var(--paper); }
@media (max-width: 720px) { .top-nav { display: none; } .top-inner > .btn { margin-left: auto; } }

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 9vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-title {
    margin: 0 0 24px;
    font-size: clamp(2.75rem, 7.2vw, 5.4rem);
    font-weight: 750;
    line-height: 0.96;
    letter-spacing: -0.045em;
    max-width: 11ch;
    text-wrap: balance;
}
.hero-lede { max-width: 34rem; color: #c7d0de; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-actions form { margin: 0; }
.hero-note { margin-top: 18px; color: var(--fog); font-size: 0.9375rem; }
.hero-stage { position: relative; display: flex; justify-content: center; }
/* the stage light: the logo's two blues behind the phone, no glow on text */
.hero-stage::before {
    content: ""; position: absolute; inset: 8% 4% 10%; border-radius: 40%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 30%, transparent), transparent 72%);
    filter: blur(20px); opacity: 0.7; pointer-events: none;
}
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-title { max-width: 12ch; }
}

/* ------------------------------------------------------------------ phone + live demo */
.phone {
    position: relative;
    width: min(340px, 82vw);
    aspect-ratio: 9 / 18.6;
    padding: 10px;
    border-radius: 44px;
    background: linear-gradient(160deg, #263247, #0b0f19 55%, #1a2232);
    box-shadow: 0 0 0 1px #2c374d, 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 18px 40px -20px rgba(18, 52, 160, 0.5);
}
.phone-screen { position: relative; height: 100%; border-radius: 35px; overflow: hidden; background: #05070c; isolation: isolate; }
.mock-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 14px 14px 0; font-size: 12px; color: var(--fog); }
.mock-bar img { width: 26px; }
.mock-project { padding: 3px 8px; border: 1px solid var(--rule); border-radius: 6px; color: var(--paper); }
.mock-dots { margin-left: auto; width: 16px; height: 4px; background: radial-gradient(circle, var(--fog) 1.6px, transparent 2px) 0 0 / 6px 4px repeat-x; }
.mock-tabs { display: flex; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid var(--rule); }
.mock-tab { padding: 6px 10px; font: 500 11px/1 var(--mono); color: var(--syn-dim); border-radius: 7px 7px 0 0; }
.mock-tab.is-active { color: var(--paper); background: var(--night); }
.mock-code {
    margin: 0; padding: 12px 12px 12px 0; height: calc(100% - 44px - 34px);
    font: 400 11.5px/1.75 var(--mono); color: #c9d3e3; white-space: pre; overflow: hidden;
    counter-reset: ln;
}
.mock-code .ln { display: block; padding-left: 38px; position: relative; }
.mock-code .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 26px; text-align: right; color: #334058; }
.k { color: var(--syn-key); } .t { color: var(--syn-type); } .s { color: var(--syn-str); } .f { color: var(--syn-fn); } .d { color: var(--syn-dim); }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.2em; background: var(--ember); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-suggest {
    position: absolute; left: 132px; top: 262px; z-index: 2; min-width: 150px; padding: 4px;
    font: 400 11px/1 var(--mono); background: #101828; border: 1px solid #2a3650; border-radius: 8px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}
.mock-suggest div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 8px; border-radius: 5px; color: #c9d3e3; }
.mock-suggest div.is-on { background: #1d3a7a; }
.mock-suggest b { font-weight: 500; color: var(--syn-fn); }
.mock-suggest i { font-style: normal; color: var(--syn-dim); }
.mock-term {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 41%;
    background: #04060b; border-top: 1px solid var(--rule);
    transform: translateY(101%); transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mock-term.is-up { transform: none; }
.mock-term-head { padding: 8px 12px; font: 600 11px/1 var(--font); color: var(--fog); border-bottom: 1px solid #141c2c; }
.mock-term-head span { color: var(--paper); border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.mock-term pre { margin: 0; padding: 10px 12px; font: 400 11px/1.65 var(--mono); color: #b9c4d6; white-space: pre-wrap; }
.mock-term .p { color: var(--sky); }
.mock-term .ok { color: var(--syn-str); }

/* ------------------------------------------------------------------ sections */
.section-title {
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    max-width: 18ch;
    text-wrap: balance;
}
.features { padding: clamp(64px, 10vw, 128px) 0; border-top: 1px solid var(--rule); }
.feature-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 7vw, 104px); margin-top: clamp(40px, 6vw, 72px); }
.feature-stage { position: sticky; top: calc(50vh - 330px); align-self: start; display: flex; justify-content: center; }
.phone-shot { width: min(320px, 100%); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity 0.45s ease; }
.shot.is-on { opacity: 1; }
.feature-list { display: grid; }
.feature { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; opacity: 0.34; transition: opacity 0.35s ease; }
.feature.is-on { opacity: 1; }
.feature h3 { margin: 0 0 14px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; }
.feature p { max-width: 34rem; color: #c7d0de; }
.feature ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 34rem; }
.feature li { position: relative; padding-left: 22px; color: var(--paper); }
.feature li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 2px; background: var(--blue); }
.feature-shot-inline { display: none; }
@media (max-width: 880px) {
    .feature-grid { grid-template-columns: 1fr; }
    .feature-stage { display: none; }
    .feature { min-height: 0; opacity: 1; padding: 28px 0 44px; }
    .feature-shot-inline { display: block; width: min(300px, 78vw); margin: 0 0 28px; border-radius: 26px; border: 8px solid #1a2232; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
}

.ai { padding: clamp(64px, 10vw, 120px) 0; background: var(--night); border-block: 1px solid var(--rule); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.ai-copy p { margin-top: 22px; max-width: 32rem; color: #c7d0de; }
.ai-table { border-top: 1px solid var(--rule); }
.ai-row { display: grid; grid-template-columns: 1.1fr 1.8fr 0.9fr 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ai-head { padding: 12px 0; color: var(--fog); font-size: 0.875rem; }
.ai-name { font-weight: 650; }
.ai-num { font-family: var(--mono); font-size: 0.9375rem; color: var(--sky); }
.ai-credit { margin-top: 16px; color: var(--fog); font-size: 0.875rem; }
@media (max-width: 880px) {
    .ai-grid { grid-template-columns: 1fr; }
    .ai-row { grid-template-columns: 1fr 1fr; row-gap: 4px; }
    .ai-head { display: none; }
    .ai-row span:nth-child(2) { grid-column: 1 / -1; order: 3; color: var(--fog); }
}

.specs { padding: clamp(64px, 10vw, 120px) 0; }
.specs-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); }
.spec-list { margin: 0; border-top: 1px solid var(--rule); }
.spec-list div { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.spec-list dt { color: var(--fog); }
.spec-list dd { margin: 0; }
.spec-list a { color: var(--sky); text-underline-offset: 3px; }
@media (max-width: 880px) { .specs-grid { grid-template-columns: 1fr; } .spec-list div { grid-template-columns: 1fr; gap: 2px; } }

.access { padding: clamp(72px, 11vw, 140px) 0; border-top: 1px solid var(--rule); background:
    radial-gradient(80% 120% at 100% 100%, color-mix(in srgb, var(--blue-deep) 26%, transparent), transparent 60%); }
.access-inner { max-width: 46rem; }
.access p { margin-top: 22px; color: #c7d0de; font-size: 1.125rem; }

/* ------------------------------------------------------------------ footer */
.foot { padding: 48px 0 56px; border-top: 1px solid var(--rule); color: var(--fog); font-size: 0.9375rem; }
.foot-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { width: 40px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--paper); }
.foot-small { grid-column: 1 / -1; font-size: 0.8125rem; color: #6b7790; }
@media (max-width: 720px) { .foot-inner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ documents, status, preview */
.doc { max-width: 44rem; padding: clamp(40px, 7vw, 80px) 0 96px; }
.doc-tabs { display: flex; gap: 6px; margin-bottom: 36px; }
.doc-tabs a { padding: 8px 14px; border-radius: 10px; color: var(--fog); text-decoration: none; border: 1px solid transparent; }
.doc-tabs a[aria-current="page"] { color: var(--paper); border-color: var(--rule); background: var(--night); }
.doc h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.035em; line-height: 1.05; }
.doc-meta { margin-top: 12px; color: var(--fog); font-size: 0.9375rem; }
.doc-summary { margin-top: 24px; font-size: 1.1875rem; color: var(--paper); }
.doc section { margin-top: 36px; }
.doc h2 { margin: 0 0 8px; font-size: 1.1875rem; letter-spacing: -0.01em; }
.doc section p { color: #c7d0de; }

.status { max-width: 36rem; padding: clamp(56px, 10vw, 120px) 0 120px; }
.status h1 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.035em; line-height: 1.05; }
.status > p { color: #c7d0de; margin-bottom: 28px; }
.signin { display: grid; gap: 10px; max-width: 22rem; }
.signin label { color: var(--fog); font-size: 0.9375rem; }
.signin input {
    min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--rule);
    background: var(--night); color: var(--paper); font: 400 1rem var(--font);
}
.signin input:focus { outline: none; border-color: var(--blue); }
.signin .btn { margin-top: 8px; }
.form-error { color: #ff8a8f; font-size: 0.9375rem; }
.hash { margin-top: 28px; color: var(--fog); font-size: 0.8125rem; overflow-wrap: anywhere; }
.hash code { display: block; margin-top: 4px; color: var(--paper); }

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

/* the demo's code scales with the phone, so a 41-character line always fits; no ligatures (-> stays ->) */
.phone { container-type: inline-size; }
.mock-code { font-size: clamp(8.5px, 3.25cqw, 11.5px); }
.mock-term pre, .mock-suggest { font-size: clamp(8.5px, 3.15cqw, 11px); }
.phone .mock-code, .phone pre, .phone code, .mock-tab, .mock-suggest, .mock-suggest *, .ai-num, code, pre { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
