/* Shared by every page: base, type ramp, components, header and footer. */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface-app);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.5;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

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

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 26px;
}

/* ---- Type ramp (UncoverFont) ---- */

.t-hero,
.t-title,
.t-section,
.t-card-title,
.t-group,
.wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0;
    text-wrap: balance;
}

.t-hero {
    font-size: clamp(40px, 6.4vw, 72px);
    line-height: 1;
    letter-spacing: -0.03em;
}

.t-title {
    font-size: clamp(32px, 4.4vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.t-section {
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.t-card-title {
    font-size: 21px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.t-group {
    font-size: 18px;
    line-height: 1.2;
}

.t-body-lg {
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
    text-wrap: pretty;
}

.t-overline {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.wordmark {
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.02em;
    text-decoration: none;
}

/* ---- Buttons (UncoverButton) ---- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 26px;
    border-radius: var(--r-button);
    border: 0;
    background: var(--ink);
    color: var(--text-on-ink);
    font: 600 16px/1.2 var(--font-text);
    text-decoration: none;
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    transition: transform 0.45s var(--ease-signature);
}

.button:hover {
    transform: translateY(-2px) scale(1.02);
}

.button:active {
    transform: scale(0.96);
    transition-duration: 0.12s;
}

.button.is-small {
    height: 40px;
    padding: 0 18px;
    font-size: 15px;
    box-shadow: var(--shadow-soft);
}

.button.is-secondary {
    background: var(--surface-card);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.button .apple {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.button-note {
    font-size: 13.5px;
    color: var(--muted);
}

/* ---- Pills (StatusPill) ---- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--r-full);
    background: var(--surface-card);
    box-shadow: var(--shadow-soft);
    font-size: 13px;
    font-weight: 600;
}

.pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tint-green-fg);
    animation: breathe 1.4s ease-in-out infinite alternate;
}

/* ---- Header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 0;
    transition:
        background 0.3s,
        box-shadow 0.3s;
}

.site-header.is-scrolled {
    background: var(--frost);
    -webkit-backdrop-filter: saturate(1.6) blur(20px);
    backdrop-filter: saturate(1.6) blur(20px);
    box-shadow: 0 1px 0 var(--divider);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ---- Footer ---- */

.site-footer {
    padding: 56px 0 40px;
    border-top: 1px solid var(--divider);
    font-size: 14px;
    color: var(--muted);
}

.site-footer .wrap {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.site-footer .wordmark {
    color: var(--ink);
    display: inline-block;
    margin-bottom: 10px;
}

.site-footer p {
    margin: 0;
}

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

.footer-links a {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
    color: var(--ink);
}

.footer-meta {
    grid-column: 1 / -1;
    font-size: 12.5px;
    color: var(--muted-2);
}

@media (max-width: 640px) {
    .site-footer .wrap {
        grid-template-columns: 1fr;
    }
}

/* ---- Motion (UncoverMotion) ---- */

[data-rise] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.6s var(--ease-entrance),
        transform 0.6s var(--ease-entrance);
    transition-delay: calc(var(--i, 0) * var(--stagger) + var(--delay, 0ms));
}

[data-rise].is-in {
    opacity: 1;
    transform: none;
}

/* Without JavaScript nothing would ever rise, so show everything. */
.no-js [data-rise] {
    opacity: 1;
    transform: none;
}

@keyframes breathe {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.45;
        transform: scale(0.8);
    }
}

@keyframes float {
    from {
        translate: 0 0;
    }
    to {
        translate: 0 var(--drift, -16px);
    }
}

@keyframes ring {
    from {
        transform: scale(0.35);
        opacity: 0.9;
    }
    to {
        transform: scale(1.1);
        opacity: 0;
    }
}

@keyframes orbit {
    to {
        rotate: 360deg;
    }
}

@keyframes counter-orbit {
    to {
        rotate: -360deg;
    }
}

@keyframes pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    60% {
        transform: scale(1.06);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shine {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    [data-rise] {
        opacity: 1;
        transform: none;
    }
}

.button[aria-disabled="true"] {
    cursor: default;
}

.button[aria-disabled="true"]:hover {
    transform: none;
}
