:root {
    color-scheme: light dark;
    --background: #f8f8fa;
    --surface: #ffffff;
    --surface-hover: #ffffff;
    --text: #18181b;
    --muted: #606068;
    --border: #dedee3;
    --border-strong: #b8b8c0;
    --accent: #2457d6;
    --button-background: #18181b;
    --button-text: #ffffff;
    --ambient: rgb(36 87 214 / 5%);
    --surface-highlight: inset 0 1px 0 rgb(255 255 255 / 72%);
    --shadow: 0 1px 2px rgb(24 24 27 / 4%), 0 8px 24px rgb(24 24 27 / 4%);
    --shadow-hover: 0 2px 4px rgb(24 24 27 / 5%), 0 14px 32px rgb(24 24 27 / 9%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    background: var(--background);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% -12rem, var(--ambient), transparent 34rem), var(--background);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgb(36 87 214 / 18%);
}

.site-header,
main,
footer {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: max(28px, env(safe-area-inset-top));
}

.app-identity {
    color: inherit;
    letter-spacing: -0.025em;
    text-decoration: none;
    transition: opacity 160ms ease;
}

.app-identity {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.05rem;
    font-weight: 750;
}

.app-identity img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgb(24 24 27 / 12%);
}

main {
    flex: 1 0 auto;
    padding: 64px 0 56px;
}

.app-home {
    padding-top: 72px;
}

.homepage {
    padding-top: clamp(72px, 12vh, 112px);
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

h2 {
    margin-top: 36px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

p,
li {
    max-width: 68ch;
    text-wrap: pretty;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lede {
    margin-top: 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.55;
    text-wrap: balance;
}

a {
    color: var(--accent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

.button {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--button-background);
    color: var(--button-text);
    font-weight: 650;
    text-decoration: none;
    box-shadow: 0 1px 2px rgb(24 24 27 / 10%);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.button:hover {
    box-shadow: 0 5px 14px rgb(24 24 27 / 16%);
    transform: translateY(-1px);
}

.app-store-badge {
    display: inline-block;
    margin: 12px 12px 12px 0;
    line-height: 0;
}

.app-store-badge img {
    display: block;
    width: auto;
    height: 48px;
}

.products {
    display: grid;
    gap: 16px;
    margin-top: 36px;
}

.product {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--surface-highlight), var(--shadow);
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    box-shadow: var(--surface-highlight), var(--shadow-hover);
    transform: translateY(-1px);
}

.product:active {
    transform: translateY(0);
}

.product h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
}

.product p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.product-icon {
    width: 72px;
    height: 72px;
    border-radius: 17px;
    box-shadow: 0 2px 8px rgb(24 24 27 / 12%);
}

.product-arrow {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgb(127 127 127 / 5%);
    color: var(--muted);
    font-size: 1.05rem;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.product:hover .product-arrow {
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateX(2px);
}

.homepage-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
}

.contact-link {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    text-decoration-color: transparent;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

.contact-link:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

footer {
    padding: 24px 0 48px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.james-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 26px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--surface-highlight), var(--shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.james-callout:hover {
    border-color: var(--border-strong);
    box-shadow: var(--surface-highlight), var(--shadow-hover);
    transform: translateY(-1px);
}

.james-callout:active {
    transform: translateY(0);
}

.james-callout strong {
    font-size: 1.1rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.james-callout-arrow {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgb(127 127 127 / 5%);
    color: var(--muted);
    font-size: 1.05rem;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.james-callout:hover .james-callout-arrow {
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateX(2px);
}

.footer-links {
    line-height: 1.7;
}

.footer-links a {
    color: var(--muted);
    text-decoration-color: transparent;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

.apple-legal {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .site-header,
    main,
    footer {
        width: min(760px, calc(100% - 32px));
    }

    .site-header {
        padding-top: max(22px, env(safe-area-inset-top));
    }

    main {
        padding: 44px 0 48px;
    }

    .app-home {
        padding-top: 52px;
    }

    .homepage {
        padding-top: 64px;
    }

    .homepage-footer {
        padding-top: 16px;
    }

    .product {
        grid-template-columns: 58px minmax(0, 1fr) auto;
        gap: 14px;
        padding: 18px;
    }

    .product-icon {
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }

    footer {
        padding-bottom: max(36px, env(safe-area-inset-bottom));
    }

    .james-callout {
        margin-bottom: 22px;
        padding: 16px 18px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #111113;
        --surface: #1b1b1f;
        --surface-hover: #202024;
        --text: #f4f4f5;
        --muted: #aaaab2;
        --border: #38383f;
        --border-strong: #5a5a64;
        --accent: #8eafff;
        --button-background: #f4f4f5;
        --button-text: #18181b;
        --ambient: rgb(142 175 255 / 7%);
        --surface-highlight: inset 0 1px 0 rgb(255 255 255 / 5%);
        --shadow: 0 1px 2px rgb(0 0 0 / 18%), 0 8px 24px rgb(0 0 0 / 12%);
        --shadow-hover: 0 2px 4px rgb(0 0 0 / 22%), 0 14px 32px rgb(0 0 0 / 22%);
    }

    .button {
        box-shadow: none;
    }

    ::selection {
        background: rgb(142 175 255 / 24%);
    }
}

@media (hover: hover) {
    .app-identity:hover {
        opacity: 0.72;
    }
}

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