/*
 * Generic Co. — the fork's shared component layer.
 *
 * Every arm loads this after the starter's inline chrome. It lives in
 * public/assets/ because that directory is fork-owned: putting these
 * components in includes/ would make an upstream merge conflict on every
 * change. Colours resolve through the brand tokens renderHead() emits, so the
 * only hue written down here is the amber accent, which is a design choice
 * for this demo and not a brand fact.
 */

:root {
  --display: var(--font);
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --deep: #0b2e2b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 46, 43, .06), 0 8px 24px rgba(11, 46, 43, .08);
  --btn-radius: 10px;
  --form-radius: 9px;
}

body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -.02em; color: var(--deep); }
img { max-width: 100%; height: auto; display: block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       min-height: 46px; padding: 12px 20px; border-radius: var(--btn-radius);
       font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
       border: 2px solid var(--brand); background: var(--brand); color: var(--on-brand);
       transition: background .15s ease, transform .15s ease; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-ring); color: var(--brand-dark); }
.btn--amber { background: var(--amber); border-color: var(--amber); color: var(--deep); }
.btn--amber:hover { background: #d97706; border-color: #d97706; }
.btn--light { background: #fff; border-color: #fff; color: var(--deep); }
.btn--light:hover { background: #ecfdf5; border-color: #ecfdf5; }
.btn--block { width: 100%; }

/* ---------- headers ---------- */
.utility { background: var(--deep); color: #ccfbf1; font-size: .82rem; }
.utility .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.utility a { color: #fff; font-weight: 700; text-decoration: none; }

.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.site-head .logo img { height: 40px; width: auto; }
.site-head .actions { display: flex; align-items: center; gap: 14px; }
.site-head .phone { font-weight: 800; color: var(--deep); text-decoration: none; white-space: nowrap; }
.site-head .phone small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
@media (max-width: 640px) { .site-head .btn { display: none; } .site-head .logo img { height: 34px; } }

.urgency { background: var(--amber); color: var(--deep); text-align: center; font-size: .9rem;
           font-weight: 600; padding: 9px 16px; }
.urgency strong { font-weight: 800; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--deep { background: var(--deep); color: #d1fae5; }
.section--deep h2, .section--deep h3 { color: #fff; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .12em;
           text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.section--deep .eyebrow, .hero3 .eyebrow { color: #5eead4; }
.section-h { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 12px; }
.section-lede { color: var(--ink-soft); max-width: 640px; margin: 0 0 32px; font-size: 1.05rem; }
.section--deep .section-lede { color: #a7f3d0; }
.center { text-align: center; }
.center .section-lede { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .section { padding: 48px 0; } }

/* ---------- cards & grids ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
/* Three quotes never split 2 + 1: below desktop they stack, at a readable measure. */
@media (max-width: 900px) { .grid-3.quotes { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; } }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line);
         border-radius: var(--radius); background: #fff; overflow: hidden; }
.trust div { padding: 18px 16px; text-align: center; border-left: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.trust div:first-child { border-left: 0; }
.trust strong { display: block; font-size: 1.5rem; color: var(--deep); font-weight: 800; line-height: 1.2; }
.stars { color: var(--amber); letter-spacing: 2px; }
@media (max-width: 720px) { .trust { grid-template-columns: 1fr 1fr; }
  .trust div:nth-child(3) { border-left: 0; } .trust div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- service cards ---------- */
.svc-card { padding: 22px; }
.svc-card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
                 background: var(--brand-ring); color: var(--brand); margin-bottom: 14px; }
.svc-card .ico svg { width: 24px; height: 24px; }
.svc-card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.svc-card p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- testimonials ---------- */
.quote { margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; font-size: 1rem; color: var(--ink); }
.quote footer { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--muted); margin-top: auto; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
          background: var(--deep); color: #fff; font-weight: 800; font-size: .85rem; flex: 0 0 auto; }
.quote footer b { display: block; color: var(--deep); }

/* ---------- process steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { list-style: none; position: relative; padding: 22px 20px 20px; background: #fff;
            border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center;
                    width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand);
                    font-weight: 800; margin-bottom: 12px; }
.steps h3 { margin: 0 0 6px; font-size: 1.02rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
ol.steps { padding: 0; margin: 0; }

/* ---------- FAQ (native details: works with no script) ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; color: var(--deep); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
                      font-size: 1.4rem; color: var(--brand); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ---------- gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; }
.gallery a::after { content: "View larger"; position: absolute; right: 12px; bottom: 12px; font-size: .75rem; font-weight: 700;
                    background: rgba(11, 46, 43, .82); color: #fff; padding: 5px 10px; border-radius: 99px;
                    opacity: 0; transition: opacity .15s ease; }
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding: 8px 2px 0; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5, 20, 19, .9); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 10px; }
.lightbox p { color: #e2e8f0; text-align: center; margin: 12px 0 0; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%;
                   width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- before/after compare slider ---------- */
.compare { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
           aspect-ratio: 16 / 10; user-select: none; touch-action: pan-y; background: #e7e5e4; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: #fff;
                   transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
                          width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--deep);
                          display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare input[type=range]:focus-visible + .handle::after { outline: 3px solid var(--amber); }

/* ---------- service-area directory ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.areas li { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: .9rem; }
.areas li::before { content: "●"; color: var(--brand); margin-right: 7px; font-size: .6rem; vertical-align: 2px; }

/* ---------- financing band ---------- */
.finance { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
           background: linear-gradient(110deg, var(--deep), var(--brand)); color: #ecfdf5; border-radius: var(--radius); padding: 30px 32px; }
.finance h3 { color: #fff; margin: 0 0 4px; font-size: 1.4rem; }
.finance p { margin: 0; color: #a7f3d0; }
.finance small { display: block; margin-top: 6px; color: #99f6e4; font-size: .74rem; }

/* ---------- closing CTA band ---------- */
.close-band { text-align: center; }
.close-band .section-lede { margin-left: auto; margin-right: auto; }
.close-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- sticky two-button bar (appears once the hero scrolls away) ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line);
              box-shadow: 0 -6px 20px rgba(11, 46, 43, .1); padding: 10px 16px; display: flex; gap: 10px;
              transform: translateY(110%); transition: transform .25s ease; }
.sticky-cta.on { transform: none; }
.sticky-cta .btn { flex: 1; min-height: 44px; padding: 10px 12px; }
@media (min-width: 761px) { .sticky-cta { left: auto; right: 20px; bottom: 20px; border-radius: 14px; border: 1px solid var(--line); width: 380px;
                                          transform: translateY(calc(100% + 40px)); } .sticky-cta.on { transform: none; } }
/* The starter's call bar and this one would stack; this arm uses this one. */
.has-sticky-cta .call-bar { display: none !important; }

/* ---------- modal (native dialog) ---------- */
dialog.gc-modal { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px));
                  max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog.gc-modal::backdrop { background: rgba(5, 20, 19, .62); }
.gc-modal .modal-body { padding: 28px; overflow-y: auto; }
.gc-modal .modal-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
                     border: 0; background: var(--bg-soft); font-size: 1.3rem; cursor: pointer; color: var(--deep); }
.gc-modal .modal-x:hover { background: var(--line); }

/* ---------- scroll reveal (only when scripting is on, and never for reduced motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- demo disclosure ---------- */
.demo-note { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem;
             text-align: center; padding: 10px 16px; }
.demo-note a { color: var(--muted); }

/* ---------- the shared form, restyled to the demo's palette ---------- */
.form-card { padding: 26px; }
.form-card .form-h { font-size: 1.3rem; margin: 0 0 4px; color: var(--deep); }
.lp-form button[type=submit], .lp-form .lp-step-go { width: 100%; min-height: 50px; font-size: 1.02rem; }
.lp-form .lp-step-go { padding: 14px 18px; font: inherit; font-weight: 700; color: var(--on-brand); background: var(--brand);
                       border: 0; border-radius: var(--btn-radius); cursor: pointer; margin-top: 10px; }
.success-panel { border-color: #99f6e4; background: #f0fdfa; }
.success-panel h2 { margin-top: 0; font-size: 1.2rem; }

/* ---------- placeholders instead of visible labels (set up in generic.js) ----------
   The label is hidden visually but kept for screen readers. Script-only: with JS
   off the labels stay visible. */
.gc-placeholders .gc-ph-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden;
                                clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.gc-placeholders input::placeholder, .gc-placeholders textarea::placeholder { color: #6b7681; opacity: 1; }
.gc-placeholders select:has(option[value=""]:checked) { color: #6b7681; }
.gc-placeholders select option { color: var(--ink); }
/* In the two-step form the step-two fields sit in a wrapper, not on the form's
   grid; without visible labels they would touch. Only when shown: a display
   rule here would otherwise override the [hidden] the form script relies on. */
.lp-form .lp-step--two:not([hidden]) { display: grid; gap: 12px; }
