/* ============================================================================
   public_home.css — styles for the public landing page (core/public_home.html)

   Self-hosted stylesheet, CSP-compatible (style-src 'self').
   No external fonts, no CDNs, no dependencies. System font stack only.
   ========================================================================== */

:root {
    --brand: #E31837;
    --brand-600: #c8102e;
    --brand-glow: rgba(227, 24, 55, 0.30);

    --bg-1: #f8fafc;
    --bg-2: #eef1f6;
    --surface: rgba(255, 255, 255, 0.86);
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #475569;
    --faint: #64748b;
    --tint: rgba(15, 23, 42, 0.035);
}

html[data-bs-theme="dark"] {
    --surface: rgba(17, 24, 39, 0.74);
    --border: rgba(148, 163, 184, 0.16);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #94a3b8;
    --tint: rgba(148, 163, 184, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(1100px 620px at 12% -10%, #eef2ff 0%, rgba(238, 242, 255, 0) 55%),
        radial-gradient(1000px 560px at 100% 0%, #ffe9ec 0%, rgba(255, 233, 236, 0) 50%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
}

html[data-bs-theme="dark"] body {
    background:
        radial-gradient(1100px 620px at 12% -10%, #1e293b 0%, rgba(30, 41, 59, 0) 55%),
        radial-gradient(1000px 560px at 100% 0%, #3b0d16 0%, rgba(59, 13, 22, 0) 50%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}

/* ── Theme toggle (driven by the existing, self-hosted theme-toggle.js) ────── */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { color: var(--brand); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid var(--brand-glow); outline-offset: 2px; }

/* ── Layout shell ──────────────────────────────────────────────────────────── */
.page-shell {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem) 1rem;
}

.hero {
    width: 100%;
    max-width: 620px;
    text-align: center;
}

/* ── Primary hero card ─────────────────────────────────────────────────────── */
.hero-card {
    border-radius: 26px;
    padding: clamp(2rem, 5vw, 3.25rem);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 26px 64px -30px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(10px);
}
html[data-bs-theme="dark"] .hero-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 72px -32px rgba(0, 0, 0, 0.8);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    background: linear-gradient(160deg, #ffffff 0%, #fdeef0 100%);
    border: 1px solid rgba(227, 24, 55, 0.16);
    box-shadow: 0 12px 32px -14px var(--brand-glow);
}
html[data-bs-theme="dark"] .brand-badge {
    background: linear-gradient(160deg, #1f2937 0%, #2a1116 100%);
    border-color: rgba(227, 24, 55, 0.32);
}
.brand-badge img { width: 54px; height: 54px; object-fit: contain; }

.eyebrow {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand);
}

.hero-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.hero-lead {
    margin: 0 auto 1.9rem;
    max-width: 44ch;
    font-size: clamp(1rem, 2.2vw, 1.08rem);
    line-height: 1.6;
    color: var(--muted);
}

/* ── Primary CTA ───────────────────────────────────────────────────────────── */
.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 2.4rem;
    font-size: 1.02rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%);
    border: 1px solid var(--brand-600);
    border-radius: 14px;
    box-shadow: 0 14px 30px -12px var(--brand-glow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px var(--brand-glow); filter: saturate(1.05); }
.btn-brand:active { transform: translateY(0); }
.btn-brand:focus-visible { outline: 3px solid var(--brand-glow); outline-offset: 3px; }
.btn-brand svg { transition: transform 0.15s ease; }
.btn-brand:hover svg { transform: translateX(3px); }

/* ── Compliance / anti-phishing notice ─────────────────────────────────────── */
.notice {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    text-align: left;
    margin-top: 1.9rem;
    margin-bottom: 0;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    background: var(--tint);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--faint);
}
.notice svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }

/* ── Trust / feature strip ─────────────────────────────────────────────────── */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.25rem;
}
.trust-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.15rem 0.9rem;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.trust-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.4); }
.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--brand);
    background: rgba(227, 24, 55, 0.10);
}
.trust-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.trust-sub { font-size: 0.76rem; color: var(--faint); line-height: 1.4; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    font-size: 0.78rem;
    color: var(--faint);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .trust-grid { grid-template-columns: 1fr; }
    .trust-card { flex-direction: row; text-align: left; gap: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle, .btn-brand, .btn-brand svg, .trust-card { transition: none; }
    .theme-toggle:hover, .btn-brand:hover, .btn-brand:hover svg, .trust-card:hover { transform: none; }
}
