/* ==========================================================================
   Telamorph — Homepage overrides
   ========================================================================== */

/* --- Hero ---
   Full viewport. The navbar is transparent and absolutely positioned, so the
   hero fills the screen behind it and its content sits in the lower third
   (clear of the floating bar). */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height, 72px) + 3rem) 0 clamp(2rem, 9vh, 6rem);
  text-align: left;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  padding-left: clamp(1.25rem, 4vw, 4.5rem);
  padding-right: clamp(1.25rem, 4vw, 4.5rem);
}

.hero-parallax-bg {
  position: absolute;
  inset: -10% 0;
  background-size: cover;
  background-position: var(--focus, center);
  will-change: transform;
  z-index: 0;
}

/* Readability scrim over the hero image */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to right,
      rgba(17, 18, 21, 0.92) 0%,
      rgba(17, 18, 21, 0.55) 55%,
      rgba(17, 18, 21, 0.2) 100%
    ),
    linear-gradient(to top, rgba(17, 18, 21, 0.85) 0%, transparent 45%);
}

.hero-eyebrow {
  display: inline-block;
  font-size: clamp(0.74rem, 0.6rem + 0.3vw, 0.92rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero-title {
  font-size: clamp(2.6rem, 1.5rem + 5vw, 6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.5rem);
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 2.25rem;
  max-width: 46ch;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  background-color: rgba(24, 26, 32, 0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* Hero CTA group — buttons keep their natural width at every breakpoint */
.hero-actions {
  display: flex;
  flex-flow: row wrap;
  gap: 0.875rem;
  align-items: center;
}

.hero-actions .btn {
  width: auto;
  justify-content: center;
}


/* ==========================================================================
   Approach — alternating split image/text rows
   ========================================================================== */
.split {
  padding: clamp(4rem, 12vh, 9rem) 0;
  overflow: hidden; /* contain the horizontal slide-in reveal */
}

.split-row {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.split-row + .split-row {
  margin-top: clamp(3.5rem, 10vh, 8rem);
}

.split-row--reverse {
  flex-direction: row-reverse;
}

/* Rows whose brightness is driven by scroll position (home-scroll.js). The
   layout stays fixed; only opacity + a small vertical drift change. */
.scroll-fade {
  will-change: opacity, transform;
}

.split-text {
  flex: 1 1 0;
  min-width: 0;
}

.split-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.split-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
}

.split-line {
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2.1rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

/* Emphasis carried by weight only — no colored words inside the white copy */
.split-line em {
  font-style: normal;
  font-weight: 700;
  color: inherit;
}

.split-media {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  aspect-ratio: 4 / 3;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.split-media-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: var(--focus, center);
  transform: scale(1.01);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 18, 21, 0.55) 0%,
    transparent 55%
  );
  transition: opacity var(--transition);
  opacity: 0.85;
}

.split-media:hover {
  border-color: var(--accent-deep);
  box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.8);
}

.split-media:hover .split-media-bg {
  transform: scale(1.08);
}

.split-media:hover::after {
  opacity: 1;
}

.split-media-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  background: rgba(17, 18, 21, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Slide-in reveal variants (layered on top of the base .reveal) */
.reveal.reveal-left {
  translate: -40px 0;
}

.reveal.reveal-right {
  translate: 40px 0;
}

.reveal.reveal-left.is-visible,
.reveal.reveal-right.is-visible {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-left,
  .reveal.reveal-right {
    translate: none;
  }
}

/* ==========================================================================
   Manifesto pull-quote — full-bleed image band
   ========================================================================== */
.manifesto {
  position: relative;
  overflow: hidden;
  padding: clamp(6rem, 18vh, 13rem) 0;
}

.manifesto-bg {
  position: absolute;
  inset: -10% 0;
  background-size: cover;
  background-position: var(--focus, center);
  will-change: transform;
  z-index: 0;
}

.manifesto-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    120% 120% at 50% 50%,
    rgba(17, 18, 21, 0.78) 0%,
    rgba(17, 18, 21, 0.92) 100%
  );
}

.manifesto-inner {
  position: relative;
  z-index: 2;
  max-width: 60rem;
  text-align: center;
}

.manifesto-kicker {
  display: block;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.manifesto-quote {
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0;
}

.manifesto-quote span {
  display: block;
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.manifesto-quote em {
  font-style: normal;
  color: var(--text-primary);
}

/* ==========================================================================
   CTA band — start a composite project
   ========================================================================== */
.cta-band {
  padding: clamp(5rem, 14vh, 10rem) 0 clamp(6rem, 16vh, 11rem);
  border-top: 1px solid var(--border-color);
}

.cta-inner {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.cta-eyebrow {
  display: inline-block;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.cta-title {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.cta-text {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto 2.25rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* --- Category Showcase --- */
.category-showcase {
  padding-top: 2rem;
  scroll-margin-top: var(--nav-height, 72px);
}

@media (min-width: 768px) {
  .category-showcase {
    padding-top: 3rem;
  }
}

.category-showcase > .container {
  margin-bottom: 1.25rem;
}

.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 clamp(0.75rem, 4vw, 4rem);
}

.showcase-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .showcase-stack {
    gap: 0.625rem;
  }
  .showcase-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.625rem;
  }
}

/* Individual showcase band */
.showcase-band {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 28vh;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  /*transition settings*/
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    flex-grow 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease;
}

@media (min-width: 768px) {
  .showcase-band {
    min-height: 0;
    /* Capped at 500px; scales between 280–500 based on viewport height */
    height: clamp(280px, 38vh, 500px);
    /* Basis 0 + equal grow → siblings within a .showcase-row split space
       evenly. Hover bumps flex-grow so the card widens and row-siblings
       shrink in place (no wrapping — row is flex-nowrap). */
    flex: 1 1 0;
    min-width: 0;
  }

  /* Hovered card widens; neighbors in the same row yield proportionally */
  .showcase-band:hover {
    flex-grow: 2;
  }
}

.showcase-band:hover {
  border-color: var(--border-light);
  box-shadow: 0 14px 32px -14px rgba(0, 0, 0, 0.5);
}

/* Parallax background image */
.showcase-bg {
  position: absolute;
  inset: -10% 0;
  background-size: cover;
  background-position: var(--focus, center);
  will-change: transform;
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  border-radius: inherit;
}

.showcase-band:hover .showcase-bg {
  transform: scale(1.12);
}

/* Dark overlay */
.showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 18, 21, 0.92) 0%,
    rgba(17, 18, 21, 0.6) 50%,
    rgba(17, 18, 21, 0.3) 100%
  );
  z-index: 1;
  transition: background var(--transition);
  border-radius: inherit;
}

.showcase-band:hover .showcase-overlay {
  background: linear-gradient(
    to top,
    rgba(17, 18, 21, 0.95) 0%,
    rgba(17, 18, 21, 0.65) 50%,
    rgba(17, 18, 21, 0.35) 100%
  );
}

/* Content positioned over the image */
.showcase-content {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  max-width: none;
  width: 100%;
}

@media (min-width: 768px) {
  .showcase-content {
    padding: 1.5rem;
  }
}

.showcase-label {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(91, 168, 245, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

.showcase-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  color: #fff;
}

@media (min-width: 768px) {
  .showcase-title {
    font-size: 1.8rem;
  }
}

.showcase-desc {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  max-width: none;
}

.showcase-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent);
  transition:
    gap var(--transition),
    color var(--transition);
}

