:root {
    --brand-primary: #ff9e16;
    --brand-neutral: #818285;
    --ink: #202225;
    --ink-soft: #4e5156;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --outline: rgba(129, 130, 133, 0.3);
    --accent-shadow: rgba(255, 158, 22, 0.28);
    --hero-a: #fff4df;
    --hero-b: #eef1f4;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Avenir Next", "Segoe UI Variable", "Trebuchet MS", "Noto Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 158, 22, 0.24), transparent 32%),
        radial-gradient(circle at 88% 8%, rgba(129, 130, 133, 0.21), transparent 34%),
        linear-gradient(170deg, var(--hero-a) 0%, var(--hero-b) 62%, #e9edf1 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 16px;
}

.page {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: clamp(12px, 3vw, 44px);
}

.card {
    width: min(100%, 500px);
    padding: clamp(26px, 5vw, 42px);
    border-radius: 24px;
    border: 1px solid var(--outline);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
    backdrop-filter: blur(6px);
    box-shadow:
        0 20px 55px -24px rgba(33, 35, 38, 0.45),
        0 10px 30px -18px var(--accent-shadow);
    text-align: center;
    animation: riseIn 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.logo {
    width: clamp(96px, 22vw, 168px);
    height: auto;
    margin: 0 auto 12px;
    display: block;
    animation: logoFloat 3600ms ease-in-out infinite;
}

.eyebrow {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--brand-neutral);
}

h1 {
    margin: 12px 0 10px;
    line-height: 1.2;
    font-size: clamp(1.6rem, 4vw, 2.15rem);
}

.subtitle {
    margin: 0 auto;
    max-width: 36ch;
    color: var(--ink-soft);
    line-height: 1.52;
    font-size: 0.98rem;
}

.actions {
    margin-top: 26px;
    display: grid;
    gap: 12px;
}

.button {
    width: 100%;
    min-height: 56px;
    border-radius: 14px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, background-color 180ms ease;
}

.button span {
    line-height: 1;
}

.button:focus-visible {
    outline: 3px solid rgba(255, 158, 22, 0.42);
    outline-offset: 2px;
}

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

.icon {
    flex: 0 0 auto;
}

.android-icon {
    width: 32px;
    height: 32px;
}

.button-android {
    color: #1f1f1f;
    background: linear-gradient(145deg, #ffb44a 0%, var(--brand-primary) 65%);
    box-shadow: 0 14px 26px -16px var(--accent-shadow);
}

.button-android:hover {
    filter: saturate(1.05) brightness(0.98);
}

.button-ios {
    color: #ffffff;
    background: linear-gradient(145deg, #8f9194 0%, #5f6267 100%);
    box-shadow: 0 14px 26px -16px rgba(51, 54, 59, 0.45);
}

.button-ios:hover {
    filter: brightness(1.05);
}

.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 20px 14px 12px;
    color: var(--ink-soft);
    text-align: center;
    font-size: 0.92rem;
}

.site-footer a {
    color: var(--ink);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.site-footer a:hover {
    color: #5f6267;
}

/* Shared styles for error pages. */
.error-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.error-card {
    width: min(100%, 640px);
}

.status-code {
    margin: 0;
    font-size: clamp(2.5rem, 8vw, 3.6rem);
    letter-spacing: 0.03em;
}

.error-message {
    margin: 10px 0 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.error-back {
    margin-top: 20px;
    display: inline-flex;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@media (max-width: 520px) {
    body {
        padding-top: 12px;
    }

    .card {
        border-radius: 18px;
    }

    .button {
        min-height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}