/* MegaconvertGS homepage: the colours of its title screen. The background is
   the title's stepped Super Hi-Res blues and purples; the accents are the
   rainbow out of its prism; the type is Shaston, the IIgs system font. */

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

:root {
    /* the title screen's bands, darkest to lightest */
    --band0: #220099;
    --band1: #0011AA;
    --band2: #1111BB;
    --band3: #2211CC;
    --band4: #3311DD;
    --band5: #4411DD;
    --band6: #5511EE;
    --band7: #6611FF;
    /* the logo's yellow and its shadow */
    --gold: #FFDD00;
    --gold-dark: #CC7700;
    /* the prism's rainbow (and the IIgs Apple's) */
    --r1: #DD0000;
    --r2: #FF7700;
    --r3: #FFFF00;
    --r4: #00DD00;
    --r5: #4DDDFF;
    --r6: #AA44FF;
    --paper: #FFFFFF;
    --ink: #000000;
    --lilac: #DDAAFF;
    --platinum: #D8D3C4;
    --platinum-dark: #A7A190;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
    background: var(--band0);
}

body {
    font-family: "Shaston", "Geneva", "Verdana", sans-serif;
    font-size: 22px;
    line-height: 1.3;
    color: var(--paper);
    -webkit-font-smoothing: none;
    /* Stepped bands, as a Super Hi-Res screen draws a gradient: hard stops,
       no blending, with the title's dither of alternate lines between bands. */
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.10) 0 2px, transparent 2px 4px),
        linear-gradient(180deg,
            var(--band1) 0 8%, var(--band2) 8% 16%, var(--band3) 16% 26%,
            var(--band4) 26% 36%, var(--band5) 36% 46%, var(--band6) 46% 56%,
            var(--band7) 56% 64%, var(--band6) 64% 72%, var(--band5) 72% 80%,
            var(--band4) 80% 88%, var(--band3) 88% 94%, var(--band0) 94% 100%);
    background-attachment: fixed;
}

a { color: var(--gold); }
img { image-rendering: pixelated; }

/* The rainbow across the top, as the prism's beam */
.rainbow {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 12px;
    z-index: 20;
    background: linear-gradient(180deg,
        var(--r1) 0 2px, var(--r2) 2px 4px, var(--r3) 4px 6px,
        var(--r4) 6px 8px, var(--r5) 8px 10px, var(--r6) 10px 12px);
}

/* Navigation */
.topbar {
    position: fixed;
    top: 12px; left: 0; right: 0;
    z-index: 19;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    padding: 4px 12px;
    background: var(--band0);
    border-bottom: 2px solid var(--ink);
}
.topbar a {
    color: var(--paper);
    text-decoration: none;
    padding: 2px 10px;
}
.topbar a:hover, .topbar a:focus-visible { background: var(--gold); color: var(--ink); outline: none; }
.topbar .brand { display: flex; align-items: center; gap: 8px; color: var(--gold); margin-right: auto; }
.topbar .brand img { width: 28px; height: 28px; }

/* Hero: the title screen on a monitor */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 104px 20px 40px;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 40px;
    align-items: center;
}
.monitor {
    background: var(--platinum);
    border-radius: 18px;
    padding: 26px 26px 14px;
    box-shadow:
        inset -6px -6px 0 var(--platinum-dark),
        inset 4px 4px 0 #F2EEE3,
        10px 10px 0 rgba(0,0,0,0.35);
}
.screen {
    background: var(--ink);
    border-radius: 10px;
    padding: 14px;
    box-shadow: inset 0 0 0 4px #3A372F;
}
.screen img { display: block; width: 100%; height: auto; }
.badge {
    margin-top: 10px;
    text-align: right;
    font-size: 16px;
    color: #6E695C;
    letter-spacing: 1px;
}
.badge::before {
    content: "";
    display: inline-block;
    width: 14px; height: 14px;
    margin-right: 8px;
    vertical-align: -1px;
    background: linear-gradient(180deg, var(--r4) 0 17%, var(--r3) 17% 34%, var(--r2) 34% 50%,
        var(--r1) 50% 67%, var(--r6) 67% 84%, var(--r5) 84% 100%);
}
.kicker { color: var(--lilac); font-size: 18px; }
.pitch h1 {
    font-weight: normal;
    font-size: 46px;
    line-height: 1.05;
    color: var(--gold);
    /* the logo's stepped shadow */
    text-shadow: 3px 3px 0 var(--gold-dark), 6px 6px 0 var(--ink);
    margin: 10px 0 18px;
}
.pitch p + p { margin-top: 12px; }

/* Buttons: IIgs push buttons in the logo's colours */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.actions.column { flex-direction: column; align-items: stretch; margin-top: 0; }
.btn {
    display: inline-block;
    text-align: center;
    padding: 6px 22px 4px;
    border: 3px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--ink);
}
.btn.primary { background: var(--gold); border-width: 5px; }
.btn:hover, .btn:focus-visible { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); outline: none; }

