/* HaTchi-MaXchi — Sitespec / marketing page sections (hero, features, pricing, FAQ, testimonials, stats, CTA, steps, logos, comparison, cards, trust-bar, team, backgrounds). Ported from Dazzle site-sections.css (HM-sitespec 1B, 2026-07-09) — theme-agnostic structure; aesthetic families reflavor via tokens. Authored with dz- prefix (build keeps it for Dazzle, strips for standalone). */

/* =============================================================================
   Hero Section
   ============================================================================= */

.dz-section-hero {
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
  padding: var(--dz-spacing-hero-y, 6rem) 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dz-section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, oklch(1 0 0 / 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero with Media Image — flex on the section to create two columns */
.dz-hero-with-media {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.dz-hero-with-media .dz-section-content {
  flex: 1;
  text-align: left;
}

.dz-hero-with-media .dz-cta-group {
  justify-content: flex-start;
}

.dz-hero-media {
  flex: 1;
  max-width: 50%;
}

.dz-hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--dz-radius-lg, 1rem);
  box-shadow: var(--dz-shadow-xl, 0 20px 50px -12px oklch(0 0 0 / 0.3));
}

@media (max-width: 768px) {
  .dz-hero-with-media {
    flex-direction: column;
    text-align: center;
  }

  .dz-hero-with-media .dz-section-content {
    text-align: center;
  }

  .dz-hero-with-media .dz-cta-group {
    justify-content: center;
  }

  .dz-hero-media {
    max-width: 100%;
    order: -1;
  }
}

/* =============================================================================
   Features Section
   ============================================================================= */

.dz-section-features {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--p, oklch(0.99 0 0));
}

/* =============================================================================
   Pricing Section
   ============================================================================= */

