/*
 * medicinetracker.app site styles — mirrors the gnlelab.net design system
 * (plain static site, no build step; content/ is the web root, so this file is
 * linked root-relative as /assets/site.css from every page).
 */

:root {
    --bg: #f0f2f5;
    --surface: #fff;
    --text: #1a1a1a;
    --muted: #555;
    --muted-2: #666;
    --muted-3: #888;
    --faint: #999;
    --accent: #1976d2;
    --accent-bg: #e3f2fd;
    --border: #e5e7eb;
    --safe-fg: #2e7d32;
    --safe-bg: #e8f5e9;
    --wait-fg: #b25e00;
    --wait-bg: #fff4e0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --maxw: 960px;
    --readw: 640px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Offset in-page anchor jumps so the sticky header does not cover the target. */
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Header / navigation ------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-brand img {
    display: block;
    width: auto;
}

.site-brand .brand-mark {
    height: 28px;
}

.site-brand .brand-wordmark {
    height: 22px;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---- Generic section + typography --------------------------------------- */

section {
    padding: 56px 0;
}

section + section {
    /* No hairline separator: 1px full-width borders rasterize sub-pixel at
       Windows 125/150% display scaling and read as smeared "artifact" lines
       in flat areas (2026-07-27 deploy review). Background zoning + spacing
       carry the section separation instead. */
    border-top: 0;
}

.section-narrow {
    max-width: var(--readw);
    margin: 0 auto;
}

.kicker {
    font-size: 13px;
    color: var(--muted-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
}

h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

p {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: 18px;
    color: var(--muted);
}

/* ---- Waitlist form ------------------------------------------------------ */

.waitlist-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0 12px;
}

.waitlist-form input[type="email"] {
    flex: 1 1 260px;
    font-size: 16px;
    font-family: inherit;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
}

.waitlist-form input[type="email"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

/* Honeypot field: visually removed for humans, present for bots. Never use
   display:none — some bots skip fields that are display:none, and assistive
   tech handling is cleaner with the off-screen pattern + aria-hidden. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-note {
    font-size: 13px;
    color: var(--muted-3);
}

.form-status {
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
}

.form-status.ok {
    color: var(--safe-fg);
}

.form-status.err {
    color: var(--wait-fg);
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
    background: #1565c0;
}

/* ---- Badges / pills ----------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 4px 11px;
    border-radius: var(--radius-md);
    letter-spacing: 0.02em;
}

.badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---- Three-up benefits -------------------------------------------------- */

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.benefit {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.benefit h3 {
    margin-bottom: 8px;
}

.benefit p {
    font-size: 15px;
    color: var(--muted-2);
    text-align: left;
}

.benefit .mock-figure {
    margin-bottom: 18px;
}

/* ---- Steps (how it works) ----------------------------------------------- */

.steps {
    list-style: none;
    display: grid;
    gap: 20px;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding-left: 52px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 2px;
}

.steps li p {
    font-size: 15px;
    color: var(--muted-2);
}

/* ---- Beta platform cards ------------------------------------------------ */

.beta-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.beta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.beta-card p {
    font-size: 15px;
    color: var(--muted-2);
    flex: 1;
}

.beta-card .btn {
    align-self: flex-start;
}

/* ---- FAQ ---------------------------------------------------------------- */

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0;
    margin-bottom: 12px;
}

.faq summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    padding: 16px 18px;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    color: var(--muted-3);
}

.faq details[open] summary::after {
    content: "\2212"; /* minus sign */
}

.faq details p {
    padding: 0 18px 16px;
    font-size: 15px;
    color: var(--muted);
}

/* ---- Disclaimer note ---------------------------------------------------- */

.disclaimer {
    font-size: 13px;
    color: var(--muted-3);
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 8px;
}

/* ---- Plain bulleted list (privacy notice, etc.) ------------------------- */

.plain-list {
    list-style: disc;
    padding-left: 22px;
    margin-bottom: 4px;
}

.plain-list li {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 8px;
}

.notice-updated {
    font-size: 13px;
    color: var(--muted-3);
    margin-top: 16px;
}

/* ---- Footer ------------------------------------------------------------- */

footer.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

footer.site-footer .container {
    padding-top: 28px;
    padding-bottom: 28px;
    text-align: center;
}

footer.site-footer p {
    font-size: 12px;
    color: var(--faint);
    margin-bottom: 4px;
}

footer.site-footer p:last-child {
    margin-bottom: 0;
}

footer.site-footer .footer-brand {
    font-size: 13px;
    margin-bottom: 12px;
}

/* Link row: a spaced flex row instead of dot-separated inline links, so the
   footer stays readable and wraps cleanly on narrow screens. */
footer.site-footer .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 26px;
    margin-bottom: 18px;
}

footer.site-footer .footer-nav a {
    font-size: 13px;
    line-height: 1.8;
}

footer.site-footer a {
    color: var(--muted-2);
    font-weight: 500;
}

footer.site-footer a:hover {
    color: var(--accent);
}

/* ---- Phone mockups (illustrative, not screenshots) ---------------------- */

.mockups {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    margin: 8px 0 20px;
}

.mock-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
}

