/* Self-hosted fonts (SIL OFL 1.1, licences in fonts/): no requests to third-party servers */

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url(fonts/jetbrains-mono-greek.woff2) format("woff2");
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin.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: "Space Grotesk";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(fonts/space-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(fonts/space-grotesk-latin.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: #212121;
    --bg-deep: #1a1a1a;
    --panel: #262626;
    --line: #353535;
    --line-soft: #2c2c2c;
    --green: #84B773;
    --green-dim: rgba(132, 183, 115, 0.14);
    --text: #FFF;
    --muted: #a3a3a3;
    --amber: #e3b341;
    --sans: "Space Grotesk", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --topbar-h: 64px;
    --wrap: 1180px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-h) + 16px);
    font-size: 18px;
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* wallpaper at 5% + faint oscilloscope graticule */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body::after {
    background-image: url(wallpaper.png);
    background-size: cover;
    background-position: center;
    opacity: 5%;
}

body::before {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}

sub {
    font-size: 0.7em;
    line-height: 0;
}

a {
    color: inherit;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 32px;
    background: rgba(33, 33, 33, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-logo img {
    display: block;
    height: 22px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav a {
    position: relative;
    padding: 8px 12px;
    color: #cfcfcf;
    text-decoration: none;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
}

.nav a.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.nav-cta {
    display: flex;
    align-items: stretch;
    margin-left: 12px;
    border: 1px solid var(--green);
    color: var(--green);
}

.nav-cta-label {
    padding: 8px 10px 8px 12px;
    color: var(--muted);
}

.nav .nav-cta a {
    padding: 8px 10px;
    border-left: 1px solid rgba(132, 183, 115, 0.4);
    color: var(--green);
}

.nav .nav-cta a:hover {
    background: var(--green-dim);
    color: var(--green);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--line);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
}

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

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 96px 32px 0;
    text-align: center;
}

.main-logo,
.subtitle {
    background-color: var(--bg);
}

.main-logo {
    display: block;
    width: 720px;
    max-width: 100%;
    height: auto;
    margin-bottom: 40px;
}

.subtitle {
    font-weight: 300;
    font-size: 1.9rem;
    letter-spacing: 0.01em;
}

.product-name {
    margin-top: 28px;
    /* cancels the trailing letter-spacing so the text stays optically centred */
    margin-right: -0.3em;
    background-color: var(--bg);
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--green);
}

.hero-product {
    position: relative;
    width: min(1100px, 100%);
    margin-top: 72px;
}

.hero-product::before {
    content: "";
    position: absolute;
    inset: 10% 5% -5%;
    background: radial-gradient(ellipse at center, rgba(132, 183, 115, 0.16), transparent 65%);
    filter: blur(30px);
    z-index: -1;
}

.hero-product img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}

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

.section {
    width: min(var(--wrap), 100% - 64px);
    margin: 0 auto;
    padding: 110px 0 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-bottom: 18px;
    margin-bottom: 44px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.section-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 72px;
    height: 2px;
    background: var(--green);
}

.section-head h2 {
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.section-note {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 0.9rem;
}

.sub-head {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    margin: 64px 0 20px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--green);
}

/* ---------- 01 overview ---------- */

.overview {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 64px;
    align-items: start;
}

.green-title {
    font-weight: 600;
    color: var(--green);
    font-size: 2.3rem;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 14px 0 22px;
}

.lead {
    color: #d4d4d4;
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.7;
}

.made-in {
    margin-top: 24px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.made-in::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1px;
    background: var(--green);
    vertical-align: middle;
    margin-right: 10px;
}

.kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.kpis > div {
    padding: 20px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(26, 26, 26, 0.6);
    display: flex;
    flex-direction: column-reverse;
}

.kpis dd {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
}

.kpis dd small {
    font-size: 0.5em;
    margin-left: 6px;
    color: var(--green);
}

.kpis dt {
    margin-top: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- 02 demo ---------- */

.demo-frame {
    position: relative;
    padding: 18px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
}

/* corner brackets */
.demo-frame::before,
.demo-frame::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--green);
}

.demo-frame::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.demo-frame::after {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
}

.demo-hint {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--green);
}