.dz-section-pricing {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

/* =============================================================================
   FAQ Section
   ============================================================================= */

.dz-section-faq {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

/* =============================================================================
   Testimonials Section
   ============================================================================= */

.dz-section-testimonials {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

/* =============================================================================
   Stats Section
   ============================================================================= */

.dz-section-stats {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
}

/* =============================================================================
   CTA Section
   ============================================================================= */

.dz-section-cta {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
  text-align: center;
}

.dz-section-cta h2 {
  font-size: var(--dz-font-size-cta-headline, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}

.dz-section-cta .dz-button[data-dz-variant="primary"] {
  background: var(--dz-cta-fill);
  color: var(--dz-cta-text);
  border: none;
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--dz-radius-button, 0.5rem);
  box-shadow: var(--dz-cta-shadow);
  transition: transform var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms);
}

.dz-section-cta .dz-button[data-dz-variant="primary"]:hover {
  background: var(--dz-cta-fill-hover);
  box-shadow: var(--dz-cta-shadow-hover);
  transform: translateY(-1px);
}

/* =============================================================================
   Steps Section
   ============================================================================= */

.dz-section-steps {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

/* =============================================================================
   Logo Cloud Section
   ============================================================================= */

.dz-section-logo-cloud {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
  text-align: center;
}

/* =============================================================================
   Comparison Section
   ============================================================================= */

.dz-section-comparison {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-comparison-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dz-comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.dz-comparison-table th,
.dz-comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dz-border-subtle);
}

.dz-comparison-table thead th {
  font-weight: 600;
  font-size: var(--text-base);
  padding-bottom: 1rem;
}

.dz-comparison-feature {
  text-align: left;
  font-weight: 500;
}

.dz-comparison-highlighted {
  background: var(--dz-feature-icon-bg, oklch(0.92 0.03 260));
}

/* =============================================================================
   Value Highlight Section
   ============================================================================= */

.dz-section-value-highlight {
  padding: var(--dz-spacing-hero-y, 6rem) 1.5rem;
  text-align: center;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

.dz-value-headline {
  font-size: var(--dz-font-size-hero-headline, 3.5rem);
  font-weight: var(--dz-font-weight-hero-headline, 800);
  line-height: var(--dz-line-height-hero-headline, 1.1);
  letter-spacing: var(--dz-letter-spacing-hero-headline, -0.02em);
}

.dz-value-body {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--dz-text-body);
}

/* =============================================================================
   Split Content Section
   ============================================================================= */

.dz-section-split-content {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.dz-split--reversed .dz-split-grid {
  direction: rtl;
}

.dz-split--reversed .dz-split-grid > * {
  direction: ltr;
}

.dz-split-text h2 {
  text-align: left;
}

.dz-split-text p {
  color: var(--dz-text-body);
}

.dz-cta-group--left {
  justify-content: flex-start;
}

.dz-split-media img {
  width: 100%;
  height: auto;
  border-radius: var(--dz-radius-lg, 1rem);
  box-shadow: var(--dz-shadow-card, 0 1px 3px oklch(0 0 0 / 0.1));
}

@media (max-width: 768px) {
  .dz-split-grid {
    grid-template-columns: 1fr;
  }

  .dz-split--reversed .dz-split-grid {
    direction: ltr;
  }

  .dz-split-text h2 {
    text-align: center;
  }

  .dz-cta-group--left {
    justify-content: center;
  }
}

/* =============================================================================
   Card Grid Section
   ============================================================================= */

.dz-section-card-grid {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

.dz-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.dz-card-grid > * {
  flex: 0 1 320px;   /* balanced: ~3-up, incomplete rows centre (#1565) */
}

.dz-card-grid:has(> :nth-child(4):last-child) > * {
  flex-basis: calc(50% - 0.75rem);
  max-width: 26rem;
}

.dz-card-item {
  background: var(--dz-surface-card);
  padding: var(--dz-spacing-card-padding, 1.5rem);
  border: var(--dz-card-border);
  border-radius: var(--dz-radius-card, 0.75rem);
  box-shadow: var(--dz-shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--dz-transition-fast, 150ms),
              box-shadow var(--dz-transition-fast, 150ms),
              border-color var(--dz-transition-fast, 150ms);
}

.dz-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--dz-card-shadow-hover);
  border-color: color-mix(in oklab, var(--dz-hero-bg-from) 35%, transparent);
}

.dz-card-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0.5rem 0;
}

.dz-card-item p {
  color: var(--dz-text-body);
  margin: 0 0 1rem;
  line-height: var(--dz-line-height-body, 1.6);
  flex: 1;
}

.dz-card-icon {
  width: 3rem;
  height: 3rem;
  background: var(--dz-feature-icon-bg, oklch(0.92 0.03 260));
  border-radius: 0.625rem;
  box-shadow: var(--dz-card-icon-ring);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--dz-hero-bg-from);
}

.dz-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* =============================================================================
   Trust Bar Section
   ============================================================================= */

.dz-section-trust-bar {
  padding: 2rem 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
  border-top: 1px solid var(--dz-border-subtle);
  border-bottom: 1px solid var(--dz-border-subtle);
}

.dz-trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.dz-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--dz-text-body);
}

.dz-trust-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--dz-hero-bg-from);
}

/* =============================================================================
   Team Section
   ============================================================================= */

.dz-section-team {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
}

.dz-team-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.dz-team-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dz-team-initials {
  font-size: var(--text-xl);
  font-weight: 600;
  color: white;
  letter-spacing: 0.05em;
}

.dz-team-name {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.dz-team-role {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--dz-hero-bg-from);
  margin: 0 0 0.75rem;
}

.dz-team-bio {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--dz-text-body);
  margin: 0 0 1rem;
}

.dz-team-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.dz-team-link {
  color: var(--dz-text-body);
  transition: color var(--dz-transition-fast, 150ms);
}

.dz-team-link:hover {
  color: var(--dz-hero-bg-from);
}

.dz-team-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* =============================================================================
   Dark Mode Adjustments
   ============================================================================= */

/* Site Header — dark mode handled by token overrides in design-system.css */

/* Theme Toggle Button */
.dz-theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--dz-text-body);
  transition: color var(--dz-transition-fast, 150ms), background var(--dz-transition-fast, 150ms);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-theme-toggle:hover {
  color: var(--dz-text-foreground);
  background: var(--dz-border-subtle);
}

