/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light dark;
    /* Trace colors match the app: zeroed round blue, Round 2 orange */
    --zeroed: #007AFF;
    --round2: #FF9500;
    --link: #0066CC;
    --background: #F2F2F7;
    --surface: #FFFFFF;
    --inset: #F2F2F7;
    --text-primary: #1C1C1E;
    --text-secondary: #48484A;
    --text-tertiary: #6C6C70;
    --border-color: #D1D1D6;
    --shadow: rgba(0, 0, 0, 0.08);
    --notice-bg: #FFF4E5;
    /* The app icon's gradient; the hero stays dark in both appearances */
    --hero-top: #2C323C;
    --hero-bottom: #0D1014;
}

@media (prefers-color-scheme: dark) {
    :root {
        --zeroed: #0A84FF;
        --round2: #FF9F0A;
        --link: #4DA3FF;
        --background: #000000;
        --surface: #1C1C1E;
        --inset: #2C2C2E;
        --text-primary: #F2F2F7;
        --text-secondary: #C7C7CC;
        --text-tertiary: #98989D;
        --border-color: #38383A;
        --shadow: rgba(0, 0, 0, 0.4);
        --notice-bg: #2B2113;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
    color: #FFFFFF;
    padding: 48px 0 40px;
    text-align: center;
}

header .app-icon {
    width: 104px;
    height: 104px;
    margin-bottom: 16px;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 6px;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 18px;
}

.tagline .zeroed {
    color: #0A84FF;
}

.tagline .round2 {
    color: #FF9F0A;
}

.store-button {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    border-radius: 999px;
    background-color: #FFFFFF;
    color: #000000;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.store-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.requirements {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 12px;
}

/* Compact header for the privacy policy */
header.compact {
    padding: 28px 0;
}

header.compact .app-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

header.compact h1 {
    font-size: 2rem;
}

/* Navigation: one row that scrolls sideways on narrow screens */
nav {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

nav .container::-webkit-scrollbar {
    display: none;
}

nav a {
    color: var(--link);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

nav a:hover {
    background-color: var(--zeroed);
    color: #FFFFFF;
    text-decoration: none;
}

/* Main Content */
main {
    padding: 32px 20px 8px;
}

.section {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px var(--shadow);
}

.section h2 {
    font-size: 1.85rem;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--zeroed);
}

.section h3 {
    font-size: 1.25rem;
    margin-top: 24px;
    margin-bottom: 8px;
}

.section p {
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.section ul, .section ol {
    margin-left: 24px;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.section li {
    margin-bottom: 6px;
}

.section li > ul {
    margin-top: 6px;
}

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

.lead {
    font-size: 1.1rem;
}

/* Screenshots */
.screenshots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.screenshots img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
    box-shadow: 0 2px 10px var(--shadow);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.feature-card {
    background-color: var(--inset);
    border-radius: 12px;
    padding: 20px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.feature-card ul {
    margin-left: 20px;
    margin-bottom: 0;
}

/* Steps */
.step {
    background-color: var(--inset);
    border-left: 4px solid var(--zeroed);
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 10px;
}

.step.round2 {
    border-left-color: var(--round2);
}

.step h3 {
    margin-top: 0;
}

.step p:last-child, .step ul:last-child {
    margin-bottom: 0;
}

/* Apple Watch */
.watch {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
    align-items: start;
}

.watch img {
    width: 100%;
    height: auto;
    border-radius: 36px;
    display: block;
    background-color: #000000;
    border: 10px solid #1C1C1E;
}

/* FAQ and Troubleshooting */
details {
    background-color: var(--inset);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--zeroed);
}

.troubleshooting details {
    border-left-color: var(--round2);
}

summary {
    cursor: pointer;
    font-weight: 600;
    padding: 14px 20px;
    list-style-position: inside;
}

details[open] summary {
    padding-bottom: 6px;
}

.answer {
    padding: 0 20px 6px;
}

/* Privacy */
.effective-date {
    background-color: var(--inset);
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
}

.summary-box {
    background-color: var(--inset);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 8px 0 20px;
}

.summary-box ul {
    margin-bottom: 0;
}

/* Safety Notice */
.safety-notice {
    background-color: var(--notice-bg);
    border: 2px solid var(--round2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 28px;
}

.safety-notice h3 {
    margin-top: 0;
}

.safety-notice p {
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    color: var(--text-tertiary);
    text-align: center;
    padding: 24px 20px 40px;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 4px;
}

footer strong {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 860px) {
    nav .container {
        justify-content: flex-start;
    }

    .screenshots {
        grid-template-columns: repeat(2, 1fr);
    }

    .watch {
        grid-template-columns: 1fr;
    }

    .watch img {
        max-width: 220px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    header {
        padding: 36px 0 32px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    main {
        padding: 20px 16px 4px;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 20px;
        margin-bottom: 16px;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .section h3 {
        font-size: 1.15rem;
    }

    .step, .feature-card {
        padding: 16px;
    }

    .screenshots {
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    nav, .store-button, .screenshots {
        display: none;
    }

    header {
        color: #000000;
        background: none;
        padding: 16px 0;
    }

    .subtitle, .requirements {
        color: #3C3C43;
    }

    .section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #C6C6C8;
    }
}

/* Selection */
::selection {
    background-color: var(--zeroed);
    color: #FFFFFF;
}
