/* EmuBuddy: a page set like the Apple IIgs desktop (GS/OS windows on the IIgs blue) */
@font-face {
    font-family: "Shaston";
    src: url("fonts/Shaston640.ttf") format("truetype");
    font-display: swap;
}

:root {
    --blue: #2222ee;
    --blue-dark: #1818b8;
    --paper: #ffffff;
    --ink: #000000;
    --grey: #d8d8d8;
    --g1: #5ebd3e; --g2: #ffb900; --g3: #f78200;
    --g4: #e23838; --g5: #973999; --g6: #009cdf;
    --serif: "Apple Garamond", local("Apple Garamond"), "EB Garamond", Garamond, "Times New Roman", serif;
    --screen: "Shaston", "Monaco", monospace;
}

* { box-sizing: border-box; }
html { background: var(--blue); }
body {
    margin: 0;
    padding: 0 16px 60px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.45;
    background-color: var(--blue);
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 4px 4px;
}

a { color: #0b2bd6; }
a:hover { background: #000; color: #fff; text-decoration: none; }

/* the menu bar */
.menubar {
    position: sticky; top: 0; z-index: 10;
    margin: 0 -16px 36px;
    padding: 6px 18px;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
    font-family: var(--screen); font-size: 17px;
}
.menubar .apple {
    display: inline-block; width: 26px; height: 17px; border-radius: 3px;
    background: linear-gradient(var(--g1) 0 16.6%, var(--g2) 0 33.3%, var(--g3) 0 50%, var(--g4) 0 66.6%, var(--g5) 0 83.3%, var(--g6) 0);
    border: 1px solid var(--ink);
}
.menubar a { color: var(--ink); text-decoration: none; padding: 0 6px; }
.menubar a:hover { background: var(--ink); color: var(--paper); }
.menubar .right { margin-left: auto; }

.wrap { max-width: 1000px; margin: 0 auto; }

/* a GS/OS window */
.win {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    margin: 0 0 40px;
}
.win > .title {
    position: relative;
    height: 26px;
    border-bottom: 2px solid var(--ink);
    background: repeating-linear-gradient(var(--ink) 0 1px, var(--paper) 1px 4px);
    background-size: 100% 13px; background-position: 0 6px; background-repeat: no-repeat;
    text-align: center;
}
.win > .title::before, .win > .title::after {
    content: ""; position: absolute; top: 4px; width: 16px; height: 16px;
    background: var(--paper); border: 2px solid var(--ink);
}
.win > .title::before { left: 8px; }
.win > .title::after { right: 8px; }
.win > .title h2 {
    display: inline-block; margin: 0; padding: 0 12px; height: 26px; line-height: 24px;
    background: var(--paper);
    font-family: var(--screen); font-weight: normal; font-size: 18px; letter-spacing: .02em;
}
.win .body { padding: 26px 34px 30px; }
.win .body > :first-child { margin-top: 0; }
.win .body > :last-child { margin-bottom: 0; }

h1, h3 { font-weight: 600; margin: 0 0 8px; }
h3 { font-size: 24px; margin-top: 24px; }
p { margin: 0 0 14px; }

/* hero */
.hero { text-align: center; padding: 10px 0 4px; }
.hero img.icon { width: 120px; height: 120px; image-rendering: pixelated; border-radius: 22px; box-shadow: 3px 3px 0 var(--ink); }
.hero h1 { font-size: clamp(46px, 9vw, 84px); line-height: 1; margin: 14px 0 6px; letter-spacing: -.01em; }
.hero .tag { font-size: 28px; font-style: italic; margin-bottom: 8px; }
.hero .sub { max-width: 680px; margin: 0 auto 18px; }
.stripes { height: 14px; margin: 18px 0;
    background: linear-gradient(var(--g1) 0 16.6%, var(--g2) 0 33.3%, var(--g3) 0 50%, var(--g4) 0 66.6%, var(--g5) 0 83.3%, var(--g6) 0);
    border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.btn {
    display: inline-block; font-family: var(--screen); font-size: 18px; color: var(--ink);
    background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
    padding: 5px 20px; margin: 4px 6px; text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.default { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }

/* screenshots: shown like the IIgs monitor */
figure { margin: 0 0 22px; }
.monitor { background: #cfc8b4; border: 2px solid var(--ink); border-radius: 14px; padding: 16px 16px 20px; box-shadow: 3px 3px 0 var(--ink); }
.monitor .glass { background: #000; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.monitor img { display: block; width: 100%; height: auto; }
figcaption { font-size: 18px; margin-top: 10px; text-align: center; }
figcaption b { font-family: var(--screen); font-weight: normal; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 30px; }
.feature h3 { margin-top: 0; font-size: 25px; }
.feature p { margin-bottom: 0; }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.shots figure { margin: 0; }

/* a tall (portrait) screenshot with text beside it */
.side { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 30px; align-items: start; }
.side figure { margin: 0; }

/* terminal-like code */
pre, code { font-family: var(--screen); }
pre {
    margin: 0 0 16px; padding: 14px 18px; overflow-x: auto;
    background: #000; color: #fff; border: 2px solid var(--ink);
    font-size: 16px; line-height: 1.5;
}
code { font-size: .88em; background: #ececec; padding: 1px 5px; border: 1px solid #b8b8b8; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
pre .c { color: #7fe3ff; }

table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 19px; }
th, td { text-align: left; vertical-align: top; padding: 7px 12px; border: 1px solid var(--ink); }
th { background: var(--ink); color: var(--paper); font-family: var(--screen); font-weight: normal; font-size: 16px; }
td:first-child { white-space: nowrap; }
td:first-child code { background: none; border: 0; padding: 0; font-weight: bold; }

.note { border: 2px solid var(--ink); background: #fff8d8; padding: 12px 16px; margin: 0 0 16px; }
.platforms { font-family: var(--screen); font-size: 16px; text-align: center; }

footer { max-width: 1000px; margin: 0 auto; color: #fff; text-align: center; font-size: 18px; }
footer a { color: #fff; }
footer a:hover { background: #fff; color: var(--blue); }

@media (max-width: 760px) {
    body { font-size: 19px; }
    .win .body { padding: 20px 18px 24px; }
    .grid, .shots, .side { grid-template-columns: 1fr; }
    .side figure { max-width: 300px; margin: 0 auto; }
    .menubar { gap: 10px; font-size: 15px; }
    td:first-child { white-space: normal; }
}
