/* MIDIPen site — HyperCard aesthetic, mirroring the app's design tokens:
   two colors (ink, paper), 1px hairlines, 2px card borders, striped title
   bars, dithered shadows, hard-offset buttons, no radius, no blur. */

:root {
    --ink: #000;
    --paper: #fff;
    --silk: "Silkscreen", "Chicago", ui-monospace, Menlo, monospace;
    --body: Geneva, Verdana, "DejaVu Sans", sans-serif;
    --card-border: 2px;
    --shadow: 8px;
    --gap: 24px;
    --max: 1100px;
}

@media (prefers-color-scheme: dark) {
    :root { --ink: #fff; --paper: #000; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    /* 50% dither desk, 4px pitch, pixel-aligned */
    background-image: repeating-conic-gradient(var(--ink) 0% 25%, var(--paper) 0% 50%);
    background-size: 4px 4px;
    min-height: 100vh;
}

a { color: var(--ink); }
a:hover { text-decoration: none; background: var(--ink); color: var(--paper); }

.silk {
    font-family: var(--silk);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 400;
}

/* Menu bar — classic Mac: paper strip, ink rule under it */
.menubar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding: 0 8px;
    font-family: var(--silk);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.menu-item {
    display: inline-block;
    padding: 9px 12px;
    text-decoration: none;
}
.menu-item:hover { background: var(--ink); color: var(--paper); }
.menu-home { font-weight: 700; }

/* Desk */
.desk {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 16px 56px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Card: 2px border, paper fill, dithered hard shadow */
.card {
    position: relative;
    background: var(--paper);
    border: var(--card-border) solid var(--ink);
}
.card::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: var(--shadow);
    top: var(--shadow);
    width: 100%;
    height: 100%;
    background-image: repeating-conic-gradient(var(--ink) 0% 25%, transparent 0% 50%);
    background-size: 4px 4px;
}
.card.inner { --shadow: 6px; }

.titlebar {
    height: 26px;
    background-image: repeating-linear-gradient(to bottom, var(--ink) 0 1px, var(--paper) 1px 3px);
    border-bottom: 1px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.plate {
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: 1px 10px;
    font-family: var(--silk);
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.card-body { padding: 24px; }

/* Hero */
.hero { max-width: 640px; width: 100%; margin: 0 auto; }
.hero-body { text-align: center; padding: 32px 24px 28px; }
.app-icon {
    display: block;
    margin: 0 auto 16px;
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}
h1.silk { font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.tagline { font-size: 20px; margin-bottom: 8px; }
.meta { font-size: 10px; opacity: 0.75; margin-bottom: 24px; }
.fine { font-size: 12px; opacity: 0.75; margin-top: 16px; }

/* HyperCard button: 1px border, hard 2px shadow, press = translate */
.hc-button {
    display: inline-block;
    font-family: var(--silk);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: 10px 18px;
    box-shadow: 3px 3px 0 var(--ink);
}
.hc-button:hover { background: var(--paper); color: var(--ink); text-decoration: underline; }
.hc-button:active { box-shadow: none; transform: translate(3px, 3px); }
.hc-button.primary {
    /* the OK treatment: inverted inside a double ring */
    background: var(--ink);
    color: var(--paper);
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}
.hc-button.primary:hover { background: var(--ink); color: var(--paper); }

/* Screenshot windows */
.shot { max-width: 760px; width: 100%; margin: 0 auto; }
.shot img { display: block; width: 100%; height: auto; }
.shot.inner { margin: 0; }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
}
.gallery .shot { max-width: none; }

/* Three-up */
.trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
}
.trio .card-body { padding: 18px 20px; }

.wide { width: 100%; }

/* Prose */
.prose h2.silk { font-size: 18px; margin-bottom: 12px; }
.prose h3.silk { font-size: 12px; margin: 22px 0 8px; }
.prose h3.silk:first-child { margin-top: 0; }
.prose p { margin-bottom: 12px; }
.prose ul { margin: 0 0 12px 22px; }
.prose li { margin-bottom: 4px; }
.tok {
    font-family: var(--silk);
    font-size: 11px;
    border: 1px solid var(--ink);
    padding: 0 5px;
    white-space: nowrap;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-top: 28px;
}
.split .shot.inner { margin: 0; }

/* X-in-a-box checklist */
.checks { list-style: none; margin: 0 !important; }
.checks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.checks li strong { margin-right: 4px; }
.box {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 4px;
    border: 1px solid var(--ink);
    font-family: var(--silk);
    font-size: 9px;
    line-height: 13px;
    text-align: center;
}
.feature-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 32px;
}

/* Price */
#price { max-width: 760px; width: 100%; margin: 0 auto; }
.price-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.tier {
    border: 1px solid var(--ink);
    padding: 18px;
    box-shadow: inset 1px 1px 0 var(--ink);
}
.tier-name { font-size: 11px; margin-bottom: 2px; }
.tier-price { font-size: 28px; margin-bottom: 10px; }
.tier p:last-child { margin-bottom: 0; font-size: 14px; }

/* FAQ, legal */
.faq h3.silk { margin-top: 18px; }
.legal { font-size: 14px; }
#support { max-width: 760px; width: 100%; margin: 0 auto; }

/* Guide page */
.guide-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--gap);
    align-items: start;
}
.toc { position: sticky; top: 56px; }
.toc ol { list-style: none; }
.toc li { border-bottom: 1px solid var(--ink); }
.toc li:last-child { border-bottom: none; }
.toc a {
    display: block;
    padding: 7px 10px;
    font-family: var(--silk);
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
}
.guide h2.silk {
    font-size: 14px;
    margin: 36px 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ink);
}
.guide h2.silk:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.guide table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--ink);
    margin-bottom: 14px;
    font-size: 14px;
}
.guide th {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--silk);
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
    padding: 6px 8px;
    font-weight: 400;
}
.guide td { padding: 6px 8px; border-top: 1px solid var(--ink); vertical-align: top; }
.guide td:first-child { font-family: var(--silk); font-size: 10px; white-space: nowrap; }
.guide figure.shot { margin: 16px 0 20px; }
.guide figure.shot.inner { max-width: 520px; }
.guide .steps { margin-left: 22px; }
.guide .steps li { margin-bottom: 6px; }

/* Footer */
.footer {
    text-align: center;
    padding: 24px 16px 40px;
    font-size: 10px;
    background: var(--paper);
    border-top: 2px solid var(--ink);
}
.footer nav { margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; background: none; color: var(--ink); }

/* Responsive */
@media (max-width: 900px) {
    .trio, .gallery, .split, .feature-cols, .price-row { grid-template-columns: 1fr; }
    .guide-layout { grid-template-columns: 1fr; }
    .toc { position: static; }
}
@media (max-width: 600px) {
    .desk { padding: 24px 16px 40px; gap: 32px; }
    .card-body { padding: 18px 16px; }
    h1.silk { font-size: 26px; }
    .tagline { font-size: 17px; }
    .menubar { font-size: 10px; }
    .menu-item { padding: 8px 8px; }
}
