/**
 * Homepage · v2
 * Light blueprint hero + proof → customer logos → business → ecosystem → stack → company
 */

.section {
  padding-block: var(--section-y);
}

.section--surface {
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
}

.section-foot {
  margin: var(--space-6) 0 0;
}

@media (min-width: 900px) {
  .section-head--split .eyebrow {
    grid-column: 1;
    grid-row: 1;
  }

  .section-head--split h2 {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
  }

  .section-head--split > p:not(.eyebrow) {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: calc(var(--nav-h) * -1);
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  color: var(--color-ink);
  background: var(--color-accent-soft);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-10);
  }
}

.eyebrow--dark {
  color: var(--color-sky);
}

.eyebrow--dark .eyebrow__index {
  color: rgba(226, 234, 246, 0.5);
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 1.06;
  color: var(--color-ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}

.hero__lead {
  margin: 0 0 var(--space-6);
  font-size: var(--text-lead);
  line-height: 1.7;
  color: var(--color-muted);
  max-width: 30rem;
}

/* A continuously built, side-scrolling blueprint landscape. */
.blueprint-architecture { margin: -2.75rem -3rem -1.5rem; min-width: 0; position: relative; }
.blueprint-architecture__canvas { display: block; width: 100%; height: auto; aspect-ratio: 960 / 760; mask-image: linear-gradient(to right, transparent, #000 8%, #000 91%, transparent); }
@media (min-width: 960px) {
  .blueprint-architecture { margin-left: -4rem; margin-right: calc(-1 * clamp(4rem, 8vw, 8rem)); left: calc(-2rem - 0.5cm); }
  .blueprint-architecture__canvas { aspect-ratio: 1120 / 760; }
}
@media (max-width: 959px) {
  .blueprint-architecture { width: min(100%, 600px); justify-self: center; margin: -1rem 0; }
}
@media (max-width: 599px) {
  .blueprint-architecture { width: calc(100% + 28px); margin-inline: -14px; }
}

.hero__proof {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.hero__proof li {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

@media (max-width: 899px) {
  .hero__proof li:nth-child(even) {
    padding-left: var(--space-4);
    padding-right: 0;
    border-left: 1px solid var(--color-line);
  }

  .hero__proof li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

/* ---------- Trust ---------- */
.trust {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--color-elevated);
  border-bottom: 1px solid var(--color-line);
}

.trust__inner {
  display: grid;
  gap: var(--space-5);
}

.trust__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}

.trust__label {
  margin: 0;
  font-family: var(--font-mono), var(--font-sans);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--color-faint);
}

.trust__more {
  font-size: var(--text-small);
}

.trust__viewport {
  min-width: 0;
  overflow-x: auto;
  border-block: 1px solid var(--color-line);
}

.trust__viewport.is-enhanced {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.trust__viewport.is-dragging { cursor: grabbing; }
.trust__track { display: flex; width: max-content; }
.trust__viewport.is-enhanced .trust__track { will-change: transform; }

.trust__logos {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  border: 0;
}

.trust__logos > li {
  flex: 0 0 clamp(10.5rem, 16vw, 13rem);
  width: clamp(10.5rem, 16vw, 13rem);
  min-height: 6rem;
  border: 0;
  background: transparent;
}

.trust__logos img {
  max-height: 1.9rem;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Compact marks need more height to balance the wide name lockups. */
.trust__logos .logo-tile--mark img {
  height: 3.5rem;
  max-height: 3.5rem;
}
.trust__logos img[src$="/mcdonalds.svg"] { filter: brightness(0); }
.trust__logos .logo-tile--wide img { max-height: 1.6rem; }

.section .eyebrow__label { order: 2; }

/* ---------- 01 Business lines ---------- */
.lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-ink);
}

.line {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.75rem;
  gap: var(--space-3) var(--space-5);
  align-items: start;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--color-line-strong);
  color: inherit;
  text-decoration: none;
}

.line__index {
  padding-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--color-accent);
}

.line__title {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-ink);
  transition: color var(--duration-ui) var(--ease-out);
}

.line__body {
  grid-column: 2 / -1;
  display: grid;
  gap: 0.75rem;
}

.line__desc {
  color: var(--color-muted);
  max-width: 36rem;
}

.line__tags {
  font-size: var(--text-caption);
  color: var(--color-faint);
  letter-spacing: 0.02em;
}

.line__go {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  color: var(--color-accent);
  transition: background-color var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out),
    color var(--duration-ui) var(--ease-out),
    transform var(--duration-ui) var(--ease-out);
}

.line__go::after {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
}

