/* ==========================================================================
   SAH marketing site design system.
   Palette mirrors the app's Resources/Styles/Colors.xaml exactly — warm
   charcoal surfaces, coral/clay accent, cream text. Dark-only, like the app.
   ========================================================================== */

:root {
    /* Brand */
    --primary: #D97757;
    --primary-dark: #C4623F;
    --primary-soft: #3A2A22;
    --secondary: #C79A6E;
    --tertiary: #E0A458;
    --teal: #5FB0A4;
    --success: #7FA97F;
    --danger: #E06A5B;

    /* Surfaces */
    --bg: #1B1A18;
    --surface: #262624;
    --surface-elevated: #302F2C;
    --outline: #3C3A36;

    /* Text */
    --text: #F4F2EC;
    --text-muted: #A8A199;

    --radius: 16px;
    --radius-sm: 10px;
    --container: 1100px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--tertiary); }

/* Blazor's FocusOnNavigate focuses the page <h1> (tabindex=-1) for screen readers.
   Suppress the visible ring on programmatic focus only — real keyboard focus rings on
   links/buttons are untouched. */
[tabindex="-1"]:focus { outline: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.muted { color: var(--text-muted); }
.accent { color: var(--primary); }
.teal { color: var(--teal); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}
.split.flip { grid-template-columns: 0.85fr 1.15fr; }

@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 580px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 52px 0; }
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 26px;
}

.card h3 { margin-top: 6px; }
.card .icon { font-size: 1.9rem; line-height: 1; }
.card .icon svg { height: 1em; width: auto; display: inline-block; vertical-align: bottom; }

a.card { color: var(--text); display: block; transition: border-color 0.15s ease, transform 0.15s ease; }
a.card:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--text); }

.pill {
    display: inline-block;
    background: var(--primary-soft);
    border: 1px solid var(--primary);
    color: var(--text);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn {
    display: inline-block;
    border-radius: 12px;
    padding: 13px 26px;
    font-size: 1.02rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--outline); }
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 1.7em; position: relative; margin-bottom: 0.55em; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Comparison table (Free vs Pro) */
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--outline); text-align: left; }
.compare th:nth-child(n+2), .compare td:nth-child(n+2) { text-align: center; white-space: nowrap; }
.compare thead th { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.compare thead th.pro { color: var(--primary); }
.compare tbody tr:last-child td { border-bottom: none; }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .lim { color: var(--text-muted); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Phone frame for real app screenshots (1080×2340 portrait)
   -------------------------------------------------------------------------- */

.phone {
    width: min(300px, 78vw);
    margin: 0 auto;
    background: #0d0d0c;
    border: 3px solid #45423d;
    border-radius: 38px;
    padding: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.phone::before {
    content: "";
    display: block;
    width: 84px;
    height: 7px;
    margin: 0 auto 9px;
    border-radius: 4px;
    background: #2c2a27;
}

.phone img { border-radius: 24px; width: 100%; }

.phone-row {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: flex-start;
}

.phone-caption { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; }

/* --------------------------------------------------------------------------
   Header / nav (CSS-only mobile menu)
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(27, 26, 24, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--outline);
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    position: relative;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; }
.brand:hover { color: var(--text); }
.brand img { width: 100px; height: 100px; }

.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: 0.98rem; }
.nav-links a:hover { color: var(--text); }
.nav-links a.cta { color: #fff; background: var(--primary); padding: 8px 18px; border-radius: 10px; }
.nav-links a.cta:hover { background: var(--primary-dark); }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; margin-left: auto; cursor: pointer; padding: 6px; }
.nav-toggle-label span {
    display: block; width: 24px; height: 2.5px; border-radius: 2px;
    background: var(--text); margin: 5px 0;
}

@media (max-width: 860px) {
    .nav-toggle-label { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--outline);
        padding: 8px 0;
    }
    .nav-links a { padding: 13px 26px; }
    .nav-links a.cta { margin: 10px 26px; text-align: center; }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    padding: 84px 0 64px;
    background:
        radial-gradient(1100px 480px at 15% -10%, rgba(217, 119, 87, 0.16), transparent 60%),
        radial-gradient(900px 420px at 95% 10%, rgba(95, 176, 164, 0.10), transparent 55%);
}

.hero .tagline {
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    color: var(--primary);
    font-style: italic;
    font-weight: 600;
    margin-bottom: 6px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.badge-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--outline);
    padding: 44px 0 36px;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.site-footer h4 { color: var(--text); font-size: 1rem; margin-bottom: 10px; }
.site-footer a { color: var(--text-muted); display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--outline); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Forms (contact page)
   -------------------------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }

.field input, .field select, .field textarea {
    width: 100%;
    background: var(--surface-elevated);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    font-family: var(--font);
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}

.notice {
    border: 1px solid var(--success);
    background: rgba(127, 169, 127, 0.12);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
}

.notice.error { border-color: var(--danger); background: rgba(224, 106, 91, 0.12); }

/* --------------------------------------------------------------------------
   Page helpers
   -------------------------------------------------------------------------- */

.page-head { padding: 64px 0 8px; }
.page-head p.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 46em; }

.banner {
    background: linear-gradient(100deg, var(--primary-soft), var(--surface));
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 30px;
}

.stat { text-align: center; }
.stat .big { font-size: 2.3rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat .small { color: var(--text-muted); font-size: 0.92rem; }

.quote {
    border-left: 3px solid var(--primary);
    padding-left: 18px;
    font-style: italic;
    color: var(--text-muted);
    margin: 1.2em 0;
}
