/* Woof Woolf website. It follows the game's interface (Resource/Qml/Common/GGTheme.qml): the pasture is a documentary,
   the pages over it a storybook — cream paper, wooden rims with a flat drop shadow, chunky buttons standing on a
   darker lip, bold rounded letters, and the game's own glyphs (assets/glyphs, shown through CSS masks). */

:root {
    --bg: #fbf1dc;
    --band: #f4e3bf;
    --paper: #fff8ea;
    --paper-deep: #fff4dc;
    --paper-shade: #f1dcb0;
    --wood: #8a5a32;
    --wood-dark: #5a391d;
    --wood-line: rgba(138, 90, 50, 0.28);
    --wood-faint: rgba(138, 90, 50, 0.12);
    --ink: #4a2f18;
    --ink-soft: #6f5136;
    --ink-faint: #8d6e50;
    --accent-ink: #a5550b;
    --orange: #ffb02e;
    --orange-dark: #d9780f;
    --green: #6cc04a;
    --green-dark: #3f8a2c;
    --red: #ec5a44;
    --red-dark: #b23622;
    --blue: #4a9cf0;
    --blue-dark: #2b6fc0;
    --gold: #ffc93c;
    --gold-dark: #d9951a;
    --lip: 0 5px 0 rgba(90, 57, 29, 0.24);
    --radius: 20px;
    --radius-sm: 14px;
    --container: 1180px;
    --gutter: clamp(18px, 4vw, 40px);
    --header-h: 68px;
    --section-space: clamp(64px, 9vw, 120px);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
    --font-round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:lang(zh) body,
body:lang(zh) {
    line-height: 1.75;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-round);
}

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: min(var(--container), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border: 2px solid var(--wood);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* The game's glyphs: white shapes on transparent, painted in the colour of the text */

.glyph {
    display: inline-block;
    flex: none;
    width: 1.2em;
    height: 1.2em;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.glyph-bark { -webkit-mask-image: url("glyphs/bark.png"); mask-image: url("glyphs/bark.png"); }
.glyph-bone { -webkit-mask-image: url("glyphs/bone.png"); mask-image: url("glyphs/bone.png"); }
.glyph-dog { -webkit-mask-image: url("glyphs/dog.png"); mask-image: url("glyphs/dog.png"); }
.glyph-eye { -webkit-mask-image: url("glyphs/eye.png"); mask-image: url("glyphs/eye.png"); }
.glyph-heart { -webkit-mask-image: url("glyphs/heart.png"); mask-image: url("glyphs/heart.png"); }
.glyph-infinity { -webkit-mask-image: url("glyphs/infinity.png"); mask-image: url("glyphs/infinity.png"); }
.glyph-paw { -webkit-mask-image: url("glyphs/paw.png"); mask-image: url("glyphs/paw.png"); }
.glyph-pen { -webkit-mask-image: url("glyphs/pen.png"); mask-image: url("glyphs/pen.png"); }
.glyph-play { -webkit-mask-image: url("glyphs/play.png"); mask-image: url("glyphs/play.png"); }
.glyph-sheep { -webkit-mask-image: url("glyphs/sheep.png"); mask-image: url("glyphs/sheep.png"); }
.glyph-shield { -webkit-mask-image: url("glyphs/shield.png"); mask-image: url("glyphs/shield.png"); }
.glyph-star { -webkit-mask-image: url("glyphs/star.png"); mask-image: url("glyphs/star.png"); }

/* Header */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    background: rgba(255, 248, 234, 0.9);
    border-bottom: 2px solid var(--wood-line);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    transition: box-shadow 0.25s;
}

.site-header.is-solid,
.site-header.is-open {
    box-shadow: 0 6px 24px rgba(90, 57, 29, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 0 rgba(90, 57, 29, 0.25);
}

.brand-name {
    font-family: var(--font-round);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-family: var(--font-round);
    font-size: 15.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
}

.site-nav a:hover {
    color: var(--ink);
    background: var(--wood-faint);
}

.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 2px solid var(--wood-line);
    border-radius: 999px;
    background: var(--paper-deep);
    flex-shrink: 0;
}

.lang-switch a {
    padding: 3px 11px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.lang-switch a:hover {
    color: var(--ink);
}

.lang-switch a[aria-current="page"] {
    background: var(--wood);
    color: #fffdf6;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: 2px;
    padding: 0;
    border: 2px solid var(--wood-line);
    border-radius: var(--radius-sm);
    background: var(--paper-deep);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2.5px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
}

.site-header.is-open .menu-button span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.site-header.is-open .menu-button span:nth-child(2) {
    opacity: 0;
}

.site-header.is-open .menu-button span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 1060px) {
    .menu-button {
        display: block;
    }

    .header-inner {
        gap: 12px;
    }

    .lang-switch {
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 10px var(--gutter) 18px;
        background: var(--paper);
        border-bottom: 2px solid var(--wood-line);
        box-shadow: 0 14px 30px rgba(90, 57, 29, 0.14);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    .site-header.is-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        font-size: 17px;
    }

    .no-js .site-nav {
        position: static;
        display: none;
    }
}

@media (max-width: 400px) {
    .brand-name {
        display: none;
    }
}

/* Language suggestion */

.lang-suggest {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
    justify-content: center;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 10px 10px 10px 18px;
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--lip), 0 16px 40px rgba(90, 57, 29, 0.25);
    transform: translateX(-50%);
    font-size: 15px;
    font-weight: 600;
}

