/* ==========================================================================
   Central FL Systems — shared stylesheet
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:          #faf9f7;
  --surface:     #ffffff;
  --surface-2:   #f3f1ec;
  --text:        #14181e;
  --muted:       #5c6674;
  --border:      #e5e1d9;
  --accent:      #b4530a;
  --accent-ink:  #ffffff;
  --accent-soft: rgba(180, 83, 10, 0.09);
  --ok:          #2f7a4f;

  --shadow-sm: 0 1px 2px rgba(20, 24, 30, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(20, 24, 30, 0.15);
  --shadow-lg: 0 24px 60px -24px rgba(20, 24, 30, 0.24);

  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1140px;
  --gutter:    clamp(20px, 5vw, 48px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:          #0e1116;
  --surface:     #151a21;
  --surface-2:   #1a2029;
  --text:        #e9ebee;
  --muted:       #9aa4b2;
  --border:      #262e39;
  --accent:      #e8913c;
  --accent-ink:  #17120b;
  --accent-soft: rgba(232, 145, 60, 0.13);
  --ok:          #5cc08b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.75);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.18;
  margin: 0 0 0.5em;
  text-transform: none;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.012em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
img, svg { max-width: 100%; }
img { display: block; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lede {
  font-size: clamp(1.03rem, 1.5vw, 1.19rem);
  color: var(--muted);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.85rem;
  text-transform: none;
}

.muted { color: var(--muted); }
.center { text-align: center; margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand .mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
}
.brand .mark svg { width: 19px; height: 19px; }

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.005em;
  margin-top: 1px;
}

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 9px;
  transition: color 0.16s ease, background 0.16s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav-cta { margin-left: 6px; }

.theme-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-1px); }

.btn-sm { padding: 9px 16px; font-size: 0.89rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(54px, 9vw, 100px) 0 clamp(46px, 7vw, 78px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -45% 45% 45% -22%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(32px, 5vw, 62px);
  align-items: center;
}

.hero h1 { margin-bottom: 0.45em; }
.hero .lede { margin-bottom: 1.85em; }

.hero-points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.94rem;
  color: var(--muted);
}
.hero-points svg { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--accent); }

/* ---------- Media frame (photo-ready) ---------- */
.media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, var(--accent-soft), transparent 60%), var(--surface-2);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
/* Injected by main.js only when the photo actually loads; otherwise the
   SVG artwork below shows through. */
.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.media-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 7vw, 86px) 0; }
.section-tight { padding: clamp(38px, 5vw, 60px) 0; }
/* Page intro sitting directly above its own content — no double gap. */
.section-head-only { padding: clamp(40px, 5.5vw, 66px) 0 0; }
.section-head-only .section-head { margin-bottom: 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head.center { text-align: center; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(256px, 1fr));
}
/* Two-up variant — keeps a four-card set as a clean 2x2 instead of 3 + orphan. */
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 0.92rem; color: var(--muted); margin: 0; }

.card-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 17px;
}
.card-icon svg { width: 21px; height: 21px; }

/* Steps */
.steps { counter-reset: step; }
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.93rem;
  margin-bottom: 15px;
}

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: start;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
}
.price-card.is-featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-md);
}

.price-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 17px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.price-card-head h3 { margin: 0; font-size: 1.2rem; }
.price-card-head p { font-size: 0.87rem; color: var(--muted); margin: 5px 0 0; }

.tag {
  flex: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.price-list { margin: 0; }

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.price-row:last-of-type { border-bottom: 0; }

.price-row dt { font-size: 0.95rem; font-weight: 500; }
.price-row dd {
  margin: 0; flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}
.price-row .unit { font-weight: 500; font-size: 0.8rem; color: var(--muted); }

.price-note {
  margin-top: 4px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}

.contact-methods { display: grid; gap: 13px; margin: 0 0 26px; padding: 0; list-style: none; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.contact-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow-md);
}
.contact-item .card-icon { margin: 0; }
.contact-item .label {
  display: block;
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--muted);
}
.contact-item .value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
}

.hours-card { padding: 22px 24px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 0.92rem;
}
.hours-row + .hours-row { border-top: 1px dashed var(--border); }
.hours-row span:last-child { color: var(--muted); }

/* Form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-md);
}

.field { margin-bottom: 17px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 38px;
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6674' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa4b2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-status { margin-top: 14px; font-size: 0.89rem; color: var(--muted); min-height: 1.4em; }
.form-status.is-ok { color: var(--ok); font-weight: 500; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 4.5vw, 50px);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -60% -20% 30% 45%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { color: var(--muted); margin: 0; max-width: 46ch; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 42px 0 32px;
  margin-top: clamp(48px, 7vw, 80px);
  font-size: 0.89rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-col { display: grid; gap: 7px; align-content: start; }
.footer-col strong {
  font-family: var(--font-display);
  font-size: 0.83rem;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
}

/* ---------- Small layout utilities ----------------------------------------
   These exist so no element needs a style="" attribute. Inline styles would
   force 'unsafe-inline' into style-src and gut the Content-Security-Policy. */
.btn-row-spaced   { margin-top: 1.8rem; }
.btn-row-center   { justify-content: center; margin-top: 2rem; }
.btn-block        { width: 100%; }
.measure-narrow   { max-width: 54ch; }
.footer-about     { max-width: 34ch; }
.is-static        { cursor: default; }

.page-center {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.form-card h2 { font-size: 1.35rem; }
.form-intro {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

/* ---------- a11y ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-grid .media { order: -1; aspect-ratio: 16 / 10; }
}

@media (max-width: 720px) {
  .nav-cta { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { min-height: 64px; gap: 6px; }
  .nav-links a { padding: 7px 7px; font-size: 0.83rem; }
  .brand { font-size: 0.86rem; gap: 8px; }
  .brand .mark { width: 30px; height: 30px; }
  .brand .mark svg { width: 17px; height: 17px; }
  .brand-sub { display: none; }
  .theme-toggle { width: 34px; height: 34px; }
  .field-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .price-card-head { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}
