/* ═══════════════════════════════════════════════════════════════════
   SW Finance — sections.css
   Homepage section layouts ONLY
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--c-primary);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.22;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg,
      rgba(10, 22, 40, 0.96) 0%,
      rgba(13, 31, 60, 0.82) 50%,
      rgba(27, 79, 171, 0.20) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + var(--sp-16));
  padding-bottom: var(--sp-16);
}

.hero__eyebrow {
  margin-bottom: var(--sp-5);
}

.hero__headline {
  color: var(--c-white);
  max-width: 760px;
  margin-bottom: var(--sp-6);
}

.hero__headline em {
  font-style: italic;
  color: var(--c-secondary);
}

.hero__subtitle {
  max-width: 580px;
  margin-bottom: var(--sp-10);
  color: rgba(255, 255, 255, 0.72);
}

.hero__cta-group {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Stats bar */
.hero__stats {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
}

.hero__stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 700px) {
  .hero__content {
    padding-top: calc(var(--nav-h) + var(--sp-10));
  }

  .hero__headline {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .hero__stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .stat-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: var(--sp-16);
  }
}

/* ── Sector strip ───────────────────────────────────────────────── */
.sector-strip {
  position: relative;
  /* establish stacking context */
  z-index: 6;
  /* sit above section-layer--5 (z-index: 5) */
  background: var(--c-secondary);
  overflow: hidden;
  padding-block: var(--sp-3);
}

.sector-strip__track {
  display: flex;
  gap: var(--sp-8);
  width: max-content;
  animation: ticker 28s linear infinite;
}

.sector-strip__track:hover {
  animation-play-state: paused;
}

.sector-strip__item {
  font-size: var(--text-small);
  font-weight: var(--weight-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-white);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.sector-strip__item::after {
  content: '·';
  color: rgba(255, 255, 255, 0.5);
}

/* ── About section ──────────────────────────────────────────────── */
.about {
  background: var(--c-surface);
}

/* ── Shared split-section utilities ─────────────────────────────
   Used by About, Mission, and London sections.
   Each section keeps only its unique overrides below.
   ────────────────────────────────────────────────────────────── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: stretch;
}

/* Image column: fills its grid cell via absolutely-positioned picture */
.split-image-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  align-self: stretch;
}

.split-image-wrap > picture {
  position: absolute;
  inset: 0;
  display: block;
}

.split-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Section heading inside a split content column */
.split-heading {
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-6);
}

/* Mobile: stack vertically, image collapses to fixed height and fades out */
@media (max-width: 1100px) {
  .split-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .split-image-wrap {
    border-radius: 8px 8px 0 0;
    height: 280px; /* default — mission overrides to 560px */
  }

  .split-image {
    aspect-ratio: unset;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  }

  .split-content {
    padding-top: var(--sp-8);
  }
}

/* ── About ── */
.about__principles {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}

/* about image: subject is near the top */
.about .split-image { object-position: top; }
@media (max-width: 1100px) {
  .about .split-image { object-position: center 20%; }
}

/* ── Services section ───────────────────────────────────────────── */
.services {
  background: var(--c-surface-2);
}

.services__header {
  max-width: 680px;
  margin-bottom: var(--sp-12);
}

.services__header .section-heading,
.methodologies__header .section-heading--light,
.testimonials__header .section-heading {
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-4);
}

/* ── Shared 3-column card grid (Services, Methodologies, Testimonials) ── */
.section-grid--3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

@media (max-width: 1024px) {
  .section-grid--3col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .section-grid--3col { grid-template-columns: 1fr; }
}

/* ── Mission section ────────────────────────────────────────────── */
.mission {
  background: var(--c-surface);
}

/* ── Mission ── */
.mission__content {
  order: 1;
}

/* Mission image sits right (order:2) and uses a lower focal point */
.mission .split-image-wrap { order: 2; }
.mission .split-image { object-position: center 30%; }

@media (max-width: 1100px) {
  /* Image moves above content on mobile, taller to show the portrait */
  .mission .split-image-wrap {
    order: 1;
    height: 560px;
  }
  .mission .split-image { object-position: center 25%; }
  .mission__content {
    order: 2;
  }

  /* Mobile consultant caption: top-right chip */
  .mission__consultant {
    bottom: var(--sp-4)to;
    top: auto;
    right: var(--sp-4);
    left: auto;
    border-radius: 6px;
    background: rgba(10, 22, 40, 0.82);
    padding: var(--sp-2) var(--sp-4);
    text-align: right;
  }
}

/* ── Consultant caption overlay (desktop: bottom bar) ───────────── */
.mission__consultant {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-4) var(--sp-6);
  background: linear-gradient(to top, rgba(10, 22, 40, 0.88) 0%, rgba(10, 22, 40, 0.60) 60%, transparent 100%);
  border-radius: 0 0 8px 8px;
}

.mission__consultant-name {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--weight-display);
  color: var(--c-white);
  line-height: var(--leading-tight);
  display: block;
}

.mission__consultant-role {
  font-size: var(--text-small);
  font-weight: var(--weight-label);
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: var(--tracking-wide);
  display: block;
  margin-top: var(--sp-1);
}

.mission__quote {
  margin-top: var(--sp-8);
  padding: var(--sp-6) var(--sp-8);
  border-left: 3px solid var(--c-secondary);
  background: var(--c-surface-2);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lead);
  color: var(--c-primary);
  line-height: var(--leading-snug);
}

/* ── Methodologies section ──────────────────────────────────────── */
.methodologies {
  background: var(--c-primary);
}

.methodologies__header {
  max-width: 700px;
  margin-bottom: var(--sp-12);
}

/* ── London section ─────────────────────────────────────────────── */
.london {
  background: var(--c-dark);
}

/* Reset list bullets on shared 3-col card grids */
.section-grid--3col {
  list-style: none;
}

/* london image: subject is near the top */
.london .split-image { object-position: top; }
@media (max-width: 1100px) {
  .london .split-image { object-position: center 20%; }
}

.london__features { margin-top: var(--sp-8); }
.london__cta      { margin-top: var(--sp-10); }

/* ── Testimonials section ───────────────────────────────────────── */
.testimonials {
  background: var(--c-surface-2);
}

.testimonials__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-12);
}

/* ── Contact section ────────────────────────────────────────────── */
.contact {
  position: relative;
  background: var(--c-surface);
  overflow: hidden;
  isolation: isolate;         /* Fix for Safari/Chrome absolute position bleeding out of border-radius */
  transform: translateZ(0);   /* Fallback compositing hint to force strict GPU clipping */
}

.contact > picture {
  position: absolute;
  inset: 0;
  display: block;
}

/* Background image layer */
.contact__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Dark overlay for legibility */
.contact__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg,
      rgba(10, 22, 40, 0.91) 0%,
      rgba(13, 31, 60, 0.85) 60%,
      rgba(13, 31, 60, 0.78) 100%);
}

/* Container sits above overlay */
.contact .container {
  position: relative;
  z-index: 2;
}

/* Single-column, max-width form card */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin-inline: auto;
}

.contact__form-wrap {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: var(--sp-12) var(--sp-10);
}

/* Override form label and input colors for dark background */
.contact .form-label {
  color: rgba(255, 255, 255, 0.85);
}

.contact .form-input,
.contact .form-textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--c-white);
}

.contact .form-input::placeholder,
.contact .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact .form-input:focus,
.contact .form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  outline: none;
}

.contact__heading {
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-8);
  color: var(--c-white);
}

@media (max-width: 560px) {
  .contact__form-wrap {
    padding: var(--sp-8) var(--sp-6);
  }
}