/* Shared by every page: base, type, buttons, header, footer and the rise-on-scroll motion. */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    background: var(--background-primary);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--text-primary);
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--r-normal);
}

.wrap {
    width: min(1140px, 100% - 2 * var(--s-m));
    margin-inline: auto;
}

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

/* ---- Type: the app's text styles, scaled up for the web where it helps ---- */

.t-display {
    font-size: clamp(42px, 7vw, 76px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

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

.t-heading3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.t-overline {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.t-body0 {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.5;
}

.t-caption {
    font-size: 13px;
    color: var(--muted);
}

.highlight {
    color: var(--text-primary);
}

/* ---- Buttons: ActionButton .primary / .secondary ---- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-s);
    min-height: 52px;
    padding: 0 var(--s-l);
    border-radius: var(--r-button);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.12s var(--ease-out),
        opacity 0.12s var(--ease-out);
}

.button:hover {
    opacity: 0.9;
}

.button:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.button.is-primary {
    background: var(--primary);
    color: var(--text-contrast);
}

.button.is-secondary {
    background: var(--secondary);
    color: var(--text-primary);
}

.button:disabled,
.button[aria-disabled="true"] {
    background: var(--disabled-background);
    color: var(--disabled-text);
    opacity: 1;
    transform: none;
}

.button.is-small {
    min-height: 40px;
    padding: 0 var(--s-m);
    border-radius: var(--r-button-small);
    font-size: 15px;
}

.store-badge {
    display: inline-block;
    border-radius: 10px;
    transition: transform 0.25s var(--ease-spring);
}

.store-badge img {
    height: 54px;
    width: auto;
}

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

.store-badge .is-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .store-badge .is-light {
        display: none;
    }

    .store-badge .is-dark {
        display: block;
    }
}

/* ---- Header: frosts once the page has moved under it ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition:
        background-color 0.3s,
        box-shadow 0.3s;
}

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

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-m);
    min-height: 72px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.wordmark img {
    height: 30px;
    width: auto;
    transition: transform 0.4s var(--ease-spring);
}

.wordmark:hover img {
    transform: rotate(-12deg) scale(1.1);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--s-l);
}

.site-nav a:not(.button) {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.site-nav a:not(.button):hover {
    opacity: 1;
}

@media (max-width: 720px) {
    .site-nav a:not(.button) {
        display: none;
    }
}

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

.site-footer {
    margin-top: 96px;
    padding: 56px 0 40px;
    border-top: 1px solid var(--divider);
}

.site-footer .wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--s-xl);
}

.site-footer p {
    margin-top: var(--s-s);
    color: var(--muted);
    max-width: 32ch;
}

.site-footer h2 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--s-s);
}

.site-footer ul {
    list-style: none;
    display: grid;
    gap: var(--s-xs);
}

.site-footer li a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.site-footer li a:hover {
    color: var(--text-primary);
}

/* The address is an image, so scrapers can't read it. Blending drops its white background. */
.email-image {
    height: 1em;
    width: auto;
    display: inline-block;
    vertical-align: -0.15em;
    mix-blend-mode: multiply;
}

.site-footer .footer-bottom {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: 0;
    padding-top: var(--s-l);
    border-top: 1px solid var(--divider);
    font-size: 14px;
    color: var(--muted);
}

@media (prefers-color-scheme: dark) {
    .email-image {
        filter: invert(1);
        mix-blend-mode: screen;
    }
}

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

    .site-footer .wrap > :first-child {
        grid-column: 1 / -1;
    }
}

/* ---- Rise on scroll: driven by js/site.js, never hides content without JS ---- */

html:not(.no-js) [data-rise] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s var(--ease-out),
        transform 0.7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--stagger));
}

html:not(.no-js) [data-rise].is-in {
    opacity: 1;
    transform: none;
}

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

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