.lang-suggest[hidden] {
    display: none;
}

.lang-suggest-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-suggest .button {
    min-height: 40px;
    padding: 6px 16px 8px;
    font-size: 15px;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}

.icon-button:hover {
    color: var(--ink);
    background: var(--wood-faint);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

/* Buttons: a slab on a darker lip, which it sinks onto when pressed */

.button {
    --face: #b98a5a;
    --lip-colour: var(--wood);
    --outline: #6b4322;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 24px 12px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    background: var(--face);
    box-shadow: 0 5px 0 var(--lip-colour), 0 10px 18px rgba(90, 57, 29, 0.18);
    color: #fffdf6;
    font-family: var(--font-round);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    text-shadow: 0 1.5px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline), 0 -1px 0 var(--outline);
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.1s, box-shadow 0.1s, filter 0.2s;
}

.button:hover {
    filter: brightness(1.05);
    transform: translateY(1px);
    box-shadow: 0 4px 0 var(--lip-colour), 0 8px 14px rgba(90, 57, 29, 0.18);
}

.button:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 var(--lip-colour), 0 2px 6px rgba(90, 57, 29, 0.18);
}

.button-accent {
    --face: var(--orange);
    --lip-colour: var(--orange-dark);
    --outline: #b05b06;
}

.button-green {
    --face: var(--green);
    --lip-colour: var(--green-dark);
    --outline: #2f6b20;
}

.button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 1.5px 0 var(--outline));
}

/* Hero */

.hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: min(94vh, 940px);
    min-height: min(94svh, 940px);
    padding: calc(var(--header-h) + 48px) 0 clamp(40px, 7vh, 88px);
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: #6d9b45;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hero-focus, 50% 50%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, var(--bg) 0%, rgba(251, 241, 220, 0) 16%);
}

.hero-card {
    max-width: 560px;
    padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 34px) clamp(22px, 2.6vw, 30px);
    border: 3px solid var(--wood);
    border-radius: 26px;
    background: rgba(255, 248, 234, 0.95);
    box-shadow: 0 7px 0 rgba(90, 57, 29, 0.38), 0 30px 70px rgba(40, 25, 10, 0.28);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent-ink);
    font-family: var(--font-round);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

:lang(zh) .eyebrow {
    letter-spacing: 0.08em;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
}

.wordmark {
    font-size: clamp(44px, 6.2vw, 74px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--ink);
}

:lang(zh) .wordmark {
    letter-spacing: 0.04em;
}

