/* ============================================================================
   14. Landing blocks (port of the old landing page builder's sections)
   ----------------------------------------------------------------------------
   The marketing blocks — hero (landing form), logos, showcase, featureGrid,
   industries, pillars, compare, chart, legal, contact, form. All data-driven
   from the app definition; the CSS below is the only styling they share.
   ========================================================================== */

/* Shared section scaffolding: an optional eyebrow micro-label, a heading,
   and a muted description. */
.section-heading {
  margin-bottom: 2rem;
}

.section-heading .eyebrow,
p.eyebrow {
  display: inline-block;
  margin: 0 0 0.55rem;
  color: var(--ta-accent);
  font-family: var(--ta-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0 0 0.5rem;
}

.section-heading .section-desc {
  max-width: 62ch;
  margin: 0;
  color: var(--ta-muted);
}

/* Buttons shared by the landing hero/contact CTAs (plain <a> links). */
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--ta-r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease,
    color 0.12s ease, box-shadow 0.12s ease;
}

a.btn.primary {
  background: var(--ta-accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 14px -4px color-mix(in srgb, var(--ta-accent) 55%, transparent);
}

a.btn.primary:hover {
  background: var(--ta-accent-hover);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 18px -4px color-mix(in srgb, var(--ta-accent) 65%, transparent);
  text-decoration: none;
}

a.btn.secondary {
  border-color: var(--ta-border-strong);
  color: var(--ta-text);
}

a.btn.secondary:hover {
  border-color: var(--ta-accent);
  color: var(--ta-accent);
  background: transparent;
  text-decoration: none;
}

/* ---- Landing hero -------------------------------------------------------- */

.hero.centered {
  text-align: center;
}

/* A media-backed hero: the video/image becomes a full-bleed background layer
   and the copy floats above it on a scrim. The minimal hero (no `.hero-media`,
   e.g. app dashboards) keeps the plain surface from section 5. */
.hero {
  position: relative;
  overflow: hidden;
}

.hero:has(.hero-media) {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background: #0b0e13;
  border-bottom: none;
  color: #fff;
  padding-block: clamp(5rem, 14vh, 9rem);
  margin-bottom: var(--section-gap);
}

.hero:has(.hero-media) .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
}

.hero:has(.hero-media) .hero-media img,
.hero:has(.hero-media) .hero-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* A scrim between the media and the copy — the reference look: darkest on
   the left where the copy sits, fading out to the right so the full media
   reads through. */
.hero:has(.hero-media) .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(2, 6, 23, 0.82) 0%,
      rgba(2, 6, 23, 0.4) 48%,
      transparent 80%);
}

.hero .hero-copy {
  max-width: 42rem;
  margin-inline: auto;
}

.hero:has(.hero-media) .hero-copy {
  position: relative;
  z-index: 1;
  text-align: left;
  margin-inline: 0;
}

