/* layout: one fixed WebGL stage behind the whole page; copy runs down the left,
   the particle object holds the right and changes with what the page is showing */
:root {
    color-scheme: dark;

    --void:    #05070c;
    --ink:     #edf1f7;
    --soft:    #a6b0c0;
    --mute:    #6c778b;
    --line:    rgba(186, 204, 232, 0.14);
    --signal:  #a5e6ff;

    --display: "Unbounded", "Arial Black", ui-sans-serif, system-ui, sans-serif;
    --body:    "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --shell:   1240px;
    --gutter:  clamp(16px, 4vw, 48px);
    --cut:     10px;

    /* where the object sits, for the glow and grid behind it */
    --obj-x:   71%;
    --obj-y:   48%;

    transition: --glow 1.4s ease;
}

/* the colour of the shape on display; registered so it can fade between products */
@property --glow {
    syntax: "<color>";
    inherits: true;
    initial-value: #ffb03b;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--void);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
img, svg { max-width: 100%; }

::selection { background: color-mix(in srgb, var(--signal) 32%, transparent); }

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

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--soft);
}

.kicker::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--glow);
}

/* ───────────── stage: canvas and the layers that sit over it ───────────── */
#stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.atmo,
.grid,
.scrim {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.atmo {
    mix-blend-mode: screen;
    background: radial-gradient(38vmax 32vmax at var(--obj-x) var(--obj-y), color-mix(in srgb, var(--glow) 15%, transparent), transparent 70%);
}

.grid {
    background-image:
        linear-gradient(rgba(186, 204, 232, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(186, 204, 232, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(55% 70% at var(--obj-x) var(--obj-y), #000, transparent 78%);
    mask-image: radial-gradient(55% 70% at var(--obj-x) var(--obj-y), #000, transparent 78%);
}

.scrim {
    background:
        linear-gradient(90deg, rgba(5, 7, 12, 0.86) 0%, rgba(5, 7, 12, 0.55) 36%, rgba(5, 7, 12, 0) 62%),
        linear-gradient(180deg, rgba(5, 7, 12, 0) 72%, rgba(5, 7, 12, 0.7) 100%);
}

.site-header,
main,
.site-footer { position: relative; z-index: 2; }

/* ───────────── header ───────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid transparent;
    transition: background-color .3s ease, border-color .3s ease;
}

.site-header[data-stuck="true"] {
    background: rgba(5, 7, 12, 0.72);
    border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(140deg, #3b82f6, #a78bfa);
}

.brand__mark svg { display: block; }
.brand em { font-style: normal; color: var(--glow); }

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    position: relative;
    padding: 8px 14px;
    color: var(--soft);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] { color: var(--ink); }

.nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 1px;
    background: var(--glow);
}

/* ───────────── buttons and links ───────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 24px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    transition: background-color .25s ease, color .25s ease;
}

.btn--solid {
    background: var(--ink);
    color: var(--void);
}

.btn--solid:hover { background: color-mix(in srgb, var(--glow) 38%, var(--ink)); }

.btn--solid:focus-visible {
    outline: none;
    background: var(--signal);
    box-shadow: inset 0 0 0 2px var(--void);
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 2px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.arrow-link span {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .3s ease;
}

.arrow-link:hover span { background-size: 100% 1px; }
.arrow-link svg { transition: transform .25s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* the load sequence: copy settles in while the particles assemble */
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

/* ───────────── sections ───────────── */
.section { padding-block: clamp(80px, 11vw, 150px); }

.section h2 {
    font-family: var(--display);
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

/* ───────────── call to action ───────────── */
.cta {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 32px clamp(32px, 6vw, 96px);
    align-items: end;
    padding-top: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--line);
}

.cta h2 { font-size: clamp(30px, 4.2vw, 58px); }

.cta__side p { color: var(--soft); }

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 26px;
}

.cta__mail {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--soft);
}

.cta__mail a { color: var(--ink); }

/* ───────────── footer ───────────── */
.site-footer {
    padding-block: 56px 36px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(5, 7, 12, 0.4), var(--void) 60%);
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr);
    gap: 36px;
}

.footer__about {
    max-width: 40ch;
    margin-top: 16px;
    color: var(--mute);
    font-size: 14.5px;
}

.footer__grid h4 {
    margin: 0 0 14px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}

.footer__links { display: grid; gap: 9px; }

.footer__links a {
    color: var(--soft);
    font-size: 14.5px;
    text-decoration: none;
}

.footer__links a:hover { color: var(--ink); }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--mute);
}

/* ───────────── responsive ───────────── */
@media (max-width: 980px) {
    .cta { grid-template-columns: minmax(0, 1fr); }
    .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer__grid > :first-child { grid-column: 1 / -1; }
}

/* narrow screens: the object floats over the top of the page, copy sits below it */
@media (max-width: 820px) {
    :root { --obj-x: 50%; --obj-y: 26%; }
    .atmo { background: radial-gradient(60vmax 40vmax at var(--obj-x) var(--obj-y), color-mix(in srgb, var(--glow) 16%, transparent), transparent 70%); }
    .grid { -webkit-mask-image: radial-gradient(80% 40% at var(--obj-x) var(--obj-y), #000, transparent 80%); mask-image: radial-gradient(80% 40% at var(--obj-x) var(--obj-y), #000, transparent 80%); }
    .scrim { background: linear-gradient(180deg, rgba(5, 7, 12, 0) 34%, rgba(5, 7, 12, 0.78) 60%, rgba(5, 7, 12, 0.9) 100%); }
}

@media (max-width: 560px) {
    .site-header__inner { gap: 12px; }
    .nav { gap: 0; }
    .nav a { padding: 8px 9px; font-size: 14px; }
    .footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    :root { transition: none; }
    *, *::before, *::after {
        animation: none !important;
        transition-duration: .001ms !important;
    }
}
