/* Living Site — Block Assembly Styles */
/* Sits alongside the existing wb- design system */

/* ── The stage — visible only when blocks have been assembled ── */
.ls-stage {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(134,173,18,0.08), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(19,164,195,0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f4f7fc 100%);
  padding: 4em 0 5em;
  border-top: 1px solid #e5e7eb;
}
/* Visibility controlled by the `hidden` attribute on <section id="ls-stage">,
   set/cleared by assembler.js. No CSS-only :has() rule — it competed with
   the attribute and was unreliable on Safari. */

.ls-stage-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ls-stage-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.ls-stage-shape.s1 { width: 320px; height: 320px; top: -80px; left: -80px;
  background: radial-gradient(circle, #86ad12 0%, transparent 70%); }
.ls-stage-shape.s2 { width: 280px; height: 280px; bottom: -60px; right: -60px;
  background: radial-gradient(circle, #13a4c3 0%, transparent 70%); }
.ls-stage-shape.s3 { width: 220px; height: 220px; top: 40%; right: 35%;
  background: radial-gradient(circle, #ea7a1e 0%, transparent 70%); opacity: 0.22; }

.ls-stage-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5em;
}
.ls-stage-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5em;
}
.ls-stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 1em 0.4em 0.85em;
  border-radius: 999px;
  background: rgba(134, 173, 18, 0.1);
  border: 1px solid rgba(134, 173, 18, 0.3);
  color: #5a7a09;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.ls-stage-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #86ad12;
  box-shadow: 0 0 0 0 rgba(134,173,18,0.7);
  animation: ls-stage-pulse 2s ease-in-out infinite;
}
@keyframes ls-stage-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(134,173,18,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(134,173,18,0); }
}
.ls-stage-title {
  font-family: var(--wb-font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.6em;
  color: var(--wb-dark);
}
.ls-stage-title-emph {
  background: linear-gradient(90deg, #86ad12, #13a4c3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ls-stage-lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

/* Assembled content area */
.ls-assembled {
  max-width: 980px;
  margin: 0 auto;
}
.ls-assembled:empty {
  display: none;
}

.ls-assembled-intro {
  text-align: center;
  padding: 2em 0 0;
  color: #6b7280;
  font-size: 0.9rem;
  border-top: 2px solid var(--wb-primary, #007acc);
  display: none;  /* superseded by ls-stage-header */
}
.ls-assembled-intro strong {
  color: var(--wb-primary, #007acc);
}

/* Block base styles — card treatment on the stage */
.ls-block {
  background: #ffffff;
  border-radius: 14px;
  padding: 2.4em 2.4em;
  margin-bottom: 1.4em;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #eef2f7;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: ls-block-in 0.5s ease forwards;
}
.ls-block::before {
  content: '';
  position: absolute;
  top: 0; left: 1.6em; right: 1.6em;
  height: 3px;
  background: var(--wb-primary, #007acc);
  border-radius: 0 0 3px 3px;
}
.ls-block--services::before { background: linear-gradient(90deg, #86ad12, #b6d44a); }
.ls-block--proof::before    { background: linear-gradient(90deg, #1a2c4a, #475569); }
.ls-block--concerns::before { background: linear-gradient(90deg, #ea7a1e, #f59e0b); }
.ls-block--actions::before  { background: linear-gradient(90deg, #13a4c3, #4ECDC4); }
.ls-block--context::before  { background: linear-gradient(90deg, #86ad12, #13a4c3); }
.ls-block:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .ls-block { padding: 1.8em 1.4em; }
}

@keyframes ls-block-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Override scroll-triggered animations inside dynamically-injected blocks
   — wow.js has already scanned the page by the time these arrive, so the
   default hidden state would otherwise stick. */
.ls-block .wb-slide-up,
.ls-block .wb-fade-in,
.ls-block .wb-zoom-in,
.ls-block .wow,
.ls-block [data-wow-delay] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation-name: none !important;
}

/* Block category accent colours */
.ls-block--services h2 { color: var(--wb-primary, #007acc); }
.ls-block--proof h2 { color: var(--wb-dark, #0f172a); }
.ls-block--concerns h2 { color: var(--wb-accent, #38bdf8); }
.ls-block--actions h2 { color: var(--wb-secondary, #4ECDC4); }

.ls-block h2 {
  font-family: var(--wb-font-heading, 'Inter', sans-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 3px solid currentColor;
  display: inline-block;
}

.ls-block h3 {
  font-family: var(--wb-font-heading, 'Inter', sans-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin: 1.2em 0 0.5em;
}

.ls-block p { margin-bottom: 1em; line-height: 1.7; }
.ls-block strong { font-weight: 600; }
/* Inline links — but don't touch buttons or links inside dark CTAs */
.ls-block a:not(.wb-btn):not(.cta-action a):not(.wb-dark a) {
  color: var(--wb-primary, #007acc);
}
.ls-block a:not(.wb-btn):hover { color: var(--wb-primary-hover, #005fa3); }
/* Buttons must keep their own colour rules; restore them defensively */
.ls-block .wb-btn-primary,
.ls-block .wb-btn-secondary,
.ls-block .wb-btn-white { color: var(--wb-white) !important; }
.ls-block .wb-btn-primary:hover,
.ls-block .wb-btn-secondary:hover { color: var(--wb-white) !important; }
.ls-block .wb-btn-outline { color: var(--wb-primary) !important; }
.ls-block .wb-btn-outline:hover { color: var(--wb-white) !important; }
/* Links inside dark CTA bands stay light */
.ls-block .wb-dark a:not(.wb-btn) { color: #b8c0d0; }
.ls-block .wb-dark a:not(.wb-btn):hover { color: #fff; }

/* Tame nested cards — they end up inside .ls-block which is already a card */
.ls-block .wb-card {
  box-shadow: none;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ls-block .wb-card:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* CTA block (dark inset) — reduce its over-padding inside the card */
.ls-block .cta-block {
  padding: 3em 1.8em;
  border-radius: 10px;
  margin: 0.5em 0;
}
.ls-block .cta-block .cta-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.4em; }
.ls-block .cta-block .cta-text { font-size: 1rem; }

/* Grids — narrower container, drop to 2-col earlier */
.ls-block .wb-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 1.4em; }
.ls-block .wb-grid-2 { gap: 1.4em; }
@media (max-width: 720px) {
  .ls-block .wb-grid-2,
  .ls-block .wb-grid-3,
  .ls-block .wb-grid-4 { grid-template-columns: 1fr; }
}

/* Feature rows — keep them readable in the narrower card */
.ls-block .wb-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6em;
  align-items: center;
  margin: 1em 0;
}
.ls-block .wb-feature-row img { width: 100%; height: auto; border-radius: 8px; display: block; }
@media (max-width: 720px) {
  .ls-block .wb-feature-row { grid-template-columns: 1fr; }
}

/* Checklist */
.ls-checklist {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}
.ls-checklist li {
  padding-left: 1.8em;
  position: relative;
  margin-bottom: 0.6em;
  line-height: 1.6;
}
.ls-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--wb-primary, #007acc);
  font-weight: 700;
}

/* Testimonial */
.ls-testimonial {
  background: var(--wb-light, #f8f9fc);
  border-left: 4px solid var(--wb-secondary, #4ECDC4);
  padding: 1.5em;
  margin: 1em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  line-height: 1.7;
}

/* Form styling */
.ls-form {
  background: var(--wb-light, #f8f9fc);
  padding: 2em;
  border-radius: 16px;
  margin: 1em 0;
}
.ls-form-group { margin-bottom: 1.2em; }
.ls-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.3em;
}
.ls-form-group input,
.ls-form-group select,
.ls-form-group textarea {
  width: 100%;
  padding: 0.7em 1em;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: var(--wb-font-body, 'Inter', sans-serif);
  font-size: 1rem;
}
.ls-form-group textarea { min-height: 100px; resize: vertical; }
.ls-form-group input:focus,
.ls-form-group select:focus,
.ls-form-group textarea:focus {
  outline: none;
  border-color: var(--wb-primary, #007acc);
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.15);
}
.ls-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
}
.ls-btn {
  display: inline-block;
  padding: 0.8em 2em;
  background: var(--wb-primary, #007acc);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--wb-font-body, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.ls-btn:hover { background: var(--wb-primary-hover, #005fa3); color: #fff; }

@media (max-width: 640px) {
  .ls-form-row { grid-template-columns: 1fr; }
}

/* Chat-overlay clearance + scroll positioning */
.ls-stage { scroll-margin-top: 80px; }
.ls-block { scroll-margin-top: 80px; }
/* Reserve space at the bottom of the stage so the last block isn't covered
   by the chat panel/FAB. Adjusts per breakpoint. */
.ls-stage { padding-bottom: 5em; }
@media (max-width: 1024px) {
  /* iPad portrait + smaller — chat panel takes more of the viewport */
  .ls-stage { padding-bottom: 6em; }
}
@media (max-width: 600px) {
  /* Phone — chat FAB clearance */
  .ls-stage { padding-bottom: 7em; }
}
