/* ---- Detail Page Hero ---- */

.detail-hero {
  padding-top: calc(var(--navbar-height) + var(--space-4xl));
  padding-bottom: var(--space-3xl);
  position: relative;
  overflow: hidden;
}

/* Per-feature hero gradients — match each feature's highlight section on the home page */
.detail-hero.accent-purple {
  background: linear-gradient(160deg, var(--color-bg-subtle) 0%, var(--purple-100) 100%);
}

.detail-hero.accent-green {
  background: linear-gradient(160deg, var(--color-bg-subtle) 0%, var(--green-100) 100%);
}

.detail-hero.accent-blue {
  background: linear-gradient(160deg, var(--color-bg-subtle) 0%, var(--blue-200) 100%);
}

.detail-hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.detail-back:hover {
  color: var(--color-text);
}

.detail-back i {
  transition: transform var(--duration-normal) var(--ease-spring);
}

.detail-back:hover i {
  transform: translateX(-4px);
}

.detail-hero h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-bold);
  max-width: 700px;
  margin-bottom: var(--space-lg);
}

.detail-hero h1 strong {
  font-weight: var(--font-weight-bold);
}

.detail-hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: var(--leading-normal);
}

/* Centered, image-focused hero (editor page) */
.detail-hero-centered .detail-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-hero-centered .detail-back {
  align-self: flex-start;
}

.detail-hero-centered h1 {
  max-width: 18ch;
  margin-bottom: var(--space-xl);
}

.detail-hero-feature {
  width: 100%;
  max-width: 880px;
}

.detail-hero-feature img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-hero-lead {
  margin-top: var(--space-2xl);
}

/* Hero variant with an illustration to the right of the intro text */
.detail-hero-split {
  display: flex;
  align-items: center;
  gap: var(--space-4xl);
}

.detail-hero-split .detail-hero-text {
  flex: 1 1 0;
  min-width: 0;
}

.detail-hero-visual {
  flex: 0 0 36%;
  max-width: 360px;
  display: flex;
  justify-content: center;
}

.detail-hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* Safemail: the mailbox is planted at the bottom edge of the hero (it's pushed
   down through the hero's bottom padding, which overflow:hidden then clips). */
.detail-hero-visual-mailbox img {
  margin-bottom: calc(-1 * var(--space-3xl));
}

@media (min-width: 769px) {
  .detail-hero-visual-mailbox {
    align-self: stretch;
    align-items: flex-end;
  }
}

@media (max-width: 768px) {
  .detail-hero-split {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2xl);
  }
  .detail-hero-visual {
    flex: none;
    max-width: 240px;
    align-self: center;
  }
}

/* ---- Detail Content Sections ---- */

.detail-section {
  padding: var(--space-4xl) 0;
}

.detail-section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.detail-row.reversed .detail-content {
  order: 2;
}

.detail-row.reversed .detail-media {
  order: 1;
}

.detail-content h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
}

.detail-content p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.detail-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-media img {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl);
}

/* Full-width text section */
.detail-prose {
  max-width: 720px;
  margin: 0 auto;
}

.detail-prose h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
}

.detail-prose p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-lg);
}

.detail-prose p:last-child {
  margin-bottom: 0;
}

/* ---- Integration Grid (Automation page) ---- */

.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.integration-card {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  text-align: center;
}

.integration-card i {
  font-size: var(--text-2xl);
  color: var(--orange-500);
  margin-bottom: var(--space-md);
}

.integration-card h3 {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-xs);
}

.integration-card p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .detail-row {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .detail-row.reversed .detail-content,
  .detail-row.reversed .detail-media {
    order: unset;
  }
  .detail-media {
    order: -1;
  }
  .integration-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .integration-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2xl);
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.pricing-name {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.pricing-tagline {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-xl);
}

.pricing-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.pricing-benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  line-height: var(--leading-normal);
}

.pricing-benefits i {
  color: var(--green-500);
  margin-top: 0.25em;
  flex-shrink: 0;
}

.pricing-cta {
  width: 100%;
  justify-content: center;
}

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

/* ---- Will'm demo video + steps row ---- */
.willm-demo-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2xl);
}

.willm-demo {
  flex: 1 1 58%;
  min-width: 0;
  display: flex;
  align-items: center;
}

.willm-demo-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(56, 35, 138, 0.15);
  background: #000;
}

/* Steps stacked to the right, the group matching the video's height */
.willm-steps {
  flex: 1 1 42%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
}

/* Each card hugs its own content (no forced equal heights, so nothing clips) */
.willm-steps .step-card {
  padding: var(--space-md);
}

/* Icon on the left, with the eyebrow + title stacked to its right */
.step-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.willm-steps .step-card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  font-size: var(--text-lg);
}

.step-card-headings {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.willm-steps .step-eyebrow {
  margin-bottom: 0;
}

.willm-steps .step-card-headings h3 {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .willm-demo-row {
    flex-direction: column;
    gap: var(--space-xl);
  }
  .willm-demo,
  .willm-steps {
    flex: none;
  }
  .willm-steps .step-card {
    flex: none;
  }
}

/* ---- Will'm "Slim samengesteld" graphic: the AI drawing on live sources ---- */
.willm-graphic {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.wg-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.wg-lines line {
  stroke: var(--purple-300);
  stroke-width: 0.5;
  stroke-dasharray: 1.6 1.6;
  opacity: 0.7;
}

.wg-source {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(56, 35, 138, 0.1);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.wg-source i {
  color: var(--purple-500);
  font-size: 1.05em;
}

.wg-plug {
  top: 4%;
  left: 0;
}

.wg-blocks {
  bottom: 6%;
  left: 3%;
}

.wg-json {
  top: 13%;
  right: 0;
  width: 58%;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.wg-json-bar {
  padding: 7px 12px;
  border-bottom: 1px solid var(--color-border);
}

.wg-json-name {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.wg-json-code {
  margin: 0;
  padding: 10px 12px 26px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--color-text);
  white-space: pre;
}

/* Fade the JSON to white at the bottom */
.wg-json::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

.wg-ai {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 16px 40px rgba(56, 35, 138, 0.22);
}

.wg-ai-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--purple-100);
  border-top-color: var(--purple-500);
  animation: wgSpin 0.9s linear infinite;
}

.wg-ai-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--purple-500);
}

@keyframes wgSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wg-ai-spinner {
    animation: none;
  }
}
