/* Layout: a deep-blue masthead field, then a narrow paper column of product rows and a register card. */
:root
{
    --ink: #14245a;          /* temno modro — the brand colour */
    --ink-deep: #0c1638;
    --on-ink: #e9edf8;
    --on-ink-muted: #9fb0dc;
    --paper: #f4f6fa;
    --surface: #ffffff;
    --text: #18203a;
    --muted: #5b6684;
    --rule: #dbe0ec;
    --link: #2340a8;
    --ok: #1f8a5b;

    --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
    --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --measure: 68rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark)
{
    :root
    {
        --paper: #0b1124;
        --surface: #111a33;
        --text: #e3e8f5;
        --muted: #95a1c2;
        --rule: #243154;
        --link: #9db4ff;
        --ok: #5fd39b;
        color-scheme: dark;
    }
}

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

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

body
{
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 1rem/1.6 var(--font-body);
}

a
{
    color: var(--link);
    text-underline-offset: 0.2em;
}

a:focus-visible
{
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

.wrap
{
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead
{
    background: var(--ink);
    color: var(--on-ink);
    background-image: radial-gradient(120% 90% at 100% 0%, #1d3378 0%, transparent 60%);
}

.masthead a
{
    color: inherit;
}

.topbar
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding-block: 1.5rem;
}

.wordmark
{
    font: 600 1rem/1 var(--font-display);
    letter-spacing: 0.01em;
    text-decoration: none;
}

.topbar nav
{
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.topbar nav a
{
    color: var(--on-ink-muted);
    text-decoration: none;
}

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

.hero
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 2.5rem 3rem;
    padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem);
}

.hero h1
{
    margin: 0;
    font: 700 clamp(3.25rem, 8vw, 6.5rem)/0.9 var(--font-display);
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.hero .gloss
{
    margin: 1.5rem 0 0;
    max-width: 34rem;
    color: var(--on-ink-muted);
    font-size: 1.125rem;
}

.hero .gloss em
{
    color: var(--on-ink);
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.95em;
}

.hero .lede
{
    margin: 1rem 0 0;
    max-width: 34rem;
    font-size: 1.25rem;
    line-height: 1.45;
}

/* Fig. 1: the robot team, framed like the stock photo it replaces */
.team
{
    margin: 0;
    min-width: 0;
}

.robots
{
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1.5rem 3rem -1.25rem rgba(0, 0, 0, 0.6);
}

.team figcaption
{
    margin-top: 0.75rem;
    color: var(--on-ink-muted);
    font: 0.8rem/1.4 var(--font-mono);
}

.robots .wall
{
    fill: #dfe5f3;
}
.robots .cork
{
    fill: #c99c63;
}
.robots .note
{
    fill: #f3e27c;
}
.robots .note-b
{
    fill: #bfe8d0;
}
.robots .tone-a
{
    fill: #e8ecf6;
}
.robots .tone-b
{
    fill: #b9c5e3;
}
.robots .tone-c
{
    fill: #cdd6ec;
}
.robots .tone-d
{
    fill: #9cadd8;
}
.robots .tone-e
{
    fill: #d7deef;
}
.robots .head
{
    stroke: rgba(12, 22, 56, 0.12); stroke-width: 1.5;
}
.robots .face,
.robots .panel
{
    fill: #14245a;
}
.robots .joint
{
    fill: #7d8fbf;
}
.robots .joint-line
{
    stroke: #7d8fbf;
}
.robots .antenna
{
    fill: #ff9f43;
}
.robots .eye-glow
{
    fill: #8fe3ff;
}
.robots .pupil
{
    fill: #0c1638;
}
.robots .mouth
{
    fill: none; stroke: #8fe3ff; stroke-linecap: round;
}
.robots .mouth-open
{
    fill: #8fe3ff;
}
.robots .glasses
{
    fill: none; stroke: #ff9f43;
}
.robots .led
{
    fill: #4b5f99;
}
.robots .led-a
{
    fill: #8fe3ff;
}
.robots .led-c
{
    fill: #ff9f43;
}
.robots .laptop
{
    fill: #c3cbe0;
}
.robots .laptop-mark
{
    fill: #14245a;
}

.robots .eye
{
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.08s ease-in;
}

.robots .blink .eye
{
    transform: scaleY(0.1);
}

.robots .pupil
{
    transition: transform 0.15s ease-out;
}

.robots .robot,
.robots .laptop-group
{
    cursor: pointer;
    outline: none;
}

.robots .robot:focus-visible .head,
.robots .laptop-group:focus-visible .laptop
{
    stroke: #ff9f43;
    stroke-width: 4;
}

.robots .robot.talking .antenna
{
    fill: #fff3a8;
}

.robots .glow
{
    pointer-events: none;
}

/* Ping's thumbs-up: wiggles at rest, flips to thumbs-down in killer mode */
.robots .tone-b-stroke
{
    stroke: #b9c5e3;
}

.robots .outline
{
    stroke: rgba(12, 22, 56, 0.25);
    stroke-width: 1.2;
}

.robots .hand
{
    transform-box: fill-box;
    transform-origin: 50% 60%;
    transition: transform 0.25s cubic-bezier(0.3, 0, 0.3, 1.4);
}

.robots .menace .hand
{
    transform: rotate(180deg);
}

.robots .thumb
{
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

/* killer-robot mode, a couple of seconds at a time */
.robots .eye-glow,
.robots .mouth,
.robots .mouth-open
{
    transition: fill 0.15s, stroke 0.15s;
}

.robots .menace .eye-glow,
.robots .menace .mouth-open
{
    fill: #ff3b30;
}

.robots .menace .mouth
{
    stroke: #ff3b30;
}

.robots .menace .pupil
{
    fill: #3a0000;
}

/* speech bubble, built in JS */
.robots .bubble
{
    pointer-events: none;
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: bubble-in 0.18s ease-out;
}

.robots .bubble-box
{
    fill: #ffffff;
    stroke: #14245a;
    stroke-width: 1.5;
}

.robots .bubble text
{
    fill: #14245a;
    font: 500 13px var(--font-mono);
}

@keyframes bubble-in
{
    from
    {
        opacity: 0;
        transform: scale(0.7);
    }
}

@media (prefers-reduced-motion: no-preference)
{
    .robots .robot
    {
        animation: bob 3.2s ease-in-out infinite;
    }

    .robots .robot[data-name="Byte"]
    {
        animation-duration: 2.7s;
        animation-delay: -1s;
    }

    .robots .robot[data-name="Cache"]
    {
        animation-duration: 3.6s;
        animation-delay: -2s;
    }

    .robots .robot[data-name="Lint"]
    {
        animation-name: nod;
        animation-duration: 4.1s;
    }

    .robots .robot[data-name="Merge"]
    {
        animation-duration: 2.4s;
        animation-delay: -0.6s;
    }

    .robots .robot[data-name="Ping"]
    {
        animation-duration: 2.9s;
        animation-delay: -1.7s;
    }

    .robots .thumb
    {
        animation: thumb 2.2s ease-in-out infinite;
    }

    .robots .robot.hop
    {
        animation: hop 0.5s cubic-bezier(0.3, 0, 0.3, 1);
    }

    .robots .antenna
    {
        animation: antenna 2.4s ease-in-out infinite;
    }

    .robots .robot:nth-of-type(2n) .antenna
    {
        animation-delay: 1.1s;
    }

    .robots .led-a
    {
        animation: led 1.7s steps(1) infinite;
    }

    .robots .led-b
    {
        animation: led 2.3s steps(1) infinite -0.8s;
    }

    .robots .led-c
    {
        animation: led 0.9s steps(1) infinite -0.3s;
    }

    .robots .glow
    {
        animation: screen 3s steps(6) infinite;
    }
}

@keyframes antenna
{
    50%
    {
        opacity: 0.35;
    }
}

@keyframes bob
{
    50%
    {
        transform: translateY(-2.5px);
    }
}

@keyframes nod
{
    0%,
    70%,
    100%
    {
        transform: translateY(0);
    }

    78%,
    92%
    {
        transform: translateY(3px);
    }

    85%
    {
        transform: translateY(0);
    }
}

@keyframes hop
{
    40%
    {
        transform: translateY(-16px);
    }

    70%
    {
        transform: translateY(2px);
    }
}

@keyframes thumb
{
    0%,
    60%,
    100%
    {
        transform: rotate(0);
    }

    70%,
    90%
    {
        transform: rotate(-12deg);
    }

    80%
    {
        transform: rotate(6deg);
    }
}

@keyframes led
{
    50%
    {
        opacity: 0.25;
    }
}

@keyframes screen
{
    0%
    {
        opacity: 0.8;
    }

    40%
    {
        opacity: 1;
    }

    60%
    {
        opacity: 0.7;
    }

    80%
    {
        opacity: 0.95;
    }
}

@media (max-width: 52rem)
{
    .hero
    {
        grid-template-columns: 1fr;
    }
}

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

main section
{
    padding-block: clamp(3rem, 7vw, 5rem);
}

main section + section
{
    border-top: 1px solid var(--rule);
}

.section-head
{
    display: grid;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
    max-width: 42rem;
}

.eyebrow
{
    margin: 0;
    color: var(--muted);
    font: 500 0.75rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h2
{
    margin: 0;
    font: 650 clamp(1.75rem, 4vw, 2.5rem)/1.1 var(--font-display);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.section-head p:not(.eyebrow)
{
    margin: 0.25rem 0 0;
    color: var(--muted);
}

/* ---------- mission ---------- */

.mission
{
    display: grid;
    gap: 1rem;
    max-width: 40rem;
    font-size: 1.25rem;
    line-height: 1.5;
}

.mission p
{
    margin: 0;
}

.mission .was
{
    color: var(--muted);
    font-size: 1rem;
}

/* ---------- register card ---------- */

.register
{
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 4px;
    max-width: 52rem;
}

.register dl
{
    margin: 0;
}

.register .row
{
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: 0.25rem 2rem;
    padding: 1.1rem 1.5rem;
}

.register .row + .row
{
    border-top: 1px solid var(--rule);
}

.register dt
{
    font-weight: 500;
    line-height: 1.35;
}

.register dt span
{
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.register dd
{
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.register .stack
{
    display: grid;
    gap: 0.35rem;
}

/* value + copy button; the button sits at the end of the value's first line */
.copyable
{
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.copyable .value
{
    min-width: 0;
}

.copyable .prefix
{
    flex: 0 0 2.75rem;
    color: var(--muted);
    font: 500 0.75rem/1.9 var(--font-mono);
    letter-spacing: 0.08em;
}

.copyable.sub
{
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.register .code
{
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.copy
{
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: -0.15rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.12s, background-color 0.12s, color 0.12s;
}

.copy svg
{
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy .i-done,
.copy.done .i-copy
{
    display: none;
}

.copy.done .i-done
{
    display: block;
}

.register .row:hover .copy,
.copy:focus-visible
{
    opacity: 1;
}

.copy:hover
{
    background: var(--paper);
    border-color: var(--rule);
    color: var(--link);
}

.copy:focus-visible
{
    outline: 2px solid var(--link);
    outline-offset: 1px;
}

.copy.done
{
    opacity: 1;
    color: var(--ok);
}

.copy-status
{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

@media (hover: none)
{
    .copy
    {
        opacity: 1;
    }
}

@media (max-width: 40rem)
{
    .register .row
    {
        grid-template-columns: 1fr;
        padding-inline: 1.1rem;
    }
}

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

.site-footer
{
    border-top: 1px solid var(--rule);
    padding-block: 2rem 3rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer p
{
    margin: 0;
}