/* Panels: a dark band with a rainbow-edged heading */
main { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.panel {
    background: rgba(17, 0, 85, 0.72);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.45);
    padding: 0 26px 28px;
    margin-bottom: 40px;
}
.panel > h2 {
    font-weight: normal;
    font-size: 30px;
    margin: 0 -26px 22px;
    padding: 10px 26px 8px;
    color: var(--ink);
    background: var(--gold);
    border-bottom: 6px solid;
    border-image: linear-gradient(90deg, var(--r1) 0 16.6%, var(--r2) 16.6% 33.3%, var(--r3) 33.3% 50%,
        var(--r4) 50% 66.6%, var(--r5) 66.6% 83.3%, var(--r6) 83.3% 100%) 1;
}
.intro { color: var(--lilac); margin-bottom: 20px; }
.small { font-size: 18px; color: var(--lilac); }

/* The conversion lab */
.lab { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 26px; align-items: start; }
.viewer img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); background: var(--ink); }
.viewer figcaption { margin-top: 10px; min-height: 2.6em; }
fieldset { border: 2px solid var(--lilac); padding: 10px 14px 12px; }
fieldset + fieldset { margin-top: 18px; }
legend { padding: 0 8px; color: var(--gold); }
.radios { display: flex; flex-direction: column; gap: 4px; }
.radio { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 4px; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio span::before {
    content: "";
    display: inline-block;
    width: 16px; height: 16px;
    margin-right: 10px;
    vertical-align: -2px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--band0);
}
.radio input:checked + span::before { background: radial-gradient(circle, var(--gold) 0 40%, var(--band0) 45%); }
.radio input:checked + span { color: var(--gold); }
.radio input:focus-visible + span { outline: 2px dashed var(--gold); outline-offset: 2px; }
.radio:hover span { color: var(--gold); }

/* What it does: a coloured word for each */
.features { list-style: none; column-count: 2; column-gap: 30px; }
.features li { break-inside: avoid; margin-bottom: 16px; }
.features b { font-weight: normal; padding: 0 6px; margin-right: 6px; color: var(--ink); }
.c1 { background: var(--r1); color: var(--paper) !important; }
.c2 { background: var(--r2); }
.c3 { background: var(--r3); }
.c4 { background: var(--r4); }
.c5 { background: var(--r5); }
.c6 { background: var(--r6); color: var(--paper) !important; }

/* Formats: each computer type a 3.5" disk with a label */
.disks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.disk {
    position: relative;
    background: #2B2B33;
    border: 2px solid var(--ink);
    border-radius: 4px 14px 4px 4px;
    padding: 46px 14px 16px;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
}
.disk::before {                      /* the metal shutter */
    content: "";
    position: absolute;
    top: 0; left: 26%; width: 48%; height: 34px;
    background: linear-gradient(90deg, #C9C9CF 0 30%, #2B2B33 30% 52%, #C9C9CF 52% 100%);
    border: 2px solid var(--ink);
    border-top: 0;
}
.disk h3, .disk p { background: var(--paper); color: var(--ink); }
.disk h3 {
    font-weight: normal;
    font-size: 21px;
    padding: 6px 10px 4px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--r1) 0 16.6%, var(--r2) 16.6% 33.3%, var(--r3) 33.3% 50%,
        var(--r4) 50% 66.6%, var(--r5) 66.6% 83.3%, var(--r6) 83.3% 100%) 1;
}
.disk p { font-size: 17px; padding: 8px 10px 10px; line-height: 1.25; }
.new {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    padding: 2px 5px 1px;
    background: var(--r1);
    color: var(--paper);
    vertical-align: 2px;
}

/* Speed: before and after bars */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 11em; gap: 16px; align-items: center; }
.track { position: relative; height: 26px; background: rgba(0,0,0,0.35); border: 2px solid var(--ink); }
.track i { position: absolute; top: 0; left: 0; bottom: 0; }
.before, .legend i.before { background: repeating-linear-gradient(90deg, var(--band7) 0 2px, var(--lilac) 2px 4px); }
.after, .legend i.after { background: var(--gold); }
.track .after { top: 5px; bottom: 5px; border-right: 2px solid var(--ink); }
.nums { font-size: 19px; white-space: nowrap; }
.nums b { font-weight: normal; color: var(--gold); margin-left: 6px; }
.legend { margin-top: 16px; font-size: 18px; color: var(--lilac); }
.legend i { display: inline-block; width: 26px; height: 14px; border: 2px solid var(--ink); vertical-align: -1px; margin: 0 6px 0 14px; }
.legend i:first-child { margin-left: 0; }

/* Screens */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.shots img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); }
.shots figcaption { margin-top: 8px; font-size: 18px; color: var(--lilac); }

/* Download */
.get { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 30px; align-items: start; }
.get p + ol, .get ol + p { margin-top: 14px; }
.steps { padding-left: 1.6em; }
.steps li { margin-top: 6px; }
.steps li::marker { color: var(--gold); }

/* Footer */
.foot {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 46px;
    text-align: center;
    font-size: 18px;
    color: var(--lilac);
}
.foot p + p { margin-top: 12px; }
.foot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot .links.apps { gap: 4px 16px; font-size: 16px; }
.foot a { color: var(--paper); }
.foot a:hover { color: var(--gold); }

@media (max-width: 900px) {
    body { font-size: 20px; }
    .hero { grid-template-columns: 1fr; padding-top: 128px; gap: 28px; }
    .pitch h1 { font-size: 36px; }
    .lab, .get { grid-template-columns: 1fr; }
    .features { column-count: 1; }
    .shots { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 1fr; gap: 6px; }
    html { scroll-padding-top: 110px; }
}

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