/* ==========================================================================
   Sections: page frame, hero, hero diagram, content sections, final CTA
   ========================================================================== */


/* Page frame: side rails with small squares where section rules meet them
   -------------------------------------------------------------------------- */

.frame {
  max-width: var(--max);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}

.hero,
.section {
  position: relative;
  padding-inline: var(--pad);
}

.section::before,
.section::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
}

.section::before {
  left: -4px;
}

.section::after {
  right: -4px;
}

/* Hatched band between the hero and the content */
.hatch {
  height: 10px;
  border-top: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, rgb(20 20 20 / .09) 0 1px, transparent 1px 4px);
}


/* Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(56px, 9vw, 112px) var(--pad);
}

.label-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.label-status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--green);
}

.lead {
  max-width: 30ch;
  margin-top: 28px;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.4;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

.works {
  margin-top: 20px;
  font: 400 .8125rem/1.6 var(--mono);
  color: var(--muted);
}


/* Hero diagram: Azure resource → … → Pull request
   (motion for it lives in animations.css)
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  margin-top: clamp(48px, 8vw, 88px);
  padding: 56px 32px 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

/* Dot grid that fades out towards the edges */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, #cfccc3 1px, transparent 1.5px) 0 0 / 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
  pointer-events: none;
}

.motion-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font: 400 .6875rem var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.motion-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

.chain {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.node {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 124px;
  font: 400 .8125rem var(--mono);
  color: var(--muted);
}

.node > span:last-child {
  padding: 1px 6px;
  background: var(--surface);
  white-space: nowrap;
}

.node-icon {
  position: relative;
  display: block;
}

.node svg {
  display: block;
  width: 52px;
  height: 52px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link {
  position: relative;
  flex: 1;
  height: 2px;
  margin-bottom: 33px;
  overflow: hidden;
  background: var(--line);
}


/* Content sections: label in a narrow left column, content on the right
   -------------------------------------------------------------------------- */

.section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px 48px;
  padding-block: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.section > .label {
  padding-top: .6em;
}


/* How it works: one step per row, text left, drawing right
   -------------------------------------------------------------------------- */

.step {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px 48px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
}

.step:first-child {
  padding-top: 0;
  border-top: 0;
}

.step:last-child {
  padding-bottom: 0;
}

.step h3 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.step p {
  max-width: 34ch;
  margin-top: 10px;
  font-size: 1.125rem;
  color: var(--muted);
}


/* Statements: one large sentence instead of a list
   -------------------------------------------------------------------------- */

.statement {
  max-width: 30ch;
  font-size: clamp(1.625rem, 3.4vw, 2.625rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--faint);
}

.statement b {
  font-weight: 500;
  color: var(--text);
}

.note {
  max-width: 44ch;
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--muted);
}


/* Final call to action: the one dark band, where the logo cyan has contrast
   -------------------------------------------------------------------------- */

.cta {
  display: block;
  border-top: 0;
  background: linear-gradient(90deg, var(--green), var(--cyan)) top / 100% 2px no-repeat, var(--text);
  color: var(--bg);
}

.cta .sub {
  color: #a9a79f;
}

.cta .btn {
  margin-top: 32px;
  background: var(--bg);
  color: var(--text);
}

.cta .btn:hover {
  background: var(--cyan);
}

.cta :focus-visible {
  outline-color: var(--cyan);
}


/* Smaller screens
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .frame {
    border-inline: 0;
  }

  .section::before,
  .section::after {
    display: none;
  }
}

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

  .section > .label {
    padding-top: 0;
  }

  /* The diagram turns vertical */
  .stage {
    padding: 52px 24px 28px;
  }

  .chain {
    flex-direction: column;
    align-items: flex-start;
  }

  .node {
    flex-direction: row;
    gap: 14px;
    width: auto;
    font-size: .9375rem;
  }

  .link {
    flex: none;
    width: 2px;
    height: 28px;
    margin: 0 0 0 25px;
  }
}

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

  .step .anim {
    order: -1;
    width: 160px;
    height: 96px;
  }
}
