:root {
  --bg: #ffffff;
  --surface: #f8f9fb;
  --text: #1a1f2e;
  --text-muted: #5c6578;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --border: #e2e8f0;
  --hero-overlay: rgba(15, 23, 42, 0.55);
  --radius: 12px;
  --font-heading: system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --section-pad: 64px;
  --container-max: 1080px;
  --btn-radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.site-header {
  --logo-size: 72px;
  --header-fg: var(--text);
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  color: var(--header-fg);
}
.site-header.is-static { position: relative; }
.site-header.has-custom-bg { backdrop-filter: none; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.brand-mark {
  --logo-max-w: min(calc(var(--logo-size) * 3.2), 72vw);
  height: var(--logo-size);
  width: var(--logo-size);
  max-width: var(--logo-max-w);
  flex-shrink: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
/* Empty mark (no image yet) — subtle tile so the slot is visible */
.brand-mark:not(:has(img)) {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.site-header.has-logo .brand-mark {
  width: auto;
  min-width: 0;
}
.brand-mark img {
  height: 100%;
  width: auto;
  max-width: var(--logo-max-w);
  object-fit: contain;
  display: block;
  border-radius: inherit;
}
.brand-name {
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.2;
  color: inherit;
}
.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Logo size tokens — 3xl ≈ 3× prior xl (96 → 288) */
.site-header[data-logo-size="sm"] { --logo-size: 40px; }
.site-header[data-logo-size="md"] { --logo-size: 56px; }
.site-header[data-logo-size="lg"] { --logo-size: 72px; }
.site-header[data-logo-size="xl"] { --logo-size: 96px; }
.site-header[data-logo-size="2xl"] { --logo-size: 192px; }
.site-header[data-logo-size="3xl"] { --logo-size: 288px; }

.site-header[data-logo-size="2xl"] .header-inner,
.site-header[data-logo-size="3xl"] .header-inner {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* Optional plate behind the logo (independent of mark/card/watermark style) */
.site-header[data-logo-bg="on"] .brand-mark {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 8px;
}
.site-header[data-logo-bg="off"] .brand-mark,
.site-header[data-logo-bg="off"] .brand-mark:not(:has(img)) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Logo presentation styles */
.site-header[data-logo-style="mark"] .brand-mark {
  opacity: 1;
  filter: none;
}
.site-header[data-logo-style="card"][data-logo-bg="on"] .brand-mark {
  /* card implies plate when background is on */
  background: var(--surface);
}
.site-header[data-logo-style="watermark"] .brand-mark {
  opacity: 0.72;
  filter: grayscale(0.15);
}
.site-header[data-logo-style="watermark"] .brand-mark img {
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Placement */
.site-header[data-logo-placement="center"] .header-inner {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.site-header[data-logo-placement="center"] .brand-lockup {
  justify-content: center;
  flex: 0 1 auto;
}
.site-header[data-logo-placement="center"] .header-actions,
.site-header[data-logo-placement="center"] .header-contact,
.site-header[data-logo-placement="center"] .header-nav {
  width: 100%;
  justify-content: center;
}
.site-header[data-logo-placement="stacked"] .brand-lockup {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.site-header[data-logo-placement="center"][data-logo-placement] .brand-lockup,
.site-header[data-logo-placement="stacked"].is-center-stack .brand-lockup {
  align-items: center;
  text-align: center;
}

.header-contact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.3;
}
.header-contact a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.header-contact a:hover { color: var(--accent); text-decoration: underline; }

.header-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.88;
}
.header-nav a:hover { color: var(--accent); opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}
.site-header[data-logo-placement="center"] .header-actions { margin-left: 0; }

.header-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}
.header-menu-btn span {
  display: block;
  height: 2px;
  background: var(--header-fg, var(--text));
  border-radius: 2px;
}
.header-drawer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem 0 1.25rem;
}
.header-drawer ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.header-drawer li { margin: 0.35rem 0; }
.header-drawer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}
.header-drawer-contact { font-size: 0.95rem; color: var(--text-muted); }
.header-drawer-contact a { color: var(--accent); }

/* Per-block theme overrides */
.section.has-block-theme,
.hero.has-block-theme {
  background: var(--block-bg, var(--surface));
  color: var(--block-text, var(--text));
}
.section.has-block-theme h2,
.section.has-block-theme h3,
.hero.has-block-theme h1 {
  color: inherit;
}
.section.has-block-theme .lead,
.section.has-block-theme .muted,
.hero.has-block-theme .lead {
  color: color-mix(in srgb, var(--block-text, var(--text)) 72%, transparent);
}
.section.has-block-accent {
  --accent: var(--block-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-lg { padding: 0.85rem 1.35rem; font-size: 1.05rem; }

.hero {
  min-height: var(--hero-min, 480px);
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: var(--section-pad) 0;
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.lead { color: var(--text-muted); font-size: 1.125rem; max-width: 42ch; }
.hero-visual {
  min-height: 280px;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--hero-overlay), var(--hero-overlay)),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  background-size: cover;
  background-position: center;
}

.section { padding: var(--section-pad) 0; }
.section-muted { background: var(--surface); }
.section h2 {
  font-family: var(--font-heading);
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.muted { color: var(--text-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.trust-list li {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}
.trust-list li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; margin: 0; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lead-form input,
.lead-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  font: inherit;
  background: var(--bg);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.section-lead { margin: -0.5rem 0 1.5rem; color: var(--text-muted); max-width: 40rem; }

.pricing-card .price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.faq-list { display: flex; flex-direction: column; gap: 0.65rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0.85rem 1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0.65rem 0 0; color: var(--text-muted); }

.testimonial-card p { margin: 0 0 0.75rem; font-size: 1.05rem; line-height: 1.45; }
.testimonial-card footer { color: var(--text-muted); font-size: 0.9rem; }

.web-part-accent {
  border-top: 3px solid var(--accent);
}

/* Custom content blocks — heading + copy with optional positioned image */
.custom-copy h2 { margin-top: 0; }
.custom-copy .lead { color: var(--text-muted); }
.custom-points { padding-left: 1.2rem; }
.custom-points li { margin: 0.4rem 0; }
.custom-media { margin: 0; }
.custom-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.custom-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: center;
}
.custom-split.media-first { grid-template-columns: 2fr 3fr; }
.custom-full .custom-media { margin-bottom: 1.5rem; }
.custom-full .custom-media img { max-height: 420px; object-fit: cover; }

@media (max-width: 800px) {
  .custom-split, .custom-split.media-first { grid-template-columns: 1fr; }
  .custom-split.media-first .custom-media { order: -1; }
}

/* Constrained motion — CSS-only entrances, no owner JS */
[data-motion] {
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-motion="fade-up"] { transform: translateY(18px); }
[data-motion].motion-in {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger="1"] .card,
[data-stagger="1"] .faq-item,
[data-stagger="1"] .trust-list li {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
[data-stagger="1"].motion-in .card,
[data-stagger="1"].motion-in .faq-item,
[data-stagger="1"].motion-in .trust-list li {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger="1"].motion-in .card:nth-child(2),
[data-stagger="1"].motion-in .faq-item:nth-child(2),
[data-stagger="1"].motion-in .trust-list li:nth-child(2) { transition-delay: 0.08s; }
[data-stagger="1"].motion-in .card:nth-child(3),
[data-stagger="1"].motion-in .faq-item:nth-child(3),
[data-stagger="1"].motion-in .trust-list li:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  [data-motion],
  [data-stagger="1"] .card,
  [data-stagger="1"] .faq-item,
  [data-stagger="1"] .trust-list li {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .header-nav { display: none !important; }
  .header-contact { display: none !important; }
  .header-menu-btn { display: inline-flex; }
  .header-cta { display: none; }
  .site-header[data-logo-size="lg"] { --logo-size: 56px; }
  .site-header[data-logo-size="xl"] { --logo-size: 80px; }
  .site-header[data-logo-size="2xl"] { --logo-size: 140px; }
  .site-header[data-logo-size="3xl"] { --logo-size: 180px; }
}

@media (max-width: 800px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 200px; }
}
