/* Inkwell Puzzles website: the game's newsprint look.
   Colours are the game's tokens (Assets/Inkwell/Resources/UI/Styles/Inkwell.uss); the typefaces are the game's own,
   served from this site (no third-party requests). Placeholders still to be filled in are <mark>[like this]</mark>. */

@font-face {
    font-family: "Old Standard TT";
    src: url("fonts/OldStandard-Regular.woff?v=7347ff67c2") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Old Standard TT";
    src: url("fonts/OldStandard-Bold.woff?v=4daf6b8e83") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Old Standard TT";
    src: url("fonts/OldStandard-Italic.woff?v=22b4a728fe") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Grenze Gotisch";
    src: url("fonts/GrenzeGotisch-Bold.woff?v=a647bff905") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #F6F1E7;
    --paper-shade: #ECE4D3;
    --paper-deep: #E2D7C0;
    --ink: #1C1B19;
    --ink-soft: #3A3833;
    --ink-muted: #6B665C;
    --rule: #2B2A27;
    --press-red: #B3261E;
    --ink-blue: #1F3A5F;
    --highlighter: #F2D16B;

    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: 2.5rem;
    --measure: 40rem;
    --wide: 66rem;
    --radius: 6px;

    --serif: "Old Standard TT", Georgia, "Times New Roman", serif;
    --gothic: "Grenze Gotisch", var(--serif);

    color-scheme: light;
}

/* The game's high-contrast palette, for readers who ask their device for more contrast. */
@media (prefers-contrast: more) {
    :root {
        --paper: #FFFFFF;
        --paper-shade: #EFEFEF;
        --paper-deep: #C8C8C8;
        --ink: #000000;
        --ink-soft: #111111;
        --ink-muted: #3D3D3D;
        --rule: #000000;
        --press-red: #A0001A;
        --ink-blue: #003A8C;
    }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
p, ul, ol, dl, table { margin: 0 0 var(--space-s); }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 700; }

a { color: var(--ink-blue); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--press-red); text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--ink-blue); outline-offset: 2px; border-radius: 2px; }