.phone {
    width: 220px;
    height: 452px;
    background: #fff;
    border: 10px solid #1f2330;
    border-radius: 34px;
    /* Deliberately tight and small: wide blurred shadows rasterize in tiles
       and show faint seam lines on fractional-DPI displays (seen on the
       2026-07-27 deploy review, worse at Windows 125/150% scaling). The dark
       bezel already separates the phone; this only grounds it. */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Compact variant used inside the three-up benefit cards. */
.phone.phone-sm {
    width: 190px;
    height: 340px;
    border-width: 8px;
    border-radius: 28px;
}

/* The notch sits over the top of the screen. */
.phone::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 92px;
    height: 18px;
    background: #1f2330;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 3;
}

.phone.phone-sm::before {
    width: 76px;
    height: 15px;
}

.mock-cap {
    font-size: 13px;
    color: var(--muted-2);
    margin-top: 12px;
    text-align: center;
}

.screen {
    flex: 1;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.screen-bar {
    background: var(--surface);
    padding: 26px 14px 12px;
    border-bottom: 1px solid var(--border);
}

.phone-sm .screen-bar {
    padding-top: 22px;
}

.screen-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.screen-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

/* Family-member selector chips inside a mockup. */
.chips {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 10px;
    background: #eef1f5;
    color: var(--muted-2);
}

.chip.active {
    background: var(--accent-bg);
    color: var(--accent);
}

/* Medicine card inside a mockup. */
.mcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 11px;
}

.mcard-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.mcard-meta {
    font-size: 9.5px;
    color: var(--muted-3);
    margin-top: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9px;
}

.pill svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.pill.safe {
    color: var(--safe-fg);
    background: var(--safe-bg);
}

.pill.wait {
    color: var(--wait-fg);
    background: var(--wait-bg);
}

/* Caregiver rows for the invite mockup. */
.person-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 11px;
}

.person-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.person-name {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.person-role {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted-3);
}

/* Primary action button inside a mockup. */
.mbtn {
    margin-top: auto;
    background: var(--accent);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 9px;
    border-radius: 10px;
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 600px) {
    section {
        padding: 40px 0;
    }

    h1 {
        font-size: 28px;
    }

    .site-nav {
        gap: 14px;
    }

    .site-nav a {
        font-size: 13px;
    }

    .site-brand .brand-wordmark {
        display: none;
    }
}

/* ---- Real app screenshots in the phone frames (docs#58 swap) ------------ */

/* A phone that holds a real screenshot: the notch overlay would cover the
   app bar in the capture, so shot-bearing frames drop it (bezel only). */
.phone.has-shot::before {
    display: none;
}

.phone .shot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crop from the bottom, never the app bar. */
    object-position: top;
    display: block;
}

/* ---- Multi-family spotlight --------------------------------------------- */

.spotlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 44px;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
}

.spotlight-copy h2 {
    margin-bottom: 12px;
}

.spotlight-copy p {
    color: var(--muted-2);
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .spotlight {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .spotlight-copy {
        text-align: center;
    }

    .spotlight-copy p {
        text-align: left;
    }
}

/* ---- Section head above screenshot sections (docs#58 review round) ------ */

.section-head {
    text-align: center;
    margin-bottom: 28px;
}

/* ---- Screenshot lightbox ------------------------------------------------ */

/* The tap target wrapping each screenshot. Resets button chrome; the zoom
   cursor is the visible affordance on desktop. */
.shot-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

#shot-lightbox {
    /* The global margin reset nukes the UA's `margin: auto` that centres a
       native dialog; restore it or the dialog pins to the top left. */
    margin: auto;
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(92vw, 420px);
    overflow: visible;
}

#shot-lightbox::backdrop {
    background: rgba(15, 17, 26, 0.72);
}

#shot-lightbox img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #1f2330;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---- Footer link affordance (docs#58 review round) ---------------------- */

/* Links must read as links next to the static bold lines: underline them. */
footer.site-footer a {
    text-decoration: underline;
    text-underline-offset: 3px;
}
