/* ==========================================================================
   Florida Coating Solutions — site stylesheet
   Header style: dark. Fonts: Montserrat (headings) + Source Sans 3 (body).

   COLOUR CONTRACT — read before changing a red.
   The brand red #ED3237 measures 4.11:1 against white. That FAILS WCAG AA for
   normal text (4.5:1) both as a text colour on white and as a button fill under
   a white label. Rule 30 requires zero axe violations at every severity, so:

     --accent       #ED3237  decorative fills, rules, large display only. NEVER
                             a text colour on white, never a button background.
     --accent-ink   #C21E23  the usable red — 5.93:1 on white. All red text,
                             all red buttons, all red links.

   Both reds are the same hue family, so the brand still reads as the logo.
   ========================================================================== */

:root {
  --primary: #111111;
  --primary-dark: #000000;
  --accent: #ED3237;
  --accent-ink: #C21E23;
  --accent-ink-dark: #9E1418;
  --accent-tint: #FDECEC;   /* icon-badge ground; --accent-ink on it is 5.25:1 */

  --ink: #14161a;
  --body: #3d434d;
  --muted: #626b78;
  --line: #e2e6ec;
  --surface: #f5f7fa;
  --surface-2: #eceff4;
  --white: #ffffff;

  --header-bg: #111111;
  --header-text: #ffffff;

  --font-head: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1180px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(17, 17, 17, .07);
  --shadow-lg: 0 12px 34px rgba(17, 17, 17, .13);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.05rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

a { color: var(--accent-ink); }
a:hover { color: var(--accent-ink-dark); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--white); color: var(--accent-ink);
  padding: 12px 18px; font-weight: 700;
}
.skip-link:focus { left: 0; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
}

/* ---------- buttons ------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: 14px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn + .btn { margin-left: 10px; }

.btn-accent { background: var(--accent-ink); color: var(--white); }
.btn-accent:hover { background: var(--accent-ink-dark); color: var(--white); }

.btn-dark { background: var(--primary); color: var(--white); }
.btn-dark:hover { background: var(--accent-ink); color: var(--white); }

.btn-outline { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }
.btn-outline:hover { background: var(--accent-ink); color: var(--white); }

/* On dark grounds the outline button must invert, or the label drops to ~1.5:1.
   Every dark container must be listed here — a dark ground missing from this list
   renders a dark-red label on a near-black hero and nothing warns you. */
.hero .btn-outline,
.page-hero .btn-outline,
.stats-bar .btn-outline,
.sidebar-card.dark .btn-outline,
.cta-banner .btn-outline,
.ftr .btn-outline { color: var(--white); border-color: var(--white); background: transparent; }
.hero .btn-outline:hover,
.page-hero .btn-outline:hover,
.stats-bar .btn-outline:hover,
.sidebar-card.dark .btn-outline:hover,
.cta-banner .btn-outline:hover,
.ftr .btn-outline:hover { background: var(--white); color: var(--primary); border-color: var(--white); }

/* ---------- trust bar ---------------------------------------------------- */

