/* ==============================================
   STANDALONE PAGES (About, Privacy)
   Same tokens, glass and type scale as the map app; only the backdrop differs.
   ============================================== */

body,
html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100dvh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- PAGE TRANSITION CURTAIN (matches the app's) --- */
.page-curtain {
    position: fixed;
    inset: 0;
    background-color: var(--bg);
    z-index: 99999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s var(--ease);
}

.page-curtain.reveal {
    opacity: 0;
}

/* --- BACKDROP: a sunset by day, a night sky in dark mode --- */
.bg-layer {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transition: opacity 1s var(--ease), transform 10s linear;
}

.bg-night {
    opacity: 0;
}

.bg-sunset {
    transform: scale(1.05);
}

html.dark-mode .bg-sunset {
    opacity: 0;
    transform: scale(1);
}

html.dark-mode .bg-night {
    opacity: 1;
    transform: scale(1.05);
}

.page-about .bg-sunset {
    background-image: url('https://images.unsplash.com/photo-1495616811223-4d98c6e9c869?q=80&w=2000&auto=format&fit=crop');
}

.page-about .bg-night {
    background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=2000&auto=format&fit=crop');
}

.page-privacy .bg-sunset {
    background-image: url('https://images.unsplash.com/photo-1476610182048-b716b8518aae?q=80&w=2000&auto=format&fit=crop');
}

.page-privacy .bg-night {
    background-image: url('https://images.unsplash.com/photo-1465101162946-4377e57745c3?q=80&w=2000&auto=format&fit=crop');
}

/* Softens the photo so the card reads cleanly */
.bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3));
    z-index: -1;
    transition: background 1s ease;
}

html.dark-mode .bg-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
}

/* --- TOP BAR: the same glass pills as the map's top bar --- */
.nav-container {
    width: 100%;
    max-width: 760px;
    padding: max(16px, env(safe-area-inset-top)) 16px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    animation: dropIn 0.6s var(--ease) 0.25s backwards;
}

.glass-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    color: var(--text);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
    -webkit-tap-highlight-color: transparent;
}

.glass-pill svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) {
    .glass-pill:hover {
        border-color: var(--accent);
        color: var(--accent);
        transform: translateY(-1px);
    }
}

.glass-pill:active {
    transform: scale(0.97);
}

.glass-pill:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}

/* --- CONTENT CARD (same glass as the app's sheets) --- */
.content-wrapper {
    flex-grow: 1;
    width: 100%;
    max-width: 680px;
    padding: 24px 16px max(40px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.page-privacy .content-wrapper {
    justify-content: flex-start;
}

.card {
    padding: 48px 44px;
    border-radius: var(--radius-lg);
    background: var(--glass-strong);
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    animation: riseIn 0.7s var(--ease) 0.15s backwards;
}

/* --- TYPE (the app's scale) --- */
h1 {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    margin: 0 0 36px;
}

/* About: the definition line and the story */
.definition {
    text-align: center;
    color: var(--accent);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    margin: 0 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.story p {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text);
    opacity: 0.88;
    margin: 0 0 18px;
}

.story strong {
    font-weight: var(--weight-bold);
}

.story .punchline {
    margin: 36px 0 0;
    text-align: center;
    color: var(--accent);
    opacity: 1;
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    letter-spacing: -0.01em;
}

/* Privacy: icon + text sections */
.policy-section {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.policy-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.policy-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.policy-content h2 {
    margin: 2px 0 6px;
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.01em;
}

.policy-content p {
    margin: 0;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

.footer-note {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- PHONES --- */
@media (max-width: 600px) {
    .card {
        padding: 36px 22px;
    }

    h1 {
        font-size: var(--text-3xl);
    }

    .definition {
        font-size: var(--text-base);
    }

    .story .punchline {
        font-size: var(--text-lg);
    }

    .policy-section {
        gap: 14px;
    }

    .policy-icon {
        width: 38px;
        height: 38px;
    }

    .policy-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* --- MOTION (same keyframes as the app's motion.css) --- */
@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
    }
}