/* blinking "live" dot */
.demo-hint span {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: hint-blink 1.6s infinite;
}

@keyframes hint-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

#nanopulse-demo {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    box-sizing: border-box;
    border: 4px solid #555;
    border-radius: 8px;
}

/* ---------- 03 applications ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.card {
    padding: 28px 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 2px solid var(--green);
    transition: transform 0.2s, background 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    background: #2b2b2b;
}

.icon {
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card h3,
.feature h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card p,
.feature p {
    color: var(--muted);
    font-size: 0.88rem;
}

/* ---------- 04 key features ---------- */

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.feature {
    position: relative;
    padding: 32px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.feature p {
    font-size: 0.95rem;
    max-width: 48ch;
}

.feature-graphic {
    display: block;
    width: 100%;
    max-width: 320px;
    margin-top: 20px;
    overflow: visible;
}

.feature-graphic .trace {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(132, 183, 115, 0.7));
}

.feature-graphic .dim,
.feature-graphic .wire {
    fill: none;
    stroke: #777;
    stroke-width: 1;
}

.feature-graphic .wire {
    stroke: #8a8a8a;
    stroke-width: 1.5;
}

.feature-graphic text {
    font-family: var(--mono);
    font-size: 12px;
    fill: var(--muted);
    text-anchor: middle;
}

.feature-graphic .small {
    font-size: 9px;
}

.feature-graphic .sub {
    font-size: 7px;
}

.feature-graphic .right {
    text-anchor: end;
}

.feature-graphic .accent {
    fill: var(--green);
}

.feature-graphic .dash {
    stroke-dasharray: 4 4;
}

.feature-graphic .box {
    fill: var(--bg-deep);
    stroke: #8a8a8a;
    stroke-width: 1.5;
}

.feature-graphic .box-g {
    fill: var(--bg-deep);
    stroke: var(--green);
    stroke-width: 1.5;
}

.feature-graphic .fill-m {
    fill: #8a8a8a;
}

/* current limiter: over-threshold pulses and trip state */
.feature-graphic .over {
    stroke: var(--amber);
    filter: drop-shadow(0 0 4px rgba(227, 179, 65, 0.6));
}

.feature-graphic rect.over {
    filter: none;
}

.feature-graphic .over-t {
    fill: var(--amber);
}

/* current limiter: the pulses arrive one by one (each step .sN has its own start time in
   its keyframes, so all steps share one cycle), the third consecutive over-threshold pulse trips the
   output, then the sequence restarts */