.trust-bar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .86rem; }
.trust-bar-inner { display: flex; gap: 26px; align-items: center; justify-content: space-between; min-height: 40px; }
.trust-item { color: #4a5261; }
.trust-call { font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.trust-call:hover { color: var(--accent-ink-dark); text-decoration: underline; }

/* ---------- header ------------------------------------------------------- */

header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky; top: 0; z-index: 100;
  overflow: visible;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }

.logo { display: flex; align-items: center; }
.logo img { height: 56px; width: auto; display: block; }

.nav-desktop { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-desktop > li { position: relative; }
.nav-desktop > li > a {
  display: block;
  color: var(--header-text);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .93rem;
  padding: 12px 13px;
  border-radius: 8px;
}
/* Rule 12: exclude the special buttons or the hover rule eats them. */
.nav-desktop > li > a:not(.nav-call):hover { background: rgba(255,255,255,.12); color: var(--white); }

.nav-call {
  background: var(--accent-ink);
  color: var(--white) !important;
  padding: 12px 20px !important;
  margin-left: 8px;
}
.nav-call:hover { background: var(--accent-ink-dark); color: var(--white) !important; }

.sub {
  position: absolute; top: 100%; left: 0; min-width: 264px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 6px 0 0; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a {
  display: block; padding: 10px 12px; border-radius: 7px;
  color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 600;
}
.sub a:hover { background: var(--surface); color: var(--accent-ink); }

.hamburger {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 46px; height: 46px; padding: 10px;
  color: currentColor;                 /* Rule 11 — auto-matches header text */
}
.hamburger span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }

/* ---------- hero --------------------------------------------------------- */

.hero { position: relative; color: var(--white); padding: 96px 0 104px; }
.hero h1 { color: var(--white); max-width: 17ch; }
.hero-lead { font-size: 1.16rem; max-width: 56ch; color: rgba(255,255,255,.92); }
.hero-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Rule 2: .page-hero carries NO background-image here — layout only. The image
   and its brand-tinted gradient are inline on each page. */
.page-hero { position: relative; color: var(--white); padding: 74px 0; overflow: hidden; }
.page-hero h1 { color: var(--white); margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.92); max-width: 62ch; margin: 0; }

/* ---------- breadcrumb --------------------------------------------------- */

.breadcrumb { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .88rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- layout blocks ------------------------------------------------ */

.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-h { text-align: center; }
.section-lead { text-align: center; max-width: 74ch; margin: 0 auto 40px; color: var(--muted); }

/* Rule 13: .content-wrap also carries .wrap — keep the side padding or mobile
   runs flush to both screen edges. */
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 46px;
  padding: 64px 22px;
}
.content-main > h2 { margin-top: 1.6em; }
.content-main > h2:first-child { margin-top: 0; }

.sidebar-cta { position: sticky; top: 96px; align-self: start; display: grid; gap: 18px; }

.sidebar-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.sidebar-card h3 { margin-bottom: .5em; }
.sidebar-card p { font-size: .95rem; }
.sidebar-card .btn { width: 100%; text-align: center; }
.sidebar-card.dark { background: var(--primary); border-color: var(--primary); color: rgba(255,255,255,.88); }
.sidebar-card.dark h3 { color: var(--white); }
.sidebar-card.dark .phone-big { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--white); text-decoration: none; margin-bottom: 14px; }
.sidebar-card.dark .phone-big:hover { color: var(--white); text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .45em; }

.svc-card { display: block; text-decoration: none; color: inherit; overflow: hidden; padding: 0; }
.svc-card img { width: 100%; height: 190px; object-fit: cover; display: block; }
.svc-card .svc-body { padding: 22px 24px 26px; }
.svc-card h3 { color: var(--ink); }
.svc-card:hover { box-shadow: var(--shadow-lg); }
.svc-card:hover h3 { color: var(--accent-ink); }
.svc-more { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--accent-ink); }

.feature-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.feature-list li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.feature-list li::before {
  /* Pure-CSS check: a rotated two-sided border. Not a glyph — an emoji-capable
     character here would render as colour-emoji on iOS and ignore --accent
     (Rule 22). Not an SVG data URI either, because that cannot read var(). */
  content: ""; position: absolute; left: 2px; top: .38em;
  width: 6px; height: 11px;
  border: solid var(--accent); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.stats-bar { background: var(--primary); color: var(--white); padding: 44px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; }
.stat-n { font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; color: var(--white); display: block; }
.stat-l { font-size: .92rem; color: rgba(255,255,255,.82); }

/* ---------- credibility band --------------------------------------------- */

.credibility { padding: 72px 0; background: var(--surface); }
.cred-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.cred-card { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 26px; }
.cred-card h3 { margin-bottom: .45em; }
.cred-card p { margin: 0; font-size: .97rem; }
.cred-cta { text-align: center; margin-top: 38px; }
.cred-cta p { max-width: 62ch; margin: 0 auto 18px; color: var(--muted); }

/* ---------- FAQ ---------------------------------------------------------- */

.faq { max-width: 860px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 1.03rem; color: var(--ink);
  padding: 20px 44px 20px 0; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--accent-ink); line-height: 1;
}
.faq-q[aria-expanded="true"]::after { content: "\2013"; }
.faq-q:hover { color: var(--accent-ink); }
.faq-a { padding: 0 0 20px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- CTA banner --------------------------------------------------- */

.cta-banner { background: var(--primary); color: var(--white); padding: 66px 0; text-align: center; }
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,.88); max-width: 60ch; margin: 0 auto 26px; }
.cta-banner .btn-accent { background: var(--white); color: var(--accent-ink); }
.cta-banner .btn-accent:hover { background: var(--surface-2); color: var(--accent-ink-dark); }

