/*
 * The website around the game: the static pages for parents and search engines (written by
 * goat-generator/export-pages.mjs). Loaded after style.css and built from its colours, buttons and
 * panels, so the pages look like the game. The game itself never loads this file.
 */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    max-width: 720px;
    margin: 0 auto;
    padding: var(--top-inset) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
    text-decoration: none;
}

.site-brand b {
    color: var(--green);
}

.site-brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

/* The links have a row of their own under the name and the button: all four don't fit beside them. */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: 2px 16px;
    order: 1;
}

.site-nav a {
    padding: 8px 0;
    color: var(--ink-soft);
    font-weight: 800;
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    color: var(--ink);
    box-shadow: inset 0 -3px 0 var(--green);
}

.site-play {
    min-height: 44px;
    padding: .45em 1em;
    font-size: 1rem;
}

.site-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

.site .site-footer {
    margin-top: 8px;
}

/* ------------------------------------------------------------ the top of a page */

.site-hero {
    padding: 22px 0 4px;
}

.site-eyebrow {
    color: var(--green-dark);
    font-size: .85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.site-hero h1 {
    margin-top: 4px;
    font-size: clamp(1.9rem, 7.5vw, 2.7rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.site-lead {
    max-width: 58ch;
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 1.15rem;
}

.site-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.site-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.site-facts li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: .88rem;
    font-weight: 800;
}

/* ------------------------------------------------------------ screenshots of the game */

.site-shots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.site-shots figure {
    margin: 0;
}

/* A dark frame like a phone's, so a screenshot isn't taken for a part of the page. */
.site-shots img {
    width: 100%;
    height: auto;
    border: 5px solid var(--ink);
    border-radius: 24px;
    background: var(--bg);
    box-shadow: 0 6px 0 var(--line-strong);
}

.site-shots figcaption {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: .88rem;
    font-weight: 700;
    text-align: center;
    text-wrap: balance;
}

/* Three phones don't fit a phone: they go in a row that scrolls sideways, the next one peeking in. */
@media (max-width: 560px) {
    .site-shots {
        grid-template-columns: none;
        grid-auto-columns: 62%;
        grid-auto-flow: column;
        margin-right: -16px;
        margin-left: -16px;
        padding: 0 16px 8px;
        overflow: auto hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
    }

    .site-shots li {
        scroll-snap-align: center;
    }
}

/* ------------------------------------------------------------ sections of text */

.site-section {
    margin-top: 20px;
    padding: 20px 18px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 6px 0 var(--line-strong);
}

.site-section h2 {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
}

.site-section > h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 900;
}

.site-section > p {
    margin-top: 10px;
}

.site-section a:not(.button) {
    color: var(--green-dark);
    font-weight: 800;
}

.site-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 1.3em;
}

.site-list li::marker {
    color: var(--green);
}

.site-small {
    color: var(--ink-soft);
    font-size: .88rem;
}

/* ------------------------------------------------------------ what is practised */

.site-topic {
    margin-top: 16px;
    padding: 14px;
    border-radius: 20px;
    background: var(--tone-soft);
}

.site-topic h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 900;
}

.site-topic-symbol {
    display: grid;
    flex: none;
    place-items: center;
    min-width: 44px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--tone);
    color: #fff;
    font-size: .95rem;
    white-space: nowrap;
}

.site-levels {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: site-level;
}

.site-levels li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--surface);
}

/* Numbered only where the order matters: maths levels unlock one after another. */
ol.site-levels li {
    counter-increment: site-level;
}

ol.site-levels li::before {
    content: counter(site-level) ".";
    color: var(--tone-dark);
    font-weight: 900;
}

.site-level-note {
    color: var(--ink-soft);
    font-size: .9rem;
    font-weight: 700;
}

.site-level-sample {
    flex: 1 1 auto;
    color: var(--tone-dark);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* The part of a sentence a level of větné členy asks about. */
.site-level-sample mark {
    padding: 0 .2em;
    border-radius: 6px;
    background: var(--tone-soft);
    color: var(--tone-dark);
}

@media (max-width: 560px) {
    .site-level-sample {
        flex-basis: 100%;
        text-align: left;
    }
}

/* ------------------------------------------------------------ example questions */

.site-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.site-example {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px;
    border-radius: 20px;
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 2px var(--line);
}

.site-example-task {
    font-size: 1.08rem;
    font-weight: 800;
}

.site-example-answer {
    color: var(--green-dark);
    font-size: 1.35rem;
    font-weight: 900;
}

.site-example-sentence,
.site-example-options {
    color: var(--ink-soft);
    font-weight: 700;
}

.site-example-options b {
    color: var(--green-dark);
}

.site-example-why {
    font-size: .95rem;
}

.site-example mark {
    padding: 0 .2em;
    border-radius: 6px;
    background: var(--green-soft);
    color: var(--green-dark);
}

/* The missing letter or word, like the gap in the game. */
.site-gap {
    display: inline-block;
    min-width: 1.5em;
    margin: 0 .12em;
    border-radius: 8px;
    background: var(--orange-soft);
    color: var(--orange-dark);
    font-weight: 900;
    text-align: center;
    box-shadow: inset 0 0 0 2px var(--orange);
}

/* ------------------------------------------------------------ links to related pages */

.site-related ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.site-related .button {
    min-height: 46px;
    font-size: 1rem;
}

/* ------------------------------------------------------------ about the game */

.site-goats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.site-goats img {
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.site-goats span {
    display: block;
    margin-top: 6px;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 480px) {
    .site-goats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------------------------------------ how to install */

.site-steps {
    display: grid;
    gap: 14px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: site-step;
}

.site-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 2px var(--line);
    counter-increment: site-step;
}

.site-step p {
    position: relative;
    min-height: 28px;
    padding-left: 38px;
}

/* Orange like the circles in the pictures that show where to tap. */
.site-step p::before {
    content: counter(site-step);
    position: absolute;
    top: -2px;
    left: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-weight: 900;
}

.site-step img {
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: auto auto 0;
    border-radius: 14px;
}

.site-section > .site-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--orange-soft);
}

@media (min-width: 560px) {
    .site-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* A section opened by its link at the top of the page doesn't start right at the screen's edge. */
.site-section[id] {
    scroll-margin-top: 12px;
}

/* ------------------------------------------------------------ feedback form */

.site-form {
    margin-top: 14px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px var(--line);
}

.site-form iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* ------------------------------------------------------------ sharing the game */

.site-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
}

.site-share [role="status"] {
    color: var(--green-dark);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.site-share [role="status"]:empty {
    display: none;
}