/* Theme toggle dark mode handled by token overrides in design-system.css */

.dz-theme-toggle__icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Show sun icon by default (for dark mode), hide moon */
.dz-theme-toggle__sun { display: none; }
.dz-theme-toggle__moon { display: block; }

/* In dark mode, show sun, hide moon */
[data-theme="dark"] .dz-theme-toggle__sun { display: block; }
[data-theme="dark"] .dz-theme-toggle__moon { display: none; }

/* =============================================================================
   Section Background Utilities
   Applied via sitespec background: alt | primary | dark
   ============================================================================= */

.dz-bg-alt {
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

.dz-bg-primary {
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
}

.dz-bg-primary .dz-section-header h2,
.dz-bg-primary .dz-section-header p {
  color: white;
}

.dz-bg-dark {
  background: oklch(0.15 0.01 260);
  color: oklch(0.9 0 0);
}

.dz-bg-dark .dz-section-header h2,
.dz-bg-dark .dz-section-header p {
  color: oklch(0.9 0 0);
}

[data-theme="dark"] .dz-bg-alt {
  background: oklch(0.12 0.01 260);
}

/* Section backgrounds */
[data-theme="dark"] .dz-section-features,
[data-theme="dark"] .dz-section-faq,
[data-theme="dark"] .dz-section-steps {
  background: oklch(0.12 0.01 260);
}

[data-theme="dark"] .dz-section-pricing,
[data-theme="dark"] .dz-section-testimonials,
[data-theme="dark"] .dz-section-logo-cloud,
[data-theme="dark"] .dz-section-cta,
[data-theme="dark"] .dz-section-value-highlight,
[data-theme="dark"] .dz-section-card-grid,
[data-theme="dark"] .dz-section-trust-bar {
  background: oklch(0.08 0.01 260);
}

[data-theme="dark"] .dz-section-comparison,
[data-theme="dark"] .dz-section-split-content {
  background: oklch(0.12 0.01 260);
}

/* Cards and items */
[data-theme="dark"] .dz-feature-item,
[data-theme="dark"] .dz-testimonial-item,
[data-theme="dark"] .dz-card-item,
[data-theme="dark"] .dz-pricing-tier:not(.dz-pricing-highlighted) {
  background: oklch(0.18 0.01 260);
}

/* Comparison table */
[data-theme="dark"] .dz-comparison-table th,
[data-theme="dark"] .dz-comparison-table td {
  border-color: oklch(1 0 0 / 0.1);
}

[data-theme="dark"] .dz-comparison-highlighted {
  background: oklch(0.18 0.03 260);
}

/* Headings */
[data-theme="dark"] .dz-section h2,
[data-theme="dark"] .dz-feature-item h3,
[data-theme="dark"] .dz-step-item h3,
[data-theme="dark"] .dz-faq-item summary,
[data-theme="dark"] .dz-pricing-tier h3 {
  color: oklch(0.95 0 0);
}

/* Body text */
[data-theme="dark"] .dz-feature-item p,
[data-theme="dark"] .dz-step-item p,
[data-theme="dark"] .dz-testimonial-item blockquote,
[data-theme="dark"] .dz-faq-item p {
  color: oklch(0.65 0 0);
}

/* FAQ borders */
[data-theme="dark"] .dz-faq-item {
  border-color: oklch(1 0 0 / 0.1);
}

/* Prose/markdown content */
[data-theme="dark"] .dz-prose {
  color: oklch(0.85 0 0);
}

[data-theme="dark"] .dz-prose h1,
[data-theme="dark"] .dz-prose h2,
[data-theme="dark"] .dz-prose h3 {
  color: oklch(0.95 0 0);
}

/* Logo cloud */
[data-theme="dark"] .dz-logo-item img {
  filter: grayscale(100%) invert(1);
  opacity: 0.5;
}

[data-theme="dark"] .dz-logo-item:hover img {
  filter: grayscale(0%) invert(1);
  opacity: 0.8;
}

/* Buttons - works with both DaisyUI btn and legacy dz-btn classes */
[data-theme="dark"] .dz-btn-secondary,
[data-theme="dark"] .btn-outline {
  color: oklch(0.85 0 0);
  border-color: oklch(0.85 0 0);
}

[data-theme="dark"] .dz-btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover {
  background: oklch(1 0 0 / 0.1);
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

@media (max-width: 768px) {
  .dz-section h1 {
    font-size: var(--text-3xl);
  }

  .dz-section h2 {
    font-size: var(--text-2xl);
  }

  .dz-section-markdown h2,
  .dz-section .prose h2 {
    font-size: var(--text-lg);
  }

  .dz-section-markdown h1,
  .dz-section .prose h1 {
    font-size: var(--text-2xl);
  }

  .dz-section-cta h2 {
    font-size: var(--text-2xl);
  }

  .dz-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .dz-pricing-highlighted {
    transform: none;
  }

  .dz-stat-value {
    font-size: var(--text-2xl);
  }
}

/* =============================================================================
   Site Layout - Header, Footer, Nav
   ============================================================================= */

.dz-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Default body background — overridden per page via {% block body_class %}.
 * Was inline `bg-[hsl(var(--card))]` Tailwind on <body> in site_base.html;
 * v0.62 moves to a semantic class rule. */
.dz-site-bg {
  background: var(--dz-surface-card, var(--colour-surface));
}

.dz-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dz-header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dz-border-subtle);
}