/* ---------- forms -------------------------------------------------------- */

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .92rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1px solid #c8cfd9; border-radius: 8px; background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-ink); outline: 3px solid rgba(194,30,35,.22); outline-offset: 0; }
.form-note { font-size: .85rem; color: var(--muted); }

/* Rule 8: honeypot is display:none, never an off-screen offset. An off-screen
   field is still focusable and still autofillable, which silently kills leads. */
.hp-field { display: none !important; }

/* ---------- gallery ------------------------------------------------------ */

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-grid img { width: 100%; height: 240px; object-fit: cover; display: block; }
.gallery-grid figcaption { padding: 12px 14px; font-size: .88rem; color: var(--muted); background: var(--white); }

/* ---------- icons -------------------------------------------------------- */

/* Base: icons sit beside text and inherit its colour. flex:none stops them
   being squashed when the label wraps. */
.icon { flex: none; vertical-align: -.18em; }

/* Round badge above a card heading. Sized in em so it tracks the card's font
   scale, and given its own line so it can never clip the card edge — a badge
   absolutely positioned into a corner is a known regression (Rule 32 notes). */
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-ink);
}
.cred-card .card-icon { width: 40px; height: 40px; margin-bottom: 12px; }

/* Icon + label rows (trust bar, footer contact). */
.icon-row { display: flex; align-items: flex-start; gap: 9px; }
.icon-row .icon { margin-top: .12em; color: var(--accent); }
.trust-item .icon { margin-right: 7px; opacity: .75; }
.svc-body h3 .icon { margin-right: 8px; color: var(--accent-ink); }

.ftr-contact-list { list-style: none; padding: 0; margin: 0; }
.ftr-contact-list li { margin-bottom: 11px; }
.ftr-contact-list .icon { color: rgba(255,255,255,.55); }

/* The footer CTA is the only button that is not full-width on mobile, so a
   4-word label wrapped inside a 154px box. Hold it on one line and let it size
   to its content. */
.ftr-col .btn { white-space: nowrap; }

/* ---------- footer ------------------------------------------------------- */

.ftr { background: var(--primary); color: rgba(255,255,255,.78); padding: 62px 0 0; }
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 38px; padding-bottom: 46px; }
.ftr-col { min-width: 0; }
.ftr-col .ftr-h + .ftr-list + .ftr-h { margin-top: 1.6em; }
.ftr-h { font-size: 1rem; color: var(--white); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1em; }
.ftr-contact li { margin-bottom: 12px; }
.ftr-logo { height: 62px; width: auto; margin-bottom: 16px; }
.ftr-blurb { font-size: .95rem; }
.ftr-list { list-style: none; margin: 0 0 18px; padding: 0; }
.ftr-list li { margin-bottom: 9px; font-size: .95rem; }
.ftr address { font-style: normal; }

/* Rule 12, the RoofMax case: :not(.btn) belongs on the BASE rule too, not just
   :hover. Without it `.ftr a` (0,2,0) outranks `.btn-accent` (0,1,0) and the
   footer CTA renders its label at ~1.6:1 in the resting state. */
