/* Foglet — styles added with the playable demo, the App Store badge and the
   cookie banner. Kept apart from style.css so the app's privacy policy, which
   loads only style.css, stays byte-for-byte unchanged. */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- hero additions ---------- */

.hero .eyebrow {
    margin-top: 22px;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero .eyebrow + h1 { margin-top: 6px; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 22px;
    margin-top: 28px;
}

.badge {
    display: inline-block;
    line-height: 0;
    border-radius: 10px;
    transition: transform 0.12s ease;
}

.badge:hover { transform: translateY(-2px); }

.badge:focus-visible,
.demo-btn:focus-visible,
.consent-btn:focus-visible,
.demo-pad button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.badge img {
    height: 54px;
    width: auto;
    display: block;
}

.hero-try {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 2px;
}

.hero-try:hover { color: var(--gold); }

/* ---------- playable demo ---------- */

.demo {
    width: min(460px, 100%);
    margin: 0 auto;
}

.demo-hud {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-hud b {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    letter-spacing: 0;
    margin-left: 4px;
}

.demo-world { color: var(--text); }

.demo-stage {
    position: relative;
    aspect-ratio: 1;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--edge);
    background: var(--night-deep);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.demo-stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.demo-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.demo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(11, 10, 20, 0.55), rgba(11, 10, 20, 0.92));
}

.demo-overlay[hidden] { display: none; }

.demo-overlay p {
    color: var(--text-soft);
    font-size: 0.9rem;
    max-width: 300px;
}

.demo-overlay .demo-win-title {
    color: var(--gold);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.1;
}

.demo-overlay .demo-win-stats {
    color: var(--text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.demo-btn {
    font: inherit;
    font-weight: 800;
    font-size: 1.02rem;
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--gold);
    color: #1a1508;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(245, 200, 76, 0.28);
}

.demo-btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--edge);
    box-shadow: none;
    padding: 10px 20px;
    font-size: 0.92rem;
}

.demo-pad {
    display: grid;
    grid-template-columns: repeat(3, 58px);
    grid-template-rows: repeat(3, 58px);
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.demo-pad button {
    font: inherit;
    font-size: 1.2rem;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 16px;
    cursor: pointer;
    touch-action: none;
}

.demo-pad button:active { background: #2a2350; color: var(--gold); }

.demo-pad [data-dir="0,-1"] { grid-column: 2; grid-row: 1; }
.demo-pad [data-dir="-1,0"] { grid-column: 1; grid-row: 2; }
.demo-pad [data-dir="1,0"]  { grid-column: 3; grid-row: 2; }
.demo-pad [data-dir="0,1"]  { grid-column: 2; grid-row: 3; }

.demo-note {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.86rem;
    margin-top: 16px;
}

/* ---------- quiet-section clarifier ---------- */

.fineprint {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.86rem;
    margin-top: 18px;
}

.fineprint a { color: var(--gold); }

/* ---------- footer additions ---------- */

.footer-links button.link {
    font: inherit;
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--text-soft);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.footer-links button.link:hover { color: var(--gold); }

/* ---------- cookie consent ---------- */

.consent {
    position: fixed;
    z-index: 50;
    left: 16px;
    right: 16px;
    bottom: 16px;
    margin: 0 auto;
    max-width: 720px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    padding: 16px 18px;
    background: rgba(28, 24, 54, 0.97);
    border: 1px solid var(--edge);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
}

.consent[hidden] { display: none; }

.consent p {
    flex: 1 1 320px;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.consent strong { color: var(--text); display: block; }

.consent a { color: var(--gold); }

.consent-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.consent-btn {
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    min-width: 100px;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid var(--edge);
    background: transparent;
    color: var(--text);
}

.consent-btn[data-consent="granted"] {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1508;
}

@media (max-width: 480px) {
    .consent-actions { width: 100%; }
    .consent-btn { flex: 1; }
}

.legal .inline-link {
    font: inherit;
    color: var(--gold);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.legal code { font-size: 0.92em; color: var(--text); }

/* ---------- screens ---------- */
/* The <img> tags carry width/height for layout stability; style.css only fixes
   the width, so without height:auto the attribute height (1039px) wins and the
   screenshots stretch. */

.screens figure {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.screens img {
    display: block;
    width: 232px;
    height: auto;
}
