/* Ubuntu is served from this site (no request to a font service). */
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ubuntu-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ubuntu-400-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: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ubuntu-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ubuntu-500-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: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ubuntu-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ubuntu-700-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 {
    /* the seven colours of the WeDo connect logo */
    --green: #BFFF80;
    --sky: #55A3FF;
    --blue: #004E8F;
    --navy: #0B2E63;
    --pink: #FF0A84;
    --red: #F51D00;
    --yellow: #FFE873;

    --paper: #ffffff;
    --ink: #000000;
    --soft: #4e4e58;
    --line: #dcdce2;
    color-scheme: light;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 400 18px/1.55 'Ubuntu', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-color: var(--pink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

/* header and footer are shared by all pages */
.top, .bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 5vw, 72px); }
.top { padding-top: clamp(18px, 3.2vh, 34px); }
.bottom { padding-bottom: clamp(16px, 2.8vh, 30px); font-size: 15px; color: var(--soft); }
.bottom nav { display: flex; gap: 22px; }
.bottom a { text-decoration: none; }
.bottom a:hover, .bottom a[aria-current] { color: var(--ink); text-decoration: underline; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 58px; height: 52px; }
.brand span { display: flex; flex-direction: column; font-size: 21px; line-height: 0.98; }
.brand b { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- start page ---------- */

.home { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 4vw, 64px); padding: 0 clamp(20px, 5vw, 72px); min-height: 0; }

.pitch { max-width: 640px; }
.pitch h1 { margin: 0 0 0.5em; font-size: clamp(38px, 4.25vw, 70px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; }
/* the question stays on two lines: the place gets its own */
.pitch h1 span { display: block; white-space: nowrap; }
.pitch p { margin: 0 0 1.5em; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; color: var(--soft); max-width: 31em; }

/* store badges in the manner of the two stores' own: black, compact, small line above the store name */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 11px; min-width: 172px; height: 56px; padding: 0 20px 0 15px; border-radius: 11px; background: var(--ink); color: #ffffff; text-decoration: none; }
.badge svg { flex-shrink: 0; width: 27px; height: 27px; }
.badge span { display: flex; flex-direction: column; font-size: 20px; font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; white-space: nowrap; }
.badge small { font-size: 11.5px; font-weight: 400; letter-spacing: 0.01em; opacity: 0.85; }
a.badge:hover { background: #26262b; }

/* the network: every labelled dot is something you find in the app */
.network { width: 100%; height: 100%; max-height: min(78vh, 720px); min-height: 0; overflow: visible; }
.network line { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.network text { font: 700 17px 'Ubuntu', system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; fill: var(--ink); letter-spacing: -0.01em; }
.network .on-dark { fill: #ffffff; }
.network g { transform-box: fill-box; transform-origin: center; transition: transform 0.25s ease; }
.network g:hover { transform: scale(1.06); }

@media (prefers-reduced-motion: no-preference) {
    /* one moment on load: the lines draw, then the dots land */
    .network line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s ease-out 0.15s forwards; }
    .network g { animation: land 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) backwards; animation-delay: calc(0.45s + var(--i) * 0.07s); }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    @keyframes land { from { transform: scale(0); opacity: 0; } }
}

/* desktop: everything fits one screen, nothing scrolls */
@media (min-width: 900px) and (min-height: 560px) {
    body.fit { height: 100vh; height: 100dvh; overflow: hidden; }
}

@media (max-width: 899px) {
    .home { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 32px; gap: 8px; }
    .network { max-height: none; height: auto; aspect-ratio: 640 / 600; }
    .pitch h1 { font-size: clamp(34px, 9.2vw, 60px); }
    .bottom { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 20px; }
}

/* ---------- legal pages ---------- */

.legal { flex: 1; width: 100%; max-width: calc(68ch + 2 * clamp(20px, 5vw, 72px)); padding: clamp(36px, 7vh, 80px) clamp(20px, 5vw, 72px) 64px; font-size: 17px; line-height: 1.6; }
.legal h1 { margin: 0 0 0.5em; font-size: clamp(36px, 4.4vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; }
.legal h2 { margin: 2.2em 0 0.5em; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.legal h3 { margin: 1.6em 0 0.3em; font-size: 17px; font-weight: 700; }
.legal p, .legal ul { margin: 0 0 1em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.35em; }
.legal li::marker { color: var(--pink); }
.legal address { font-style: normal; margin: 0 0 1em; }
.legal .lead { font-size: 19px; color: var(--soft); }
.legal .stand { margin-top: 3em; color: var(--soft); font-size: 15px; }
