/* ==========================================================================
   GITLEAF DESIGN SYSTEM — 06. SECTIONS
   Home hero, inner-page hero, process timeline, CTA band and the composed
   section patterns that appear on more than one page.
   ========================================================================== */

/* ==========================================================================
   HOME HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-height) + clamp(2.5rem, 7vw, 6rem));
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
}

/* Engineering grid, faded towards the bottom and the edges. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--pattern-grid);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 110% 85% at 50% 0%, #000 10%, transparent 85%);
  pointer-events: none;
}

/* Two soft green lights: one behind the headline, a brighter one behind the
   illustration. Static, so nothing animates in the background. */
.hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero__glow--a {
  top: -18%;
  left: -12%;
  width: min(760px, 85vw);
  aspect-ratio: 1;
  background-image: radial-gradient(circle, rgb(40 73 54 / 55%) 0%, transparent 68%);
}

.hero__glow--b {
  top: 2%;
  right: -16%;
  width: min(680px, 78vw);
  aspect-ratio: 1;
  background-image: radial-gradient(circle, rgb(166 230 185 / 11%) 0%, transparent 66%);
}

.hero__inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(3rem, 5vw, 5rem);
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  max-width: 34ch;
}

@media (max-width: 1023px) {
  .hero__content {
    max-width: 40ch;
  }
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

/* "connected world" takes the accent. A gradient keeps it from looking flat
   at display size. */
.hero__title em {
  font-style: normal;
  background-image: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 54ch;
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

@media (max-width: 429px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

/* Capability strip below the buttons: mono labels separated by hairlines. */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hero__meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
}

/* --- Hero visual ---------------------------------------------------------- */
.hero__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.hero__visual svg {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   INNER PAGE HERO
   ========================================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-height) + clamp(2.25rem, 5vw, 4rem));
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--color-border);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--pattern-grid);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 120% 100% at 20% 0%, #000 0%, transparent 80%);
}

.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  right: -10%;
  width: min(620px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background-image: radial-gradient(circle, rgb(40 73 54 / 46%) 0%, transparent 68%);
  pointer-events: none;
}

.page-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.page-hero__title {
  max-width: 24ch;
  font-size: var(--fs-hero);
}

.page-hero__lead {
  max-width: 62ch;
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* Wide variant with a visual on the right, used by the service and product
   pages. */
.page-hero--split .page-hero__inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 1024px) {
  .page-hero--split .page-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }
}

.page-hero__visual {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
}

.page-hero__visual svg {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   PROCESS TIMELINE
   ========================================================================== */
/* Vertical on small screens, horizontal from 900px. The connecting line is a
   pseudo-element so no extra markup is needed. */
.process {
  position: relative;
  display: grid;
  gap: var(--space-7);
  counter-reset: step;
}

.process__step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-left: var(--space-10);
}

.process__marker {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background-color: var(--color-card);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-mono-lg);
  font-weight: var(--fw-medium);
  transition: var(--transition-colors);
}

.process__step:hover .process__marker {
  border-color: var(--color-accent-45);
  background-color: var(--color-accent-08);
}

/* Vertical connector between markers. */
.process__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 52px;
  bottom: calc(var(--space-7) * -1);
  width: 1px;
  background-image: linear-gradient(to bottom, var(--color-border), transparent);
}

.process__title {
  font-family: var(--font-heading);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  padding-top: var(--space-2);
}

.process__text {
  color: var(--color-text-muted);
  line-height: var(--lh-body);
  max-width: 42ch;
}

@media (min-width: 900px) {
  .process {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-gap);
  }

  .process__step {
    padding-left: 0;
    padding-top: var(--space-11);
  }

  .process__marker {
    top: 0;
  }

  /* Horizontal connector, drawn from the right edge of each marker to the
     next step. */
  .process__step:not(:last-child)::before {
    left: 56px;
    top: 22px;
    bottom: auto;
    right: calc(var(--space-gap) * -1);
    width: auto;
    height: 1px;
    background-image: linear-gradient(to right, var(--color-border), var(--color-border) 70%, transparent);
  }

  .process__title {
    padding-top: 0;
  }
}

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background-image: var(--gradient-deep);
}

/* Dotted texture plus a soft highlight, so the deep green reads as a lit
   surface rather than a flat block. */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--pattern-dots);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 100% at 85% 50%, #000 0%, transparent 75%);
}

.cta-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -60%;
  left: 50%;
  width: min(900px, 100%);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background-image: radial-gradient(ellipse at center, rgb(166 230 185 / 12%) 0%, transparent 70%);
}

.cta-band__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

@media (min-width: 960px) {
  .cta-band__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-gap-lg);
  }
}

.cta-band__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 44ch;
}

.cta-band__title {
  font-size: var(--fs-h2);
  color: var(--color-text);
}

.cta-band__text {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: rgb(244 247 244 / 76%);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  flex: none;
}

/* ==========================================================================
   FEATURED PRODUCT PANEL
   ========================================================================== */
.product-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 3.6vw, 3rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background-image: var(--gradient-surface);
}

.product-panel::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background-image: var(--gradient-hairline);
}

@media (min-width: 960px) {
  .product-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
  }
}

.product-panel__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.product-panel__title {
  font-size: var(--fs-h3);
}

.product-panel__visual {
  position: relative;
}

/* ==========================================================================
   VALUE / WHY GRID
   ========================================================================== */
/* A bordered matrix rather than separate cards: fewer boxes, more intent. */
.matrix {
  display: grid;
  gap: 1px;
  background-color: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 640px) {
  .matrix {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .matrix--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.matrix__cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.5rem, 2.8vw, 2.25rem);
  background-color: var(--color-bg-secondary);
  transition: background-color var(--duration) var(--ease-out);
}

.matrix__cell:hover {
  background-color: var(--color-card);
}

.matrix__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

.matrix__title svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.matrix__text {
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

/* ==========================================================================
   QUOTE
   ========================================================================== */
.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: clamp(1.75rem, 3.4vw, 2.75rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-card);
}

.quote__mark {
  width: 28px;
  height: 28px;
  color: var(--color-accent-45);
}

.quote__text {
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  font-weight: var(--fw-medium);
  line-height: 1.6;
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

.quote__cite {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-style: normal;
}

.quote__name {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.quote__role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-muted);
}

/* ==========================================================================
   ARTICLE LIST
   ========================================================================== */
.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.article-card__title {
  font-size: var(--fs-card);
  color: var(--color-text);
}

.card--interactive:hover .article-card__title {
  color: var(--color-accent);
}

.article-card__excerpt {
  color: var(--color-text-muted);
  line-height: var(--lh-body);
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding-top: calc(var(--header-height) + clamp(3rem, 8vw, 6rem));
  padding-bottom: var(--space-section);
  text-align: center;
}

.error-page__code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: var(--fw-medium);
  line-height: 1;
  letter-spacing: -0.04em;
  background-image: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.error-page__links {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 560px;
  margin-top: var(--space-4);
  text-align: left;
}

@media (min-width: 560px) {
  .error-page__links {
    grid-template-columns: 1fr 1fr;
  }
}

.error-page__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-card);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-colors);
}

.error-page__link:hover {
  border-color: var(--color-accent-28);
  color: var(--color-accent);
}

.error-page__link svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}
