:root {
    color-scheme: light;
    --page: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #f5f5f7;
    --surface-muted: #fbfbfd;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --line: #d2d2d7;
    --line-soft: #e8e8ed;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ink: #ffffff;
    --focus: #0071e3;
    --max-width: 1120px;
    --radius-card: 18px;
    --radius-control: 980px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #000000;
    --surface: #1d1d1f;
    --surface-subtle: #161617;
    --surface-muted: #0b0b0c;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: #424245;
    --line-soft: #2d2d2f;
    --accent: #2997ff;
    --accent-hover: #64b5ff;
    --accent-ink: #000000;
    --focus: #2997ff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;
        --page: #000000;
        --surface: #1d1d1f;
        --surface-subtle: #161617;
        --surface-muted: #0b0b0c;
        --ink: #f5f5f7;
        --muted: #a1a1a6;
        --line: #424245;
        --line-soft: #2d2d2f;
        --accent: #2997ff;
        --accent-hover: #64b5ff;
        --accent-ink: #000000;
        --focus: #2997ff;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 64%, transparent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    z-index: 100;
    top: -4rem;
    left: 1rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--page);
    font-weight: 600;
    text-decoration: none;
}

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

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

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--page);
}

.site-nav-shell,
.site-footer-shell {
    width: min(var(--max-width), calc(100vw - 2.5rem));
    margin: 0 auto;
}

.site-nav-shell {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    text-decoration: none;
}

.site-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: var(--page);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.site-brand-copy {
    display: grid;
    gap: 0.05rem;
    font-size: 0.88rem;
    line-height: 1.2;
}

.site-brand-copy strong {
    font-weight: 600;
}

.site-brand-copy span {
    color: var(--muted);
    font-size: 0.76rem;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.site-nav a {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    background: var(--surface-subtle);
    color: var(--ink);
}

.site-menu-toggle,
.theme-control {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
}

.site-menu-toggle {
    display: none;
}

.theme-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: var(--page);
    font-size: 0.7rem;
}

.theme-label {
    display: none;
}

.button,
.detail-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible,
.detail-button:hover,
.detail-button:focus-visible {
    background: var(--accent-hover);
}

.button-secondary,
.detail-button-secondary {
    border-color: var(--line);
    background: transparent;
    color: var(--accent);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.detail-button-secondary:hover,
.detail-button-secondary:focus-visible {
    border-color: var(--accent);
    background: transparent;
}

.store-badge {
    display: inline-block;
    width: 142px;
    line-height: 0;
}

.store-badge img {
    width: 100%;
    height: auto;
}

.eyebrow,
.detail-eyebrow {
    margin: 0 0 0.55rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--line-soft);
}

.site-footer-shell {
    display: flex;
    padding: 2rem 0 2.5rem;
    align-items: start;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer-brand {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-navigation,
.footer-social-links,
.footer-link-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

.footer-navigation a,
.footer-social-links a {
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-navigation a:hover,
.footer-navigation a:focus-visible,
.footer-social-links a:hover,
.footer-social-links a:focus-visible {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (max-width: 760px) {
    .site-header {
        position: relative;
    }

    .site-nav-shell,
    .site-footer-shell {
        width: min(var(--max-width), calc(100vw - 1.5rem));
    }

    .site-brand-copy span {
        display: none;
    }

    .site-menu-toggle {
        display: inline-grid;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 0.75rem;
        left: 0.75rem;
        display: none;
        padding: 0.65rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--surface);
        box-shadow: 0 14px 30px rgb(0 0 0 / 12%);
    }

    .site-nav.is-open {
        display: grid;
        gap: 0.15rem;
    }

    .site-nav a {
        padding: 0.72rem 0.8rem;
    }

    .site-footer-shell {
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
