/* Chunkline, coming soon. The look is the Chunkline app's own: its palette and four faces, the VHS
   split on small text, the drifting motes, and its window with the title bar on top. Nothing is
   fetched from anywhere but this site. */

@font-face {
    font-family: 'Orbitron';
    src: url('/fonts/orbitron.woff2') format('woff2');
    font-weight: 400 900;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo Black';
    src: url('/fonts/archivo-black.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Share Tech Mono';
    src: url('/fonts/share-tech-mono.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg-page: #0d0d11;
    --bg-container: #19191f;
    --bg-titlebar: #131318;
    --bg-card: #212129;
    --border-card: #2c2c36;
    --text-primary: #e6e6ec;
    --text-secondary: #a0a0aa;
    --text-dim: #5f5f6b;
    --orange: #f0852d;
    --cyan: #2dd2ff;
    --radius-window: 14px;
    --radius-card: 12px;
    --font-header: 'Orbitron', 'Arial Black', 'Impact', sans-serif;
    --font-buttons: 'Archivo Black', 'Arial Black', 'Impact', sans-serif;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-ui: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color-scheme: dark;
}

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

html { background: var(--bg-page); }

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 48px 16px 28px;
    overflow-x: hidden;
    font-family: var(--font-ui);
    color: var(--text-primary);
    background:
        radial-gradient(64rem 40rem at 12% -12%, rgba(240, 133, 45, 0.11), transparent 62%),
        radial-gradient(52rem 36rem at 108% 112%, rgba(45, 210, 255, 0.07), transparent 62%),
        var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── The VHS treatment the app gives small and secondary text: a red and cyan channel split, crisp
   rather than glowing, and now and then a one-pixel tracking jitter. ── */
.holo {
    font-family: var(--font-mono);
    letter-spacing: 0.6px;
    color: #b8b8c2;
    text-shadow:
        1px 0 0 rgba(255, 45, 45, 0.55),
        -1px 0 0 rgba(45, 210, 255, 0.55);
    animation: vhsJitter 4s infinite steps(1);
}
@keyframes vhsJitter {
    0%, 88%, 100% { transform: translateX(0); }
    89% { transform: translateX(-1px); }
    91% { transform: translateX(1px); }
    93% { transform: translateX(0); }
}

/* ── Drifting motes, as behind the app's window. ── */
.motes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.motes i {
    position: absolute;
    bottom: -6%;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    filter: blur(1px);
    opacity: 0;
    animation: drift var(--d) linear infinite;
    animation-delay: var(--w);
}
.motes i:nth-child(1)  { --x: 4%;  --s: 3px; --d: 19s; --w: -2s;  --dx: 18px;  --o: 0.22; }
.motes i:nth-child(2)  { --x: 11%; --s: 2px; --d: 24s; --w: -9s;  --dx: -14px; --o: 0.16; }
.motes i:nth-child(3)  { --x: 17%; --s: 4px; --d: 28s; --w: -15s; --dx: 22px;  --o: 0.12; }
.motes i:nth-child(4)  { --x: 23%; --s: 2px; --d: 21s; --w: -4s;  --dx: -10px; --o: 0.2; }
.motes i:nth-child(5)  { --x: 30%; --s: 3px; --d: 26s; --w: -19s; --dx: 16px;  --o: 0.15; }
.motes i:nth-child(6)  { --x: 36%; --s: 2px; --d: 18s; --w: -7s;  --dx: -18px; --o: 0.18; }
.motes i:nth-child(7)  { --x: 42%; --s: 3px; --d: 30s; --w: -22s; --dx: 12px;  --o: 0.12; }
.motes i:nth-child(8)  { --x: 49%; --s: 2px; --d: 23s; --w: -12s; --dx: -16px; --o: 0.2; }
.motes i:nth-child(9)  { --x: 55%; --s: 4px; --d: 27s; --w: -3s;  --dx: 20px;  --o: 0.1; }
.motes i:nth-child(10) { --x: 61%; --s: 2px; --d: 20s; --w: -16s; --dx: -12px; --o: 0.18; }
.motes i:nth-child(11) { --x: 67%; --s: 3px; --d: 25s; --w: -8s;  --dx: 14px;  --o: 0.16; }
.motes i:nth-child(12) { --x: 72%; --s: 2px; --d: 29s; --w: -25s; --dx: -20px; --o: 0.14; }
.motes i:nth-child(13) { --x: 78%; --s: 3px; --d: 22s; --w: -11s; --dx: 10px;  --o: 0.2; }
.motes i:nth-child(14) { --x: 83%; --s: 2px; --d: 19s; --w: -5s;  --dx: -14px; --o: 0.18; }
.motes i:nth-child(15) { --x: 88%; --s: 4px; --d: 31s; --w: -20s; --dx: 18px;  --o: 0.1; }
.motes i:nth-child(16) { --x: 93%; --s: 2px; --d: 24s; --w: -14s; --dx: -10px; --o: 0.16; }
.motes i:nth-child(17) { --x: 97%; --s: 3px; --d: 26s; --w: -1s;  --dx: -18px; --o: 0.14; }
.motes i:nth-child(18) { --x: 52%; --s: 2px; --d: 33s; --w: -27s; --dx: 24px;  --o: 0.12; }
@keyframes drift {
    0%   { bottom: -6%; transform: translateX(0); opacity: 0; }
    8%   { opacity: var(--o); }
    50%  { transform: translateX(var(--dx)); }
    88%  { opacity: var(--o); }
    100% { bottom: 112%; transform: translateX(calc(var(--dx) * 1.6)); opacity: 0; }
}

/* Faint scanlines over everything, the tape the VHS text came off. */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.022) 0,
        rgba(255, 255, 255, 0.022) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* ══ The window ══ */
.window {
    position: relative;
    z-index: 1;
    width: min(780px, 100%);
    border-radius: var(--radius-window);
    overflow: hidden;
    background: var(--bg-container);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 24px 70px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.4);
    animation: windowIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes windowIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
}

