/* =========================================================
   HOME PAGE (index.html)
   ========================================================= */

/* ---------- HERO: text left, stacked cards right ---------- */

.hero { padding-block: 4.5rem 5rem; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-headline {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 700;
  line-height: 1.06;
  margin-bottom: 1.5rem;
  animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-tagline {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin-bottom: 2.25rem;
  animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- HERO SHOWREEL ---------- */

.hero-showcase {
  animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.showcase-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--accent-red);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(197, 3, 55, 0.22);
  display: grid;
  place-items: center;
}

/* Any media dropped in fills the frame */
.showcase-frame video,
.showcase-frame iframe,
.showcase-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.showcase-ph {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 880px) {
  .hero-showcase { order: -1; }
}

/* ---------- TRUSTED BY: scrolling client row ---------- */

.trusted {
  padding-block: 4.5rem 5rem;
}

.trusted-label {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.client-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.client-track {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  width: max-content;
  animation: clientScroll 30s linear infinite;
}

@keyframes clientScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.client {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.client-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* No logo yet — show the branded circle with initials instead of a
   blank white disc */
.client-avatar:not(:has(img)) {
  background: var(--accent-red);
  border-color: transparent;
}

.client-avatar img {
  /* Default: fill the circle edge to edge — right for square icon-style
     marks (Growlyze, Fitness Forge, Builderops, Realty Vault). */
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Wordmark / wide logos (icon + text, or a landscape mark) get the whole
   logo fitted instead, with a little breathing room — `cover` would crop
   the text off these. Applied per-client in the markup. */
.client-avatar--wordmark {
  padding: 0.35rem;
}
.client-avatar--wordmark img {
  object-fit: contain;
}
.client-avatar--zoom img {
  transform: scale(1.55);
}

/* Some source icon files have a very slight rounded-corner background
   bleeding in at the very edge, which a plain circle mask doesn't fully
   hide. A small scale pushes that sliver outside the visible circle
   without cropping any of the actual logo mark. */
.client-avatar--fill-zoom img {
  transform: scale(1.18);
}
.client-avatar img.is-loaded { opacity: 1; }

/* Initials sit underneath; the logo covers them once it loads.
   If the file is missing, onerror removes the img and these show. */
.client-initials {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--white);
}

.client-info { display: flex; flex-direction: column; line-height: 1.35; }
.client-info strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  white-space: nowrap;
}
.client-info span { font-size: 0.9rem; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .client-track { animation: none; }
  .client-marquee { overflow-x: auto; }
}

/* ---------- PROCESS: heading left, timeline right ---------- */

.process-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
}

.process-intro {
  position: sticky;
  top: 8rem;
  /* Sits centred against the tall step column rather than pinned high */
  align-self: start;
}
.process-intro .section-heading { font-size: clamp(2rem, 3.6vw, 3.1rem); }

.timeline-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Each step gets roughly a screen to itself, so only one is in view
     at a time and the next arrives as you keep scrolling. */
  gap: 0;
  /* Belt and braces: <ol> carries a browser default indent that would
     shift the steps right of the rail. */
  padding-left: 0;
  margin: 0;
  list-style: none;
  --icon-size: 64px;
  --rail-w: 2px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 2rem;
  position: relative;
  min-height: 58vh;
  align-content: start;
}
.timeline-step:last-child { min-height: auto; }

/* Each step eases in on arrival rather than all at once */
.timeline-step .step-body {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-step.is-visible .step-body { opacity: 1; transform: none; }

.step-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  opacity: 0.35;
  z-index: 2;
  position: relative;
  transition: opacity 0.6s ease, color 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.step-icon svg {
  width: 38px;
  height: 38px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-num {
  display: block;
  font-size: 0.92rem;
  color: var(--accent-pink);
  margin-bottom: 0.4rem;
}

.step-title { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin-bottom: 0.6rem; }

.step-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 42ch;
  margin: 0;
}

/* ---------- STATS: left accent rule ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 4.5rem;
}

.stat-item {
  padding-left: 1.75rem;
  border-left: 3px solid var(--accent-red);
  position: relative;
  /* Staggered fade-up entrance, on top of the existing rule-grow and
     count-up — three layered motions landing together rather than one. */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-item.is-visible { opacity: 1; transform: none; }

.stat-item:nth-child(1) { transition-delay: 0s; }
.stat-item:nth-child(2) { transition-delay: 0.12s; }
.stat-item:nth-child(3) { transition-delay: 0.24s; }

/* The rule grows downward as the stat scrolls into view */
.stat-item::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-pink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.stat-item.is-visible::before { transform: scaleY(1); }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  margin-bottom: 0.6rem;
  color: var(--white);
}

/* Brief pulse when the count-up lands on its final value */
.stat-number.is-done { animation: statSettle 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes statSettle {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); text-shadow: 0 0 22px rgba(255, 46, 99, 0.55); }
  100% { transform: scale(1); text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stat-number.is-done { animation: none; }
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 26ch;
}

@media (max-width: 880px) {
  .stats-grid { grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
}

/* ---------- PROCESS RAIL: fills as you scroll ---------- */

.timeline-steps { position: relative; }

.timeline-rail {
  position: absolute;
  /* Centre of the icon column, minus half the rail's own width */
  left: calc(var(--icon-size) / 2 - var(--rail-w) / 2);
  /* top and height are set by JS from the real icon positions, so the
     rail starts and stops exactly at the first and last icon centres.
     These are the pre-JS fallback. */
  top: calc(var(--icon-size) / 2);
  bottom: calc(var(--icon-size) / 2);
  width: var(--rail-w);
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;   /* fill can never paint outside the rail */
  z-index: 0;
}

.timeline-fill {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-pink), var(--accent-red));
  transition: height 0.15s linear;
}

