/* Homepage. Enqueued on the front page only, after main.css. */

.is-front {
  --surface: #f7f8fa;
  --text-strong: #0b1220;
  --text-soft: #4a5566;
  --shadow-soft: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.04);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}

.home-section {
  padding: clamp(88px, 10vw, 144px) 0;
  background: #fff;
  color: var(--text-strong);
}
.home-section--surface { background: var(--surface); }
.home-section--dark {
  background:
    radial-gradient(480px 220px at 92% 0%, rgba(20, 212, 212, 0.28), transparent 62%),
    linear-gradient(160deg, #0c335c, var(--navy-deep) 55%);
  color: #fff;
}
.home-section--dark .home-head h2 { color: #fff; }
.home-section--dark .home-head .lede { color: rgba(255, 255, 255, 0.78); }
.home-section--dark a:focus-visible { outline-color: var(--teal); }
.home-section h2,
.home-section h3 { color: var(--text-strong); }

.home-head { margin-bottom: clamp(40px, 5vw, 64px); }
.home-head h2 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
.home-section h3,
.home-final h2 { text-wrap: balance; }
.home-section p,
.home-hero .lede { text-wrap: pretty; }
.home-head h2:last-child { margin-bottom: 0; }
.home-head .lede,
.home-hero .lede {
  font-size: clamp(1.06rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 46em;
  margin: 0;
}

.home-section a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.home-hero a:focus-visible,
.home-final a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* 02 Hero */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header)), 900px);
  padding: clamp(72px, 9vw, 128px) 0;
  box-sizing: border-box;
  background: #061a30;
  color: #fff;
}
.home-hero__film {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.home-hero__film .brand-video {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 60% 50%;
  background: transparent;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 18, 36, 0.94) 0%, rgba(6, 18, 36, 0.84) 34%, rgba(6, 18, 36, 0.42) 64%, rgba(6, 18, 36, 0.12) 100%),
    linear-gradient(180deg, rgba(6, 18, 36, 0.3) 0%, rgba(6, 18, 36, 0) 30%, rgba(6, 18, 36, 0) 70%, rgba(6, 18, 36, 0.6) 100%);
}
.home-hero__inner { width: min(1280px, 100%); }
.home-hero__copy { max-width: 660px; }
.home-hero .eyebrow { color: var(--teal); margin-bottom: 22px; }
.home-hero .eyebrow__line { background: var(--teal); }
.home-hero h1 {
  font-size: clamp(3rem, 6.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 0 0.32em;
  color: #fff;
}
.home-hero .lede { color: rgba(255, 255, 255, 0.88); }
.home-hero .actions { margin-top: 36px; }
.home-hero .btn--ghost {
  background: rgba(6, 18, 36, 0.24);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}
.home-hero .btn--ghost:hover { border-color: #fff; }
.home-hero__caps {
  margin: 28px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

/* 03 One team */
.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: opacity 0.7s var(--ease-out), transform 0.35s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease;
}
.pillar-card__visual {
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--build);
}
.pillar-card--reach .pillar-card__visual { background: var(--market); }
.pillar-card--grow .pillar-card__visual { background: var(--grow); }
.pillar-card__visual svg { width: 100%; height: 100%; display: block; transition: transform 0.6s var(--ease-out); }
.pillar-card__body { padding: 28px 28px 32px; }
.pillar-card__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}
.pillar-card__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.pillar-card h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.pillar-card__caps { margin: 0; color: var(--text-soft); font-weight: 500; }

/* 04 Outcomes */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.outcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  padding: clamp(20px, 2vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--text-strong);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: opacity 0.7s var(--ease-out), transform 0.35s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease;
}
.outcome-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 0 4px 8px;
}
.outcome-card__index {
  margin-bottom: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--teal-deep);
}
.outcome-card h3 {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.outcome-card p { margin: 0; color: var(--text-soft); }
.outcome-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}
.outcome-card__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--navy);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out);
}
.outcome-card__visual {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: clamp(16px, 2vw, 28px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--build);
}
.outcome-card--customers .outcome-card__visual { background: var(--market); }
.outcome-card--automate .outcome-card__visual { background: var(--mist); }
.outcome-card--grow .outcome-card__visual { background: var(--grow); }
.outcome-card__visual svg {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  transition: transform 0.6s var(--ease-out);
}
.outcome-card:hover,
.outcome-card:focus-visible { border-color: rgba(10, 163, 173, 0.5); }
.outcome-card:hover .outcome-card__arrow,
.outcome-card:focus-visible .outcome-card__arrow { background: var(--teal); border-color: var(--teal); color: var(--navy-deep); transform: translateX(4px); }

/* 05 What we do */
.service-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.service-group { padding: 36px 32px 8px 0; }
.service-group + .service-group { padding-left: 32px; border-left: 1px solid var(--line); }
.home-section .service-group__label {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 18px;
}
.service-group ul { list-style: none; margin: 0; padding: 0; }
.service-group li {
  font-family: var(--display);
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding: 7px 0;
}
.service-group a {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.2s ease;
}
.service-group a:hover { text-decoration-color: var(--teal); }
.home-services__cta { margin: 44px 0 0; }