.title-bar {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 14px;
    background: var(--bg-titlebar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.title-bar-app {
    display: flex;
    align-items: center;
    gap: 9px;
}
.title-bar-icon {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--orange), #ffc27a);
    box-shadow: 0 0 8px rgba(240, 133, 45, 0.4);
}
.title-bar-label {
    font-size: 0.72rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.85;
}
.title-bar-controls {
    display: flex;
    gap: 16px;
    color: var(--text-dim);
}
.title-bar-controls svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 46px 40px 38px;
}

/* ── The hero ── */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
/* The chunk-tile logo. It holds still: its screen tear is in the SVG, and visitors who ask for
   reduced motion get logo-still.svg. The page's scanlines lie over it, and it takes the red and
   cyan split the small text has, and a soft glow in its own green. */
.logo { display: block; line-height: 0; }
.logo img {
    display: block;
    width: 97px;
    height: 97px;
    filter:
        drop-shadow(1px 0 0 rgba(255, 45, 45, 0.55))
        drop-shadow(-1px 0 0 rgba(45, 210, 255, 0.55))
        drop-shadow(0 0 16px rgba(62, 138, 92, 0.5));
}
.wordmark {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: clamp(2.3rem, 8.4vw, 4.4rem);
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--orange);
    text-shadow:
        2px 0 0 rgba(255, 45, 45, 0.32),
        -2px 0 0 rgba(45, 210, 255, 0.32),
        0 0 38px rgba(240, 133, 45, 0.28);
    animation: vhsJitter 5s infinite steps(1);
}
.tagline { font-size: 0.98rem; }

/* ── Coming soon, beside the world being prepared ── */
.loader {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 24px 28px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-card);
}
/* A scanline sweeping down the card, as the app draws over a panel being re-read. */
.loader::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 46px;
    background: linear-gradient(to bottom, transparent, rgba(45, 210, 255, 0.05), transparent);
    animation: sweep 5.5s linear infinite;
    pointer-events: none;
}
@keyframes sweep {
    from { transform: translateY(-50px); }
    to { transform: translateY(300px); }
}
.chunks {
    flex: 0 0 auto;
    width: 178px;
    height: 178px;
    border-radius: 6px;
}
.loader-text { min-width: 0; }
.soon {
    font-family: var(--font-buttons);
    font-weight: 400;
    font-size: clamp(1.7rem, 4.8vw, 2.45rem);
    line-height: 1.04;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.soon-note {
    max-width: 36ch;
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.progress { margin-top: 18px; }
.progress-line {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.8rem;
}
.dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 8px rgba(240, 133, 45, 0.75);
    animation: pulse 1.6s ease-in-out infinite;
}
.dot.ready {
    background: #4caf6d;
    box-shadow: 0 0 8px rgba(76, 175, 109, 0.75);
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.bar {
    height: 4px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
}
.bar span {
    display: block;
    width: var(--p, 0%);
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--orange), #ffc27a);
    box-shadow: 0 0 10px rgba(240, 133, 45, 0.5);
}

/* ── Three things it will be, and three places to join in ── */
.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
}
.facts li {
    padding: 16px 16px 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-card);
    transition: border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.facts li:hover {
    border-color: rgba(240, 133, 45, 0.55);
    transform: translateY(-2px);
}
.fact-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 9px;
    color: var(--orange);
    background: rgba(240, 133, 45, 0.1);
}
.fact-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.facts h3 {
    margin-bottom: 6px;
    font-family: var(--font-buttons);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.facts p {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.join-title {
    margin-bottom: 12px;
    font-family: var(--font-buttons);
    font-weight: 400;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}
/* The button sits at the foot of each card, whatever the text above it. */
.join-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.join-links li {
    display: flex;
    flex-direction: column;
}
.join-links p { flex: 1; }
.join-links .link-button {
    align-self: flex-start;
    margin-top: 14px;
}

.foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 4px;
    font-size: 0.74rem;
    color: var(--text-dim);
}
.foot > * + *::before {
    content: "·";
    margin: 0 10px;
}
.foot a {
    color: var(--text-secondary);
    text-decoration: none;
}
.foot a:hover,
.foot a[aria-current] { color: var(--text-primary); }
.foot a:focus-visible {
    outline: none;
    border-radius: 3px;
    box-shadow: 0 0 0 2px rgba(240, 133, 45, 0.5);
}

/* The people on the page now, beside the copyright: a live dot in the app's online cyan. */
.here {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.here[hidden] { display: none; }
.here::before { margin-right: 3px; }
.here-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(45, 210, 255, 0.75);
    animation: pulse 1.6s ease-in-out infinite;
}

/* ── The page that is not there ── */
.lost {
    align-items: center;
    text-align: center;
}
.lost .soon { font-size: clamp(1.6rem, 5vw, 2.3rem); }
.lost .soon-note { margin-left: auto; margin-right: auto; }
.home-link {
    display: inline-block;
    margin-top: 22px;
    padding: 10px 18px;
    border: 1.5px solid rgba(240, 133, 45, 0.6);
    border-radius: 10px;
    font-family: var(--font-buttons);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--orange);
    background: rgba(240, 133, 45, 0.08);
    transition: background 0.18s, color 0.18s;
}
.home-link:hover { background: var(--orange); color: #1a1208; }
.home-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(240, 133, 45, 0.35); }