.showcase-band:hover .showcase-cta {
  gap: 0.75rem;
  color: var(--accent-hover);
}

/* --- Why Telamorph --- */
.why-telamorph {
  position: relative;
}

.section-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.value-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  height: 100%;
  overflow: hidden;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.value-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.value-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--accent-subtle);
  color: var(--accent);
  margin-bottom: 1.25rem;
  transition:
    background-color var(--transition),
    transform var(--transition);
}

.value-card-icon svg {
  width: 24px;
  height: 24px;
}

.value-card:hover .value-card-icon {
  background-color: rgba(91, 168, 245, 0.18);
  transform: scale(1.05);
}

.value-card h3 {
  font-size: 1.26rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.value-card p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   Responsive — landing page (mobile / small tablet)
   ========================================================================== */
@media (max-width: 767.98px) {
  .hero {
    padding-top: calc(var(--nav-height, 72px) + 1.25rem);
    padding-bottom: clamp(3.5rem, 12vh, 5rem);
    align-items: flex-end; /* keep hero content bottom-aligned on mobile */
    text-align: left;
  }

  .hero-lead {
    max-width: none;
  }

  /* Stack split rows; image below text, consistent regardless of row order */
  .split-row,
  .split-row--reverse {
    flex-direction: column;
    gap: 1.75rem;
  }

  /* Drop flex:1 1 0 — in a column with no shared height, basis-0 collapses the
     image to nothing. flex:none lets aspect-ratio size it from the full width. */
  .split-text,
  .split-media {
    flex: none;
    width: 100%;
  }

  .split-media {
    aspect-ratio: 16 / 10;
  }

  /* Switch the horizontal slide to a vertical one so nothing pushes past the
     viewport edge on narrow screens */
  .reveal.reveal-left,
  .reveal.reveal-right {
    translate: 0 24px;
  }

  .manifesto-quote br {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .split-media-tag {
    font-size: 0.66rem;
    left: 0.75rem;
    bottom: 0.75rem;
  }
}
