/* ============================================================
   Breathe Everyday — shared stylesheet for /, /privacy/, /support/
   ============================================================ */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/poppins-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/poppins-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/poppins-semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('./fonts/poppins-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Design tokens (mirrored from ui/theme/Color.kt) ---------- */
:root {
    --bg:            #F5F9F7;  /* LightBackground */
    --surface:       #FFFFFF;  /* LightSurface */
    --surface-sage:  #E6F0EC;  /* SageLight — callout surface */
    --text:          #2D3E36;  /* LightOnBackground */
    --text-subtle:   #374840;  /* LightOnSurface */
    --text-muted:    #6E837A;  /* LightOnSurfaceVariant */
    --accent:        #4A7E6B;  /* SageAccent — links, borders */
    --accent-soft:   #6B9E8C;  /* SageDeep — hover */
    --divider:       #C2D9D0;  /* SageMedium */

    --measure: 680px;
    --radius: 12px;
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-soft); }
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- Page container ---------- */
.page {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 48px 24px 96px;
}
@media (min-width: 720px) {
    .page { padding-top: 72px; }
}

/* ---------- Header (shared by privacy + support) ---------- */
.page-header {
    margin-bottom: 56px;
}
.page-header a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}
.mark { width: 48px; height: 48px; flex: none; }
.wordmark {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.01em;
}

/* ---------- Typography ---------- */
h1 {
    font-size: 40px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}
@media (min-width: 720px) {
    h1 { font-size: 48px; }
}
.meta {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 48px;
}
h2 {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 56px 0 16px;
}
h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 32px 0 8px;
}
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin-bottom: 6px; }
li::marker { color: var(--text-muted); }
strong { font-weight: 600; color: var(--text); }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.92em;
    background: var(--surface-sage);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ---------- Short-version callout (privacy page) ---------- */
.callout {
    background: var(--surface-sage);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 0 0 48px;
}
.callout ul { margin: 0; padding-left: 18px; }
.callout li { margin-bottom: 8px; }
.callout li:last-child { margin-bottom: 0; }

/* ---------- Contact card (support page) ---------- */
.contact-card {
    background: var(--surface-sage);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 0 0 48px;
}
.contact-card p { margin-bottom: 12px; }
.contact-card p:last-child { margin-bottom: 0; }

/* ---------- FAQ (support page) ---------- */
details {
    border-top: 1px solid var(--divider);
    padding: 20px 0;
}
details:last-of-type { border-bottom: 1px solid var(--divider); }
summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 17px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text);
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: '+';
    font-weight: 300;
    font-size: 24px;
    color: var(--text-muted);
    line-height: 1;
}
details[open] summary::after { content: '−'; }
details > :not(summary) {
    margin-top: 12px;
    color: var(--text-subtle);
}
details > :not(summary):last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.page-footer {
    margin-top: 96px;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.page-footer a { color: var(--text-muted); }
.page-footer .copyright { margin-left: auto; }
@media (max-width: 480px) {
    .page-footer .copyright { margin-left: 0; }
}

/* ---------- Landing (/) ---------- */
.landing {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.landing-mark { margin-bottom: 24px; }
.landing h1 { margin-bottom: 12px; }
.landing .tagline {
    color: var(--text-subtle);
    font-size: 20px;
    margin-bottom: 40px;
}
.landing .links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 18px;
    margin-bottom: 0;
}
