/* helix-2.com · "Live circuit". Dark by design; there is no light theme. */

/* ── Fonts ──────────────────────────────────────────────────
   Self-hosted variable fonts from Fontsource 5.3.0 (SIL OFL 1.1, licences in /fonts),
   so visitors' browsers never contact a third-party font service. */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('/fonts/unbounded-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0D1122;
    --surface: #151A31;
    --deep: #0A0D1B;
    --line: #2A3157;
    --text: #E9EBF7;
    --muted: #9097BD;
    --lilac: #A98DFF;
    --coral: #FF9E7A;
    --mint: #7BE2B8;
    --comment: #626A95;
    --gutter: clamp(16px, 5vw, 56px);
    --travel: 560ms;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image: radial-gradient(rgba(169, 141, 255, .10) 1px, transparent 1.2px);
    background-size: 26px 26px;
    color: var(--text);
    font: 16px/1.5 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }
::selection { background: rgba(169, 141, 255, .35); }

.mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; }

.page {
    width: min(100%, 1312px);
    margin-inline: auto;
    padding-inline: var(--gutter);
    padding-block: 22px 32px;
}

/* ── Header ─────────────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.wordmark { font-weight: 600; font-size: 16px; text-decoration: none; }
.wordmark::after { content: "_"; color: var(--lilac); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--mint);
    border: 1px solid rgba(123, 226, 184, .35); border-radius: 999px; padding: 3px 10px;
}
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.nav-links { display: flex; gap: 22px; margin-left: auto; color: var(--muted); font-size: 15px; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links a:not(:last-child) { display: none; } }
@media (max-width: 400px) { .live-pill { display: none; } }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding-block: clamp(40px, 7vw, 80px) 0; }
.hero h1 {
    font-family: 'Unbounded', sans-serif; font-weight: 700;
    font-size: clamp(32px, 5.4vw, 62px); line-height: 1.05; letter-spacing: -0.02em;
    margin: 0; max-width: 17ch; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--lilac); }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 58ch; margin: 22px 0 0; }

/* ── Live circuit demo ─────────────────────────────────── */
.try { margin: 36px 0 0; font-size: 13px; color: var(--coral); }
.try-more { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.stage { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 920px) { .stage { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.3fr) 64px minmax(0, 1fr); } }

.win { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; }
.bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.bar i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { padding: 16px; display: grid; gap: 12px; }
.who { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.unit { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.unit b { font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: 17px; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
    background: rgba(123, 226, 184, .14); color: var(--mint);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.oos { background: rgba(255, 158, 122, .14); color: var(--coral); }
.pill.flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 10px transparent; } }

.flip {
    font: inherit; font-weight: 600; font-size: 14px;
    background: transparent; color: var(--text);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
    cursor: pointer; text-align: left;
}
.flip:hover:not(:disabled) { border-color: var(--lilac); }
.flip:disabled { opacity: .55; cursor: progress; }

.wire {
    position: relative; justify-self: center; width: 2px; height: 44px;
    background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px);
}
.dot {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    left: 50%; top: 0; margin-left: -6px; opacity: 0;
    background: var(--coral); box-shadow: 0 0 14px var(--coral);
}
.dot.diff { background: var(--lilac); box-shadow: 0 0 14px var(--lilac); }
.dot.fwd { animation: fwd-v var(--travel) ease-in-out forwards; }
.dot.back { animation: back-v var(--travel) ease-in-out forwards; }
@keyframes fwd-v { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: calc(100% - 12px); opacity: 0; } }
@keyframes back-v { 0% { top: calc(100% - 12px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 0; opacity: 0; } }
@media (min-width: 920px) {
    .wire { width: 100%; height: 2px; background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px); }
    .dot { top: 50%; left: 0; margin: -6px 0 0 0; }
    .dot.fwd { animation-name: fwd-h; }
    .dot.back { animation-name: back-h; }
}
@keyframes fwd-h { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; } }
@keyframes back-h { 0% { left: calc(100% - 12px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }

.srv { background: var(--deep); border: 1px solid rgba(169, 141, 255, .45); border-radius: 14px; overflow: hidden; box-shadow: 0 0 40px -18px var(--lilac); min-width: 0; }
.srv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.srv-head strong { color: var(--text); font-weight: 600; }
.code { margin: 0; padding: 12px 0; font-size: 12.5px; line-height: 1.65; overflow-x: auto; }
.ln { display: block; padding: 0 14px; white-space: pre; transition: background .2s; }
.ln.hot { background: rgba(169, 141, 255, .22); }
.code .k { color: var(--lilac); }
.code .s { color: var(--coral); }
.code .c { color: var(--comment); }
.log {
    list-style: none; margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--line);
    font-size: 11.5px; line-height: 1.7; color: var(--muted); min-height: calc(4 * 1.7em + 22px);
}
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log li:first-child { color: var(--text); }

/* ── Sections ───────────────────────────────────────────── */
.h2 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.01em; margin: 88px 0 24px; }

