@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  font-family: "Poppins", sans-serif;
  color: #030214;
  background: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 4px;
}

::selection {
  background: #7c3aed;
  color: #ffffff;
}

.page-shell {
  width: min(100% - 2.5rem, 1280px);
  margin-inline: auto;
}

.font-mono {
  font-family: "Poppins", sans-serif;
}

/* Buttons */
.button-primary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding-inline: 1.35rem;
  font-size: 0.875rem;
  font-weight: 800;
  transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.button-primary {
  color: #ffffff;
  background: #7c3aed;
}

.button-primary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

.button-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.button-ghost:hover {
  color: #071725;
  background: white;
  transform: translateY(-2px);
}

/* Background Grids */
.hero-grid {
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, black, transparent 68%);
}

.hero-img-animate {
  animation: heroZoom 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

/* Section Typography */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #7c3aed;
  font-family: "Poppins", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label::before {
  width: 26px;
  height: 1px;
  content: "";
  background: currentColor;
}

.section-label-light {
  color: #a78bfa;
}

.section-heading {
  max-width: 700px;
  font-size: clamp(2.25rem, 4.8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.052em;
}

.lead-copy {
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.035em;
  color: #55546a;
}

/* Case study outcome counters */
.case-study-counter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(4rem, 8vw, 6rem);
  border-top: 1px solid #cbd5da;
  border-bottom: 1px solid #cbd5da;
}

.case-study-counter__item {
  min-height: 225px;
  padding: clamp(3rem, 5vw, 4.5rem) clamp(1.7rem, 3vw, 2.6rem);
  border-right: 1px solid #cbd5da;
}

.case-study-counter__item:first-child {
  padding-left: 0;
}

.case-study-counter__item:last-child {
  border-right: 0;
}

.case-study-counter__value {
  color: #030214;
  font-size: clamp(4.2rem, 7vw, 6.4rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.case-study-counter__item p {
  max-width: 230px;
  margin: 2rem 0 0;
  color: #5f7487;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Architecture Stage & Diagram */
.architecture-stage {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  color: white;
  background-color: #030214;
  background-image: radial-gradient(rgba(167, 139, 250, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
}

.architecture-grid {
  display: grid;
  grid-template-columns: 0.8fr 0.35fr 1.55fr 0.35fr 0.9fr;
  align-items: center;
  min-height: 520px;
  max-width: 1120px;
  margin-inline: auto;
}

.architecture-kicker {
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: "Poppins", sans-serif;
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.source-item,
.outcome-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.8rem;
  color: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
}

.fabric-core {
  overflow: hidden;
  background: #17112f;
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.fabric-layer {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.8rem;
  align-items: center;
  min-height: 84px;
  padding-inline: 1.5rem;
}

.fabric-layer > span {
  font-family: "Poppins", sans-serif;
  font-size: 0.65rem;
  color: #f59e0b;
}

.fabric-layer strong,
.fabric-layer small {
  display: block;
}

.fabric-layer strong {
  font-size: 0.95rem;
}

.fabric-layer small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
}

.flow-line {
  position: relative;
  height: 1px;
  overflow: visible;
  background: rgba(167, 139, 250, 0.42);
}

.flow-line::after {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 7px;
  height: 7px;
  content: "";
  border-top: 1px solid #a78bfa;
  border-right: 1px solid #a78bfa;
  transform: rotate(45deg);
}

.flow-line span {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.72);
  animation: data-flow 2.6s ease-in-out infinite;
}

.flow-line-right span {
  animation-delay: 1.3s;
}

.cta-rings {
  border: 1px solid #030214;
  border-radius: 50%;
  box-shadow: 0 0 0 70px transparent, 0 0 0 71px #030214, 0 0 0 150px transparent, 0 0 0 151px #030214;
}

/* Animations */
@keyframes data-flow {
  0% {
    left: 0;
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 6px);
    opacity: 0;
  }
}

/* Scroll Reveal */
.reveal-el {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-el.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive styles */
@media (max-width: 767px) {
  .page-shell {
    width: min(100% - 2rem, 1280px);
  }

  .architecture-stage {
    padding: 1.4rem;
  }

  .case-study-counter {
    grid-template-columns: 1fr;
    margin-top: 3.25rem;
  }

  .case-study-counter__item,
  .case-study-counter__item:first-child {
    min-height: 0;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid #cbd5da;
  }

  .case-study-counter__item:last-child {
    border-bottom: 0;
  }

  .case-study-counter__value {
    font-size: clamp(3.8rem, 20vw, 5.2rem);
  }

  .case-study-counter__item p {
    margin-top: 1.4rem;
  }

  .architecture-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
  }

  .flow-line {
    width: 1px;
    height: 40px;
    margin-inline: auto;
  }

  .flow-line::after {
    top: auto;
    right: -3px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .flow-line span {
    top: 0;
    left: -3px;
    animation: data-flow-vertical 2.6s ease-in-out infinite;
  }

  .flow-line-right span {
    animation-delay: 1.3s;
  }

  @keyframes data-flow-vertical {
    0% {
      top: 0;
      opacity: 0;
    }
    15%,
    80% {
      opacity: 1;
    }
    100% {
      top: calc(100% - 6px);
      opacity: 0;
    }
  }
}

/* Homepage brand alignment for the case-study template. */
body,
button,
input,
textarea,
select {
  font-family: "Poppins", sans-serif;
}

[class*="text-[#0b1f35]"],
[class*="text-[#081929]"],
[class*="text-[#071725]"] {
  color: #030214 !important;
}

[class*="text-[#53e1d0]"],
[class*="text-[#62dfd0]"],
[class*="text-[#71ebdd]"],
[class*="text-[#3fe0cd]"] {
  color: #a78bfa !important;
}

[class*="text-[#008d80]"] {
  color: #7c3aed !important;
}

[class*="bg-[#19c6b3]"],
[class*="bg-[#00a896]"],
[class*="bg-[#3fe0cd]"] {
  background-color: #7c3aed !important;
}

[class*="bg-[#163b54]"] {
  background-color: #241746 !important;
}

[class*="bg-[#17485c]"] {
  background-color: #312063 !important;
}

[class*="bg-[#155565]"] {
  background-color: #412987 !important;
}

[class*="border-[#00a896]"] {
  border-color: #7c3aed !important;
}

[class*="group-hover:bg-[#00a896]"]:hover {
  background-color: #7c3aed !important;
}

.industry-support-section .rounded-full:empty::before {
  width: 0.42rem;
  height: 0.72rem;
  content: "";
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-1px) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal-el {
    opacity: 1;
    transform: none;
  }
}
