/* ───────── V3 HOME — Monks-inspired: clean, spacious, editorial ───────── */

/* ═══════════════ HERO — LOGO DOCK + OVAL EXPAND ═══════════════ */
/* Hide nav logo while hero logo is visible */
body.hero-active .nav__brand { opacity: 0; pointer-events: none; }

.hero-pin {
  position: relative;
  /* height set by JS to create scroll room */
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--mash-dusk-blue);
  overflow: hidden;
  z-index: 1;
}

.hero__logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  will-change: transform, opacity;
  pointer-events: none;
}
.hero__logo-center {
  width: min(400px, 60vw);
  display: block;
  opacity: 0;
  animation: logo-in 0.5s ease 0.1s forwards;
}
@keyframes logo-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Oval wrapper — holds both the PNG shape and the video */
.hero__oval-wrap {
  position: absolute;
  left: calc(50% - min(400px, 60vw) / 2 + min(400px, 60vw) * 0.328);
  top: calc(50% - min(400px, 60vw) * 0.247 / 2 + min(400px, 60vw) * 0.247 * 0.175);
  width: calc(min(400px, 60vw) * 0.16);
  z-index: 2;
  will-change: transform;
  transform-origin: center center;
  opacity: 0;
  pointer-events: none;
  animation: oval-drop 1.4s ease 0.3s forwards;
}
/* The actual brand oval PNG — sits on top, acts as the shape */
.hero__oval-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
}
/* Video — same size as the PNG, behind it.
   When oval-img fades out, video shows through in the same area */
.hero__oval-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  /* Round enough to roughly clip to the oval at large scales */
  border-radius: 45%;
}
/* Hero text — appears after video fills the screen */
.hero__text {
  position: absolute;
  bottom: 100px;
  left: var(--pad-page);
  right: var(--pad-page);
  z-index: 4;
  color: white;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}
.hero__text.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero__headline span {
  font-weight: 300;
  opacity: .6;
}
.hero__sub {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255,255,255,.6);
  max-width: 440px;
  margin-bottom: 28px;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: opacity .3s;
}
.hero__cta:hover { opacity: .85; }
.hero__cta span {
  font-size: 16px;
}

@keyframes oval-drop {
  0% { transform: translateY(-800%) scale(0.3) rotate(-30deg); opacity: 0; }
  10% { opacity: 1; }
  35% { transform: translateY(0) scale(1.08) rotate(3deg); }
  55% { transform: translateY(-150%) scale(0.85) rotate(-4deg); }
  75% { transform: translateY(0) scale(1.05) rotate(2deg); }
  88% { transform: translateY(-50%) scale(0.94) rotate(-1deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

/* ═══════════════ SOLUTIONS (scroll-driven horizontal reveal) ═══════════════ */
.solutions-pin {
  position: relative;
  /* height is set dynamically by JS */
}
.solutions {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper-subtle);
  overflow: hidden;
}
.solutions__headline {
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 750px;
  padding-top: 80px;
  margin-bottom: 48px;
}
.solutions__grid {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.sol-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 260px;
}
/* Stagger cards up/down like monks.com */
.sol-card:nth-child(odd) { padding-top: 0; }
.sol-card:nth-child(even) { padding-top: 50px; }

.sol-card__num {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(0,0,0,0.07);
  pointer-events: none;
  user-select: none;
  margin-bottom: -8px;
}
.sol-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  overflow: hidden;
}

/* Glass hover overlay */
.sol-card__hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  opacity: 0;
  transition: opacity .35s ease;
}
.sol-card:hover .sol-card__hover {
  opacity: 1;
}
.sol-card__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 16px;
  opacity: .85;
}
.sol-card__hover-num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.5);
  margin-bottom: 4px;
}
.sol-card__hover h4 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.sol-card__hover p {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  font-weight: 400;
}
.sol-card__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 400;
}
.sol-card__title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}
/* View all projects card — same size as .sol-card__img */
.sol-card--viewall .sol-card__num,
.sol-card--viewall .sol-card__label,
.sol-card--viewall .sol-card__title { display: none; }
.sol-card__viewall-inner {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  background: var(--mash-dusk-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: white;
  transition: background .3s;
}
.sol-card--viewall:hover .sol-card__viewall-inner { background: #063a46; }
.sol-card__viewall-count {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  opacity: .2;
}
.sol-card--viewall h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: white;
}
.sol-card--viewall .sol-card__arrow {
  background: white;
  color: var(--mash-dusk-blue);
  border-color: white;
  opacity: 1;
  transform: none;
}

.sol-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: white;
  font-size: 12px;
  font-weight: 400;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}
