/* ==========================================================================
   Oculis Studio — shared stylesheet
   Loaded by every page. Page-specific rules stay in that page's <style>.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Surfaces */
    --bg: #0a0a0a;
    --bg-raised: #101010;
    --bg-card: rgba(255, 255, 255, 0.022);
    --bg-card-hover: rgba(255, 255, 255, 0.04);

    /* Text */
    --text: #ededed;
    --text-soft: #b0b0b0;
    --text-muted: #8a8a8a;
    --text-faint: #6b6b6b;

    /* Lines */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* Accents — deliberately just two. Everything else maps onto these so the
       palette stays calm no matter which legacy class a page still uses. */
    --accent: #7fb9e0;
    --accent-soft: rgba(127, 185, 224, 0.12);
    --accent-line: rgba(127, 185, 224, 0.32);
    --positive: #6cc79b;
    --positive-soft: rgba(108, 199, 155, 0.1);
    --positive-line: rgba(108, 199, 155, 0.28);

    /* Legacy aliases: older markup references these directly. */
    --sh-cyan: var(--accent);
    --sh-green: var(--positive);
    --sh-green-hot: var(--positive);
    --sh-purple: var(--accent);
    --sh-amber: var(--positive);
    --sh-orange: var(--accent);
    --sh-orange-hot: var(--accent);
    --sh-blue: var(--accent);
    --sh-text: var(--text);
    --sh-body: var(--text-soft);
    --sh-muted: var(--text-muted);
    --sh-dim: var(--text-faint);

    /* Type */
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-serif: 'Fraunces', Georgia, serif;

    /* Rhythm */
    --radius: 14px;
    --radius-sm: 10px;
    --gutter: clamp(1rem, 4vw, 3rem);
    --section-y: clamp(3.5rem, 9vw, 7rem);
    --header-h: 72px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

/* Pages that also load Tailwind get this from preflight, but the sheet has to
   stand on its own for the ones that don't. */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.06);
}

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Stops iOS from clipping fixed bottom bars behind the home indicator. */
    padding-bottom: env(safe-area-inset-bottom);
}

/* Long words and URLs should wrap rather than push the page sideways. */
h1, h2, h3, h4, p, li, a, span, td, th { overflow-wrap: break-word; }

img, video, canvas, svg, iframe { max-width: 100%; }

/* A single quiet backdrop. Replaces the animated 3D grid the pages used to
   each render themselves — static, so it never competes with the work. */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 55% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 70%),
        radial-gradient(ellipse 70% 50% at 50% 110%, rgba(255, 255, 255, 0.022), transparent 70%);
}

/* Legacy hooks. Old markup still ships these nodes on some pages; neutralise
   them so nothing animates if one is missed. */
.grid-bg, .grid-glow, .grid-bg-inner, .grid-layer, .orb, .noise {
    display: none !important;
}