.dz-site-nav {
  /* dazzle#1591: never force the page wider than the viewport */
  max-width: min(72rem, 100%);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.dz-site-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--dz-logo-color);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.dz-nav-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  /* dazzle#1591: wrap before horizontal overflow (no app-level overflow-x hack) */
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

/* Narrow viewports: stack logo + items so multi-link marketing nav fits. */
@media (max-width: 767px) {
  .dz-site-nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .dz-nav-items {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    gap: 0.4rem 0.75rem;
    justify-content: flex-start;
  }
}

.dz-nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--dz-text-body);
  text-decoration: none;
  transition: color var(--dz-transition-fast, 150ms);
}

.dz-nav-link:hover {
  color: var(--dz-text-foreground);
}

.dz-nav-cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  padding: 0.5rem 1rem;
  border-radius: var(--dz-radius-button, 0.375rem);
  text-decoration: none;
  transition: background var(--dz-transition-fast, 150ms);
}

.dz-nav-cta:hover {
  background: var(--dz-hero-bg-to, oklch(0.45 0.18 270));
}

.dz-site-footer {
  margin-top: auto;
  background: var(--dz-footer-bg);
  color: var(--dz-footer-text);
  padding: 3rem 1.5rem 1.5rem;
}

.dz-footer-content {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.dz-footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dz-footer-heading);
  margin: 0 0 1rem;
}

.dz-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dz-footer-col li {
  margin-bottom: 0.5rem;
}

.dz-footer-col a {
  font-size: var(--text-sm);
  color: var(--dz-footer-link);
  text-decoration: none;
  transition: color var(--dz-transition-fast, 150ms);
}

.dz-footer-col a:hover {
  color: var(--dz-footer-heading);
}

.dz-footer-bottom {
  max-width: 72rem;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dz-footer-border);
  text-align: center;
}

.dz-footer-bottom p {
  font-size: var(--text-xs);
  margin: 0;
}

/* =============================================================================
   Button Styles for Site Pages

   NOTE: Most button styling is now handled by DaisyUI btn classes (btn, btn-primary, etc.)
   These are kept for backwards compatibility and site-specific overrides.
   ============================================================================= */

/* Hero section CTA buttons need special styling to stand out on the gradient.
   Buttons render as `.dz-button[data-dz-variant]` (HM button component); these
   hero-context rules win on specificity to make the primary pop and the
   secondary a legible ghost. */
