/* ROOFIX TODAY — light mobile-first theme */
:root {
    --navy: #002855;
    --navy-dark: #001a38;
    --slate: #94a3b8;
    --slate-dark: #64748b;
    --cream: #fafaf8;
    --paper: #ffffff;
    --text: #1e293b;
    --text-muted: #475569;
    --accent: #ea580c;
    --accent-hover: #c2410c;
    --ring: rgba(0, 40, 85, 0.25);
    --shadow: 0 12px 40px rgba(0, 40, 85, 0.08);
    --radius: 14px;
    --radius-sm: 10px;
    --font: "DM Sans", system-ui, -apple-system, sans-serif;
    --header-ribbon-h: 32px;
    --header-bar-h: 56px;
    --header-total: calc(var(--header-ribbon-h) + var(--header-bar-h));
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--navy);
}

.wrap {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.site-header__ribbon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    min-height: var(--header-ribbon-h);
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    color: #f1f5f9;
    background: linear-gradient(105deg, var(--navy-dark) 0%, var(--navy) 45%, #0c4a6e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header__ribbon-icon {
    display: flex;
    flex-shrink: 0;
    color: #fbbf24;
    opacity: 0.95;
}

.site-header__ribbon-text {
    max-width: 20rem;
}

@media (min-width: 400px) {
    .site-header__ribbon {
        font-size: 0.68rem;
    }

    .site-header__ribbon-text {
        max-width: none;
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--header-bar-h);
    padding-block: 0.5rem;
}

.site-logo img {
    width: auto;
    height: 40px;
}

@media (min-width: 400px) {
    .site-logo img {
        height: 44px;
    }
}

.site-header__call {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--navy);
    border: 1px solid rgba(0, 40, 85, 0.12);
    background: var(--paper);
    white-space: nowrap;
}

.site-header__call-icon {
    display: flex;
    color: var(--accent);
}

.site-header__call-text {
    letter-spacing: 0.02em;
}

/* Hero — first mobile screen */
.hero {
    position: relative;
    min-height: calc(100dvh - var(--header-total));
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: var(--slate) url("../images/hero-roof.png") center 30% / cover no-repeat;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(250, 250, 248, 0.82) 38%,
        rgba(255, 255, 255, 0.75) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
    padding-block: 1.5rem 2rem;
    width: 100%;
}

.hero__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    opacity: 0.9;
}

.hero__title {
    margin: 0;
    font-size: clamp(1.55rem, 5.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy-dark);
    max-width: 18ch;
}

.hero__promo {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero__promo strong {
    color: var(--navy);
}

/* Trust strip */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.trust-strip__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.65rem 0.35rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 40, 85, 0.08);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 40, 85, 0.04);
}

.trust-strip__icon {
    display: flex;
    color: var(--navy);
}

.trust-strip__label {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Review platform badges — under headline (300×50 display), no frame */
.trust-badges {
    margin: 0.35rem auto 0.2rem;
    padding: 0;
    width: 300px;
    max-width: min(300px, 100%);
    background: transparent;
    border: none;
    box-shadow: none;
}

.trust-badges img {
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 50;
    display: block;
    object-fit: cover;
}

.hero__trust-line {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 36ch;
}

.hero__phone-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 0.35rem;
}

.hero__tel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.hero__tel:hover,
.hero__tel:focus-visible {
    text-decoration: underline;
}

.hero__micro {
    margin: 0;
    font-size: 0.78rem;
    color: var(--slate-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.btn--call {
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn--call:hover {
    background: var(--navy-dark);
}

.btn--cta {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
    margin-top: 0.25rem;
    padding-block: 1rem;
    line-height: 1.3;
}

.btn--cta:hover {
    background: var(--accent-hover);
}

.btn--primary {
    background: var(--navy);
    color: #fff;
}

.btn--primary:hover {
    background: var(--navy-dark);
}

.btn--secondary {
    background: var(--paper);
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn--secondary:hover {
    background: rgba(0, 40, 85, 0.06);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding-block: 1.05rem;
    font-size: 1rem;
}

.btn:active {
    transform: scale(0.98);
}

/* Sections */
.section {
    padding-block: 2.5rem;
}

.section--tint {
    background: rgba(255, 255, 255, 0.85);
    border-block: 1px solid rgba(148, 163, 184, 0.2);
}

.section__title {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
}

.section__lead {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert--error ul {
    margin: 0;
    padding-left: 1.1rem;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 40, 85, 0.1);
    box-shadow: var(--shadow);
}

.lead-form__inline-error {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #991b1b;
    line-height: 1.35;
}

.lead-form__ajax-errors {
    margin-bottom: 0;
}

.lead-form.is-loading #lead-form-submit {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.lead-form.is-loading #lead-form-submit::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lead-form-spin 0.65s linear infinite;
}

@keyframes lead-form-spin {
    to {
        transform: rotate(360deg);
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
}

.field__optional {
    font-weight: 500;
    color: var(--slate-dark);
}

.field input {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--text);
}

.field input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px var(--ring);
}

/* Checklist */
.checklist {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.checklist li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    background: var(--navy);
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.5);
}

/* Cards */
.cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    padding: 1.15rem 1.2rem;
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 40, 85, 0.08);
    box-shadow: 0 4px 20px rgba(0, 40, 85, 0.05);
}

.card__title {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    color: var(--navy);
}

.card__text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Before & after */
.before-after-section .section__lead {
    margin-bottom: 1.1rem;
}

.before-after__figure {
    margin: 0 auto;
    max-width: min(400px, 100%);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper);
    border: 1px solid rgba(0, 40, 85, 0.1);
    box-shadow: var(--shadow);
}

.before-after__figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* Steps */
.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.steps li {
    position: relative;
    padding: 1rem 1rem 1rem 3.25rem;
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 40, 85, 0.08);
    font-size: 0.92rem;
    color: var(--text-muted);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: var(--navy);
    border-radius: 50%;
}

.steps strong {
    color: var(--navy);
}

.financing-grid {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.financing-grid li {
    font-size: 0.92rem;
    color: var(--text-muted);
    padding-left: 1rem;
    border-left: 3px solid var(--slate);
}

.financing-grid strong {
    color: var(--navy);
}

/* Final CTA */
.cta-final {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #e2e8f0;
    padding-block: 2.75rem;
}

.cta-final__inner {
    text-align: center;
}

.cta-final__title {
    margin: 0 0 0.65rem;
    font-size: 1.4rem;
    color: #fff;
}

.cta-final__text {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    opacity: 0.92;
    max-width: 36ch;
    margin-inline: auto;
}

.cta-final .btn--cta {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}

/* Footer */
.site-footer {
    padding-block: 1.25rem;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.85rem;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

.footer-trust-badges-panel {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: 0.35rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.footer-trust-badges {
    margin: 0;
    padding: 0;
    width: 300px;
    max-width: min(300px, 100%);
}

.footer-trust-badges img {
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 50;
    display: block;
    object-fit: contain;
}

.site-footer a {
    color: #e2e8f0;
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Larger phones / small tablet */
@media (min-width: 480px) {
    .trust-strip__label {
        font-size: 0.7rem;
    }

    .hero__title {
        max-width: none;
    }
}

@media (min-width: 640px) {
    .cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .card {
        min-height: 100%;
    }
}