/* 06 Selected work (renders only with approved projects) */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.work-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.work-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
}
.work-card__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; }
.work-card--featured .work-card__media { aspect-ratio: auto; min-height: 100%; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.work-card__body { padding: 28px; }
.work-card--featured .work-card__body { display: flex; flex-direction: column; justify-content: flex-end; padding: 36px; }
.work-card h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin: 0 0 6px; }
.work-card__tags {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.work-card__body > p:not(.work-card__tags) { color: var(--text-soft); }
.work-card__proof { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.95rem; }
.work-card__proof dt { font-weight: 700; color: var(--navy); }
.work-card__proof dd { margin: 0; color: var(--text-soft); }

/* 07 Why */
.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.why-list li { border-top: 1px solid var(--text-strong); padding-top: 24px; }
.why-list h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.why-list p { margin: 0; color: var(--text-soft); font-size: 1.05rem; }
.home-why__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.home-why .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.home-why__media .split-still { box-shadow: var(--shadow-soft); }
.home-section--dark .why-list li { border-top-color: rgba(255, 255, 255, 0.22); }
.home-section--dark .why-list h3 { color: #fff; }
.home-section--dark .why-list p { color: rgba(255, 255, 255, 0.72); }
.home-section--dark .split-still {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}
.home-section--dark .outcome-card {
  border-color: transparent;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.home-section--dark .outcome-card:hover,
.home-section--dark .outcome-card:focus-visible { border-color: var(--teal); }
.home-why__media .split-still picture,
.home-why__media .split-still img { aspect-ratio: 16 / 10; }
.home-why__media .split-still img { object-position: 72% 50%; }

/* 08 Global */
.home-global__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.home-global .home-head { margin-bottom: 0; }
.home-global__map { margin: 0; }
.home-global__map img { width: 100%; height: auto; }

/* 09 Final CTA */
.home-final { padding: clamp(96px, 11vw, 160px) 0; text-align: center; }
.home-final__inner { display: flex; flex-direction: column; align-items: center; }
.home-final h2 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.4em;
  color: #fff;
}
.home-final p { font-size: clamp(1.06rem, 1.3vw, 1.25rem); max-width: 40ch; margin: 0 0 36px; }
.home-final .actions { justify-content: center; }

/* Hover and motion */
@media (hover: hover) {
  .pillar-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11, 18, 32, 0.08); }
  .pillar-card:hover .pillar-card__visual svg { transform: scale(1.03); }
  .outcome-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11, 18, 32, 0.08); }
  .home-section--dark .outcome-card:hover { box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32); }
  .outcome-card:hover .outcome-card__visual svg { transform: scale(1.05); }
  .work-card:hover .work-card__media img { transform: scale(1.03); }
}

/* Responsive */
@media (max-width: 1180px) {
  .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (max-width: 980px) {
  .home-hero {
    align-items: flex-end;
    min-height: min(calc(100svh - var(--header)), 760px);
    padding: 120px 0 56px;
  }
  .home-hero::after {
    background: linear-gradient(180deg, rgba(6, 18, 36, 0.35) 0%, rgba(6, 18, 36, 0.62) 38%, rgba(6, 18, 36, 0.92) 72%, rgba(6, 18, 36, 0.96) 100%);
  }
  .home-hero__film .brand-video { object-position: 50% 30%; }
  .pillars { grid-template-columns: 1fr; }
  .pillar-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pillar-card__visual { aspect-ratio: auto; min-height: 220px; }
  .pillar-card__body { align-self: center; }
  .outcome-grid { grid-template-columns: 1fr; }
  .service-groups { grid-template-columns: 1fr; border-top: 0; }
  .service-group,
  .service-group + .service-group { padding: 28px 0 12px; border-left: 0; border-top: 1px solid var(--line); }
  .home-global__grid { grid-template-columns: 1fr; }
  .home-why__grid { grid-template-columns: 1fr; }
  .home-why__media .split-still picture,
  .home-why__media .split-still img { aspect-ratio: 16 / 9; }
  .home-why__media .split-still img { object-position: 70% 50%; }
  .work-card--featured { grid-template-columns: 1fr; }
  .work-card--featured .work-card__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 680px) {
  .home-hero .actions .btn,
  .home-final .actions .btn { width: 100%; min-height: 48px; }
  .home-final .actions { width: 100%; flex-direction: column; }
  .pillar-card { display: flex; }
  .pillar-card__visual { aspect-ratio: 5 / 3; min-height: 0; }
  .pillar-card__body { padding: 24px; }
  .outcome-grid,
  .work-grid,
  .why-list,
  .home-why .why-list { grid-template-columns: 1fr; }
  .outcome-card { grid-template-columns: 1fr; gap: 20px; padding: 16px 16px 24px; }
  .outcome-card__visual { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .outcome-card__body { padding: 4px 8px 0; }
  .outcome-card__index { margin-bottom: 12px; }
  .outcome-card__cta { padding-top: 20px; }
  .outcome-card__arrow { width: 44px; height: 44px; }
  .work-card__body,
  .work-card--featured .work-card__body { padding: 24px; }
}
