/*
 * Cincinnati Stairlift Directory — Custom styles
 * Lean, no Tailwind dependency. ~12KB minified in production.
 */

/* ============ Variables ============ */
:root {
    --brand-50:  #eff6ff;
    --brand-100: #dbeafe;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --green-500: #10b981;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --radius-sm: .375rem;
    --radius:    .5rem;
    --radius-lg: 1rem;
}

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
}
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-800); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .75rem; font-weight: 700; }
h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip-link {
    position: absolute; top: -40px; left: 0; background: var(--brand-700); color: #fff;
    padding: 8px 16px; z-index: 100;
}
.skip-link:focus { top: 0; }

/* ============ Layout ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 760px; }
.section { padding: 3rem 0; }
.section-alt { background: #fff; }
.centered { text-align: center; }

/* ============ Header ============ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky; top: 0; z-index: 50;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 70px; gap: 1rem;
}
.site-title {
    font-size: 1.1rem; font-weight: 700; color: var(--gray-900);
    text-decoration: none;
}
.site-tagline { margin: 2px 0 0; font-size: .8125rem; color: var(--gray-500); }
.site-branding { display: flex; flex-direction: column; }
.primary-nav .nav-menu {
    display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0;
}
.primary-nav a { color: var(--gray-700); font-weight: 500; font-size: .9375rem; }
.primary-nav a:hover { color: var(--brand-700); text-decoration: none; }
.mobile-nav-toggle {
    display: none; background: none; border: none; padding: 8px;
    flex-direction: column; gap: 4px; cursor: pointer;
}
.mobile-nav-toggle span {
    display: block; width: 24px; height: 2px; background: var(--gray-700);
}

/* ============ Buttons ============ */
.cta-button {
    display: inline-block;
    background: var(--brand-700);
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .05s;
    border: none;
    cursor: pointer;
    font-size: .9375rem;
}
.cta-button:hover { background: var(--brand-800); color: #fff; text-decoration: none; }
.cta-button:active { transform: translateY(1px); }
.cta-button.cta-light { background: #fff; color: var(--brand-900); }
.cta-button.cta-light:hover { background: var(--brand-50); }
.cta-button.cta-secondary { background: #fff; color: var(--brand-700); border: 1px solid var(--brand-200); }
.cta-button.cta-full { width: 100%; text-align: center; }
.cta-band {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    padding: 3rem 0;
}
.cta-band .cta-button { margin-top: 1rem; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--brand-100); }

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    padding: 4rem 0 5rem;
    text-align: center;
}
.hero-pill {
    display: inline-block;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    padding: .375rem 1rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: .05em;
}
.hero-title { color: #fff; margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3rem); }
.hero-sub { color: var(--brand-100); font-size: 1.125rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-search {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: #fff;
    padding: .5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) { .hero-search { flex-direction: row; } }
.hero-search input {
    flex: 1;
    border: none;
    padding: .75rem 1rem;
    font-size: 1rem;
    background: transparent;
    color: var(--gray-900);
}
.hero-search input:focus { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.hero-search button {
    background: var(--brand-700);
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}
.hero-search button:hover { background: var(--brand-800); }
.hero-fineprint { font-size: .8125rem; color: var(--brand-100); margin: 1rem 0 0; }

/* ============ Section heads ============ */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.eyebrow {
    color: var(--brand-700);
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.section-sub { color: var(--gray-600); max-width: 600px; }
.section-link { color: var(--brand-700); font-weight: 600; }

/* ============ Installer cards ============ */
.installer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.top-rated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.installer-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    position: relative;
    transition: box-shadow .15s, transform .05s;
}
.installer-card:hover { box-shadow: var(--shadow-lg); }
.top-rated-card { border: 2px solid var(--brand-500); }
.installer-card.mini { padding: 1rem; }
.rank-badge {
    position: absolute; top: -.75rem; right: 1rem;
    background: var(--brand-700); color: #fff;
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}
.card-badges {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem;
}
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .25rem .625rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-verified { background: var(--amber-100); color: #92400e; }
.badge-premium { background: var(--brand-100); color: var(--brand-900); }
.installer-name {
    font-size: 1.125rem;
    margin-bottom: .5rem;
}
.installer-name a { color: var(--gray-900); }
.installer-name a:hover { color: var(--brand-700); text-decoration: none; }
.rating-row {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .5rem; flex-wrap: wrap;
}
.stars { color: var(--amber-500); font-size: 1.125rem; letter-spacing: 1px; }
.star.empty { color: var(--gray-300); }
.rating-number { font-weight: 700; color: var(--gray-900); }
.review-count { color: var(--gray-500); font-size: .875rem; }
.installer-loc { color: var(--gray-600); font-size: .9375rem; margin-bottom: 1rem; }
.service-list {
    list-style: none; padding: 0; margin: 0 0 1rem;
    display: grid; gap: .25rem;
}
.service-list li { font-size: .875rem; color: var(--gray-700); }
.service-list .more { color: var(--gray-500); font-style: italic; }
.card-actions {
    display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem;
}
.card-cta {
    display: block;
    background: var(--brand-700);
    color: #fff;
    padding: .625rem 1rem;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9375rem;
}
.card-cta:hover { background: var(--brand-800); color: #fff; text-decoration: none; }
.card-cta-secondary {
    display: block;
    background: #fff;
    color: var(--brand-700);
    border: 1px solid var(--brand-200);
    padding: .625rem 1rem;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9375rem;
}
.card-cta-secondary:hover { background: var(--brand-50); text-decoration: none; }

.sort-controls {
    display: flex; align-items: center; gap: .5rem;
    font-size: .875rem; color: var(--gray-700);
}
.sort-controls select {
    padding: .5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: #fff;
    font-size: .875rem;
}
.archive-fineprint {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--gray-600);
}

/* ============ How It Works ============ */
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.how-step { text-align: center; }
.how-num {
    width: 3.5rem; height: 3.5rem;
    background: var(--brand-100);
    color: var(--brand-700);
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem; font-weight: 700;
}

/* ============ Edu block ============ */
.edu-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--brand-50), #fff);
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-lg);
}
@media (min-width: 768px) { .edu-block { grid-template-columns: 2fr 1fr; } }
.check-list { list-style: none; padding: 0; }
.check-list li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}
.check-list li:last-child { border-bottom: none; }
.quick-facts {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.quick-facts-title {
    font-size: .75rem;
    color: var(--gray-500);
    font-weight: 700;
    letter-spacing: .05em;
    margin-bottom: 1rem;
}
.quick-facts dl { margin: 0; }
.quick-facts dl div {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: .75rem 0; border-bottom: 1px solid var(--gray-100); gap: 1rem;
}
.quick-facts dl div:last-child { border-bottom: none; }
.quick-facts dt { color: var(--gray-700); font-size: .875rem; }
.quick-facts dd { margin: 0; font-weight: 700; color: var(--brand-700); font-size: .9375rem; text-align: right; }

/* ============ Single installer ============ */
.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    font-size: .875rem;
}
.installer-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
.installer-hero-main { flex: 1; min-width: 280px; }
.installer-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .5rem; }
.external-link { margin-left: .5rem; color: var(--brand-700); font-size: .875rem; font-weight: 600; }
.installer-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) { .installer-grid-2col { grid-template-columns: 2fr 1fr; } }
.installer-sidebar { position: sticky; top: 90px; align-self: start; }
.info-card, .quote-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}
.info-card h3, .quote-card h3 { margin-bottom: 1rem; }
.info-card p { font-size: .9375rem; color: var(--gray-700); }
.quote-card .quote-sub { color: var(--gray-600); font-size: .875rem; margin-bottom: 1rem; }
.quote-form { display: grid; gap: .75rem; }
.quote-form label { display: grid; gap: .25rem; font-size: .875rem; font-weight: 600; color: var(--gray-700); }
.quote-form input,
.quote-form select,
.quote-form textarea {
    padding: .625rem .75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .9375rem;
    font-family: inherit;
    background: #fff;
    color: var(--gray-900);
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    outline: 2px solid var(--brand-500);
    outline-offset: -1px;
    border-color: var(--brand-500);
}
.form-status {
    padding: .75rem;
    border-radius: var(--radius);
    font-size: .875rem;
    display: none;
}
.form-status.success { background: #d1fae5; color: #065f46; display: block; }
.form-status.error { background: #fee2e2; color: #991b1b; display: block; }
.quote-fineprint { font-size: .75rem; color: var(--gray-500); margin: .5rem 0 0; }
.verified-at { color: var(--gray-500); margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }
.prose p { color: var(--gray-700); }
.related-installers { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }

/* ============ Quick Facts Card (sidebar) ============ */
.quick-facts-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}
.quick-facts-card h3 {
    font-size: .75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    margin-bottom: 1rem;
}
.qf-list { margin: 0; }
.qf-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: .5rem 0; border-bottom: 1px solid var(--gray-100); gap: 1rem;
}
.qf-row:last-child { border-bottom: none; }
.qf-row dt { color: var(--gray-700); font-size: .8125rem; font-weight: 500; margin: 0; }
.qf-row dd { margin: 0; font-weight: 700; color: var(--gray-900); font-size: .875rem; text-align: right; }