.sol-card:hover .sol-card__arrow {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}


/* ═══════════════ SERVICES (monks-style — hover fills section with color) ═══════════════ */
.svc-monks {
  position: relative;
  padding-top: 100px;
  padding-bottom: 120px;
  background: var(--paper-subtle);
  overflow: hidden;
  transition: background-color .4s ease;
}
/* Background color fill — changes on hover via JS */
.svc-monks__bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .4s ease, background-color .3s ease;
  z-index: 0;
}
.svc-monks.hovered .svc-monks__bg {
  opacity: 1;
}
/* Image card stack — arranged on a vertical arc, rotates on hover */
.svc-monks__carousel {
  position: absolute;
  right: calc(var(--pad-page) + 40px);
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 380px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.svc-monks.hovered .svc-monks__carousel {
  opacity: 1;
  pointer-events: auto;
}
.svc-monks__wheel {
  position: relative;
  width: 100%;
  height: 100%;
}
.svc-monks__card {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity .5s ease;
  transform-origin: center 120%;
}
.svc-monks__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc-monks__inner {
  position: relative;
  z-index: 2;
}
.svc-monks__inner .eyebrow {
  display: block;
  margin-bottom: 40px;
}
.svc-monks__list {
  display: flex;
  flex-direction: column;
}
.svc-monks__row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  width: 100%;
  border-bottom: 1px solid rgba(0,0,0,.1);
  text-decoration: none;
  color: var(--ink);
  transition: padding .3s var(--ease-out), opacity .3s;
}
.svc-monks__row:first-child {
  border-top: 1px solid rgba(0,0,0,.1);
}
.svc-monks__row h3 {
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.svc-monks__row:hover {
  padding-left: 16px;
}
/* Dim non-hovered rows */
.svc-monks.hovered .svc-monks__row {
  opacity: .35;
  border-color: rgba(0,0,0,.06);
}
.svc-monks.hovered .svc-monks__row:hover {
  opacity: 1;
}
.svc-monks__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .3s, transform .3s var(--ease-out), background .2s, border-color .2s;
}
.svc-monks__row:hover .svc-monks__arrow {
  opacity: 1;
  transform: translateX(0);
}
.svc-monks.hovered .svc-monks__row:hover .svc-monks__arrow {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}


