/*
 * dataPRO → webO3
 * Self-contained styles for index.html and 404.html. No external assets.
 */

/* Lexend — SIL Open Font License 1.1 (see /fonts/OFL.txt).
   One variable file covers every weight from 100 to 900. */
@font-face {
    font-family: "Lexend";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/lexend-latin.woff2") format("woff2");
}

/* Registered so the header's logo size can animate when it shrinks on scroll */
@property --logo-h {
    syntax: "<length>";
    inherits: true;
    initial-value: 3.25rem;
}

:root {
    color-scheme: light;

    --paper: #ffffff;
    --ice: #eaf6fa;          /* pale webO3 cyan: secondary surface */
    --ink: #14242c;          /* text */
    --slate: #4a5d66;        /* secondary text */
    --line: #d6e4e9;
    --line-strong: #a9bfc7;
    --link: #00759b;         /* webO3 cyan, darkened to read as text on white */
    --link-hover: #005a78;

    /* webO3 logo, plus soft tints of each for icon chips */
    --cyan: #00b5df;
    --cyan-hover: #33c4e6;
    --cyan-soft: #c7eef8;
    --green: #71bf47;
    --green-soft: #e0f1d6;
    --amber: #fec340;
    --amber-soft: #fff2d5;

    /* dataPRO logo */
    --dp-blue: #3b56a5;
    --dp-orange: #f69322;
    --dp-red: #ec2028;
    --dp-green: #0f9447;

    --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section: clamp(4rem, 9vw, 7rem);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --shadow-panel: 0 1px 2px rgba(20, 36, 44, 0.05), 0 18px 40px -24px rgba(20, 36, 44, 0.28);
}

/* ---------- Base ---------- */

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

