/* ===========================================================================
   LifeLink AI — Public Website
   Shares the Android/Portal design language: Primary Green #1ABC9C,
   Primary Blue #2563EB, Dark Navy #0F172A, 16px radius, Poppins.
   =========================================================================== */

:root, [data-theme="light"] {
    --green: #1ABC9C;
    --blue: #2563EB;
    --navy: #0F172A;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --text: #0F172A;
    --muted: #64748B;
    --border: #E2E8F0;
    --danger: #EF4444;
    --shadow: 0 1px 3px rgba(15,23,42,.08), 0 6px 18px rgba(15,23,42,.06);
    --grad: linear-gradient(135deg, var(--green), var(--blue));
}
[data-theme="dark"] {
    --bg: #0B1220;
    --surface: #111A2E;
    --surface-2: #16223B;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --border: #243352;
    --shadow: 0 1px 3px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: 'Poppins', system-ui, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-weight: normal; vertical-align: middle; }

/* Layout */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.eyebrow { color: var(--green); font-weight: 600; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.section h2 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.section .lead { color: var(--muted); max-width: 620px; margin: 0 auto 40px; text-align: center; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
    font-weight: 600; font-size: 15px; border: none; border-radius: 16px;
    padding: 13px 22px; cursor: pointer; transition: filter .15s, transform .15s;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.logo-mark {
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
    color: #fff; display: grid; place-items: center; font-weight: 700;
}
.brand .accent { color: var(--green); }
.nav-links { display: flex; gap: 26px; margin-left: 14px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer;
    background: var(--surface-2); color: var(--text); display: grid; place-items: center;
}
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; font-weight: 700; margin: 14px 0 16px; }
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 22px; margin-top: 30px; }
.hero-badges div { font-size: 14px; color: var(--muted); }
.hero-badges strong { display: block; font-size: 22px; color: var(--text); font-weight: 700; }

/* Phone mockup */
.phone {
    width: 280px; margin: 0 auto; background: var(--surface); border: 10px solid var(--navy);
    border-radius: 38px; padding: 18px 14px; box-shadow: var(--shadow);
}
.phone .ph-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.ph-card { background: var(--surface-2); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.ph-search { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ph-sos { background: var(--danger); color: #fff; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.ph-provider { display: flex; align-items: center; gap: 10px; }
.ph-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); }
.ph-pill { margin-left: auto; font-size: 11px; color: var(--green); font-weight: 600; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.stat .num { font-size: 34px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: 14px; }

/* Cards grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 26px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); color: var(--blue); display: grid; place-items: center; font-size: 28px; margin-bottom: 14px; }
.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split .panel { background: var(--grad); color: #fff; border-radius: 20px; padding: 34px; }
.split .panel h3 { font-size: 22px; margin-bottom: 12px; }
.split .panel ul { margin: 0; padding-left: 18px; }
.split .panel li { margin: 8px 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; position: relative; }
.step .n { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; border-radius: 24px; padding: 54px 40px; text-align: center; }
.cta-band h2 { font-size: 30px; margin-bottom: 10px; }
.cta-band p { color: #cbd5e1; max-width: 560px; margin: 0 auto 24px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { font-size: 15px; margin: 0 0 14px; }
.footer a { color: var(--muted); font-size: 14px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--green); }
.footer .about { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 10px; }
.footer .badge { background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-size: 12px; }

/* Legal page */
.legal-page { padding: 64px 0 80px; }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h1 { font-size: 36px; font-weight: 700; margin-bottom: 6px; }
.legal-content .legal-meta { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.legal-content section { margin-bottom: 36px; }
.legal-content h2 { font-size: 20px; font-weight: 700; margin: 32px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text); }
.legal-content h2:first-of-type { border-top: none; margin-top: 0; }
.legal-content h3 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.legal-content p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.legal-content ul { margin: 0 0 16px; padding-left: 20px; }
.legal-content li { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 6px; }
.legal-content b { color: var(--text); }
.legal-content i { font-style: italic; }
.legal-important { background: var(--surface-2); border-left: 4px solid var(--blue); padding: 14px 18px; border-radius: 0 10px 10px 0; }

/* ── Delete account page (delete-account.php) ── */
.hint { font-size: 13px; color: var(--muted); }
.req { color: var(--danger); }
.delete-page { max-width: 860px; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
.steps-3 .step .n { background: var(--grad); }

.alert {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
    border-radius: 14px; margin-bottom: 26px; border: 1px solid var(--border);
    background: var(--surface-2);
}
.alert > .material-symbols-outlined { font-size: 24px; flex: 0 0 auto; }
.alert strong { display: block; margin-bottom: 4px; }
.alert p { margin: 0; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert li { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 4px; }
.alert-success { background: color-mix(in srgb, var(--green) 12%, var(--surface)); border-color: var(--green); }
.alert-success > .material-symbols-outlined { color: var(--green); }
.alert-info { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); border-color: var(--blue); }
.alert-info > .material-symbols-outlined { color: var(--blue); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: var(--danger); }
.alert-error > .material-symbols-outlined { color: var(--danger); }
.ref-line code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    padding: 3px 8px; letter-spacing: .5px;
}

.dc-form {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 26px; box-shadow: var(--shadow); margin-top: 18px;
}
.dc-form-narrow { max-width: 520px; }
.dc-form .field { margin-bottom: 18px; }
.dc-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dc-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.dc-form input[type="text"],
.dc-form input[type="email"],
.dc-form input[type="password"],
.dc-form select,
.dc-form textarea {
    width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
    background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px;
    padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.dc-form input:focus, .dc-form select:focus,
.dc-form textarea:focus {
    outline: none; border-color: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
.dc-form textarea { resize: vertical; min-height: 84px; }
.dc-form .hint { font-weight: 400; margin: 6px 0 0; }
.dc-form .btn { width: 100%; justify-content: center; }
.form-foot { font-size: 13px; color: var(--muted); text-align: center; margin: 14px 0 0; }

.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; margin-bottom: 18px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); flex: 0 0 auto; }
.check span { color: var(--muted); line-height: 1.6; }

.scope { border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 4px; margin: 0 0 20px; }
.scope legend { font-size: 15px; font-weight: 700; padding: 0 6px; }
.scope .check { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--bg); }
.scope .check:hover { border-color: var(--green); }
.scope .check.is-locked { opacity: .65; background: var(--surface-2); }

.btn-danger { background: var(--danger); color: #fff; width: auto; }
.btn-danger:hover { filter: brightness(1.06); transform: translateY(-1px); }

.pill { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-sm { font-size: 11px; padding: 2px 9px; }
.pill-deleted { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.pill-retained { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }

.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-bottom-width: 2px; }
.data-table tbody th { font-weight: 600; color: var(--text); min-width: 160px; }
.data-table td { color: var(--muted); line-height: 1.6; }

/* Honeypot: off-screen but not display:none, so bots still fill it. */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Responsive */
@media (max-width: 920px) {
    .hero-grid, .split { grid-template-columns: 1fr; }
    .phone { display: none; }
    .grid-3, .grid-2, .stats, .steps { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 22px; gap: 12px; }
    .nav-links.open { display: flex; }
    .menu-toggle { display: grid; }
    .hero h1 { font-size: 36px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .grid-3, .grid-2, .stats, .steps { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
    .dc-form { padding: 20px 16px; }
    .dc-form .field-row { grid-template-columns: 1fr; gap: 0; }
    .legal-content h1 { font-size: 30px; }
    .delete-page { max-width: 100%; }
}
