/* Sunologi — theme carried over from the previous site:
   primary #4C9543, secondary #1569B4, accent #F18225, text #59595B,
   DM Sans headings / Inter body, 5px radii, boxed sections. */

@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/dmsans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --green: #4C9543;
  --green-dark: #3F7C38;
  --blue: #1569B4;
  --blue-tint: #1569b436;
  --orange: #F18225;
  --orange-soft: #FFBC7D;
  --text: #59595B;
  --dark: #2C2C2C;
  --line: #EBEBEB;
  --line-strong: #BDBDBD;
  --tint: #F5F9F3;
  --radius: 5px;
  --container: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
}
h1, h2, h3, h4 { font-family: 'DM Sans', system-ui, sans-serif; color: var(--dark); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-bottom: .6em; }
h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: .4em; }
p { margin-bottom: 1em; }
ul, ol { margin: 0 0 1em 1.3em; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px;
}
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

/* Top bar */
.topbar { background: var(--green-dark); color: #fff; font-size: .82rem; }
.topbar a { color: #fff; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand img { width: 190px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a {
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem;
  color: var(--dark); text-decoration: none; padding: 10px 12px; border-radius: var(--radius); display: block;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green-dark); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.has-sub { position: relative; }
.has-sub .sub {
  display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 250px;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 26px rgba(0,0,0,.09); padding: 6px; z-index: 60;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.has-sub .sub li { width: 100%; }
.nav-toggle { display: none; }
.btn {
  display: inline-block; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem;
  border: 2px solid transparent; border-radius: var(--radius); padding: 11px 22px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-phone { background: var(--orange); color: #1A1A1A; border-color: var(--orange); white-space: nowrap; }
.btn-phone:hover { background: #fff; color: var(--dark); border-color: var(--orange); }
.btn-solid { background: var(--green-dark); color: #fff; border-color: var(--green-dark); font-size: 1.05rem; }
.btn-solid:hover { background: var(--orange); border-color: var(--orange); color: #1A1A1A; }
.btn-outline { border-color: var(--green-dark); color: var(--green-dark); background: #fff; }
.btn-outline:hover { background: var(--orange); border-color: var(--orange); color: #1A1A1A; }

/* Breadcrumbs */
.crumbs { font-size: .85rem; padding: 12px 0 0; }
.crumbs .sep { color: var(--line-strong); padding: 0 4px; }
.crumbs span[aria-current] { color: var(--dark); }
.phero .crumbs { padding: 0 0 14px; }
.phero .crumbs .container { padding: 0; }
.phero .crumbs a, .phero .crumbs span { color: #E8E8E8; }
.phero .crumbs span[aria-current] { color: #fff; }

/* Legacy text hero */
.hero { padding: 48px 0 44px; }
.hero .container { max-width: 950px; }
.kicker { font-family: 'DM Sans', sans-serif; color: var(--green-dark); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .88rem; margin-bottom: 10px; }
.hero p.lede { font-size: 1.12rem; max-width: 46em; margin-top: 16px; }
.hero-ctas { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

/* Photo hero */
.phero { position: relative; display: flex; align-items: flex-end; overflow: hidden; background: var(--dark); }
.phero-tall { min-height: clamp(480px, 66vh, 640px); }
.phero-banner { min-height: clamp(320px, 42vh, 430px); }
.phero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroZoom 12s ease-out forwards; }
.phero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,20,.25) 0%, rgba(20,24,20,.38) 45%, rgba(16,20,16,.78) 100%); }
.phero-inner { position: relative; z-index: 1; width: 100%; padding-top: 48px; padding-bottom: 44px; animation: riseIn .8s cubic-bezier(.22,.9,.36,1) both; }
.phero h1 { color: #fff; max-width: 17em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.phero .lede { color: #F1F3F0; font-size: 1.1rem; max-width: 44em; margin-top: 14px; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.kicker-light { color: var(--orange-soft); }
.btn-ghost { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost:hover { background: #fff; color: var(--dark); }

@keyframes heroZoom { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.9,.36,1); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .phero-img, .phero-inner { animation: none; }
  html { scroll-behavior: auto; }
}

/* Sections */
.section { padding: 48px 0; }
.section.tint { background: var(--tint); }
.section-head { max-width: 780px; margin-bottom: 26px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .35s cubic-bezier(.22,.9,.36,1), box-shadow .35s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(30,40,30,.12); }
.card h3 a { color: var(--dark); text-decoration: none; }
.card h3 a:hover { color: var(--green-dark); }
.card .more { margin-top: auto; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .95rem; }
.card-icon { width: 42px; height: 42px; color: var(--green-dark); }

/* Photo cards */
.pcard { padding: 0; overflow: hidden; }
.pcard .pcard-img { position: relative; aspect-ratio: 16/9; overflow: hidden; display: block; }
.pcard .pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,.9,.36,1); }
.pcard:hover .pcard-img img { transform: scale(1.06); }
.pcard .pcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.chip {
  display: inline-block; align-self: flex-start; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .82rem;
  background: var(--tint); color: var(--green-dark); border: 1px solid #DCE9D8; border-radius: 30px; padding: 3px 12px;
}
.pcard-img .chip { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.94); z-index: 1; }

/* Fact strip */
.facts { background: linear-gradient(120deg, #253125 0%, var(--dark) 60%); color: #fff; padding: 34px 0; }
.facts .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.facts .n { font-family: 'DM Sans', sans-serif; font-size: 2rem; font-weight: 700; color: var(--orange-soft); display: block; font-variant-numeric: tabular-nums; }
.facts .l { font-size: .88rem; color: #D8D8D8; }

/* Prose pages */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.2em; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1.2em; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--tint); font-family: 'DM Sans', sans-serif; color: var(--dark); }

/* FAQ blocks (open style, service pages) */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h3 { margin-bottom: 8px; }
.faq-item :last-child { margin-bottom: 0; }

/* Collapsible FAQ accordions (FAQ page) */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.12rem; color: var(--dark);
  padding: 16px 20px; min-height: 44px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ''; flex: none; width: 12px; height: 12px;
  border-right: 3px solid var(--green-dark); border-bottom: 3px solid var(--green-dark);
  transform: rotate(45deg); transition: transform .3s ease; margin-top: -6px;
}
.acc[open] summary::after { transform: rotate(225deg); margin-top: 6px; }
.acc summary:hover { color: var(--green-dark); background: var(--tint); }
.acc .acc-a { padding: 2px 20px 18px; }
.acc .acc-a :last-child { margin-bottom: 0; }

/* Blog */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { text-decoration: none; color: inherit; }
.post-meta { font-size: .85rem; color: #7a7a7c; }
.post-body img { border-radius: var(--radius); margin: 1em 0; }
.post-hero { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius); margin-bottom: 22px; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

/* County cards */
.card.county { border-top: 4px solid var(--green); scroll-margin-top: 130px; }
.county h3 { margin-bottom: 4px; }
.county:target { animation: countyFlash 1.8s ease; border-top-color: var(--orange); }
@keyframes countyFlash { 0% { background: #FFF3E5; transform: scale(1.03); } 100% { background: #fff; transform: none; } }

/* Interactive Florida county map (real boundaries, generated by scripts/gen-map.js).
   Styled sunny: blue water, sandy land, sun, pulsing HQ, counties pop in on reveal. */
.flmap-wrap { max-width: 860px; margin: 0 auto; position: relative; }
.flmap { width: 100%; height: auto; display: block; border-radius: 10px; }
.flmap-context path { fill: #F2E9D4; stroke: #fff; stroke-width: 1; }
.flmap .flc {
  fill: var(--green); stroke: #fff; stroke-width: 1.2; cursor: pointer;
  transition: fill .25s ease, transform .25s ease; transform-origin: center; transform-box: fill-box;
}
.flmap-wrap.rv .flc { opacity: 0; }
.flmap-wrap.rv.in .flc { animation: countyPop .55s cubic-bezier(.22,.9,.36,1) both; animation-delay: calc(var(--i, 0) * 70ms + .15s); }
@keyframes countyPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.flmap a:hover .flc, .flmap a:focus .flc { fill: var(--orange); transform: scale(1.04); }
.flmap a:focus { outline: none; }
.flmap a:focus .flc { stroke: var(--dark); stroke-width: 2; }
.flmap-labels text {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; fill: #fff;
  text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.3); stroke-width: 2.5px;
}
.flmap-wrap.rv .flmap-labels, .flmap-wrap.rv .flmap-hq { opacity: 0; transition: opacity .5s ease 1.2s; }
.flmap-wrap.rv.in .flmap-labels, .flmap-wrap.rv.in .flmap-hq { opacity: 1; }
.flmap-sun circle { fill: #FFC94D; }
.flmap-rays line { stroke: #FFC94D; stroke-width: 5; stroke-linecap: round; }
.flmap-sun { animation: sunSpin 40s linear infinite; }
@keyframes sunSpin { to { transform: translate(682px, 70px) rotate(45deg); } }
.flmap-hq-dot { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.flmap-hq-pulse { fill: none; stroke: var(--orange); stroke-width: 2; animation: hqPulse 2.2s ease-out infinite; }
@keyframes hqPulse { 0% { r: 6; opacity: .9; } 70% { r: 20; opacity: 0; } 100% { r: 20; opacity: 0; } }
.flmap-hq text { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; fill: var(--dark); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.cmap-note { font-size: .85rem; color: #7a7a7c; margin-top: 12px; text-align: center; }

/* Card floating over the Gulf (empty left side of the map) */
.flmap-card {
  position: absolute; left: 3%; bottom: 6%; width: min(315px, 44%);
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 14px 34px rgba(20,40,55,.18);
}
.flmap-card h2 { font-size: 1.25rem; margin-bottom: 6px; }
.flmap-card p { font-size: .95rem; margin-bottom: 12px; }
.flmap-card .btn { display: block; text-align: center; margin-bottom: 8px; }
@media (max-width: 760px) {
  .flmap-card { position: static; width: 100%; margin-top: 14px; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flmap-wrap.rv .flc { opacity: 1; animation: none; }
  .flmap-wrap.rv .flmap-labels, .flmap-wrap.rv .flmap-hq { opacity: 1; transition: none; }
  .flmap-sun, .flmap-hq-pulse { animation: none; }
}

/* Lead form */
.lead-form-wrap {
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; max-width: 860px;
}
.tint .lead-form-wrap { background: #fff; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.ff { display: flex; flex-direction: column; gap: 5px; }
.ff-full { grid-column: 1 / -1; }
.ff label { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .92rem; color: var(--dark); }
.ff input, .ff select, .ff textarea {
  font: inherit; font-size: 1rem; color: var(--dark);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; background: #fff; width: 100%;
}
.hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; font-weight: 600; margin: 0; min-height: 1.4em; }
.form-status.ok { color: var(--green-dark); }
.form-status.err { color: #B3261E; }

/* Financing partner logo wall */
.fin-wall { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 18px 0 22px; }
.fin-logo {
  display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; min-height: 72px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.fin-logo:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30,40,30,.1); }
.fin-logo img { height: 44px; width: auto; max-width: 190px; object-fit: contain; }
.fin-chip { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--dark); }

/* CTA band */
.cta-band { background: linear-gradient(115deg, var(--green-dark) 0%, #2e6559 55%, var(--blue) 130%); color: #fff; padding: 44px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #EAF3E8; max-width: 44em; }
.cta-band .btn-phone { margin-top: 6px; }

/* Sticky header shadow after scroll */
.site-header.scrolled { box-shadow: 0 6px 22px rgba(20,25,20,.1); }

/* Sticky call/estimate dock — follows the visitor down the page */
.cta-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; gap: 10px; justify-content: center;
  padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 26px rgba(20,25,20,.12);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.22,.9,.36,1);
}
.cta-dock.show { transform: none; }
.cta-dock .btn { flex: 1; max-width: 300px; text-align: center; white-space: nowrap; }
body.dock-open .site-footer .footer-bottom { padding-bottom: 82px; }
@media (prefers-reduced-motion: reduce) { .cta-dock { transition: none; } }

/* Footer */
.site-footer { background: var(--dark); color: #CFCFCF; font-size: .95rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange-soft); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding-top: 42px; padding-bottom: 32px; }
.footer-logo { background: #fff; border-radius: var(--radius); padding: 12px 16px; display: inline-block; margin-bottom: 16px; }
.footer-h { font-size: 1.05rem; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.license { color: #fff; }
.footer-bottom { border-top: 1px solid #444; padding: 16px 0; font-size: .85rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* 404 */
.err-page { padding: 80px 0; max-width: 760px; }

@media (max-width: 980px) {
  .grid-3, .post-list { grid-template-columns: repeat(2, 1fr); }
  .facts .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .phero-tall { min-height: 440px; }
}
/* Tablet + phone: collapse the nav to a menu button so it never crowds the call button */
@media (max-width: 1023px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .btn-phone { order: 2; margin-left: auto; padding: 9px 14px; font-size: .92rem; }
  .main-nav { order: 3; width: 100%; margin: 0; }
  .nav-toggle {
    display: block; width: 100%; font: inherit; font-weight: 600; font-family: 'DM Sans', sans-serif;
    background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; color: var(--dark); min-height: 44px;
  }
  .main-nav ul { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
  .main-nav.open ul { display: flex; }
  .main-nav a { padding: 12px; min-height: 44px; }
  .has-sub .sub { display: block; position: static; border: 0; box-shadow: none; padding-left: 16px; min-width: 0; }
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  .topbar-inner { justify-content: center; text-align: center; }
  .brand img { width: 150px; }
  .grid-3, .grid-2, .post-list { grid-template-columns: 1fr; }
  .lead-form { grid-template-columns: 1fr; }
  .lead-form-wrap { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 36px 0; }
  .phero-tall { min-height: 400px; }
  .phero-banner { min-height: 280px; }
  .phero h1 { font-size: 1.85rem; }
  .facts .n { font-size: 1.55rem; }
  .hero-ctas .btn { width: 100%; }
}
