/* Floppeek's site: a Workbench screen. The palette is Workbench 1.3's four colours,
   the windows are the ones Floppeek's own preview draws (orange title bar, close and
   depth gadgets, pinstriped drag bar, black frame, hard shadow), and the type is
   Topaz, served from fonts/ (never Google Fonts). Shared by every page. */

@font-face {
    font-family: "Topaz";
    src: url("fonts/Topaz_a1200_v1.0.ttf") format("truetype");
    font-display: swap;
}

:root {
    --blue: #0055aa;
    --blue-deep: #003a78;
    --black: #000022;
    --white: #ffffff;
    --orange: #ff8800;
    --grey: #d3dae6;   /* 5.2:1 on the blue, 14.6:1 on the black */
    --topaz: "Topaz", ui-monospace, "SF Mono", Menlo, monospace;
    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--blue);
    color: var(--white);
    font: 18px/1.5 var(--topaz);
    -webkit-font-smoothing: none;
    font-smooth: never;
    overflow-x: hidden;
}

a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 3px dashed var(--orange); outline-offset: 3px; }

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

code, kbd {
    font-family: var(--topaz);
    background: var(--blue-deep);
    padding: 0 0.3em;
}

.skip {
    position: absolute; left: -999px; top: 0;
    background: var(--orange); color: var(--black); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- The screen's title bar ---------- */
.screen-bar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; gap: 1.2em;
    min-height: 34px; padding: 0 var(--gutter);
    background: var(--white); color: var(--blue);
    border-bottom: 3px solid var(--black);
    font-size: 16px;
}
.screen-bar .brand {
    display: flex; align-items: center; gap: 8px;
    color: var(--blue); text-decoration: none; white-space: nowrap;
}
.screen-bar .brand img { width: 22px; height: 22px; }
.screen-bar nav { display: flex; gap: 1.2em; margin-left: auto; padding-left: 0.6em; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.screen-bar nav a { color: var(--blue); text-decoration: none; white-space: nowrap; }
.screen-bar nav a:hover { background: var(--blue); color: var(--white); }
.screen-bar .depth { flex: none; }
@media (max-width: 640px) { .screen-bar .free { display: none; } }

/* ---------- Windows ---------- */
.window {
    background: var(--blue);
    border: 3px solid var(--black);
    box-shadow: 10px 10px 0 var(--black);
    min-width: 0;
}
.window-title {
    display: flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 4px;
    background: var(--orange); color: var(--black);
    border-bottom: 3px solid var(--black);
    font-size: 18px; line-height: 1;
}
.window-title .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.window-title .drag {
    flex: 1; height: 16px; min-width: 16px;
    background: repeating-linear-gradient(to bottom, var(--black) 0 2px, transparent 2px 4px);
}
.gadget {
    flex: none; width: 24px; height: 22px;
    border: 2px solid var(--black); background: var(--orange); position: relative;
}
.gadget.close::after {
    content: ""; position: absolute; inset: 5px 7px;
    border: 2px solid var(--black); background: var(--white);
}
.gadget.depth::before, .gadget.depth::after {
    content: ""; position: absolute; width: 11px; height: 9px; border: 2px solid var(--black);
}
.gadget.depth::before { left: 2px; top: 2px; background: var(--orange); }
.gadget.depth::after { right: 2px; bottom: 2px; background: var(--white); }
.window-body { padding: clamp(16px, 3vw, 28px); }
.window-body > :first-child { margin-top: 0; }
.window-body > :last-child { margin-bottom: 0; }
.window.white .window-body { background: var(--white); color: var(--black); }
.window.white a { color: var(--blue); }
.window.shot .window-body { padding: 0; background: var(--black); }

/* ---------- Buttons: Workbench's bevel ---------- */
.button {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px;
    font: 20px/1.2 var(--topaz);
    background: var(--orange); color: var(--black);
    border: 3px solid; border-color: var(--white) var(--black) var(--black) var(--white);
    text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--black); background: #ffa033; }
.button:active { border-color: var(--black) var(--white) var(--white) var(--black); }
.button.secondary { background: var(--blue); color: var(--white); }
.button.secondary:hover { background: var(--blue-deep); color: var(--white); }
.button svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- Layout ---------- */
main { display: block; }
.section { padding: clamp(40px, 7vw, 80px) var(--gutter); max-width: 1180px; margin: 0 auto; }
.section h2 { font-size: clamp(26px, 4vw, 34px); font-weight: normal; margin: 0 0 0.6em; color: var(--white); }
.section h2::before { content: "> "; color: var(--orange); }
.lead { max-width: 46em; }

/* ---------- Copper bars ---------- */
.copper {
    height: 72px; position: relative; overflow: hidden; background: var(--black);
}
.copper span {
    position: absolute; left: 0; right: 0; height: 14px;
    animation: copper 6s ease-in-out infinite alternate;
}
.copper span:nth-child(1) { top: 6px;  background: linear-gradient(#5c1a00, #ff9f43, #fff3, #ff9f43, #5c1a00); }
.copper span:nth-child(2) { top: 22px; background: linear-gradient(#4a0a55, #ff6ec7, #fff6, #ff6ec7, #4a0a55); animation-delay: -1.5s; }
.copper span:nth-child(3) { top: 38px; background: linear-gradient(#05265e, #6ee7ff, #fff6, #6ee7ff, #05265e); animation-delay: -3s; }
.copper span:nth-child(4) { top: 54px; background: linear-gradient(#0b4a16, #9bff7a, #fff6, #9bff7a, #0b4a16); animation-delay: -4.5s; }
@keyframes copper { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .copper span { animation: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); padding: clamp(40px, 6vw, 64px) var(--gutter) 28px; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; }
.support { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 820px) { .support { grid-template-columns: 1fr; } }
.support h2 { font-weight: normal; font-size: 26px; margin: 0 0 0.4em; }
.support h2 .heart { color: #f06595; }
.support p { margin: 0; color: var(--grey); }
.sponsor-wall { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.sponsor-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 92px; color: var(--grey); text-decoration: none; font-size: 15px; text-align: center;
}
.sponsor-item:hover { color: var(--white); }
.sponsor-avatar {
    width: 64px; height: 64px; border: 3px solid var(--white);
    display: grid; place-items: center; background: var(--blue); color: var(--white); font-size: 30px;
}
.sponsor-item:hover .sponsor-avatar { border-color: var(--orange); }
.sponsor-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links {
    display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 40px 0 16px; padding-top: 22px;
    border-top: 2px dashed var(--blue);
}
.footer-links a { color: var(--white); text-decoration: none; }
.footer-links a:hover { color: var(--orange); }
.footer-attribution, .footer-legal { color: var(--grey); font-size: 15px; margin: 6px 0; }
.footer-attribution .heart { color: #f06595; }
.footer-legal .dot { margin: 0 0.5em; }
.footer-legal a, .footer-attribution a { color: var(--grey); }
.footer-legal a:hover, .footer-attribution a:hover { color: var(--orange); }
.trademark { color: var(--grey); font-size: 14px; margin-top: 14px; }

/* ---------- Text pages (legal, privacy) ---------- */
.page { max-width: 860px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter); }
.page h1 { font-weight: normal; font-size: clamp(26px, 4vw, 34px); margin: 0 0 0.6em; }
.page h2 { font-weight: normal; font-size: 22px; margin: 1.6em 0 0.4em; color: var(--blue); }
.page h2::before { content: none; }
.page ul { padding-left: 1.2em; }
.page li { margin: 0.3em 0; }