/* Placeholders the owner fills in: a highlighter stroke, as on a proof. */
mark {
    background-color: var(--highlighter);
    color: var(--ink);
    padding: 0 0.2em;
    border-radius: 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
@media (prefers-contrast: more) { mark { outline: 1px solid var(--ink); } }

.skip-link { position: absolute; left: var(--space-s); top: -4rem; padding: var(--space-xs) var(--space-s); background: var(--ink); color: var(--paper); z-index: 1; }
.skip-link:focus { top: var(--space-s); color: var(--paper); }

.page { max-width: var(--wide); margin: 0 auto; padding: 0 var(--space-s); }
@media (min-width: 40em) { .page { padding: 0 var(--space-m); } }

/* ---------- masthead ---------- */
.masthead { text-align: center; padding-top: var(--space-m); }
/* The way back to the company's home page: a small card above the nameplate, like a newspaper's publisher's box, in
   the same ink-and-paper style as the store buttons. */
.publisher {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.65em;
    margin: 0 auto var(--space-s) 0;
    padding: 0.45em 0.95em 0.45em 0.7em;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background-color: var(--paper);
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    text-align: left;
    text-decoration: none;
    line-height: 1.15;
}
.publisher:hover { background-color: var(--paper-shade); color: var(--ink); }
.publisher:active { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }
.publisher img { width: 2.2rem; height: 2.2rem; }
.publisher__arrow { color: var(--ink-muted); font-size: 1.15rem; }
.publisher__label { display: block; color: var(--press-red); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.publisher__name { display: block; font-size: 1.05rem; font-weight: 700; }
.masthead__title {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--gothic);
    font-weight: 700;
    font-size: clamp(1.9rem, 0.6rem + 6.6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-decoration: none;
}
.masthead__title:hover { color: var(--ink); }
.masthead__title img { width: 0.95em; height: 0.95em; }
.masthead__tagline { margin: 0.25em 0 var(--space-s); color: var(--ink-soft); font-style: italic; }

.masthead__nav { border-top: 6px solid var(--rule); border-bottom: 2px solid var(--rule); padding: 0.4em 0; }
.masthead__nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1em 1.1em; margin: 0; padding: 0; list-style: none; }
.masthead__nav li { margin: 0; }
.masthead__nav a { color: var(--ink-soft); font-style: italic; text-decoration: none; padding: 0.3em 0; }
.masthead__nav a:hover { color: var(--press-red); text-decoration: underline; }
.masthead__nav a[aria-current="page"] { color: var(--ink); font-style: normal; font-weight: 700; }

/* ---------- typography ---------- */
main { padding: var(--space-m) 0 var(--space-l); }
.prose { max-width: var(--measure); margin: 0 auto; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); text-align: center; margin: 0.2em 0 0.4em; }
h2 { font-size: 1.55rem; margin: var(--space-l) 0 var(--space-xs); padding-top: var(--space-xs); border-top: 2px solid var(--rule); }
h3 { font-size: 1.2rem; margin: var(--space-m) 0 0.3em; }
.kicker {
    display: block;
    margin: 0;
    color: var(--press-red);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.prose > .kicker, .lede, .dateline { text-align: center; }
.lede { font-size: 1.25rem; color: var(--ink-soft); margin-bottom: var(--space-m); }
.dateline { color: var(--ink-muted); font-style: italic; }
.muted { color: var(--ink-muted); }

/* A notice printed in a red box: the draft warning on the legal pages, and other things to read first. */
.notice { border: 2px solid var(--press-red); background-color: var(--paper-shade); padding: var(--space-s) var(--space-m); margin: var(--space-m) 0; }
.notice > :last-child { margin-bottom: 0; }
.notice .kicker { margin-bottom: 0.3em; padding-top: 0; border-top: 0; }

/* A short list of the page's sections. */
.contents { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: var(--space-s) 0; margin: var(--space-m) 0; }
.contents .kicker { margin-bottom: 0.3em; color: var(--ink-soft); }
.contents ul { margin: 0; padding: 0; list-style: none; }

/* ---------- tables: columns on wide screens, labelled stacks on phones ---------- */
.table-wrap { margin: var(--space-m) 0; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 0.6em 0.7em; border-bottom: 1px solid var(--paper-deep); }
thead th { border-bottom: 2px solid var(--rule); font-size: 0.9rem; letter-spacing: 0.04em; }
tbody th { font-weight: 400; }
/* On wide screens a table reaches beyond the text column, so four columns of prose stay readable. */
@media (min-width: 62em) {
    .prose .table-wrap { width: 56rem; margin-left: -8rem; margin-right: -8rem; }
}
@media (max-width: 47.99em) {
    table, thead, tbody, tr, th, td { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    tr { border-top: 2px solid var(--rule); padding: var(--space-xs) 0 var(--space-s); }
    th, td { border: 0; padding: 0.25em 0; }
    td[data-label]::before { content: attr(data-label); display: block; color: var(--press-red); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
}

/* ---------- front page ---------- */
.hero { display: grid; gap: var(--space-m); align-items: center; justify-items: center; text-align: center; padding: var(--space-s) 0 var(--space-m); }
.hero__stamp { width: 7.5rem; height: 7.5rem; border-radius: 22%; box-shadow: 0 0 0 1px var(--paper-deep); }
.hero h1 { margin-top: 0; }
.hero .lede { max-width: 38rem; margin-left: auto; margin-right: auto; }
@media (min-width: 48em) {
    .hero { grid-template-columns: auto 1fr; text-align: left; justify-items: start; gap: var(--space-l); padding: var(--space-m) var(--space-m) var(--space-l); }
    .hero__stamp { width: 12rem; height: 12rem; }
    .hero h1, .hero .lede { text-align: left; margin-left: 0; }
    .hero .store-links { justify-content: flex-start; }
}

.store-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-s); margin: 0 0 var(--space-xs); padding: 0; list-style: none; }
.store-links li { margin: 0; }
.button {
    display: inline-block;
    padding: 0.55em 1.1em;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background-color: var(--paper);
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}
.button small { display: block; font-weight: 400; font-size: 0.8rem; font-style: italic; }
.button:hover { background-color: var(--paper-shade); color: var(--ink); }
.button:active { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }
.store-note { color: var(--ink-muted); font-style: italic; font-size: 1rem; }

.section-title { text-align: center; font-size: 1.55rem; margin: var(--space-l) 0 var(--space-s); padding-top: var(--space-xs); border-top: 6px solid var(--rule); }
.section-title + .section-intro { text-align: center; color: var(--ink-soft); max-width: var(--measure); margin: 0 auto var(--space-m); }

/* Newspaper columns: side by side with a hairline between them, stacked on phones. */
.columns { display: grid; gap: var(--space-m); margin: 0; padding: 0; list-style: none; }
.columns > * { margin: 0; }
.columns h3 { margin-top: 0.2em; }
.columns p { margin-bottom: 0; }
@media (max-width: 39.99em) {
    .columns > * + * { border-top: 1px solid var(--paper-deep); padding-top: var(--space-m); }
}
@media (min-width: 40em) {
    .columns--2, .columns--3 { grid-template-columns: repeat(2, 1fr); }
    .columns > * { border-left: 1px solid var(--paper-deep); padding-left: var(--space-m); }
}
@media (min-width: 64em) {
    .columns--3 { grid-template-columns: repeat(3, 1fr); }
}

.feature { margin: var(--space-l) 0; padding: var(--space-m); border: 2px solid var(--rule); background-color: var(--paper-shade); }
.feature h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.feature > :last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.colophon { border-top: 6px solid var(--rule); padding: var(--space-m) 0 var(--space-l); font-size: 1rem; color: var(--ink-soft); text-align: center; }
.colophon ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em 1.2em; padding: 0; list-style: none; }
.colophon li { margin: 0; }
.colophon p { margin-bottom: 0.4em; }

/* ---------- motion ---------- */
/* As on the company's home page: things fade in and rise into place as they come into view (../motion.js reveals each
   child of a data-reveal element and each .reveal, a step apart). Hidden only while that script runs the show; without
   it everything simply shows. */
.motion [data-reveal] > :not(.shown), .motion .reveal:not(.shown) { opacity: 0; transform: translateY(1.5rem); }
.motion .showing { transition: opacity 0.7s ease-out, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