.title-local {
    margin-top: 6px;
    color: var(--ink-faint);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tagline {
    margin-bottom: 10px;
    color: var(--accent-ink);
    font-family: var(--font-round);
    font-size: clamp(20px, 2.2vw, 25px);
    font-weight: 800;
    line-height: 1.3;
}

.lead {
    color: var(--ink-soft);
    font-size: clamp(16.5px, 1.5vw, 18px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    margin-top: 24px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px 5px 9px;
    border: 2px solid var(--wood-line);
    border-radius: 999px;
    background: #fffdf6;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
}

.hero-facts .glyph {
    color: var(--orange-dark);
}

@media (max-width: 760px) {
    .hero {
        display: block;
        min-height: 0;
        padding: var(--header-h) 0 8px;
    }

    .hero-media {
        position: relative;
        inset: auto;
        aspect-ratio: 16 / 11;
    }

    .hero-media img {
        object-position: var(--hero-focus-narrow, 50% 50%);
    }

    .hero::after {
        display: none;
    }

    .hero-card {
        position: relative;
        margin-top: -56px;
        border-radius: 22px;
    }
}

@media (max-height: 560px) and (orientation: landscape) and (min-width: 761px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-h) + 28px);
    }
}

/* Sections */

.section {
    padding: var(--section-space) 0;
}

.section-band {
    background: var(--band);
    border-block: 2px solid var(--wood-faint);
}

.section:not(.section-band) + .section:not(.section-band) {
    padding-top: 0;
}

.section-head {
    max-width: 760px;
    margin-bottom: clamp(30px, 4.6vw, 52px);
}

.section-head.centered {
    margin-inline: auto;
    text-align: center;
}

.section-title {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

:lang(zh) .section-title {
    letter-spacing: 0.02em;
}

.section-intro {
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: clamp(17px, 1.7vw, 19px);
}

.panel {
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--lip);
}

/* How to herd */

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    padding: 24px 22px 26px;
}

.step-badge {
    --face: var(--orange);
    --rim: var(--orange-dark);
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--face);
    box-shadow: 0 4px 0 var(--rim);
    color: #fffdf6;
}

.step:nth-child(2) .step-badge {
    --face: var(--green);
    --rim: var(--green-dark);
}

.step:nth-child(3) .step-badge {
    --face: var(--blue);
    --rim: var(--blue-dark);
}

.step:nth-child(4) .step-badge {
    --face: var(--red);
    --rim: var(--red-dark);
}

.step-badge .glyph {
    width: 32px;
    height: 32px;
}

.step-number {
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 26px;
    height: 26px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--wood);
    color: #fffdf6;
    font-family: var(--font-round);
    font-size: 13px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}

.step h3 {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.step p {
    color: var(--ink-soft);
    font-size: 16px;
}

.showcase {
    margin: clamp(30px, 4vw, 48px) 0 0;
}

.showcase-frame {
    display: block;
    overflow: hidden;
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--paper-shade);
    box-shadow: var(--lip);
}

.showcase-frame img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.showcase figcaption {
    margin-top: 14px;
    color: var(--ink-faint);
    font-size: 15px;
    text-align: center;
}