.limiter .lim-step {
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.limiter .s0 { animation-name: lim-0; }
.limiter .s1 { animation-name: lim-1; }
.limiter .s2 { animation-name: lim-2; }
.limiter .s3 { animation-name: lim-3; }
.limiter .s4 { animation-name: lim-4; }
.limiter .s5 { animation-name: lim-5; }
.limiter .s6 { animation-name: lim-6; }

@keyframes lim-0 {
    0%, 7.9% { opacity: 0; }
    8%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-1 {
    0%, 16.9% { opacity: 0; }
    17%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-2 {
    0%, 25.9% { opacity: 0; }
    26%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-3 {
    0%, 34.9% { opacity: 0; }
    35%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-4 {
    0%, 43.9% { opacity: 0; }
    44%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-5 {
    0%, 52.9% { opacity: 0; }
    53%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

@keyframes lim-6 {
    0%, 61.9% { opacity: 0; }
    62%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
}

/* connectors light up one after the other, like signal activity */
.connectors .conn {
    animation: conn-active 4.2s infinite;
    animation-delay: calc(var(--i) * 0.35s);
}

@keyframes conn-active {
    0%, 100% { filter: none; }
    5% { filter: brightness(1.7) drop-shadow(0 0 5px rgba(132, 183, 115, 0.9)); }
    16% { filter: none; }
}

/* Marx switches close one after the other, then the output pulse appears */
.marx .sw {
    fill: var(--bg);
    stroke: var(--green);
    stroke-width: 1.5;
    animation: marx-switch 3s infinite;
    animation-delay: calc(var(--i) * 0.12s);
}

.marx .trace {
    animation: marx-out 3s infinite;
}

@keyframes marx-switch {
    0%, 8% { fill: var(--bg); }
    12%, 40% { fill: var(--green); }
    50%, 100% { fill: var(--bg); }
}

@keyframes marx-out {
    0%, 18% { opacity: 0.25; }
    24%, 45% { opacity: 1; }
    60%, 100% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    .marx .sw,
    .marx .trace,
    .limiter .lim-step,
    .connectors .conn,
    .demo-hint span {
        animation: none;
    }
}

.waveforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.scope {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    padding: 10px;
}

.scope img {
    display: block;
    width: 100%;
    height: auto;
}

.scope figcaption {
    padding: 12px 4px 2px;
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--muted);
}

.scope figcaption b {
    color: var(--text);
    font-weight: 500;
    margin-right: 6px;
}

.c-cyan { color: #5fd8e6; }
.c-green { color: #7ed36a; }
.c-magenta { color: #e2508f; }

/* ---------- 05 technical data ---------- */

.spec-groups {
    columns: 2;
    column-gap: 56px;
}

.spec {
    width: 100%;
    border-collapse: collapse;
    break-inside: avoid;
    margin-bottom: 40px;
    font-size: 0.85rem;
}

.spec caption {
    text-align: left;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--green);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
}

.spec th,
.spec td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
    text-align: left;
}

.spec th {
    width: 42%;
    padding-right: 16px;
    font-weight: 400;
    color: var(--muted);
}

.spec td {
    font-family: var(--mono);
    font-size: 0.8rem;
}

.spec-qual {
    display: block;
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--muted);
}

.spec tr:hover th,
.spec tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.spec-groups .spec:last-child {
    margin-bottom: 0;
}

.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    /* same 64px gap as above .ordering */
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.panel .sub-head {
    margin-top: 0;
}

.panel {
    container-type: inline-size;
}

/* shrink-wrapped to the photo so the % pin positions stay on it */
.panel-img {
    position: relative;
    width: fit-content;
}

/* both photos share one height: the one that lets the wider front photo (1878×562, rack ears
   included) fill the column; the narrower rear photo then sits left-aligned with space on its right */
.panel-img img {
    display: block;
    width: auto;
    height: calc(100cqw * 562 / 1878);
}

.pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #111;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55);
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pin.hot {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55), 0 0 14px var(--green);
}

.legend {
    list-style: none;
    columns: 2;
    column-gap: 24px;
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--muted);
}

.legend li {
    padding: 4px 6px;
    cursor: default;
}

.legend li.hot {
    color: var(--text);
    background: var(--green-dim);
}

.legend b {
    display: inline-block;
    width: 1.4em;
    font-family: var(--mono);
    color: var(--green);
}

.ordering {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

.ordering h4 {
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.ordering p,
.ordering li {
    margin-bottom: 10px;
}

.ordering ul {
    list-style: none;
}

.ordering code {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text);
}

.ordering code.inline {
    display: inline;
}

.ordering em {
    font-style: normal;
    color: var(--green);
}

.warning {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 20px 24px;
    border: 1px solid #5a4a1f;
    border-left: 3px solid var(--amber);
    background: rgba(227, 179, 65, 0.06);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #cfcfcf;
}

.warning-icon {
    flex: none;
    width: 40px;
    height: 37px;
    margin-top: 2px;
    fill: var(--amber);
}

.warning-icon .bolt {
    fill: #1a1a1a;
}

.warning b {
    color: var(--amber);
}

.warning ul {
    margin-top: 10px;
    padding-left: 1.1em;
}

.warning li {
    margin-bottom: 4px;
}

.warning li::marker {
    color: var(--amber);
}

.spec-note {
    margin-top: 40px;
    font-size: 0.78rem;
    color: var(--muted);
}

.downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
}

.downloads .button {
    margin-top: 0;
}

.button.button-alt {
    background: transparent;
    color: var(--green);
    box-shadow: inset 0 0 0 1px var(--green);
}

.button.button-alt:hover {
    background: var(--green-dim);
    box-shadow: inset 0 0 0 1px var(--green), 0 0 22px rgba(132, 183, 115, 0.3);
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    padding: 14px 22px;
    background: var(--green);
    color: #111;
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.button span {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.7;
}

.button:hover {
    box-shadow: 0 0 22px rgba(132, 183, 115, 0.45);
}

/* ---------- footer ---------- */

.footer {
    margin-top: 120px;
    padding: 28px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
    font-size: 0.85rem;
    color: var(--muted);
    align-items: baseline;
}

.footer-links {
    display: flex;
    align-items: baseline;
    gap: 28px;
}

.footer-small {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}

.footer-small:hover {
    color: var(--green);
}

/* ---------- back-to-top button ---------- */

.to-top {
    --lift: 0px;
    position: fixed;
    right: 24px;
    bottom: calc(24px + var(--lift));
    z-index: 9;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: rgba(33, 33, 33, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid var(--green);
    color: var(--green);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s, box-shadow 0.2s;
}

.to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover,
.to-top:focus-visible {
    background: var(--green-dim);
    box-shadow: 0 0 16px rgba(132, 183, 115, 0.45);
}

.to-top svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .to-top {
        transition: none;
    }
}

/* ---------- 404 page ---------- */

.not-found {
    min-height: calc(100vh - var(--topbar-h) - 240px);
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nf-scope {
    width: 100%;
    max-width: 600px;
    margin: 28px 0 8px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    overflow: visible;
}

.nf-scope .grid {
    stroke: #2e2e2e;
    stroke-dasharray: 2 4;
}

.nf-scope .trace {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(132, 183, 115, 0.7));
}

/* the second pulse never arrives */
.nf-scope .lost {
    stroke: #555;
    stroke-dasharray: 6 6;
    filter: none;
}

.nf-scope text {
    font-family: var(--mono);
    font-size: 18px;
    fill: #777;
    text-anchor: middle;
}

/* ---------- privacy page ---------- */

.back-link {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #cfcfcf;
    text-decoration: none;
}

.back-link:hover {
    color: var(--green);
}

.legal {
    max-width: 820px;
    padding-top: 80px;
    font-weight: 300;
    color: #d4d4d4;
}

.legal h3 {
    margin: 40px 0 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.legal p,
.legal li {
    font-size: 0.92rem;
    line-height: 1.7;
}

.legal p + p {
    margin-top: 10px;
}

.legal ul {
    padding-left: 1.2em;
}

.legal li {
    margin-bottom: 8px;
}

.legal li::marker {
    color: var(--green);
}

.legal b {
    font-weight: 600;
    color: var(--text);
}

.legal a {
    color: var(--green);
}

.link {
    color: var(--text);
    font-weight: 300;
    font-size: 1.1rem;
}

.link:hover {
    text-decoration: none;
    color: var(--green);
}

/* ---------- responsive ---------- */

@media screen and (max-width: 1280px) {
    html {
        font-size: 16px;
    }

    .main-logo {
        width: 540px;
        margin-bottom: 30px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1000px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--topbar-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 20px;
        background: rgba(26, 26, 26, 0.97);
        border-bottom: 1px solid var(--line);
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 14px 8px;
        border-bottom: 1px solid var(--line-soft);
    }

    .nav a.active::after {
        left: 0;
        right: auto;
        top: 14px;
        bottom: 14px;
        width: 2px;
        height: auto;
    }

    .nav-cta {
        margin: 12px 0 0;
    }

    .nav-cta-label {
        flex: 1;
        padding: 14px 8px;
    }

    .nav .nav-cta a {
        padding: 14px 18px;
        border-bottom: 0;
    }

    .overview,
    .panels {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .spec-groups {
        columns: 1;
    }

    .ordering {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .topbar {
        padding: 0 20px;
    }

    .hero {
        padding-top: 56px;
    }

    .subtitle {
        font-size: 1.45rem;
    }

    .main-logo {
        width: 400px;
        margin-bottom: 20px;
    }

    .hero-product {
        margin-top: 40px;
    }

    .section {
        width: calc(100% - 40px);
        padding-top: 80px;
    }

    .demo-frame {
        padding: 8px;
    }

    .cards,
    .features,
    .waveforms,
    .ordering {
        grid-template-columns: 1fr;
    }

    .green-title {
        font-size: 1.9rem;
    }

    .pin {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .to-top {
        right: 16px;
        bottom: calc(16px + var(--lift));
        width: 42px;
        height: 42px;
    }
}
