/* The public marketing site (closewell.us). Standalone: the app's MudBlazor styles aren't loaded on these pages. */

:root {
    --brand: #1F4E79;
    --brand-strong: #173C5E;
    --brand-soft: #E8F0F8;
    --accent: #7FB3E0;
    --bg: #FFFFFF;
    --bg-alt: #F5F8FB;
    --surface: #FFFFFF;
    --text: #16212C;
    --muted: #51606F;
    --line: #DCE3EA;
    --ok-bg: #E7F5EC;
    --ok-text: #1D5E36;
    --warn-bg: #FDF1E4;
    --warn-text: #7A3E06;
    --error: #B3261E;
    --shadow: 0 1px 2px rgb(16 33 50 / 0.06), 0 8px 24px rgb(16 33 50 / 0.08);
    --radius: 12px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand: #7FB3E0;
        --brand-strong: #A9CCEB;
        --brand-soft: #16283A;
        --accent: #7FB3E0;
        --bg: #0E141A;
        --bg-alt: #131B23;
        --surface: #17212B;
        --text: #E6ECF2;
        --muted: #A2B0BE;
        --line: #2A3743;
        --ok-bg: #143323;
        --ok-text: #9FDDB6;
        --warn-bg: #3A2614;
        --warn-text: #F3C38E;
        --error: #F2B8B5;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

@media (max-width: 600px) {
    .wrap { padding: 0 16px; }
    body { font-size: 16px; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { border-radius: 7px; }

.nav-wide { display: flex; align-items: center; gap: 24px; }
.nav-wide a:not(.button) { color: var(--text); text-decoration: none; font-weight: 550; }
.nav-wide a:not(.button):hover { color: var(--brand); }

.nav-narrow { display: none; position: relative; }
.nav-narrow summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.nav-narrow summary::-webkit-details-marker { display: none; }
.nav-narrow nav {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.nav-narrow nav a:not(.button) { color: var(--text); text-decoration: none; padding: 8px 6px; font-weight: 550; }
.nav-narrow nav .button { margin-top: 6px; text-align: center; }

@media (max-width: 820px) {
    .nav-wide { display: none; }
    .nav-narrow { display: block; }
}

/* Buttons */
.button {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 10px;
    border: 2px solid var(--brand);
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.button.small { padding: 7px 14px; font-size: 0.95rem; }
.button.ghost { background: transparent; color: var(--brand); }
.button.ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
.button.light { background: #fff; color: #1F4E79; border-color: #fff; }
.button.light:hover { background: #E8F0F8; border-color: #E8F0F8; color: #173C5E; }

@media (prefers-color-scheme: dark) {
    .button, .button:hover { color: #0E141A; }
    .button.ghost { color: var(--brand); }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 0.75em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.fine { font-size: 0.9rem; color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 980px) {
    .hero-grid { grid-template-columns: 5fr 6fr; gap: 56px; }
}

.page-hero { padding: 64px 0 32px; background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }

/* Screenshots */
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.shot .chrome { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.shot .chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot.phone { max-width: 300px; margin: 0 auto; border-radius: 36px; border: 8px solid #1b232b; }

/* Sections */
.pillars { padding: 56px 0; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.25rem; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.8em; }
.card p:last-child { margin-bottom: 0; color: var(--muted); }

.feature { padding: 64px 0; }
.feature.alt { background: var(--bg-alt); }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 900px) {
    .feature-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; }
    .feature-grid.flip > :first-child { order: 2; }
}

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin: 0 0 0.6em; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--brand);
    border-bottom: 3px solid var(--brand);
    transform: rotate(-45deg);
}

.texas { padding: 56px 0; border-top: 1px solid var(--line); }
.texas h2 { font-size: 1.2rem; }
.texas p { color: var(--muted); }

.cta { padding: 64px 0; background: #1F4E79; color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #D7E6F4; }

/* FAQ */
.faq { padding: 56px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Long-form pages (security, legal) */
.prose { padding: 16px 0 72px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

table.plain { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
table.plain th, table.plain td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 940px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.form-grid h2 { font-size: 1.2rem; margin-top: 1.5em; }
.form-card { padding: 28px; }

.contact-form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 520px) { .contact-form .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { font-weight: 600; font-size: 0.95rem; }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--brand); }
.contact-form .invalid { border-color: var(--error); }
.contact-form .validation-message { color: var(--error); font-size: 0.9rem; }
.contact-form .button { width: 100%; margin-top: 4px; }
.contact-form .fine { margin-top: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 16px 18px; border-radius: 10px; margin-bottom: 16px; }
.notice.success { background: var(--ok-bg); color: var(--ok-text); }
.notice.warn { background: var(--warn-bg); color: var(--warn-text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--bg-alt); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-row p { color: var(--muted); margin-top: 8px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; }
.footer-row nav a { color: var(--muted); text-decoration: none; }
.footer-row nav a:hover { color: var(--brand); }
.site-footer .fine { margin-top: 24px; }
