/* ==========================================================================
   Shared building blocks for the homepage sections below the hero.
   They extend the hero's language: black canvas, Inter for what people say,
   IBM Plex Mono for system-like labels, dot-matrix icons, and the "spark" —
   the point where the hands touch. Below the hero the spark takes on the
   page's single accent colour: the warm light of that moment.
   ========================================================================== */

.section {
  position: relative;
  padding-block: var(--section-space);
}

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

/* A raised, inset panel for the sections that carry the most weight. The rim
   light along the top edge is the only highlight; there is no blur or glass. */
.panel {
  margin-inline: var(--panel-inset);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--panel-radius);
  background: var(--color-surface-1);
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28), transparent);
  pointer-events: none;
}

/* Faint field of dots — the nodes of the wireframe hands, as texture. */
.dot-field {
  background: radial-gradient(circle, rgb(255 255 255 / 0.11) 0 1px, transparent 1.5px) 0 0 / 22px 22px;
  pointer-events: none;
}

/* ---- Section header -------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.875em;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.eyebrow::before,
.spark {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.section-title {
  margin-top: 1.5rem;
  font-size: clamp(2.125rem, 1.4rem + 2.9vw, 3.75rem);
  font-weight: 400;
  font-variation-settings: "opsz" 32;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Two-tone headings: the statement in white, its second half dimmed. */
.title-dim {
  color: var(--color-text-dim);
}

.section-lead {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

/* ---- Small labels ------------------------------------------------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---- Actions ----------------------------------------------------------------- */

/* Same pill as the hero CTA. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.95em;
  height: 3rem;
  padding-inline: 1.35em 1.3em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 1rem;
  font-variation-settings: "opsz" 32;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button__arrow {
  flex: none;
  width: 1.32em;
  height: 0.695em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.button:hover {
  background: #ececec;
}

.button:disabled {
  background: rgb(255 255 255 / 0.55);
  cursor: not-allowed;
}

.button:disabled .button__arrow {
  transform: none;
}

.button:hover .button__arrow {
  transform: translateX(0.2em);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--color-accent);
}

.section :focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* ---- Dot-matrix icons (same density as the hero icons) ------------------------ */

.dot-icon {
  flex: none;
  height: auto;
  aspect-ratio: 80 / 72;
  fill: #fff;
}

/* ---- Restrained motion --------------------------------------------------------
   main.js adds .reveal-pending only to elements that start below the fold, so
   nothing on screen flickers and, without JavaScript, nothing is hidden. */

[data-reveal] {
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(1rem);
}

/* Dotted connectors draw themselves instead of fading in. */
[data-reveal="line"],
[data-reveal="line-x"] {
  transform-origin: top left;
  transition: transform 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}

[data-reveal="line"].reveal-pending {
  opacity: 1;
  transform: scaleY(0);
}

[data-reveal="line-x"].reveal-pending {
  opacity: 1;
  transform: scaleX(0);
}

/* Dotted lines, like the nodes of the wireframe hands. */
.dots-v {
  background: radial-gradient(circle, rgb(255 255 255 / 0.45) 0 1px, transparent 1.4px) center top / 2px 10px repeat-y;
}

.dots-h {
  background: radial-gradient(circle, rgb(255 255 255 / 0.45) 0 1px, transparent 1.4px) left center / 10px 2px repeat-x;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .button,
  .button__arrow,
  .text-link {
    transition: none;
  }
}