.dz-section-hero .dz-button[data-dz-variant="primary"] {
  background: var(--dz-cta-fill);
  color: var(--dz-cta-text);
  border: none;
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--dz-radius-button, 0.5rem);
  box-shadow: var(--dz-cta-shadow);
  transition: transform var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms),
              background var(--dz-transition-fast, 150ms);
}

.dz-section-hero .dz-button[data-dz-variant="primary"]:hover {
  background: var(--dz-cta-fill-hover);
  box-shadow: var(--dz-cta-shadow-hover);
  transform: translateY(-1px);
}

.dz-section-hero .dz-button[data-dz-variant="outline"],
.dz-section-hero .dz-button[data-dz-variant="secondary"] {
  background: transparent;
  color: white;
  border: 1.5px solid var(--dz-hero-border, oklch(1 0 0 / 0.5));
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--dz-radius-button, 0.5rem);
  transition: background var(--dz-transition-fast, 150ms), border-color var(--dz-transition-fast, 150ms);
}

.dz-section-hero .dz-button[data-dz-variant="outline"]:hover,
.dz-section-hero .dz-button[data-dz-variant="secondary"]:hover {
  background: var(--dz-hero-overlay);
  border-color: var(--dz-hero-border-hover);
  color: white;
}

/* =============================================================================
   Site Page Sections (JS-rendered)

   These rules target the HTML structure generated by get_site_js().
   They use design-system tokens so themes propagate correctly.
   ============================================================================= */

.dz-section {
  width: 100%;
}

.dz-section-content {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section header (renderSectionHeader helper) --- */
.dz-section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-media {
  text-align: center;
  margin: 0 auto 2rem;
  max-width: 48rem;
}

.dz-section-media img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* --- Generic section typography --- */
.dz-section h1 {
  font-size: var(--dz-font-size-hero-headline, 3.5rem);
  font-weight: var(--dz-font-weight-hero-headline, 800);
  line-height: var(--dz-line-height-hero-headline, 1.1);
  letter-spacing: var(--dz-letter-spacing-hero-headline, -0.02em);
  margin: 0 0 1.5rem;
}

.dz-section h2 {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  line-height: var(--dz-line-height-section-headline, 1.2);
  letter-spacing: var(--dz-letter-spacing-section-headline, -0.01em);
  margin: 0 0 2rem;
  text-align: center;
}

.dz-section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0.5rem 0;
}

.dz-section p {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
}

/* --- Article body / markdown typography ---
   .dz-section h1/h2/h3/p above target marketing *section headlines*
   (centred, large). Markdown bodies and any .prose content inside a
   section are article copy and must opt out of the headline treatment
   — otherwise blog-post H2s render centred and oversized (issue #921). */
.dz-section-markdown h1,
.dz-section-markdown h2,
.dz-section-markdown h3,
.dz-section-markdown h4,
.dz-section-markdown p,
.dz-section .prose h1,
.dz-section .prose h2,
.dz-section .prose h3,
.dz-section .prose h4,
.dz-section .prose p {
  text-align: start;
  letter-spacing: normal;
}

.dz-section-markdown h1,
.dz-section .prose h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}

.dz-section-markdown h2,
.dz-section .prose h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

.dz-section-markdown h3,
.dz-section .prose h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
}

.dz-section-markdown h4,
.dz-section .prose h4 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  margin: 1.25rem 0 0.5rem;
}

.dz-section-markdown p,
.dz-section .prose p {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: 1.7;
  margin: 0 0 1em;
}

/* --- 404 page --- */
.dz-404-section {
  text-align: center;
  padding: var(--dz-spacing-hero-y, 6rem) 1.5rem;
}

.dz-404-headline {
  font-size: var(--dz-font-size-hero-headline, 3.5rem);
  font-weight: var(--dz-font-weight-hero-headline, 800);
  line-height: var(--dz-line-height-hero-headline, 1.1);
  margin-bottom: 1rem;
}

.dz-404-cta {
  margin-top: 2rem;
}

/* --- Pricing tier description --- */
.dz-pricing-description {
  color: var(--dz-text-muted);
  margin: 0 0 1.5rem;
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
}

