/* ============================================
   TEMPLATE V2 — Lithic-Inspired Visual Language
   Topographic contours, UI illustrations, asymmetric layouts
   ============================================ */


/* ============================================
   CONTOUR BACKGROUND PATTERN
   ============================================ */

/* Base contour pattern behavior */
.section--contour {
  position: relative;
}

.section--contour::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.section--contour > * {
  position: relative;
  z-index: 1;
}

/* Variant 2: Asymmetric, dense left — white sections */
.section--contour-2::before {
  background-image: url('../assets/bg-contour-2.png');
}

/* Variant 3: Concentric rings from bottom-right — cream sections */
.section--contour-3::before {
  background-image: url('../assets/bg-contour-3.png');
  opacity: 0.7;
}

/* Variant 4: Diagonal wind currents — sand sections */
.section--contour-4::before {
  background-image: url('../assets/bg-contour-4.png');
  opacity: 0.6;
}


/* ============================================
   PAGE-CLASS CONTOUR VARIANTS
   Each page class gets its own visual identity
   ============================================ */

/* Platform — Circuit board traces (precision, determinism) */
.section--contour-circuit::before {
  background-image: url('../assets/bg-contour-circuit.png');
  opacity: 0.4;
}

/* Platform — Isometric grid dissolving to dots (technical depth) */
.section--contour-isometric::before {
  background-image: url('../assets/bg-contour-isometric.png');
  opacity: 0.6;
}

/* Solutions — Geological strata layers (industry, real-world) */
.section--contour-strata::before {
  background-image: url('../assets/bg-contour-strata.png');
  opacity: 0.5;
}

/* Solutions — River delta branching (organic structure) */
.section--contour-delta::before {
  background-image: url('../assets/bg-contour-delta.png');
  opacity: 0.6;
}

/* Developers — Polar coordinate grid (mathematical, technical) */
.section--contour-polar::before {
  background-image: url('../assets/bg-contour-polar.png');
  opacity: 0.5;
}

/* Engagements — Wave interference (process, progression) */
.section--contour-wave::before {
  background-image: url('../assets/bg-contour-wave.png');
  opacity: 0.35;
}

/* Foresight — Gentle wave flow (projection, forward motion) */
.section--contour-wave-v2::before {
  background-image: url('../assets/bg-contour-wave-v2.png');
  opacity: 0.5;
}

/* Integrations — Constellation network (connection, ecosystem) */
.section--contour-constellation::before {
  background-image: url('../assets/bg-contour-constellation-v2.png');
  opacity: 0.6;
}

/* Resources — Fine survey contours (knowledge, scholarly) */
.section--contour-survey::before {
  background-image: url('../assets/bg-contour-survey.png');
  opacity: 0.4;
}

/* Security — Hexagonal tessellation (protection, structure) */
.section--contour-hex::before {
  background-image: url('../assets/bg-contour-hex.png');
  opacity: 0.35;
}

/* Company — Sand dune curves (warmth, human) */
.section--contour-dune::before {
  background-image: url('../assets/bg-contour-dune.png');
  opacity: 0.4;
}

/* Integrations alt — Organic-to-geometric mesh (integration, convergence) */
.section--contour-mesh::before {
  background-image: url('../assets/bg-contour-mesh.png');
  opacity: 0.35;
}

/* Security alt — Broken orbital rings (layered protection) */
.section--contour-orbital::before {
  background-image: url('../assets/bg-contour-orbital.png');
  opacity: 0.35;
}

/* Company alt — Bauhaus geometric composition (design, principles) */
.section--contour-bauhaus::before {
  background-image: url('../assets/bg-contour-bauhaus.png');
  opacity: 0.35;
}

/* Developers alt — Magnetic field lines (force, convergence) */
.section--contour-field::before {
  background-image: url('../assets/bg-contour-field.png');
  opacity: 0.3;
}

/* Engagements alt — Moiré interference (cross-referencing, overlap) */
.section--contour-moire::before {
  background-image: url('../assets/bg-contour-moire.png');
  opacity: 0.3;
}

/* Resources alt — Decision tree branching (hierarchy, structure) */
.section--contour-tree::before {
  background-image: url('../assets/bg-contour-tree.png');
  opacity: 0.35;
}