::selection { background: #fff; color: #0a0a0a; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

.font-display, .h1, .h2, .h3 { font-family: var(--font-display); }
.font-serif-accent { font-family: var(--font-serif); }

.h1 { font-size: clamp(2.15rem, 6.2vw, 4.25rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 300; }
.h2 { font-size: clamp(1.7rem, 4.2vw, 2.85rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 300; }
.h3 { font-size: clamp(1.15rem, 2.4vw, 1.6rem);  line-height: 1.25; font-weight: 500; }

.lead { font-size: clamp(1rem, 1.6vw, 1.175rem); line-height: 1.65; color: var(--text-soft); }
.body-sm { font-size: 0.9375rem; line-height: 1.7; color: var(--text-soft); }

/* Section label. 12px is the floor — the old 10–11px pills were unreadable on
   a phone. */
.eyebrow {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.measure { max-width: 62ch; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.shell { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.shell-narrow { width: 100%; max-width: 860px; margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section-line { border-top: 1px solid var(--line); }

section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transform: translateZ(0);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Solid rather than blurred: backdrop-filter is expensive on mobile and the
   frosted look was the most generic thing on the page. */
#header.glass,
#header.is-scrolled {
    background: rgba(12, 12, 12, 0.94);
    border-bottom-color: var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
    padding-block: 0.75rem;
}

.header-logo img { height: 34px; width: auto; display: block; }

.nav-desktop { display: none; align-items: center; gap: 0.35rem; }

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-link[aria-current="page"] { color: #fff; }

.nav-cta {
    margin-left: 0.4rem;
    padding: 0 1.15rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
}
.nav-cta:hover { background: #fff; color: #0a0a0a; border-color: #fff; }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -0.5rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }

.nav-mobile {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(12, 12, 12, 0.98);
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding-inline: var(--gutter);
    color: var(--text-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a:active { background: rgba(255, 255, 255, 0.05); }

@media (min-width: 860px) {
    .nav-desktop { display: flex; }
    .nav-toggle { display: none; }
    .nav-mobile { display: none !important; }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
/* No nowrap: on a 320px screen a long label has to be allowed to wrap. */

.btn svg { flex-shrink: 0; }

.btn-primary { background: #fff; color: #0a0a0a; }
.btn-primary:hover { background: #d8d8d8; }

.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.05); color: #fff; }

.btn-quiet { color: var(--text-soft); }
.btn-quiet:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

.btn-sm { min-height: 42px; padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row-center { justify-content: center; }

@media (max-width: 420px) {
    /* Stacked full-width buttons beat three cramped pills on a small phone. */
    .btn-row > .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   7. Cards / tiles
   -------------------------------------------------------------------------- */

.tile,
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.15rem, 3vw, 1.6rem);
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.tile:hover,
.card:hover { border-color: var(--line-strong); background: var(--bg-card-hover); }
.tile-static:hover { border-color: var(--line); background: var(--bg-card); }

.card-title { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text); }
.card-body { font-size: 0.9375rem; line-height: 1.65; color: var(--text-soft); margin: 0; }

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.9rem;
}
.feature-icon svg { width: 20px; height: 20px; }

.step-num {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 255, 255, 0.28);
    margin-bottom: 0.6rem;
    font-feature-settings: "lnum";
}

/* --------------------------------------------------------------------------
   8. Chips, badges, panels
   -------------------------------------------------------------------------- */

.chip,
.sh-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    line-height: 1.3;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.chip-accent,
.sh-chip-cyan,
.sh-chip-purple { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

.chip-positive,
.sh-chip-green { color: var(--positive); background: var(--positive-soft); border-color: var(--positive-line); }

.sh-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0d0d0d;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.9rem;
}
.sh-badge-cyan { background: var(--accent); }
.sh-badge-green { background: var(--positive); }

/* Flat tint with an accent edge, in place of the old two-colour gradient. */
.panel,
.sh-panel {
    padding: clamp(1.15rem, 3vw, 1.5rem);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    border-left: 2px solid var(--accent);
    background: rgba(255, 255, 255, 0.025);
}
.sh-panel-why { border-left-color: var(--positive); }

.sh-card-title { margin: 0 0 0.25rem; font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.sh-card-body { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--text-soft); }
.sh-body { font-size: 0.9375rem; line-height: 1.7; color: var(--text-soft); }
.sh-intro-lead { font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.6; color: var(--text-soft); }
.sh-bullet { font-size: 0.9375rem; line-height: 1.75; color: var(--text-soft); margin: 0 0 0.4rem; }
.sh-bullet span { margin-right: 0.4rem; color: var(--positive); }

/* --------------------------------------------------------------------------
   8b. Product page components
   Every product page used its own copy of these; they live here now. All the
   old per-product colour variants (orange, blue, purple, amber, cyan) resolve
   to the two site accents so the shop reads as one family.
   -------------------------------------------------------------------------- */

.hero-cover,
.hero-mark,
.hero-logo {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
}
.hero-logo { max-width: 480px; }

.hero-cover img,
.hero-logo img,
.hero-mark svg {
    display: block;
    width: 100%;
    height: auto;
}
.hero-cover img {
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.step-gif {
    margin: 0 0 0.75rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #050505;
}
.step-gif img,
.step-gif video { display: block; width: 100%; height: auto; }

.sh-media {
    display: block;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}
.step-gif .sh-media { border: 0; border-radius: 0; }

.sh-accent-card {
    height: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    border-left: 2px solid var(--accent);
}
.sh-accent-card.is-green,
.sh-accent-card.is-hot { border-left-color: var(--positive); }
.sh-accent-card.is-blue,
.sh-accent-card.is-purple,
.sh-accent-card.is-amber,
.sh-accent-card.is-orange { border-left-color: var(--accent); }

.sh-roadmap-card {
    height: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
}
.sh-roadmap-card.is-purple { border-color: var(--line); }

.sh-usecase-label {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}
.sh-usecase-label.is-green { color: var(--positive); }
.sh-usecase-label.is-orange,
.sh-usecase-label.is-blue,
.sh-usecase-label.is-purple,
.sh-usecase-label.is-cyan,
.sh-usecase-label.is-amber { color: var(--accent); }

.sh-step-dot {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}
.sh-step-dot.is-green {
    color: var(--positive);
    background: var(--positive-soft);
    border-color: var(--positive-line);
}

.sh-bullet.is-green span,
.sh-bullet.is-hot span { color: var(--positive); }
.sh-bullet.is-blue span,
.sh-bullet.is-cyan span { color: var(--accent); }

.sh-chip-orange,
.sh-chip-blue { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.sh-badge-blue,
.sh-badge-orange { background: var(--accent); }

.sh-panel-next { border-left-color: var(--accent); }

.trail-blue,
.trail-orange { color: var(--accent); font-weight: 500; }

.sh-kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.sh-divider { height: 1px; background: var(--line); border: 0; margin-block: 1.5rem; }
.sh-muted { font-size: 0.8125rem; line-height: 1.55; color: var(--text-faint); }

.sh-spec-row {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}
.sh-spec-row:last-child { border-bottom: 0; }
.sh-spec-row dt { margin: 0; color: var(--text-muted); }
.sh-spec-row dd { margin: 0; color: var(--text); font-weight: 500; }

@media (max-width: 560px) {
    .sh-spec-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: rgba(255, 255, 255, 0.85);
}
.value-icon svg { width: 20px; height: 20px; }

.cta-finish {
    position: relative;
    padding: clamp(1.75rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

details.site-details summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 48px;
}
details.site-details summary::-webkit-details-marker { display: none; }
details.site-details summary::after { content: " +"; color: var(--text-muted); }
details.site-details[open] summary::after { content: " \2212"; }
details.site-details .details-inner { padding-top: 0.85rem; }

/* --------------------------------------------------------------------------
   9. FAQ
   -------------------------------------------------------------------------- */

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 0.6rem;
    overflow: hidden;
}
.faq-q {
    width: 100%;
    min-height: 56px;
    padding: 1rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.faq-q:hover { color: #fff; background: rgba(255, 255, 255, 0.025); }
.faq-icon { flex-shrink: 0; color: var(--text-muted); transition: transform 0.25s var(--ease); }
.faq-item.active .faq-icon { transform: rotate(180deg); color: #fff; }
.faq-a {
    padding: 0 1.15rem;
    max-height: 0;
    overflow: hidden;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-soft);
    transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
}
/* Generous cap so long answers can't be clipped on a narrow screen. */
.faq-item.active .faq-a { padding: 0 1.15rem 1.15rem; max-height: 1200px; }

/* --------------------------------------------------------------------------
   10. Sticky mobile CTA
   -------------------------------------------------------------------------- */

.sticky-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(12, 12, 12, 0.97);
    border-top: 1px solid var(--line);
    padding: 0.7rem var(--gutter);
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
}
.sticky-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    max-width: 1200px;
    margin-inline: auto;
}
.sticky-cta-content > .btn { flex-shrink: 0; }

@media (max-width: 860px) {
    .sticky-cta { display: block; }
    body.has-sticky-cta { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) and (max-height: 700px) {
    .sticky-cta {
        padding-top: 0.45rem;
        padding-bottom: calc(0.45rem + env(safe-area-inset-bottom));
    }
    .sticky-cta-content { gap: 0.6rem; }
    .sticky-cta .font-display { font-size: 1rem; }
    body.has-sticky-cta { padding-bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */

.field {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    /* 16px keeps iOS Safari from zooming when the field is focused. */
    font-size: 16px;
    font-family: inherit;
}
.field::placeholder { color: var(--text-faint); }
.field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
}
textarea.field { min-height: 140px; resize: vertical; line-height: 1.6; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); padding-block: clamp(2.25rem, 5vw, 3rem); }
.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.site-footer nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
}
.site-footer nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.site-footer-inner > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 0.25rem;
}
.site-footer img { height: 30px; width: auto; }
.site-footer-legal { font-size: 0.8125rem; color: var(--text-faint); }

@media (min-width: 860px) {
    .site-footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* --------------------------------------------------------------------------
   13. Accessibility
   -------------------------------------------------------------------------- */

.skip-to-content {
    position: fixed;
    top: -5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    padding: 0.7rem 1.25rem;
    background: #fff;
    color: #0a0a0a;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
    transition: top 0.2s var(--ease);
}
.skip-to-content:focus,
.skip-to-content:focus-visible { top: 0; }

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   14. Motion
   -------------------------------------------------------------------------- */

/* Reveal only ever hides content once JS has confirmed it can show it again,
   so the page still reads with scripts blocked or broken. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

.js img[data-fade] { opacity: 0; transition: opacity 0.4s var(--ease); }
.js img[data-fade].loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .js img[data-fade] { opacity: 1; }
}

/* --------------------------------------------------------------------------
   15. Touch
   -------------------------------------------------------------------------- */

@media (hover: none) {
    /* Anything that only appeared on hover has to be readable on a phone. */
    .gallery-overlay { opacity: 1; }

    .tile:hover,
    .card:hover { border-color: var(--line); background: var(--bg-card); }
    .tile:active,
    .card:active { background: var(--bg-card-hover); }
}