/* ═══════════════ SERVICES MOBILE ═══════════════ */
@media (max-width: 820px) {
  /* Make section a 2-column layout: text left, images right */
  .svc-monks__inner {
    display: flex;
    flex-direction: column;
  }
  .svc-monks__inner .eyebrow {
    color: var(--ink);
  }
  .svc-monks__carousel {
    display: block !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    height: 200px !important;
    margin-bottom: 32px;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .svc-monks__wheel {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .svc-monks__card {
    width: 70%;
    height: 180px;
    position: absolute;
    left: 15%;
    top: 10px;
  }
  /* Hide arrow on mobile, show "View more" button on active */
  .svc-monks__arrow { display: none; }
  .svc-monks__row--active::after {
    content: 'View more →';
    font-size: 12px;
    font-weight: 500;
    color: white;
    background: var(--ink);
    padding: 6px 14px;
    border-radius: 100px;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* Smaller text for mobile */
  .svc-monks__row { padding: 14px 0; }
  .svc-monks__row h3 {
    font-size: clamp(18px, 5vw, 28px);
  }
  .svc-monks { padding-top: 48px; padding-bottom: 48px; }
}

/* ═══════════════ METRICS ═══════════════ */
.metrics {
  padding-top: 120px;
  padding-bottom: 120px;
  background: var(--paper-subtle);
}
.metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.metric {
  display: flex; flex-direction: column; gap: 10px;
}
.metric + .metric { border-left: 1px solid var(--rule); padding-left: 40px; }
.metric + .metric::before { display: none; }
.metric__n {
  font-size: clamp(48px, 5.5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.metric__l { font-size: 14px; color: var(--ink-soft); max-width: 160px; line-height: 1.4; }
@media (max-width: 820px) {
  .metrics__grid { grid-template-columns: 1fr 1fr; }
  .metric + .metric { border-left: 0; padding-left: 0; }
  .metric:nth-child(odd) + .metric { border-left: 1px solid var(--rule); padding-left: 32px; }
}

/* ═══════════════ PROJECTS (clean image grid) ═══════════════ */
.projects-home {
  padding-top: 120px;
  padding-bottom: 160px;
  background: white;
}
.projects-home__head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 48px;
}
.projects-home__head h2 {
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.projects-home__all {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color .2s;
}
.projects-home__all:hover { color: var(--ink); }

.projects-home__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.pcard {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  transition: transform .6s var(--ease-out);
  display: block;
}
.pcard:first-child {
  grid-column: span 2;
  aspect-ratio: 21 / 9;
}
.pcard:hover { transform: scale(1.01); }
.pcard::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  z-index: 1;
  opacity: 0;
  transition: opacity .4s;
}
.pcard:hover::before { opacity: 1; }
.pcard__content {
  position: absolute;
  bottom: 20px; left: 20px; right: 20px;
  z-index: 2;
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s, transform .4s var(--ease-out);
}
.pcard:hover .pcard__content { opacity: 1; transform: none; }
.pcard__cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 400;
  opacity: 0.7;
  margin-bottom: 4px;
  display: block;
}
.pcard__title {
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
}


/* ═══════════════ CEO MESSAGE (quatrefoil expand) ═══════════════ */
.ceo-pin {
  position: relative;
}
.ceo-section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  overflow: hidden;
}
.ceo-shape {
  position: absolute;
  width: 60px;
  height: 60px;
  object-fit: contain;
  z-index: 1;
  will-change: transform;
  pointer-events: none;
  transition: opacity .3s ease;
}
.ceo-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  opacity: 0;
}
.ceo-content.visible { opacity: 1; }

.ceo-video {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.1);
}
.ceo-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ceo-video__label {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: rgba(255,255,255,.5);
}
.ceo-text { color: white; }
.ceo-text .eyebrow {
  color: rgba(255,255,255,.45);
  display: block;
  margin-bottom: 20px;
}
.ceo-text h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.ceo-text h2 em { font-style: italic; color: rgba(255,255,255,.5); }
.ceo-text p {
  font-size: 16px;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 24px;
}
.ceo-text cite {
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  color: rgba(255,255,255,.4);
}
@media (max-width: 820px) {
  .ceo-content { grid-template-columns: 1fr; gap: 32px; }
}

/* ═══════════════ CLIENTS (logo grid) ═══════════════ */
.clients {
  padding-top: 100px;
  padding-bottom: 100px;
  background: var(--paper-subtle);
}
.clients__head {
  margin-bottom: 48px;
}
.clients__head .eyebrow {
  display: block;
  margin-bottom: 16px;
}
.clients__title {
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.clients__sub {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 440px;
  line-height: 1.6;
}
.clients__logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--rule);
}
.clients__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 100px;
}
.clients__logo:nth-child(6n) { border-right: 0; }
.clients__logo:nth-last-child(-n+6) { border-bottom: 0; }
.clients__logo img {
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
  filter: grayscale(1) opacity(.45);
  transition: filter .3s;
}
.clients__logo:hover img {
  filter: grayscale(0) opacity(1);
}
.clients__fallback {
  display: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: center;
}
@media (max-width: 820px) {
  .clients__logo-grid { grid-template-columns: repeat(3, 1fr); }
  .clients__logo:nth-child(6n) { border-right: 1px solid var(--rule); }
  .clients__logo:nth-child(3n) { border-right: 0; }
  .clients__logo:nth-last-child(-n+6) { border-bottom: 1px solid var(--rule); }
  .clients__logo:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 480px) {
  .clients__logo-grid { grid-template-columns: repeat(2, 1fr); }
  .clients__logo:nth-child(3n) { border-right: 1px solid var(--rule); }
  .clients__logo:nth-child(2n) { border-right: 0; }
  .clients__logo:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .clients__logo:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ═══════════════ CTA BANNER ═══════════════ */
.cta-banner {
  background: var(--mash-dusk-blue);
  color: white;
  padding-top: 140px;
  padding-bottom: 140px;
  position: relative;
  overflow: hidden;
}
.cta-banner__inner { position: relative; z-index: 2; }
.cta-banner h2 {
  font-size: var(--fs-h1);
  font-weight: 500;
  margin: 16px 0;
}
.cta-banner p {
  font-size: 16px;
  max-width: 380px;
  margin-bottom: 32px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
}
.cta-banner .btn--primary { background: white; color: var(--ink); }
.cta-banner .btn--primary:hover { opacity: .9; }
.cta-banner__oval {
  top: -15%; right: -8%;
  width: 400px;
  opacity: .06;
}