/* --- Markdown page section --- */
.dz-section-markdown {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-section-markdown .prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--dz-border-subtle), transparent);
  margin: 3rem auto;
  max-width: 200px;
}

.dz-subhead {
  font-size: var(--text-lg);
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 2rem;
}

.dz-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Balanced feature/testimonial grid — flex-wrap + center so any card count reads
   intentional: max ~3 per row (cards don't grow), and incomplete trailing rows
   CENTER instead of left-orphaning (#1565 — a 5th card no longer hangs alone). */
.dz-features-grid,
.dz-testimonials-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.dz-features-grid > *,
.dz-testimonials-grid > * {
  flex: 0 1 320px;   /* fixed basis, no grow → wraps at ~3-up, orphans centre */
}

/* Exactly 4 → a balanced 2×2 rather than a lone centred card. */
.dz-features-grid:has(> :nth-child(4):last-child) > *,
.dz-testimonials-grid:has(> :nth-child(4):last-child) > * {
  flex-basis: calc(50% - 0.75rem);
  max-width: 26rem;
}

.dz-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.dz-feature-item,
.dz-testimonial-item {
  background: var(--dz-surface-card);
  padding: var(--dz-spacing-card-padding, 1.5rem);
  border: var(--dz-card-border);
  border-radius: var(--dz-radius-card, 0.75rem);
  box-shadow: var(--dz-shadow-card);
  transition: transform var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms),
              border-color var(--dz-transition-fast, 150ms);
}

.dz-feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--dz-card-shadow-hover);
  border-color: color-mix(in oklab, var(--dz-hero-bg-from) 35%, transparent);
}

.dz-feature-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0.5rem 0;
}

.dz-feature-item p {
  color: var(--dz-text-body);
  margin: 0;
  line-height: var(--dz-line-height-body, 1.6);
}

.dz-feature-icon {
  width: 3rem;
  height: 3rem;
  background: var(--dz-feature-icon-bg, oklch(0.92 0.03 260));
  border-radius: 0.625rem;
  box-shadow: var(--dz-card-icon-ring);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--dz-hero-bg-from);
}

.dz-feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.dz-faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.dz-faq-item {
  border-bottom: 1px solid var(--dz-border-default);
  padding: 1rem 0;
}

.dz-faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.dz-faq-item summary::-webkit-details-marker {
  display: none;
}

.dz-faq-item p {
  margin: 0.75rem 0 0;
  color: var(--dz-text-body);
  line-height: var(--dz-line-height-body, 1.6);
}

/* #1113 — replaces DaisyUI's `stats stats-vertical lg:stats-horizontal
 * shadow` grid emitted by `site_section_builder._build_stats_section`.
 * Vertical stack on narrow viewports, horizontal row from --breakpoint-lg
 * upward. Tokens-only, no hardcoded values. */
.dz-stats-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--colour-surface);
  color: var(--colour-text);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

@media (min-width: 64rem) {
  .dz-stats-grid {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    gap: var(--space-lg);
  }
}

.dz-stat-item {
  padding: var(--space-md);
}

.dz-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--colour-text);
  display: block;
  font-variant-numeric: tabular-nums;
}

.dz-stat-label {
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
}

/* List wrapper for the marketing steps section. Mobile stacks
 * vertically; desktop equal-width columns. Distinct from
 * the framework's `.dz-steps` rule (in components/fragments.css)
 * which is used by the in-app step indicator.
 * dazzle#1590: connector must not be a flex:1 child that steals column width. */
.dz-section-steps-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

@media (min-width: 1024px) {
  .dz-section-steps-list {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

/* Decorative connector — out of flex flow so step columns stay equal. */
.dz-step-connector {
  display: none;
}

/* Mobile: vertical steps — number beside text in a row */
.dz-step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
}

/* Do not give is-not-last different flex growth than siblings (crush risk). */
.dz-step-item.is-not-last {
  flex: initial;
}

.dz-step-number {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--dz-hero-bg-from);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
  flex-shrink: 0;
}