/* ── Impressum and privacy: the same window, holding text to read ── */
.legal { gap: 22px; }
.legal-kicker {
    margin-top: 8px;
    font-size: 0.78rem;
}
.legal h2 {
    margin-bottom: 8px;
    font-family: var(--font-buttons);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.legal p,
.legal dd {
    max-width: 64ch;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.legal p + p { margin-top: 10px; }
.legal address { font-style: normal; }
.legal-card a,
.legal-text a {
    color: var(--orange);
    text-decoration: underline;
    text-decoration-color: rgba(240, 133, 45, 0.4);
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}
.legal-card a:hover,
.legal-text a:hover { text-decoration-color: var(--orange); }
.legal-card {
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-card);
}
.legal-text {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.legal-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 24px;
}
.legal-facts dt {
    padding-top: 3px;
    font-family: var(--font-buttons);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.legal-facts dd { color: var(--text-primary); }
.legal .home-link { align-self: flex-start; margin-top: 4px; }

/* ── Thank you: the 404's layout, with a world that grows a heart ── */
.thanks-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.thanks .chunks { margin-bottom: 22px; }

/* ── Donate: a card for Ko-fi, in the facts' own style ── */
.support { align-items: center; text-align: center; }
.support .hero .soon { margin-top: 4px; }
.kofi-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(560px, 100%);
    padding: 20px 22px;
    text-align: left;
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-card);
}
.kofi-cup {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: var(--orange);
    background: rgba(240, 133, 45, 0.1);
}
.kofi-cup svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.kofi-text { flex: 1; min-width: 0; }
.kofi-text h2 {
    margin-bottom: 6px;
    font-family: var(--font-buttons);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.kofi-text p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.kofi-button,
.link-button {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1.5px solid var(--orange);
    border-radius: 10px;
    font-family: var(--font-buttons);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: #1a1208;
    background: var(--orange);
    box-shadow: 0 0 14px rgba(240, 133, 45, 0.3);
    transition: background 0.18s, box-shadow 0.18s;
}
a.kofi-button:hover,
a.link-button:hover { background: #ffa95c; box-shadow: 0 0 20px rgba(240, 133, 45, 0.45); }
a.kofi-button:focus-visible,
a.link-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(240, 133, 45, 0.35); }
/* Until there is a page to send anyone to: the button's outline, and nothing to press. */
.kofi-button.placeholder,
.link-button.placeholder {
    border-style: dashed;
    border-color: rgba(240, 133, 45, 0.5);
    color: var(--text-dim);
    background: transparent;
    box-shadow: none;
    cursor: default;
}
.support-note {
    max-width: 56ch;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-dim);
}
.support .home-link { margin-top: 0; }

@media (max-width: 680px) {
    body { padding-top: 24px; }
    .logo img { width: 83px; height: 83px; }
    .legal-card { padding: 18px; }
    .legal-facts { grid-template-columns: 1fr; gap: 2px; }
    .legal-facts dd + dt { margin-top: 12px; }
    /* On a phone the count would wrap anyway: give it its own line, without a dot to start it. */
    .here { flex-basis: 100%; justify-content: center; }
    .here::before { display: none; }
    /* Four entries do not fit a phone's line: the copyright takes its own, the links the next. */
    .foot > span:first-child { flex-basis: 100%; text-align: center; }
    .foot > span:first-child + *::before { display: none; }
    .content { padding: 34px 20px 26px; gap: 24px; }
    .loader {
        flex-direction: column;
        gap: 20px;
        padding: 22px 20px;
        text-align: center;
    }
    .soon-note { margin-left: auto; margin-right: auto; }
    .progress-line { justify-content: center; }
    .facts, .join-links { grid-template-columns: 1fr; }
    .join-links .link-button { align-self: center; }
    .join-links li { align-items: center; text-align: center; }
    .kofi-card { flex-direction: column; text-align: center; padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .motes, .loader::after { display: none; }
}