html {
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
p,
ul {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 600;
    text-wrap: balance;
}

a {
    color: var(--link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

a:hover {
    color: var(--link-hover);
}

:focus-visible {
    outline: 3px solid var(--link);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Anchored sections clear the sticky header */
[id] {
    scroll-margin-top: 6rem;
}

.wrap {
    width: min(100% - 2 * var(--gutter), 72rem);
    margin-inline: auto;
}

.icon {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.7rem 1.4rem;
    border: 1.5px solid var(--cyan);
    border-radius: 999px;
    background: var(--cyan);
    color: var(--ink);
    font-weight: 550;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, translate 150ms ease;
}

.button:hover {
    border-color: var(--cyan-hover);
    background: var(--cyan-hover);
    color: var(--ink);
    translate: 0 -1px;
}

.button--quiet {
    border-color: var(--line-strong);
    background: transparent;
}

.button--quiet:hover {
    border-color: var(--ink);
    background: transparent;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Header ---------- */

.masthead {
    --logo-h: clamp(2.25rem, 1.75rem + 1.5vw, 3.25rem);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: saturate(1.5) blur(12px);
    backdrop-filter: saturate(1.5) blur(12px);
    border-bottom: 1px solid transparent;
    transition: --logo-h 250ms var(--ease-out), border-color 250ms ease, box-shadow 250ms ease;
}

.masthead.is-scrolled {
    --logo-h: clamp(1.875rem, 1.6rem + 0.8vw, 2.25rem);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -22px rgba(20, 36, 44, 0.45);
}

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: clamp(1rem, 2.5vw, 1.5rem);
    transition: padding 250ms var(--ease-out);
}

.masthead.is-scrolled .masthead__inner {
    padding-block: 0.65rem;
}

/*
 * The two logos side by side, same height, sharing one baseline.
 *
 * At equal image heights the two wordmarks come out the same size
 * (x-height is ~39% of the image height in both files), but their baselines
 * sit at different depths, measured from the artwork:
 *   dataPRO: baseline 26% of the height above the bottom edge (16 of 61 px)
 *   webO3:   baseline  8% above the bottom edge (its "3" hangs below)
 * So both are bottom-aligned and webO3 is lifted by the 18% difference.
 */
.lockup {
    display: flex;
    align-items: flex-end;
    gap: clamp(0.875rem, 2.5vw, 1.5rem);
}

.lockup img {
    width: auto;
    height: var(--logo-h);
}

.lockup__webo3 {
    display: block;
    margin-bottom: calc(var(--logo-h) * 0.18);
}

/* Runs from the wordmarks' baseline up to the top of their ascenders */
.lockup__rule {
    width: 1px;
    height: calc(var(--logo-h) * 0.51);
    margin-bottom: calc(var(--logo-h) * 0.26);
    background: var(--line-strong);
}

.masthead__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 550;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.masthead__contact:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.masthead__contact span {
    display: none;
}

@media (min-width: 40rem) {
    .masthead__contact {
        width: auto;
        padding-inline: 1rem 1.15rem;
    }

    .masthead__contact span {
        display: inline;
    }
}

/* ---------- Hero ---------- */

/* The hero's orbit ring reaches slightly past its box; never let it cause sideways scroll */
main {
    overflow-x: clip;
}

.hero {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: center;
    padding-block: clamp(2.5rem, 7vw, 5.5rem) var(--section);
}

@media (min-width: 60rem) {
    .hero {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    }

    .bubbles {
        width: min(100%, 30rem);
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 1.35rem + 3.9vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.lead {
    max-width: 38rem;
    margin-top: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--slate);
    font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
    font-weight: 350;
    line-height: 1.6;
}

.hero .actions {
    margin-top: 2rem;
}

/*
 * Hero visual: webO3's three logo bubbles, one per service group, inside an
 * orbit that carries dataPRO's four colours. Positions are in % of a square
 * box so the cluster scales as one piece.
 */
.bubbles {
    --px: 0;   /* pointer offset from the cluster centre, -1 to 1, set by js/site.js */
    --py: 0;
    position: relative;
    width: min(92%, 22rem);
    aspect-ratio: 1;
    margin-inline: auto;
    isolation: isolate;
}

/* Outer element follows the pointer, inner ring spins: kept apart so the
   rotation doesn't turn the parallax direction */
.orbit {
    position: absolute;
    left: -6%;
    top: -2%;
    z-index: -1;
    width: 114%;
    aspect-ratio: 1;
    pointer-events: none;
    transform: translate(calc(var(--px) * -10px), calc(var(--py) * -10px));
    transition: transform 900ms var(--ease-out);
}

.orbit__ring {
    position: absolute;
    inset: 0;
    border: 1.5px dashed var(--line-strong);
    border-radius: 50%;
}

/* dataPRO's colours, as the diamonds from its logo, placed around the ring */
.orbit__ring i {
    position: absolute;
    width: 0.7rem;
    height: 0.7rem;
    margin: -0.35rem 0 0 -0.35rem;
    border-radius: 2px;
    background: var(--c);
    transform: rotate(45deg);
}

.orbit__ring i:nth-child(1) { --c: var(--dp-blue);   left: 50%;   top: 0;     }
.orbit__ring i:nth-child(2) { --c: var(--dp-orange); left: 100%;  top: 50%;   }
.orbit__ring i:nth-child(3) { --c: var(--dp-green);  left: 25%;   top: 93.3%; }
.orbit__ring i:nth-child(4) { --c: var(--dp-red);    left: 6.7%;  top: 25%;   }

.bubble {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 45%),
        linear-gradient(150deg, var(--key-light) 0%, var(--key) 55%, var(--key-deep) 100%);
    box-shadow: 0 30px 50px -30px var(--key-glow);
    opacity: 0.92;              /* keeps the overlaps light under multiply */
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    mix-blend-mode: multiply;
    transform: translate(calc(var(--px) * var(--depth)), calc(var(--py) * var(--depth)));
    transition: scale 350ms var(--ease-out), opacity 250ms ease, transform 900ms var(--ease-out);
}

.bubble:hover {
    color: var(--ink);
    scale: 1.06;
}

.bubble:focus-visible {
    border-radius: 50%;
}

/* Hovering one bubble brings it forward and lets the others recede */
@media (hover: hover) {
    .bubbles:hover .bubble:not(:hover) {
        opacity: 0.45;
    }
}

.bubble__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 14px -6px rgba(20, 36, 44, 0.35);
    transition: translate 350ms var(--ease-out);
}

.bubble:hover .bubble__icon {
    translate: 0 -3px;
}

.bubble__label {
    font-size: clamp(0.9375rem, 0.8rem + 0.6vw, 1.125rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* Contents sit in the part of each circle the others don't cover;
   --depth sets how far each one moves with the pointer */
.bubble--servers {
    --key: var(--amber); --key-light: #ffe7a3; --key-deep: #f6a80f; --key-glow: rgba(246, 168, 15, 0.6);
    --depth: 12px;
    width: 46%; left: 27%; top: 0;
    padding-bottom: 10%;
}

.bubble--sites {
    --key: var(--green); --key-light: #bfe6a4; --key-deep: #4fa22c; --key-glow: rgba(79, 162, 44, 0.55);
    --depth: 22px;
    width: 54%; left: 0; top: 37%;
    padding: 8% 20% 0 0;
}

.bubble--hosting {
    --key: var(--cyan); --key-light: #92e4f6; --key-deep: #0096c7; --key-glow: rgba(0, 150, 199, 0.55);
    --depth: 17px;
    width: 60%; left: 39%; top: 36%;
    padding: 10% 0 0 14%;
}

/* ---------- Load sequence (once) and ambient drift ---------- */

@media (prefers-reduced-motion: no-preference) {
    .hero h1,
    .lead,
    .hero .actions {
        animation: rise 800ms var(--ease-out) backwards;
    }

    .lead { animation-delay: 120ms; }
    .hero .actions { animation-delay: 240ms; }

    /* `scale` pops the bubble in, `translate` drifts it: separate properties, no conflict */
    .bubble {
        animation:
            pop 900ms var(--ease-out) backwards,
            drift var(--drift-time) ease-in-out 900ms infinite alternate;
    }

    .bubble--servers { --drift-time: 7s;  --drift-x: 6px;  --drift-y: -10px; animation-delay: 300ms, 1.2s; }
    .bubble--sites   { --drift-time: 9s;  --drift-x: -9px; --drift-y: 7px;   animation-delay: 420ms, 1.3s; }
    .bubble--hosting { --drift-time: 8s;  --drift-x: 8px;  --drift-y: 9px;   animation-delay: 540ms, 1.4s; }

    .orbit {
        animation: fade-in 1200ms ease 700ms backwards;
    }

    .orbit__ring {
        animation: spin 70s linear infinite;
    }
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes spin {
    to { rotate: 360deg; }
}

@keyframes rise {
    from {
        opacity: 0;
        translate: 0 1.25rem;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        scale: 0.4;
    }
}

@keyframes drift {
    to {
        translate: var(--drift-x) var(--drift-y);
    }
}

/* Scroll reveal: js/site.js adds .reveal-pending only to elements that start
   below the fold, so nothing is hidden if the script doesn't run. */
@media (prefers-reduced-motion: no-preference) {
    .reveal-pending {
        opacity: 0;
        translate: 0 1.5rem;
        transition: opacity 600ms ease, translate 800ms var(--ease-out);
        transition-delay: var(--delay, 0ms);
    }

    .reveal-pending.is-visible {
        opacity: 1;
        translate: 0 0;
    }
}

/* ---------- Services ---------- */

.services {
    padding-block: var(--section);
    background: var(--ice);
}

.services__head {
    display: grid;
    gap: 1rem 3rem;
}

@media (min-width: 52rem) {
    .services__head {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "title intro";
        align-items: end;
    }

    .services__head h2 { grid-area: title; }
    .services__intro { grid-area: intro; }

    /* With the guide: it takes a full-width row under the heading and intro */
    .services__head.has-guide {
        grid-template-areas:
            "title intro"
            "guide guide";
    }

    .guide { grid-area: guide; }
}

/* ---------- Service guide ---------- */

.guide {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 1.5rem;
    background: var(--paper);
    box-shadow: var(--shadow-panel);
}

.guide[hidden] {
    display: none;
}

.guide__header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

/* webO3's three bubbles as the guide's avatar */
.guide__avatar {
    position: relative;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--ice);
    isolation: isolate;
}

.guide__avatar i {
    position: absolute;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    mix-blend-mode: multiply;
}

.guide__avatar i:nth-child(1) { background: var(--green); left: 0.5rem;  top: 1.15rem; }
.guide__avatar i:nth-child(2) { background: var(--amber); left: 0.85rem; top: 0.5rem;  }
.guide__avatar i:nth-child(3) { background: var(--cyan);  left: 1.2rem;  top: 1.15rem; }

.guide__title {
    font-weight: 600;
    line-height: 1.25;
}

.guide__subtitle {
    color: var(--slate);
    font-size: 0.875rem;
    line-height: 1.35;
}

.guide__log {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-block: 1.25rem;
}

.msg {
    max-width: 88%;
    padding: 0.65rem 0.95rem;
    border-radius: 1.1rem;
    font-size: 0.96875rem;
    line-height: 1.45;
    scroll-margin: 6rem 0 1.5rem;
}

.msg--bot {
    align-self: flex-start;
    border-bottom-left-radius: 0.35rem;
    background: var(--ice);
}

.msg--user {
    align-self: flex-end;
    border-bottom-right-radius: 0.35rem;
    background: var(--cyan);
    font-weight: 500;
}

.msg--answer {
    max-width: 100%;
}

/* Typing indicator: the logo's three bubbles taking turns */
.typing {
    display: flex;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
}

.typing i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--c);
}

.typing i:nth-child(1) { --c: var(--cyan); }
.typing i:nth-child(2) { --c: var(--green); }
.typing i:nth-child(3) { --c: var(--amber); }

@media (prefers-reduced-motion: no-preference) {
    .msg {
        animation: msg-in 300ms var(--ease-out) backwards;
    }

    .typing i {
        animation: typing-dot 900ms ease-in-out infinite;
    }

    .typing i:nth-child(2) { animation-delay: 150ms; }
    .typing i:nth-child(3) { animation-delay: 300ms; }
}

@keyframes msg-in {
    from {
        opacity: 0;
        translate: 0 6px;
        scale: 0.97;
    }
}

@keyframes typing-dot {
    0%, 60%, 100% { translate: 0 0;    opacity: 0.45; }
    30%           { translate: 0 -4px; opacity: 1; }
}

/* The recommended service, inside the guide's answer */
.answer {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-top: 0.65rem;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: var(--paper);
}

.answer__name {
    display: block;
    font-weight: 600;
    line-height: 1.3;
}

.answer__group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--slate);
    font-size: 0.8125rem;
}

.answer__group::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--key);
}