.dz-step-content {
  min-width: 0;
  width: 100%;
}

.dz-step-content h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.dz-step-content p {
  color: var(--dz-text-body);
  margin: 0;
  line-height: var(--dz-line-height-body, 1.6);
  font-size: var(--text-sm);
}

/* Desktop: equal-width columns; connector absolutely positioned between steps. */
@media (min-width: 1024px) {
  .dz-step-item,
  .dz-step-item.is-not-last {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    position: relative;
  }

  .dz-step-item.is-not-last .dz-step-connector {
    display: block;
    position: absolute;
    /* Center of the number circle → into the gap toward the next column */
    top: 1.5rem;
    left: calc(50% + 1.75rem);
    width: calc(50% + 0.75rem);
    height: 1px;
    margin: 0;
    flex: none;
    background: var(--dz-border-default, var(--colour-border));
    pointer-events: none;
  }

  .dz-step-number {
    width: 3rem;
    height: 3rem;
    font-size: var(--text-lg);
  }

  .dz-step-content {
    text-align: center;
  }

  .dz-step-content h3 {
    font-size: var(--text-lg);
    margin: 0 0 0.5rem;
  }

  .dz-step-content p {
    font-size: var(--text-sm);
  }
}

.dz-logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  align-items: center;
}

.dz-logo-item img {
  height: 2rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all var(--duration-fast, 150ms);
}

.dz-logo-item:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

.dz-pricing-tier {
  background: var(--dz-surface-card);
  padding: 2rem;
  border-radius: var(--dz-radius-card, 0.75rem);
  box-shadow: var(--dz-shadow-card, 0 1px 3px oklch(0 0 0 / 0.1));
  display: flex;
  flex-direction: column;
  transition: transform var(--dz-transition-fast, 150ms);
}

.dz-pricing-tier:hover:not(.dz-pricing-highlighted) {
  transform: translateY(-4px);
}

.dz-pricing-tier h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-pricing-price {
  margin: 0 0 1.5rem;
}

.dz-price {
  font-size: var(--text-3xl);
  font-weight: 700;
}

.dz-period {
  font-size: var(--text-sm);
  color: var(--dz-text-muted);
}

.dz-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.dz-pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dz-border-subtle);
}

.dz-pricing-highlighted {
  background: var(--dz-pricing-highlight-bg, var(--dz-hero-bg-from));
  color: white;
  transform: scale(1.05);
  box-shadow: var(--dz-shadow-lg);
}

.dz-pricing-highlighted .dz-period,
.dz-pricing-highlighted li {
  color: var(--dz-hero-text-dimmed);
  border-color: var(--dz-hero-border-dim);
}

.dz-testimonial-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--dz-shadow-lg, 0 10px 15px -3px oklch(0 0 0 / 0.1));
}

.dz-testimonial-item blockquote {
  font-style: italic;
  color: var(--dz-text-emphasis);
  margin: 0 0 1rem;
  line-height: var(--dz-line-height-body, 1.6);
}

.dz-testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dz-testimonial-author strong {
  display: block;
  font-size: var(--text-sm);
}

.dz-testimonial-author span {
  display: block;
  font-size: var(--text-xs);
  color: var(--dz-text-muted);
}

.dz-prose {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.dz-prose h1, .dz-prose h2, .dz-prose h3 {
  text-align: left;
}

/* --- Legal page styling (terms, privacy) --- */
.dz-page-legal .dz-section-markdown .prose {
  max-width: 45rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dz-page-legal .dz-section-markdown .prose h1,
.dz-page-legal .dz-section-markdown .prose h2,
.dz-page-legal .dz-section-markdown .prose h3 {
  text-align: left;
}

.dz-page-legal .dz-section-markdown .prose p {
  line-height: 1.7;
}

.dz-page-legal .dz-section-markdown .prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  font-size: var(--text-lg);
  font-weight: 600;
}

.dz-page-legal .dz-section-markdown .prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: var(--text-base);
  font-weight: 600;
}

