/* ==========================================================================
   Palmetto Guard — marketing site design system
   Shared by index.html and the pillar pages. Docs pages carry their own CSS.
   Light ground, navy brand band. All text pairs verified at WCAG AA.
   ========================================================================== */

:root {
    --navy: #003366;
    --navy-deep: #002347;
    --blue: #12558f;
    --blue-hover: #0d3f6d;
    --blue-bright: #125589;
    --blue-tint: #e7eff8;
    --blue-line: #c4d8ec;
    --bg: #eef3f9;
    --panel: #ffffff;
    --panel-2: #eaf1f8;
    --header-bg: #003366;
    --hdr-text: #ffffff;
    --hdr-muted: #bfd5ea;
    --text: #0f1f2e;
    --heading: #0d2340;
    --muted: #4c6172;
    --faint: #566b7d;
    --live: #127a4a;
    --border: #d3ddea;
    --shadow: 0 1px 2px rgba(13,35,64,.05), 0 6px 20px -12px rgba(13,35,64,.20);
    --radius: 12px;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    line-height: 1.65;
    font-size: 17px;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ---------- HEADER (navy brand band) ----------
   One centred stack. The previous three-column flex could never optically
   centre, because the logo column and the button column were different widths. */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--navy-deep);
    padding: 30px 20px 0;
    text-align: center;
}

.header-content {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.header-left img.logo { height: 150px; width: auto; display: block; }
.header-left a { display: inline-block; }

.header-center { max-width: 640px; }

.header-center h1 {
    margin: 0;
    font-size: clamp(1.4rem, 3.2vw, 1.95rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--hdr-text);
    letter-spacing: -.01em;
    text-wrap: balance;
}

/* availability reads as a status line, not a third button */
.availability {
    display: inline;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--hdr-muted);
    text-decoration: none;
}
.availability:hover { color: #ffffff; text-decoration: none; }
.availability .dot {
    display: inline-block;
    vertical-align: middle;
    width: 9px; height: 9px; border-radius: 50%;
    margin-right: 9px;
    position: relative; top: -1px;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74,222,128,.22);
}
@media (prefers-reduced-motion: no-preference) {
    .availability .dot { animation: pulse 2.4s ease-in-out infinite; }
    @keyframes pulse {
        0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,.22); }
        50%      { box-shadow: 0 0 0 7px rgba(74,222,128,.05); }
    }
}