/* ============ Detailed Q&A Section ============ */
.qa-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }
.qa-section h2 { margin-bottom: .5rem; }
.qa-category {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.qa-category summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--gray-900);
    list-style: none;
    background: var(--gray-50);
    border-bottom: 1px solid transparent;
    position: relative;
}
.qa-category[open] summary { border-bottom-color: var(--gray-200); }
.qa-category summary::-webkit-details-marker { display: none; }
.qa-category summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--gray-500);
    font-weight: 400;
}
.qa-category[open] summary::after { content: '−'; }
.qa-category summary:hover { background: var(--brand-50); color: var(--brand-700); }
.qa-items { padding: .5rem 0; }
.qa-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}
.qa-item:last-child { border-bottom: none; }
.qa-question {
    font-size: .875rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0 0 .375rem;
}
.qa-answer {
    font-size: 1rem;
    color: var(--gray-900);
    line-height: 1.5;
}
.qa-yes, .qa-no, .qa-sometimes {
    display: inline-flex;
    align-items: center;
    padding: .125rem .625rem;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
}
.qa-yes { background: #d1fae5; color: #065f46; }
.qa-no { background: #fee2e2; color: #991b1b; }
.qa-sometimes { background: var(--amber-100); color: #92400e; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 1rem; margin-top: 2rem; }
.faq-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0;
}
.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-900);
    list-style: none;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--gray-500);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--brand-700); }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--gray-700); }