/* --- Task surface container (human task workflow pages) --- */
.dz-task-surface-container {
  max-width: 75rem;
  margin: 0 auto;
  padding: var(--dz-spacing-card-padding, 1.5rem);
}

.dz-loading {
  text-align: center;
  padding: 4rem;
  color: var(--dz-text-muted);
}

.dz-error {
  text-align: center;
  padding: 2rem;
  color: var(--dz-error-text);
}

/* ============================================================= */
/* Consent banner (v0.61.0 Phase 2 — Analytics, Consent & Privacy) */
/* ============================================================= */

.dz-consent-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  padding: 1.25rem 1rem;
  background: var(--dz-bg-card, var(--colour-surface));
  border-top: 1px solid var(--dz-border, var(--colour-border));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.dz-consent-panel {
  max-width: 64rem;
  margin: 0 auto;
  color: var(--dz-text-primary, var(--colour-text));
  font-size: var(--text-sm);
  line-height: 1.5;
}

.dz-consent-title {
  margin: 0 0 0.5rem 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.dz-consent-description {
  margin: 0 0 1rem 0;
  color: var(--dz-text-muted, var(--colour-text-muted));
  font-size: var(--text-sm);
}

.dz-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.dz-consent-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.375rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.dz-consent-btn:focus-visible {
  outline: 2px solid var(--dz-focus-ring, var(--colour-brand));
  outline-offset: 2px;
}

.dz-consent-btn-primary {
  background: var(--dz-primary, var(--colour-brand));
  color: var(--dz-primary-foreground, var(--colour-brand-contrast));
}

.dz-consent-btn-primary:hover {
  filter: brightness(1.05);
}

.dz-consent-btn-secondary {
  border-color: var(--dz-border, var(--colour-border));
  background: var(--dz-bg-card, var(--colour-surface));
}

.dz-consent-btn-secondary:hover {
  background: var(--dz-bg-hover, var(--colour-surface-muted));
}

.dz-consent-btn-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.5rem 0;
  color: var(--dz-text-link, var(--colour-brand));
}

.dz-consent-btn-link:hover {
  text-decoration-thickness: 2px;
}

.dz-consent-customize {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dz-border, var(--colour-border));
}

.dz-consent-category {
  border: 0;
  padding: 0.5rem 0;
  margin: 0;
}

.dz-consent-category + .dz-consent-category {
  border-top: 1px solid var(--dz-border, var(--colour-border));
}

.dz-consent-category label {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
}

.dz-consent-category input[type="checkbox"]:disabled + .dz-consent-category-label {
  color: var(--dz-text-muted, var(--colour-text-muted));
  cursor: not-allowed;
}

.dz-consent-category-hint {
  margin: 0.25rem 0 0 1.5rem;
  color: var(--dz-text-muted, var(--colour-text-muted));
  font-size: var(--text-xs);
}

.dz-consent-links {
  margin: 0.75rem 0 0 0;
  font-size: var(--text-xs);
}

.dz-consent-links a {
  color: var(--dz-text-link, var(--colour-brand));
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .dz-consent-banner {
    padding: 1rem 0.75rem;
  }
  .dz-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dz-consent-btn {
    width: 100%;
  }
  .dz-consent-btn-link {
    width: auto;
    align-self: center;
  }
}

/* =============================================================================
   #1113 — Per-stat wrapper + native toast. The `.dz-stats-grid` /
   `.dz-stat-value` / `.dz-stat-label` rules above (modernised in the
   same release) cover the section-level layout; `.dz-stat` here is the
   per-item flex column the section-builder emits. `.dz-stat-title` is
   the per-item label kept distinct from `.dz-stat-label` (the latter is
   used by the legacy `dz-stat-item` shape in templated marketing pages).
   Tokens-only — no literal hsl/hex.
   ============================================================================= */

.dz-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  flex: 1 1 auto;
  min-width: 0;
}

.dz-stat-title {
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
}

/* Toast unit + stack — owned by HYPERPART: toast (components/toast.css).
 * Do not re-declare .dz-toast* here; dual-lock lives in toast.css. */
