/* Shared by every page (index.html keeps its own inline styles and
   inner pages load page.css; this file only holds what all of them need). */

/* Skip link: off-screen until focused by keyboard. */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 10px 18px;
    background: #1C1914;
    color: #F0EDE4;
    border-radius: 100px;
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0.75rem;
}

:focus-visible {
    outline: 2px solid #8A6A45;
    outline-offset: 3px;
}

main:focus {
    outline: none;
}

/* The heading of a section that is labelled for assistive tech only. */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Scroll reveal. Content is hidden only when JavaScript is running
   (html.js is set by an inline script in <head>), so it stays visible
   with JavaScript off. If site.js never starts (html.reveal-on is never
   set), a failsafe reveals everything after two seconds. */
html.js .reveal:not(.visible) {
    opacity: 0;
    transform: translateY(40px);
}

html.js:not(.reveal-on) .reveal {
    animation: reveal-failsafe 0s linear 2s forwards;
}

@keyframes reveal-failsafe {
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html.js .reveal:not(.visible) { opacity: 1; transform: none; }
    .reveal { transition: none !important; }
}

/* Mobile menu: the button toggles .is-open on the nav (see site.js). */
@media (max-width: 768px) {
    .nav.is-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        background: rgba(250, 248, 243, 0.98);
        padding: 1rem 2rem 2rem;
        border-bottom: 1px solid rgba(28, 25, 20, 0.12);
        gap: 1.25rem;
    }

    .nav.is-open .nav-links a {
        font-size: 0.95rem;
    }
}

.mobile-menu-btn {
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
}

/* Store buttons. Apple's and Google's official badges side by side, at one
   height, wrapping onto two lines on narrow screens. Both are the black
   artwork, ink bands included: Google's badge comes only in black (its grey
   border carries it on dark backgrounds) and may not be recoloured, so the
   App Store badge beside it is black too. */
.store-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    /* Google's clear space: a quarter of the 54px badge height. */
    gap: 14px;
}

.store-links > a {
    display: inline-flex;
}

/* Apple's and Google's trademark lines, asked for wherever their badges
   appear. */
.footer-legal {
    max-width: 1100px;
    margin: 1.4rem auto 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(250, 248, 243, 0.45);
    text-align: center;
}