.faq-cta {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--brand-50);
    border-radius: var(--radius-lg);
    text-align: center;
}

/* ============ For Installers (pricing) ============ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.pricing-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}
.pricing-card-featured {
    border: 2px solid var(--brand-500);
    position: relative;
}
.pricing-tier {
    font-size: .8125rem;
    color: var(--gray-600);
    font-weight: 700;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.pricing-tier-featured { color: var(--brand-700); }
.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}
.pricing-price span { font-size: .875rem; color: var(--gray-500); font-weight: 400; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pricing-features li { padding: .375rem 0; color: var(--gray-700); font-size: .9375rem; }
.pricing-note { font-size: .75rem; color: var(--gray-500); text-align: center; margin-top: .75rem; }
.disclosure-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--gray-600);
}

/* ============ Footer ============ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-brand { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.footer-tagline { font-size: .875rem; color: var(--gray-500); }
.footer-heading { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.footer-menu { list-style: none; padding: 0; }
.footer-menu li { margin-bottom: .5rem; }
.footer-menu a { color: var(--gray-300); font-size: .9375rem; }
.footer-menu a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-700);
    text-align: center;
    font-size: .8125rem;
    color: var(--gray-500);
}

/* ============ 404 ============ */
.error-404 { padding: 4rem 0; text-align: center; }
.error-404 h1 { font-size: 3rem; color: var(--gray-300); margin-bottom: 1rem; }

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .primary-nav { display: none; }
    .primary-nav.is-open { display: block; position: absolute; top: 70px; left: 0; right: 0; background: #fff; padding: 1rem 1.25rem; box-shadow: var(--shadow-lg); }
    .primary-nav.is-open .nav-menu { flex-direction: column; gap: 1rem; }
    .mobile-nav-toggle { display: flex; }
    .cta-button.cta-mobile-only { display: none; }
    .header-inner .cta-button { display: none; }
    .installer-sidebar { position: static; }
}