.hero:has(.hero-media) .hero-copy .eyebrow {
  font-family: var(--ta-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero:has(.hero-media) .hero-copy h1 {
  color: #fff;
  max-width: 18ch;
  margin-inline: 0;
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero:has(.hero-media) .hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
  max-width: 60ch;
  margin-inline: 0;
}

.hero:has(.hero-media) .hero-badges,
.hero:has(.hero-media) .hero-ctas {
  justify-content: flex-start;
}

/* Marketing heroes — the landing form (an image, badges or CTAs). Whether
   media-backed or a plain dark gradient (a landing whose YAML declares
   badges/CTAs but no `image:`), they get the full-screen treatment: white,
   left-aligned copy on a full-height dark surface. The media-specific rules
   above still apply when `.hero-media` is present. */
.hero.marketing {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(5rem, 14vh, 9rem);
  background: radial-gradient(1100px 560px at 18% 8%,
      rgba(255, 255, 255, 0.07),
      transparent 60%),
    linear-gradient(180deg, #12161d, #0b0e13);
  border-bottom: none;
  color: #fff;
  margin-bottom: var(--section-gap);
}

.hero.marketing .hero-copy {
  text-align: left;
  margin-inline: 0;
}

.hero.marketing .hero-copy .eyebrow {
  font-family: var(--ta-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero.marketing .hero-copy h1 {
  color: #fff;
  max-width: 18ch;
  margin-inline: 0;
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero.marketing .hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
  max-width: 60ch;
  margin-inline: 0;
}

.hero.marketing .hero-badges,
.hero.marketing .hero-ctas {
  justify-content: flex-start;
}

.hero.marketing .hero-badges li {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
}

.hero.marketing .hero-ctas a.btn.secondary {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(10, 12, 16, 0.5);
  color: #fff;
}

.hero.marketing .hero-ctas a.btn.secondary:hover {
  border-color: #fff;
  background: rgba(10, 12, 16, 0.72);
  color: #fff;
}

.hero .hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero .hero-badges li {
  padding: 0.28rem 0.8rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r);
  color: var(--ta-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero:has(.hero-media) .hero-badges li {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
}

.hero .hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

/* Primary landing CTA — teal with a trailing chevron, like the reference. */
.hero .hero-ctas a.btn.primary {
  background: var(--ta-teal);
}

.hero .hero-ctas a.btn.primary:hover {
  background: var(--ta-teal-hover);
}

.hero .hero-ctas a.btn.primary::after {
  content: "\203A";
  font-size: 1.05em;
  line-height: 1;
  font-weight: 700;
}

/* Secondary CTA on the media scrim — a dark button, like the reference. */
.hero:has(.hero-media) .hero-ctas a.btn.secondary {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(10, 12, 16, 0.5);
  color: #fff;
}

.hero:has(.hero-media) .hero-ctas a.btn.secondary:hover {
  border-color: #fff;
  background: rgba(10, 12, 16, 0.72);
  color: #fff;
}

/* ---- Logos --------------------------------------------------------------- */

.logos {
  margin-block: var(--section-gap);
  text-align: center;
}

.logos .logos-heading {
  color: var(--ta-muted);
  font-family: var(--ta-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logos .logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 2.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.logos .logos-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ta-muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.logos .logos-row img {
  max-height: 1.9rem;
  width: auto;
  filter: grayscale(1);
  opacity: 0.78;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.logos .logos-row li:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ---- Showcase ------------------------------------------------------------ */

.showcase {
  margin-block: var(--section-gap);
}

.showcase-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.showcase-card {
  display: block;
  border-radius: var(--ta-r-lg);
  text-decoration: none;
}

a.showcase-card:hover {
  text-decoration: none;
}

.showcase-card h3 {
  margin: 0.9rem 0 0.35rem;
}

/* ---- Feature grid -------------------------------------------------------- */

.feature-grid {
  margin-block: var(--section-gap);
}

.feature-grid-list {
  display: grid;
  gap: 1rem;
}

.feature-grid.cols-2 .feature-grid-list {
  grid-template-columns: repeat(2, 1fr);
}

.feature-grid.cols-3 .feature-grid-list {
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid.cols-4 .feature-grid-list {
  grid-template-columns: repeat(4, 1fr);
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r);
  background: var(--ta-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  border-color: var(--ta-border-strong);
  box-shadow: var(--ta-shadow-sm);
}

.feature-grid.muted .feature-card {
  background: var(--ta-surface-2);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.9rem;
  border-radius: var(--ta-r-sm);
  background: var(--ta-accent-soft);
  color: var(--ta-accent);
  font-size: 1.15rem;
}

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

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.feature-card p {
  margin: 0;
  color: var(--ta-muted);
  font-size: 0.9rem;
}

/* ---- Industries ---------------------------------------------------------- */

.industries {
  margin-block: var(--section-gap);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.industry-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r-lg);
  background: var(--ta-surface);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.industry-card:hover {
  text-decoration: none;
  border-color: var(--ta-border-strong);
  box-shadow: var(--ta-shadow-sm);
}

.industry-media img,
.industry-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: var(--ta-r);
}

.industry-card h3 {
  margin: 0 0 0.5rem;
}

.industry-card p {
  color: var(--ta-muted);
  font-size: 0.92rem;
}

.industry-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.industry-caps li {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r);
  color: var(--ta-muted);
  font-size: 0.78rem;
}

/* ---- Pillars ------------------------------------------------------------- */

.pillars {
  margin-block: var(--section-gap);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.pillar-card {
  padding: 1.25rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r-lg);
  background: var(--ta-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pillar-card:hover {
  border-color: var(--ta-border-strong);
  box-shadow: var(--ta-shadow-sm);
}

.pillar-media img,
.pillar-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: var(--ta-r);
}

.pillar-card h3 {
  margin: 0 0 0.5rem;
}

.pillar-card p {
  margin: 0;
  color: var(--ta-muted);
  font-size: 0.92rem;
}

/* ---- Compare ------------------------------------------------------------- */

.compare {
  margin-block: var(--section-gap);
}

/* A real before/after slider: both images share one 16:9 frame; the handle
   (left: var(--pos)) clips the "after" layer over the "before". The range
   input is the full-frame drag surface — app.js syncs its value to --pos. */
.compare-slider {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--ta-r-lg);
  border: 1px solid var(--ta-pane-rim);
  box-shadow: var(--ta-pane-shadow);
  background: #0b0e13;
  user-select: none;
  -webkit-user-select: none;
}

.compare-layer {
  position: absolute;
  inset: 0;
  margin: 0;
}

/* The after layer is clipped from the left by the handle position, so the
   divider reveals it over the before. `--pos` is driven by app.js. */
.compare-after {
  clip-path: inset(0 0 0 var(--pos));
}

.compare-layer .compare-el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-tag {
  position: absolute;
  bottom: 0.9rem;
  z-index: 2;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  pointer-events: none;
}

.compare-tag-before {
  left: 0.9rem;
}

.compare-tag-after {
  right: 0.9rem;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

/* The circular grip with chevrons, centred on the divider line. */
.compare-handle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: #fff;
  color: #11151d;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

/* The range input is invisible but covers the whole frame, so dragging
   anywhere on the image moves the divider (keyboard/touch included). */
.compare-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

/* Two-column variant: copy + bullets + CTA beside the slider (the reference
   "Accurately detect threats" layout), instead of a centered header above a
   full-width slider. */
.compare-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.compare-copy h2 {
  margin: 0 0 0.75rem;
}

.compare-bullets {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.compare-bullets li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ta-fg);
  font-size: 0.92rem;
}

.compare-bullets li svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--ta-accent);
}

.compare-split .compare-slider {
  margin: 0;
}

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

/* ---- Chart --------------------------------------------------------------- */

.chart {
  margin-block: var(--section-gap);
}

.chart-body {
  display: block;
}

/* With stats: stat tiles in a column beside the chart (the reference "Proof"
   layout — 97% / 10x / 0 stacked left of the bar chart). */
.chart-body.with-stats {
  display: grid;
  grid-template-columns: minmax(11rem, 0.7fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.chart-stats {
  display: grid;
  gap: 1.5rem;
}

.chart-stat-value {
  margin: 0;
  color: var(--ta-fg);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.chart-stat-label {
  margin: 0.35rem 0 0;
  color: var(--ta-muted);
}

@media (max-width: 860px) {
  .chart-body.with-stats {
    grid-template-columns: 1fr;
  }

  .chart-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.chart-card {
  padding: 1.5rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r-lg);
  background: var(--ta-surface);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ta-muted);
  font-size: 0.85rem;
}

.chart-legend-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--ta-border-strong);
}

.chart-legend-swatch.accent {
  background: var(--ta-accent);
}

.chart-title {
  margin: 0 0 1rem;
  color: var(--ta-muted);
  font-family: var(--ta-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chart-canvas-wrap {
  position: relative;
  height: 16rem;
  margin-bottom: 1.75rem;
}

.chart-caption {
  margin: 1.5rem 0 0;
  color: var(--ta-muted);
  font-size: 0.9rem;
}

/* ---- Legal --------------------------------------------------------------- */

.legal {
  margin-block: var(--section-gap);
}

.legal-doc {
  max-width: 46rem;
  margin-inline: auto;
  padding: 2rem 2.5rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r-lg);
  background: var(--ta-surface);
}

.legal-doc h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.legal-updated {
  color: var(--ta-muted);
  font-size: 0.85rem;
}

.legal-intro {
  color: var(--ta-muted);
}

.legal-section h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-section p {
  white-space: pre-line;
  color: var(--ta-text);
  line-height: 1.7;
}

/* ---- Contact ------------------------------------------------------------- */

.contact {
  margin-block: var(--section-gap);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.contact-media img,
.contact-media video {
  display: block;
  width: 100%;
  border-radius: var(--ta-r-lg);
  box-shadow: var(--ta-shadow-sm);
}

.contact-details {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ta-border);
}

.contact-details li:first-child {
  padding-top: 0;
}

.contact-details strong {
  color: var(--ta-muted);
  font-family: var(--ta-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* ---- Landing form -------------------------------------------------------- */

.form-block {
  margin-block: var(--section-gap);
}

.form-block article {
  max-width: 34rem;
  padding: 1.5rem;
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-r-lg);
  background: var(--ta-surface);
}

.form-block .form-error {
  color: var(--ta-err);
}