@media (max-width: 1080px) {
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Features */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feature-media {
    display: block;
    overflow: hidden;
    border-bottom: 3px solid var(--wood);
    background: var(--paper-shade);
}

.feature-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-body {
    padding: 20px 22px 24px;
}

.feature h3 {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.feature p {
    color: var(--ink-soft);
    font-size: 16px;
}

@media (hover: hover) {
    .feature-media:hover img,
    .showcase-frame:hover img,
    .gallery-item:hover img {
        transform: scale(1.035);
    }
}

@media (max-width: 1080px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Dogs: the cards of the kennel page */

.dog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dog {
    overflow: hidden;
}

.dog-portrait {
    display: grid;
    place-items: center;
    aspect-ratio: 2 / 1;
    border-bottom: 3px solid var(--wood);
    background:
        radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 62%),
        linear-gradient(180deg, #8ed06a 0%, #63b244 100%);
}

.dog-portrait img {
    width: 88%;
    height: auto;
    filter: drop-shadow(0 2px 0 rgba(40, 70, 20, 0.15));
}

.dog-body {
    padding: 18px 22px 22px;
}

.dog h3 {
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.dog p {
    color: var(--ink-soft);
    font-size: 16px;
}

@media (hover: hover) {
    .dog-portrait img {
        transition: transform 0.35s ease;
    }

    .dog:hover .dog-portrait img {
        transform: translateX(3%) rotate(-2deg);
    }
}

@media (max-width: 960px) {
    .dog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dog-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Farms */

.chapters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chapter {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
    padding: 22px;
    overflow: hidden;
    isolation: isolate;
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--wood-dark);
    box-shadow: var(--lip);
    color: #fffdf6;
}

.chapter img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chapter::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(48, 29, 12, 0.94) 0%, rgba(48, 29, 12, 0.66) 44%, rgba(48, 29, 12, 0) 100%);
}

.chapter-label {
    margin-bottom: 6px;
    color: var(--gold);
    font-family: var(--font-round);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chapter h3 {
    margin-bottom: 6px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.25;
}

.chapter p {
    color: #f3e6cc;
    font-size: 15.5px;
}

.chapter-endless {
    border-color: var(--orange-dark);
}

@media (max-width: 960px) {
    .chapters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .chapters {
        grid-template-columns: minmax(0, 1fr);
    }

    .chapter {
        min-height: 240px;
    }
}

/* Pictures */

.gallery {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery li {
    grid-column: span 4;
}

.gallery li.wide {
    grid-column: span 8;
    grid-row: span 2;
}

.gallery-item {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--paper-shade);
    box-shadow: var(--lip);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 14px 10px;
    background: linear-gradient(0deg, rgba(48, 29, 12, 0.88), rgba(48, 29, 12, 0));
    color: #fffdf6;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.25s;
}

.gallery-item:hover .caption,
.gallery-item:focus-visible .caption {
    opacity: 1;
}

.gallery-note {
    margin-top: 18px;
    color: var(--ink-faint);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 960px) {
    .gallery li,
    .gallery li.wide {
        grid-column: span 6;
        grid-row: auto;
    }

    .gallery li.wide:first-child {
        grid-column: span 12;
    }
}

@media (max-width: 560px) {
    .gallery {
        gap: 12px;
    }

    .gallery li,
    .gallery li.wide,
    .gallery li.wide:first-child {
        grid-column: span 12;
    }

    .gallery-item .caption {
        opacity: 1;
    }
}

@media (hover: none) {
    .gallery-item .caption {
        opacity: 1;
    }
}

/* Picture viewer */

html.has-dialog {
    overflow: hidden;
}

.lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(28, 19, 10);
    color: #fff4dc;
}

.lightbox::backdrop {
    background: rgba(28, 19, 10, 0.7);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 20px;
    color: #e9d8b6;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lightbox .icon-button {
    color: #e9d8b6;
}

.lightbox .icon-button:hover {
    color: #fffdf6;
    background: rgba(255, 244, 220, 0.12);
}

.lightbox-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 clamp(8px, 6vw, 88px);
    touch-action: pan-y;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-caption {
    min-height: 56px;
    padding: 14px 20px 20px;
    color: #e9d8b6;
    font-size: 15px;
    text-align: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 4px 0 var(--orange-dark);
    color: #fffdf6;
    cursor: pointer;
    transform: translateY(-50%);
}

.lightbox-nav:hover {
    filter: brightness(1.06);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.6;
}

.lightbox-prev {
    left: clamp(6px, 1.5vw, 24px);
}

.lightbox-next {
    right: clamp(6px, 1.5vw, 24px);
}

@media (max-width: 640px) {
    .lightbox-nav {
        top: auto;
        bottom: -64px;
        transform: none;
    }

    .lightbox-stage {
        padding: 0 8px;
    }

    .lightbox-caption {
        padding-inline: 70px;
    }
}

/* Free */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.price-card {
    padding: 24px 22px 26px;
}

.price-badge {
    --face: var(--green);
    --rim: var(--green-dark);
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: var(--face);
    box-shadow: 0 4px 0 var(--rim);
    color: #fffdf6;
}

.price-badge-1 {
    --face: var(--red);
    --rim: var(--red-dark);
}

.price-badge-2 {
    --face: var(--gold);
    --rim: var(--gold-dark);
}

.price-badge-3 {
    --face: var(--blue);
    --rim: var(--blue-dark);
}

.price-badge .glyph {
    width: 30px;
    height: 30px;
}

.price-card h3 {
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
}

.price-card p {
    color: var(--ink-soft);
    font-size: 16px;
}

.pricing-note {
    margin-top: 20px;
    color: var(--ink-faint);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1080px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pricing-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Download */

.platforms {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.platform-devices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.platform-devices li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 2px solid var(--wood-line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 700;
}

.platform-devices svg {
    width: 20px;
    height: 20px;
    color: var(--ink);
}

.platform-meta {
    margin-top: 22px;
    color: var(--ink-soft);
    font-size: 16px;
}

.platform-meta strong {
    color: var(--ink);
    font-weight: 800;
}

.stores {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.store {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    border: 3px solid var(--wood);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--lip);
}

.store-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.store-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.store-name {
    font-family: var(--font-round);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
}

.store-devices {
    color: var(--ink-soft);
    font-size: 15px;
}

.store-action {
    min-height: 48px;
    padding: 8px 20px 10px;
}

.store-soon {
    padding: 8px 16px;
    border: 2px dashed var(--wood-line);
    border-radius: 999px;
    color: var(--ink-faint);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.store-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.store-facts div {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.store-facts dt {
    flex: none;
    color: var(--ink-faint);
    white-space: nowrap;
}

.store-facts dd {
    min-width: 0;
    margin: 0;
}

.store-hash {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.store-note {
    color: var(--ink-faint);
    font-size: 14px;
}

@media (max-width: 860px) {
    .platforms {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .store-main {
        flex-direction: column;
        align-items: stretch;
    }

    .store-soon {
        text-align: center;
    }
}

/* Privacy and footer */

.privacy {
    max-width: 860px;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 40px);
}

.privacy h2 {
    margin-bottom: 14px;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
}

.privacy p {
    color: var(--ink-soft);
}

.privacy p + p {
    margin-top: 12px;
}

.privacy a {
    color: var(--ink);
    text-underline-offset: 3px;
}

.privacy-more {
    margin-top: 18px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-ink);
    font-weight: 800;
    text-decoration: none;
}

.privacy .text-link {
    color: var(--accent-ink);
}

.text-link:hover {
    text-decoration: underline;
}

.text-link svg {
    width: 18px;
    height: 18px;
}

.site-footer {
    padding: 44px 0 52px;
    border-top: 6px solid var(--wood);
    background: var(--wood-dark);
    color: #e3cfa9;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f1dcb0;
}

.footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 11px;
}

.footer-brand a {
    color: inherit;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: #fff4dc;
    font-weight: 600;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-fineprint {
    display: grid;
    gap: 6px;
    flex-basis: 100%;
    max-width: 760px;
    color: #cdb48a;
}

.footer-fineprint a {
    color: inherit;
}

/* Privacy policy page */

.policy {
    width: min(760px, 100% - 2 * var(--gutter));
    padding-top: calc(var(--header-h) + clamp(40px, 7vw, 88px));
    padding-bottom: var(--section-space);
}

.policy h1 {
    margin-top: 6px;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
}

.policy-updated {
    margin-top: 12px;
    color: var(--ink-faint);
    font-size: 15px;
}

.policy-intro {
    margin-top: 24px;
    font-size: clamp(17px, 1.7vw, 19px);
}

.policy section {
    margin-top: 36px;
}

.policy h2 {
    margin-bottom: 10px;
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 800;
}

.policy section p,
.policy li {
    color: var(--ink-soft);
}

.policy section p + p {
    margin-top: 12px;
}

.policy ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 1.2em;
}

.policy a {
    color: var(--ink);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.policy-back {
    margin-top: 48px;
}

/* Reveal on scroll, only when scripts run and motion is welcome */

@media (prefers-reduced-motion: no-preference) {
    .js .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .js .reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