.timeline-step.is-visible .step-icon {
  opacity: 1;
  color: var(--accent-pink);
  transform: scale(1.04);
}

@media (max-width: 880px) {
}

/* ---------- TESTIMONIALS: three vertically scrolling columns ---------- */

.testimonials .section-heading {
  font-size: clamp(2.35rem, 5vw, 4rem);
  max-width: none;
}

.testimonial-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  height: 640px;
  overflow: hidden;
  /* Cards fade out at the top and bottom rather than being cut off */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.t-col { overflow: hidden; }

.t-track {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  will-change: transform;
}

/* Half the track is a duplicate, so -50% lands exactly on the copy */
.t-col--up .t-track   { animation: tScrollUp 20s linear infinite; }
.t-col--down .t-track { animation: tScrollDown 20s linear infinite; }

@keyframes tScrollUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
@keyframes tScrollDown {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

.testimonial {
  margin: 0;
  padding: 1.6rem 1.65rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.028);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.testimonial:hover {
  border-color: rgba(255, 46, 99, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.testimonial-person { display: flex; align-items: center; gap: 0.85rem; }

.person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
/* No photo/logo — fall back to the branded red initials circle */
.person-avatar:not(:has(img)) {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 0 14px rgba(197, 3, 55, 0.45);
}
.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.person-avatar img.is-loaded { opacity: 1; }

/* Some source icon files have a very slight rounded-corner background
   bleeding in at the edge — a small scale pushes it outside the visible
   circle without cropping the actual logo mark. Same fix as Trusted-by. */
.person-avatar--fill-zoom img {
  transform: scale(1.18);
}

/* Wordmark logos (icon + text) need the whole mark visible instead of
   cropped-cover, same treatment as the Trusted-by section avatars. */
.person-avatar--wordmark {
  background: var(--white);
  border-color: var(--white);
  box-shadow: none;
}
.person-avatar--wordmark img {
  object-fit: contain;
  padding: 0.3rem;
  transform: scale(1.55);
}

.person-info { display: flex; flex-direction: column; line-height: 1.35; }
.person-info strong { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--white); }
.person-info span { font-size: 0.85rem; color: var(--text-muted); }

.testimonial blockquote {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .timeline-step .step-body { opacity: 1; transform: none; }
  .step-icon { opacity: 1; }
  .t-track { animation: none !important; }
  .testimonial-columns { height: auto; mask-image: none; -webkit-mask-image: none; }
}

/* ---------- CONNECT WITH ME ---------- */

.connect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.connect-card {
  display: flex;
  flex-direction: column;
  padding: 2.25rem 1.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.connect-card:hover {
  border-color: rgba(255, 46, 99, 0.55);
  transform: translateY(-6px);
  box-shadow: 0 20px 46px rgba(197, 3, 55, 0.28);
}

/* Icon in a glowing ring */
.connect-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--accent-red);
  color: var(--white);
  box-shadow: 0 0 18px rgba(197, 3, 55, 0.45), inset 0 0 12px rgba(197, 3, 55, 0.2);
  transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
}
.connect-icon svg { width: 28px; height: 28px; }

.connect-card:hover .connect-icon {
  border-color: var(--accent-pink);
  box-shadow: 0 0 26px rgba(255, 46, 99, 0.65), inset 0 0 14px rgba(255, 46, 99, 0.28);
  transform: scale(1.06);
}

.connect-name {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.connect-sub {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.connect-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--white);
  margin-top: auto;
}
.connect-cta svg {
  width: 15px;
  height: 15px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}
.connect-card:hover .connect-cta svg { transform: translate(3px, -3px); }

/* Highlighted email card */
.connect-card.is-featured {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 1px rgba(255, 46, 99, 0.35), 0 0 34px rgba(255, 46, 99, 0.28);
}
.connect-card.is-featured .connect-sub {
  color: var(--white);
  font-weight: 500;
}

@media (max-width: 1100px) {
  .connect-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .connect-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .testimonial-columns { grid-template-columns: repeat(2, 1fr); height: 620px; }
  .t-col:last-child { display: none; }
}
@media (max-width: 640px) {
  .testimonial-columns { grid-template-columns: 1fr; height: 560px; }
  .t-col:nth-child(2) { display: none; }
}

.step-optional {
  font-size: 0.62em;
  font-weight: 500;
  color: var(--text-faint);
  vertical-align: middle;
}
/* Text-only hero until the showreel is ready. */
.hero-grid.hero-grid--text-only { grid-template-columns: minmax(0, 1fr); }
.hero-grid--text-only .hero-copy { max-width: 760px; }

/* Preserve the original typography of the home-page headline. */
.hero-headline .gradient-text {
  font-family: inherit;
  font-weight: inherit;
  font-style: normal;
  padding: 0;
}