.comps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.comp { border: 1px solid var(--line); background: rgba(21, 26, 49, .7); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.comp code { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--lilac); }
.comp p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; }
.why div { display: flex; flex-direction: column; gap: 6px; }
.why small { font-size: 12px; color: var(--coral); }
.why h3 { margin: 0; font-size: 19px; font-weight: 600; }
.why p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }

/* ── Recent work ────────────────────────────────────────── */
.work { display: grid; gap: 72px; }
.proj { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .proj { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 44px; } }
.proj-text small { font-size: 12px; color: var(--coral); }
.proj-text h3 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.01em; margin: 8px 0 12px; }
.proj-text p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.proj-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.proj-points li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.5; }
.proj-points li::before { content: "→"; position: absolute; left: 0; font-family: 'JetBrains Mono', monospace; color: var(--lilac); }

.shot-row { display: grid; grid-template-columns: minmax(0, 1fr) clamp(64px, 21%, 164px); gap: 14px; align-items: end; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: var(--deep); }
.phone { margin: 0; padding: 5px; background: var(--deep); border: 1px solid var(--line); border-radius: 18px; }
.phone img { width: 100%; aspect-ratio: 9 / 19; object-fit: cover; object-position: top; border-radius: 13px; }
@media (max-width: 420px) { .phone { padding: 3px; border-radius: 12px; } .phone img { border-radius: 9px; } }

.thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.thumbs a { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.thumbs a:hover { border-color: var(--muted); }
.thumbs a[aria-current="true"] { border-color: var(--lilac); box-shadow: 0 0 0 1px var(--lilac); }
.thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; opacity: .7; transition: opacity .15s; }
.thumbs a:hover img, .thumbs a[aria-current="true"] img { opacity: 1; }
.thumbs span { display: block; padding: 5px 8px; font: 11px/1.4 'JetBrains Mono', monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumbs a[aria-current="true"] span { color: var(--text); }

/* ── Contact ────────────────────────────────────────────── */
.cta {
    margin-top: 88px; border: 1px solid var(--line); border-radius: 18px;
    padding: clamp(20px, 4vw, 44px);
    background: linear-gradient(135deg, rgba(169, 141, 255, .14), rgba(255, 158, 122, .06)), rgba(13, 17, 34, .6);
    display: grid; gap: 32px;
}
@media (min-width: 900px) { .cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; } }
.cta-cmd { font-size: 13px; color: var(--muted); }
.cta h2 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: clamp(26px, 4vw, 42px); line-height: 1.1; margin: 10px 0 0; letter-spacing: -0.02em; text-wrap: balance; }
.cta-intro > p { margin: 16px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 44ch; }
.cta-intro > p.cta-or { margin-top: 28px; font-size: 12px; color: var(--coral); }