/* ============================================
   HERO V2 — Centered with floating cards
   ============================================ */

.hero--v2 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 100px;
  padding-bottom: 200px;
  position: relative;
  overflow: hidden;
}

.hero__contour-bg {
  position: fixed;
  inset: 0;
  background-image: url('../assets/bg-contour.png');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.hero--v2 .container {
  position: relative;
  z-index: 2;
}

.hero__content--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__headline--centered {
  max-width: 16ch;
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero__description--centered {
  max-width: 560px;
  text-align: center;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero__cta-group--centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

/* Floating UI mockup cards flanking the hero */
.hero__floating-cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__float-card {
  position: absolute;
  width: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.6s var(--ease-out);
}

.hero__float-card img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__float-card--left {
  left: 4%;
  bottom: 15%;
  transform: rotate(-3deg);
  animation: floatLeft 1s var(--ease-out) 0.6s both;
}

.hero__float-card--right {
  right: 4%;
  bottom: 20%;
  transform: rotate(2deg);
  animation: floatRight 1s var(--ease-out) 0.8s both;
}

@keyframes floatLeft {
  from {
    opacity: 0;
    transform: rotate(-3deg) translateY(60px) translateX(-40px);
  }
  to {
    opacity: 1;
    transform: rotate(-3deg) translateY(0) translateX(0);
  }
}

@keyframes floatRight {
  from {
    opacity: 0;
    transform: rotate(2deg) translateY(60px) translateX(40px);
  }
  to {
    opacity: 1;
    transform: rotate(2deg) translateY(0) translateX(0);
  }
}

@media (max-width: 1280px) {
  .hero__float-card {
    width: 260px;
  }
  .hero__float-card--left {
    left: 2%;
    bottom: 10%;
  }
  .hero__float-card--right {
    right: 2%;
    bottom: 14%;
  }
}

@media (max-width: 1024px) {
  .hero__floating-cards {
    display: none;
  }

  .hero--v2 {
    padding-bottom: var(--space-3xl);
    min-height: auto;
    padding-top: 160px;
  }
}


/* ============================================
   FLOW VISUAL — Horizontal process flow
   ============================================ */

.flow-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-xl) 0;
  max-width: 900px;
  margin: 0 auto;
}

.flow-visual__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex: 0 0 auto;
  padding: var(--space-lg);
  border-radius: 16px;
  transition: all var(--duration-normal) var(--ease-out);
}

.flow-visual__step--highlight {
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-lg) var(--space-xl);
}

.flow-visual__step--highlight .flow-visual__label,
.flow-visual__step--highlight .flow-visual__sublabel {
  color: var(--color-white);
}

.flow-visual__step--highlight .flow-visual__sublabel {
  opacity: 0.7;
}

.flow-visual__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream);
  border-radius: 14px;
  color: var(--color-charcoal);
  margin-bottom: var(--space-xs);
}

.flow-visual__icon--dark {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
}

.flow-visual__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-black);
  text-align: center;
}

.flow-visual__sublabel {
  font-size: 0.8125rem;
  color: var(--color-stone);
  text-align: center;
}

.flow-visual__connector {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 60px;
}

.flow-visual__line {
  flex: 1;
  height: 1px;
  background: var(--color-warm-gray);
}

@media (max-width: 768px) {
  .flow-visual {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .flow-visual__connector {
    flex-direction: column;
    flex: 0 0 auto;
    height: 40px;
    width: auto;
  }

  .flow-visual__connector .flow-visual__line {
    width: 1px;
    height: 100%;
    flex: 1;
  }

  .flow-visual__connector svg {
    transform: rotate(90deg);
  }
}


/* ============================================
   FEATURE CARDS — Lithic-style with UI illustrations
   ============================================ */

.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 0 0 var(--space-lg) 0;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.1);
}

.feature-card__visual {
  background: var(--color-cream);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.feature-card__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/bg-contour-3.png');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.feature-card__visual img {
  position: relative;
  z-index: 1;
  max-width: 85%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.08));
}

.feature-card__title {
  padding: var(--space-lg) var(--space-lg) 0;
}

.feature-card__description {
  padding: var(--space-sm) var(--space-lg) 0;
}

.feature-card .card__link {
  padding: var(--space-sm) var(--space-lg) 0;
  display: inline-flex;
  margin-left: 0;
}