.ftr a:not(.btn) { color: #d9dee6; text-decoration: none; }
.ftr a:not(.btn):hover { color: var(--white); text-decoration: underline; }

.ftr-social a { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }

.ftr-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 20px 0; }
.ftr-bottom-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }
.ftr-bottom p { margin: 0; }
.ftr-legal a { margin: 0 6px; }

/* ---------- sticky CTA (Rule 10 — exactly two elements) ------------------ */

.sticky-cta { position: fixed; z-index: 120; display: flex; }
.sticky-quote, .sticky-phone {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sticky-quote { background: var(--accent-ink); color: var(--white); }
.sticky-quote:hover { background: var(--accent-ink-dark); color: var(--white); }
.sticky-phone { background: var(--primary); color: var(--white); }
.sticky-phone:hover { background: #2a2a2a; color: var(--white); }

@media (min-width: 901px) {
  .sticky-cta {
    right: 22px; bottom: 22px; width: 320px;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  }
  .sticky-quote, .sticky-phone { flex: 1; padding: 14px 10px; }
}

@media (max-width: 900px) {
  .sticky-cta { left: 0; right: 0; bottom: 0; }
  .sticky-quote, .sticky-phone { flex: 1; padding: 16px 10px; }
  /* Rule 24: clear the bar AND the iOS home indicator, or the footer's last
     row sits underneath it. */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .sticky-cta { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 1024px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar-cta { position: static; }
  .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid-3, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The desktop nav needs ~1000px. Below that it was being crushed rather than
   collapsed: at 769-979px .nav-call rendered 76x100px with the phone number
   broken across THREE lines and every nav item wrapping to two. The hamburger
   used to engage only at <=768px, leaving the whole tablet range broken.
   Kept separate from the 768px layout block on purpose — the nav has to switch
   earlier than the grid/padding rules do.
   1120px is measured, not chosen: the row only fits on one line from 1125px up
   (at 1100px the items still wrap to two). Re-measure if a nav item is added or
   renamed — this number is a property of the label widths, not a round guess. */
@media (max-width: 1120px) {
  .hamburger { display: block; }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--primary);
    border-top: 1px solid rgba(255,255,255,.12);
    display: none;
  }
  .nav.open { display: block; }
  .nav-desktop { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 18px; }
  .nav-desktop > li > a { padding: 13px 10px; }
  /* Rule 25: reset the desktop transform in EVERY state or the panel renders
     shifted the first time it opens. */
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; margin: 0 0 6px;
    padding: 0 0 0 12px;
  }
  .sub a { color: rgba(255,255,255,.82); padding: 9px 10px; }
  .sub a:hover { background: rgba(255,255,255,.1); color: var(--white); }
  .nav-call { display: inline-block; margin: 10px 10px 0; }

}

/* Rule 11: the four trust items fit on one line from exactly 809px up (measured
   at 1px resolution; 808px wraps them to two). Hidden below that, with a few px
   of headroom. Its own breakpoint on purpose — unrelated to where the NAV stops
   fitting (1120px) or to the 768px layout switch. */
@media (max-width: 815px) {
  .trust-bar { display: none; }
}

@media (max-width: 768px) {
  .grid-2, .two-col { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 76px; }
  .content-wrap { padding: 46px 22px; }
  .section { padding: 54px 0; }
}

@media (max-width: 560px) {
  .grid-3, .gallery-grid, .stats-grid { grid-template-columns: 1fr; }
  /* Two footer columns leave 139px each at 360px — too narrow for the contact
     block, and narrow enough that the nowrap CTA label spilled past the
     viewport (scrollWidth 366 vs 360). One column below 560px. */
  .ftr-grid { grid-template-columns: 1fr; }
  .logo img { height: 48px; }
  .btn { display: block; text-align: center; }
  .btn + .btn { margin-left: 0; margin-top: 10px; }
  .hero-cta { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