.mail {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 10px; max-width: 100%;
    background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 14px;
}
.mail code { font-family: 'JetBrains Mono', monospace; font-size: 15px; user-select: all; overflow-wrap: anywhere; }
.mail button {
    font: inherit; font-size: 13px; font-weight: 600; margin-left: 10px;
    background: var(--lilac); color: var(--deep); border: 0; border-radius: 7px; padding: 8px 12px; cursor: pointer;
}

.form { display: grid; gap: 16px; }
.row2 { display: grid; gap: 16px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; margin-bottom: 6px; font: 12px 'JetBrains Mono', monospace; color: var(--muted); }
.field label span { color: var(--comment); }
.field input, .field textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--text);
    background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--comment); }
.field input:focus, .field textarea:focus { border-color: var(--lilac); outline: none; box-shadow: 0 0 0 3px rgba(169, 141, 255, .25); }
.field .invalid { border-color: var(--coral); }
.validation-message { margin-top: 6px; font-size: 13.5px; color: var(--coral); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; padding: 10px 14px; border: 1px solid rgba(255, 158, 122, .45); border-radius: 10px; color: var(--coral); background: rgba(255, 158, 122, .08); }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.form-note { font-size: 13.5px; color: var(--muted); }
.form-privacy { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.form-privacy a { color: var(--text); }
.btn {
    font: inherit; font-weight: 600; font-size: 15px;
    background: var(--lilac); color: var(--deep); border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer;
    box-shadow: 0 0 24px -8px var(--lilac);
}
.btn:hover { filter: brightness(1.08); }

.form-done { align-self: center; border: 1px solid rgba(123, 226, 184, .4); border-radius: 14px; padding: 24px; background: rgba(123, 226, 184, .06); }
.form-done .mono { margin: 0; font-size: 13px; color: var(--mint); }
.form-done h3 { margin: 8px 0 6px; font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: 22px; }
.form-done p:last-child { margin: 0; color: var(--muted); }
.form-done strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

/* ── Footer ─────────────────────────────────────────────── */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ── Simple pages (404, error) ─────────────────────────── */
.plain { padding-block: clamp(56px, 10vw, 120px); max-width: 60ch; }
.plain h1 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: clamp(28px, 4vw, 44px); margin: 12px 0 14px; }
.plain p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.plain .mono:first-child { color: var(--coral); font-size: 13px; margin: 0; }
.plain a { color: var(--lilac); }

/* ── Connection notices ────────────────────────────────── */
.reconnect {
    position: fixed; inset: auto auto 16px 16px; z-index: 1000; margin: 0;
    max-width: calc(100vw - 32px); padding: 10px 12px 10px 14px;
    display: none; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--deep); color: var(--text); font-size: 12.5px;
    border: 1px solid rgba(255, 158, 122, .5); border-radius: 12px;
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .7);
}
.reconnect[open] { display: flex; }
.reconnect p { margin: 0; }
.reconnect-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 8px var(--coral); animation: blink 1.1s steps(1) infinite; }
.reconnect button { font: inherit; font-weight: 600; background: var(--lilac); color: var(--deep); border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer; }

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible { display: none; }
.components-reconnect-show .components-reconnect-first-attempt-visible,
.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
.components-reconnect-failed .components-reconnect-failed-visible,
.components-reconnect-paused .components-pause-visible,
.components-reconnect-resume-failed .components-resume-failed-visible { display: block; }

#blazor-error-ui {
    display: none; position: fixed; inset: auto 0 0 0; z-index: 1001;
    padding: 12px 48px 12px var(--gutter);
    background: var(--deep); color: var(--text); border-top: 1px solid var(--coral); font-size: 14px;
}
#blazor-error-ui .reload { color: var(--lilac); margin-left: 8px; }
#blazor-error-ui .dismiss { position: absolute; right: 12px; top: 6px; font-size: 22px; background: none; border: 0; color: var(--muted); cursor: pointer; }

/* ── Reduced motion: no travelling dots, flashes or blinking ─ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .wordmark::after, .reconnect-dot { animation: none; }
    .dot { display: none; }
    .pill.flash { animation: none; }
    .ln, .thumbs img { transition: none; }
}