.answer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.answer__actions .button {
    min-height: 2.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.9375rem;
}

.answer__actions .button--quiet {
    background: var(--paper);
}

.guide__replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.reply {
    padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.reply:hover {
    border-color: var(--ink);
}

.reply[aria-pressed="true"] {
    border-color: var(--cyan);
    background: var(--cyan-soft);
}

.reply--other {
    border-style: dashed;
}

/* Wide screens: conversation on the left, situations on the right, so the
   answer appears beside the buttons. Same order as the HTML: read, then choose.
   Kept after the base guide rules so these overrides win. */
@media (min-width: 52rem) {
    .guide {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "header  header"
            "log     replies";
        align-items: start;
        margin-top: 2rem;
        padding: 1.5rem 2rem 2rem;
    }

    .guide__header { grid-area: header; }

    .guide__log {
        grid-area: log;
        padding-right: 2rem;
    }

    .guide__replies {
        grid-area: replies;
        align-content: flex-start;
        margin-top: 1.25rem;
        padding: 0 0 0 2rem;
        border-top: 0;
        border-left: 1px solid var(--line);
    }
}

/* A service reached from the guide's "Le voir dans la liste" link */
.service:target {
    background: var(--key-soft);
    box-shadow: inset 0 0 0 2px var(--key);
}

@media (prefers-reduced-motion: no-preference) {
    .service:target {
        animation: spotlight 1.6s var(--ease-out);
    }
}

@keyframes spotlight {
    0%, 35% {
        box-shadow: inset 0 0 0 2px var(--key), 0 0 0 6px var(--key-soft);
    }
}

.services h2 {
    font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.services__intro {
    max-width: 34rem;
    color: var(--slate);
}

.groups {
    display: grid;
    gap: 1.25rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 44rem) {
    .groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }
}

/* Each group is keyed to the bubble of the same colour in the hero */
.group {
    padding: 1.5rem 0.75rem 0.75rem;
    border-radius: 1.25rem;
    background: var(--paper);
    box-shadow: var(--shadow-panel);
}

.group--hosting { --key: var(--cyan);  --key-soft: var(--cyan-soft); }
.group--sites   { --key: var(--green); --key-soft: var(--green-soft); }
.group--servers { --key: var(--amber); --key-soft: var(--amber-soft); }

.group h3 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-inline: 0.75rem;
    font-size: 1.1875rem;
    letter-spacing: -0.015em;
}