@media (min-width: 900px) {
  .line {
    grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 6fr) 3rem;
    align-items: center;
  }

  .line__title {
    grid-column: 2;
  }

  .line__body {
    grid-column: 3;
  }

  .line__go {
    grid-column: 4;
  }

  .line__index {
    padding-top: 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .line:hover .line__title {
    color: var(--color-accent);
  }

  .line:hover .line__go {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: translateX(4px);
  }
}

/* ---------- 02 Ecosystem ---------- */
.eco {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 639px) {
  .eco > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .eco a {
    min-height: 8rem;
    gap: 1.25rem;
    padding: 1.25rem 1rem;
  }
}

@media (min-width: 640px) {
  .eco {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .eco {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.eco a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  min-height: 9rem;
  padding: 1.5rem 1.25rem 1.1rem;
  background: var(--color-elevated);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--duration-ui) var(--ease-out);
}

.eco img,
.eco .mark-word {
  align-self: flex-start;
  flex: 0 0 auto;
}

.eco img {
  width: 100%;
  height: 3rem;
  max-width: var(--logo-width, 8.5rem);
  object-fit: contain;
  object-position: left center;
  opacity: 1;
  transition: opacity var(--duration-ui) var(--ease-out);
}

/* Optical sizing preserves the complete marks and a common 48px alignment box. */
.eco a[href$="redhat/"] { --logo-width: 8.75rem; }
.eco a[href$="suse/"] { --logo-width: 8rem; }
.eco a[href$="kylin/"] { --logo-width: 5.25rem; }
.eco a[href$="smartx/"] { --logo-width: 8rem; }
.eco a[href$="netapp/"] { --logo-width: 8rem; }
.eco a[href$="elastic/"] { --logo-width: 8rem; }
.eco a[href$="cloudera/"] { --logo-width: 8.75rem; }
.eco a[href$="confluent/"] { --logo-width: 8.5rem; }
.eco a[href$="dameng/"] { --logo-width: 9.5rem; }
.eco a[href$="vault/"] { --logo-width: 6.5rem; }
.eco a[href$="qingteng/"] { --logo-width: 8rem; }
.eco a[href$="zdns/"] { --logo-width: 7.25rem; }
.eco a[href$="cplex/"] { --logo-width: 5.25rem; }
.eco a[href$="terraform/"] { --logo-width: 8.75rem; }

.eco .mark-word {
  display: flex;
  align-items: center;
  height: 3rem;
  font-size: 1.5rem;
}

.eco__meta {
  display: grid;
  gap: 0.15rem;
  font-size: var(--text-small);
  font-weight: 600;
}

.eco__cat {
  font-family: var(--font-mono), var(--font-sans);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  color: var(--color-faint);
}

@keyframes eco-mark-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes eco-word-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html.is-motion .eco.reveal.is-in img {
    animation: eco-mark-in 420ms var(--ease-out) backwards;
  }

  html.is-motion .eco.reveal.is-in .mark-word {
    animation: eco-word-in 420ms var(--ease-out) backwards;
  }

  html.is-motion .eco.reveal.is-in > li:nth-child(n + 6) img,
  html.is-motion .eco.reveal.is-in > li:nth-child(n + 6) .mark-word {
    animation-delay: 50ms;
  }

  html.is-motion .eco.reveal.is-in > li:nth-child(n + 11) img,
  html.is-motion .eco.reveal.is-in > li:nth-child(n + 11) .mark-word {
    animation-delay: 100ms;
  }
}

@media (hover: hover) and (pointer: fine) {
  .eco a:hover {
    background: var(--color-accent-soft);
  }

  .eco a:hover img {
    opacity: 1;
  }

  .eco a:hover .eco__meta {
    color: var(--color-accent);
  }
}

/* ---------- 03 Solution ---------- */
.solution {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .solution {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--space-12);
  }
}

.solution__copy h2 {
  margin-bottom: var(--space-5);
}

.solution__copy .lead {
  margin-bottom: var(--space-6);
}

/* ---------- 04 About ---------- */
#about { border-bottom: 0; }
.about {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .about {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-12);
  }
}

.about__media {
  aspect-ratio: 4 / 3;
}

.about__copy h2 {
  margin-bottom: var(--space-5);
}

.milestones {
  list-style: none;
  margin: var(--space-6) 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: var(--space-5);
  border-top: 1px solid var(--color-line-strong);
}

@media (min-width: 640px) {
  .milestones {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.milestones li {
  position: relative;
  display: grid;
  gap: 0.3rem;
  padding: 1.1rem 0.75rem 0 0;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--color-muted);
}

.milestones li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

.milestones__year {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-ink);
}