.header-right { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.button {
    padding: 11px 22px;
    background: #ffffff;
    color: var(--navy);
    border: 1px solid #ffffff;
    border-radius: 7px;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block;
    text-decoration: none;
    transition: background .18s;
}
.button:hover { background: var(--blue-tint); color: var(--navy); text-decoration: none; }

.button-quiet {
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    color: #ffffff;
}
.button-quiet:hover { background: rgba(255,255,255,.12); color: #ffffff; }

/* ---------- SITE NAV ---------- */
.sitenav {
    max-width: 1100px;
    margin: 26px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.sitenav a {
    color: var(--hdr-muted);
    font-size: 0.94rem;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.sitenav a:hover { color: #ffffff; text-decoration: none; }
.sitenav a[aria-current="page"] { color: #ffffff; border-bottom-color: #ffffff; }

@media (max-width: 780px) {
    .header-left img.logo { height: 112px; }
    .sitenav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* fade the right edge so it reads as scrollable rather than cut off */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%);
                mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%);
    }
    .sitenav::-webkit-scrollbar { display: none; }
}

/* ---------- PAGE HERO (pillar pages) ---------- */
.page-hero { background: var(--header-bg); padding: 8px 20px 44px; }
.page-hero-inner { max-width: 860px; margin: auto; text-align: center; }
.crumb { font-size: 0.85rem; color: var(--hdr-muted); margin: 24px 0 14px; }
.crumb a { color: var(--hdr-muted); text-decoration: underline; }
.crumb a:hover { color: #ffffff; }
.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4.6vw, 2.7rem);
    font-weight: 700;
    color: var(--hdr-text);
    letter-spacing: -.015em;
    line-height: 1.12;
    text-wrap: balance;
}
.page-hero .lede {
    margin: 0 auto;
    max-width: 62ch;
    font-size: 1.1rem;
    color: var(--hdr-muted);
}

/* ---------- LAYOUT ---------- */
.container { max-width: 960px; margin: auto; padding: 24px 24px 60px; }
.section { margin: 64px 0; }

/* Inline links inside running prose get an underline. --blue-bright on white is a
   colour difference only, which fails WCAG 1.4.1 for anyone who can't rely on hue —
   and this is the 55+ HOA-board readership the light theme was chosen for.
   Scoped to <p> so it can't touch .seeall, the buttons, or the card/docs link blocks,
   which are already distinguishable by shape. */
.container p a { text-decoration: underline; text-underline-offset: 2px; }
.container p a:hover { text-decoration-thickness: 2px; }

.section h2 {
    font-size: 24px;
    color: var(--heading);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin: 0 0 20px;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.section h3 {
    font-size: 1.15rem;
    color: var(--heading);
    margin: 36px 0 12px;
}
.section > p { color: var(--muted); margin: 0 0 24px; }

/* ---------- CARD GRID ---------- */
.features, .why-choose {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.card {
    background: var(--panel);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.card h3 { margin: 0; color: var(--heading); font-size: 1.06rem; }
.card p { margin: 8px 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

a.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .18s, box-shadow .18s; }
a.card-link:hover { border-color: var(--blue); box-shadow: 0 4px 18px rgba(18,85,143,.16); text-decoration: none; }

/* ---------- PILLAR (homepage summary block) ---------- */
.seeall {
    display: inline-block;
    margin-top: 20px;
    font-weight: 700;
    color: var(--blue-bright);
}
.seeall:hover { text-decoration: underline; }

/* ---------- DOCS STRIP ---------- */
.docs-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 64px;
    padding: 16px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.5;
    text-decoration: none;
    transition: border-color .18s, background .18s;
}
.docs-strip:hover { border-color: var(--blue); background: var(--panel-2); text-decoration: none; }
.docs-strip strong { color: var(--text); font-weight: 700; }
.docs-strip-go { color: var(--blue-bright); font-weight: 700; white-space: nowrap; flex: none; }
@media (max-width: 620px) {
    .docs-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- APP STORE BADGES ---------- */
.app-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 64px;
    padding: 20px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.app-badges-text strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }
.app-badges-text span { color: var(--muted); font-size: 0.9rem; }
.app-badges-links { display: flex; align-items: center; gap: 12px; flex: none; }
.app-badges-links img { width: auto; display: block; }
/* Apple's SVG is cropped tight to its pill (135x40, no padding).
   Google's official SVG carries ~10px of padding baked in around its pill on a
   155x60 canvas, so at equal element height its pill reads visibly smaller.
   Scaling Google's element height by 60/40 makes both rendered PILLS match —
   162x48 either way — even though the two <img> elements aren't the same height. */
.app-badges-links img.badge-apple { height: 48px; }
.app-badges-links img.badge-google { height: 72px; }
@media (max-width: 620px) {
    .app-badges { flex-direction: column; align-items: flex-start; gap: 16px; }
    .app-badges-links { align-self: stretch; }
    .app-badges-links img.badge-apple { height: 40px; }
    .app-badges-links img.badge-google { height: 60px; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--heading);
    font-size: 1rem;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: " +"; color: var(--blue-bright); float: right; font-weight: 700; }
.faq details[open] summary::after { content: " –"; }
.faq details p { color: var(--muted); font-size: 0.95rem; margin: 12px 0 0; }

/* ---------- CTA BAND (pillar pages) ---------- */
.cta-band {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 28px;
    margin: 64px 0;
}
.cta-band h2 { border: none; margin: 0 0 8px; padding: 0; font-size: 1.4rem; }
.cta-band p { color: var(--muted); margin: 0 0 18px; }
.btn-primary {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    padding: 13px 30px;
    border: none;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; text-decoration: none; }

/* ---------- FORM ---------- */
label { font-size: 0.9rem; color: var(--text); font-weight: 600; letter-spacing: .3px; }
.field {
    width: 100%;
    padding: 12px 14px;
    margin: 6px 0 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    font-size: 1rem;
    font-family: var(--sans);
}
.field:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field::placeholder { color: var(--faint); }
.btn-submit {
    background: var(--blue);
    color: #fff;
    padding: 13px 30px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--sans);
    transition: background .18s;
}
.btn-submit:hover { background: var(--blue-hover); }

/* ---------- FOOTER (navy band) ---------- */
footer {
    text-align: center;
    padding: 26px 20px;
    background: var(--header-bg);
    border-top: 1px solid var(--navy-deep);
    font-size: 0.88rem;
    color: var(--hdr-muted);
}
/* Underlined, not colour-only. These sit on the navy band where the link colour
   (#fff) and the surrounding text (--hdr-muted) are close enough that colour alone
   doesn't mark them as links — a real problem for the 55+ HOA-board readership this
   light theme was chosen for, and a WCAG 1.4.1 failure Lighthouse flags. */
footer a { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { text-decoration-thickness: 2px; }