.group h3::before {
    content: "";
    flex: none;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: var(--key);
}

.group ul {
    margin-top: 0.875rem;
    padding: 0;
    list-style: none;
}

.chip {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--key-soft);
    color: var(--ink);
    transition: background-color 150ms ease;
}

.service {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.875rem;
    color: var(--ink);
    font-weight: 450;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.service:hover {
    background: var(--ice);
    color: var(--ink);
}

.service:hover .chip {
    background: var(--key);
}

.service .chevron {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    color: var(--line-strong);
    transition: translate 200ms var(--ease-out), color 150ms ease;
}

.service:hover .chevron {
    color: var(--ink);
    translate: 3px 0;
}

.services__all {
    margin-top: 2.5rem;
}

.services__all .button {
    background: var(--paper);
}

/* ---------- Closing: the letter's last word and how to reach us ---------- */

.closing {
    padding-block: var(--section);
}

/* A bright webO3-cyan panel: the page's closing note */
.closing__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);   /* contents never widen the panel past the screen */
    gap: 2.5rem;
    padding: clamp(2.25rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem);
    border-radius: clamp(1.5rem, 3vw, 2.25rem);
    background: linear-gradient(140deg, #46cdeb 0%, var(--cyan) 45%, #00a3d1 100%);
    color: var(--ink);
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 40px 80px -50px rgba(0, 150, 199, 0.85);
}