@media (max-width: 768px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .feature-card__visual {
    padding: var(--space-sm);
    min-height: auto;
  }

  .feature-card__visual img {
    max-width: 100%;
    border-radius: 8px;
  }
}


/* ============================================
   FEATURE BLOCK — Visual contained image
   ============================================ */

.feature-block__visual--contained {
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  position: relative;
}

.feature-block__visual--contained::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/bg-contour.png');
  background-size: cover;
  opacity: 0.35;
  border-radius: 24px;
}

.feature-block__visual--contained img {
  position: relative;
  z-index: 1;
  max-width: 90%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.08));
}

@media (max-width: 768px) {
  .feature-block__visual--contained {
    padding: var(--space-sm);
  }

  .feature-block__visual--contained img {
    max-width: 100%;
    border-radius: 8px;
  }
}


/* ============================================
   SPECTRUM BAR — Adoption path
   ============================================ */

.spectrum {
  max-width: 700px;
  margin: 0 auto;
}

.spectrum__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.spectrum__bar {
  height: 4px;
  background: var(--color-warm-gray);
  border-radius: 4px;
  overflow: hidden;
}

.spectrum__fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,
    var(--color-warm-gray) 0%,
    var(--color-stone) 35%,
    var(--color-graphite) 65%,
    var(--color-charcoal) 100%
  );
  border-radius: 4px;
  transition: width 1.5s var(--ease-out);
}

.spectrum.is-visible .spectrum__fill {
  width: 100%;
}


/* ============================================
   CTA BANNER — Dark with background image
   ============================================ */

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-2xl);
  background-color: var(--color-charcoal);
  background-image: url('../assets/bg-cta-dark.png');
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  overflow: hidden;
}

.cta-banner__title {
  color: var(--color-white);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.cta-banner__description {
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
}

.cta-banner .btn--primary {
  background: var(--color-white);
  color: var(--color-black);
  flex-shrink: 0;
}

.cta-banner .btn--primary:hover {
  background: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -8px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
  }

  .cta-banner__description {
    max-width: none;
  }
}

.section--no-pad-bottom {
  padding-bottom: 0;
}


/* ============================================
   TESTIMONIAL — Dark quote card
   ============================================ */

.testimonial {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.testimonial__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial__card {
  background: var(--color-charcoal);
  border-radius: 20px;
  padding: var(--space-xl);
  color: var(--color-white);
}

.testimonial__quote {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-graphite);
}

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

  .testimonial__logo {
    justify-content: flex-start;
  }
}


/* ============================================
   CARD CTA VARIANT
   ============================================ */

.card--cta-card {
  background: var(--color-sand);
  border-color: transparent;
}

.card--cta-card:hover {
  background: var(--color-beige);
  box-shadow: none;
  transform: none;
}


/* ============================================
   MT-3XL utility
   ============================================ */

.mt-3xl {
  margin-top: var(--space-3xl);
}


/* ============================================
   SPECTRUM ANIMATION OBSERVER
   ============================================ */

/* The spectrum bar fills on scroll - handled via the
   stagger-children / is-visible mechanism in main.js */


/* ============================================
   EDITORIAL PHOTO SECTION — Full-bleed visual break
   ============================================ */

.editorial-break {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  overflow: hidden;
}

.editorial-break__image {
  overflow: hidden;
}

.editorial-break__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-break__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3xl) var(--space-2xl);
}

.editorial-break--dark {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.editorial-break--dark .editorial-break__content p {
  color: rgba(255, 255, 255, 0.65);
}

.editorial-break--dark .editorial-break__content .eyebrow {
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 768px) {
  .editorial-break {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .editorial-break__image {
    aspect-ratio: 16/9;
  }

  .editorial-break__content {
    padding: var(--space-xl) var(--space-lg);
  }
}


/* ============================================
   PHOTO CARD — Card with editorial image header
   ============================================ */

.card--photo {
  overflow: hidden;
  padding: 0;
}

.card--photo .card__photo {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card--photo .card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card--photo:hover .card__photo img {
  transform: scale(1.04);
}

.card--photo .card__body {
  padding: var(--space-lg);
}

.card--photo .card__body .pill {
  margin-bottom: var(--space-sm);
}