@media (min-width: 56rem) {
    .closing__panel {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: clamp(3rem, 6vw, 5rem);
        align-items: center;
    }
}

/* Cyan is too close to the default focus colour; switch to ink inside the panel */
.closing__panel :focus-visible {
    outline-color: var(--ink);
}

/* Echoes of the hero bubbles: two large translucent ones, two small brand dots */
.closing__bubble {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.closing__bubble:nth-of-type(1) { width: 26rem; height: 26rem; right: -9rem;  top: -11rem;   background: rgba(255, 255, 255, 0.17); --drift-x: -12px; --drift-y: 10px;  --drift-time: 11s; }
.closing__bubble:nth-of-type(2) { width: 15rem; height: 15rem; left: -6rem;   bottom: -7rem; background: rgba(255, 255, 255, 0.13); --drift-x: 10px;  --drift-y: -8px;  --drift-time: 9s; }
.closing__bubble:nth-of-type(3) { width: 2.75rem; height: 2.75rem; right: 1.75rem; top: 1.75rem;  background: var(--amber); --drift-x: -6px; --drift-y: 6px; --drift-time: 6s; }
.closing__bubble:nth-of-type(4) { width: 1.5rem; height: 1.5rem; left: 46%; bottom: 1.5rem;   background: var(--green); --drift-x: 8px;  --drift-y: -5px; --drift-time: 7s; }

/* The small green dot only has clear space in the two-column layout */
.closing__bubble:nth-of-type(4) {
    display: none;
}

@media (min-width: 56rem) {
    .closing__bubble:nth-of-type(4) {
        display: block;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .closing__bubble {
        animation: drift var(--drift-time) ease-in-out infinite alternate;
    }
}

.letter h2 {
    max-width: 17ch;
    font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.letter p {
    max-width: 36rem;
    margin-top: 1rem;
}

.letter h2 + p {
    margin-top: 1.5rem;
}

.letter a {
    color: var(--ink);
    text-decoration-thickness: 1.5px;
}

.letter a:hover {
    color: var(--ink);
    text-decoration-thickness: 2.5px;
}

.signoff {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(20, 36, 44, 0.2);
}

.contact h3 {
    margin-bottom: 0.875rem;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.contact ul {
    display: grid;
    gap: 0.625rem;
    padding: 0;
    list-style: none;
}

/* White tiles on the cyan panel */
.contact a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 14px 28px -20px rgba(3, 38, 45, 0.7);
    transition: translate 200ms var(--ease-out), box-shadow 200ms ease, background-color 150ms ease;
}

.contact a:hover {
    translate: 0 -2px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 20px 34px -20px rgba(3, 38, 45, 0.8);
}

.contact .chip {
    width: 2.75rem;
    height: 2.75rem;
}

.contact .chevron {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    color: var(--line-strong);
    transition: translate 200ms var(--ease-out), color 150ms ease;
}

.contact a:hover .chevron {
    color: var(--ink);
    translate: 3px 0;
}

/* Small phones (360px and under): the full tile is ~286px wide, more than the
   panel leaves, so tighten it and drop the chevron to keep each value whole */
@media (max-width: 24rem) {
    .contact a {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .contact .chip {
        width: 2.25rem;
        height: 2.25rem;
    }

    .contact .chevron {
        display: none;
    }
}

.contact__mail   { --key-soft: var(--cyan-soft); }
.contact__phone  { --key-soft: var(--green-soft); }
.contact__github { --key-soft: var(--amber-soft); }

.contact__label {
    display: block;
    color: var(--slate);
    font-size: 0.8125rem;
    line-height: 1.3;
}

/* Keeps a phone number or an address from breaking across lines */
.contact__value {
    display: block;
    font-weight: 550;
    line-height: 1.4;
    white-space: nowrap;
}

.footer {
    padding-block: 1.5rem 2rem;
    border-top: 1px solid var(--line);
    color: var(--slate);
    font-size: 0.875rem;
}

/* ---------- Not found page (404.html) ---------- */

.lost {
    display: grid;
    place-items: center;
    padding: 2rem var(--gutter);
    background: radial-gradient(ellipse at 50% 30%, var(--ice) 0%, var(--paper) 70%) fixed;
    text-align: center;
}

.stars {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--line-strong);  /* read by js/404.js as the star colour */
    pointer-events: none;
}

.lost main {
    position: relative;
    max-width: 32rem;
}

.lost__scene {
    position: relative;
    width: 9rem;
    height: 9rem;
    margin: 0 auto 1.5rem;
}

.lost__planet {
    width: 100%;
    height: 100%;
}

.lost__orbit {
    position: absolute;
    inset: -1.75rem;
}

.lost__astronaut {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.75rem;
    height: 2.75rem;
}

@media (prefers-reduced-motion: no-preference) {
    .lost__planet {
        animation: float 3s ease-in-out infinite alternate;
    }

    .lost__orbit {
        animation: orbit 40s linear infinite;
    }

    .lost__astronaut {
        animation: tumble 6s linear infinite;
    }
}

@keyframes float {
    from { transform: translateY(3px); }
    to { transform: translateY(-3px); }
}

@keyframes orbit {
    to { transform: rotate(360deg); }
}

@keyframes tumble {
    to { transform: rotate(-360deg); }
}

.lost__code {
    font-size: clamp(5rem, 22vw, 8.5rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.lost h1 {
    margin: 0.75rem 0 1rem;
    font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.lost h1 s {
    color: var(--slate);
    text-decoration-color: var(--dp-red);
    text-decoration-thickness: 0.1em;
}

.lost__text {
    color: var(--slate);
    text-wrap: pretty;
}

.lost .actions {
    justify-content: center;
    margin-top: 2rem;
}
