/* =====================================================================
   Home page "Our Work" bento grid (index.php, section.work-v2)
   Uses brand tokens from header-modern.css, .section-eyebrow from
   services.css and .hero-btn from hero.css.
   ===================================================================== */
.work-v2 {
  position: relative;
  padding: 100px 0;
  background:
    radial-gradient(40% 50% at 0% 0%, rgba(255, 122, 61, 0.06), transparent 70%),
    radial-gradient(40% 50% at 100% 100%, rgba(106, 61, 240, 0.07), transparent 70%),
    #ffffff;
}
.work-container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Heading (same style as Services / Workflow) ---------- */
.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.work-v2 .work-title {
  margin: 20px 0 0;
  font-family: var(--title-font);
  font-size: clamp(34px, 3.6vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #12141c;
}
.work-title-grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.work-head .hero-btn {
  flex-shrink: 0;
  height: 54px;
}

/* ---------- Bento grid ----------
   a = tall left tile, b c d = top row, e = bottom, f = wide bottom */
.work-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  grid-template-rows: 152px 152px;
  grid-template-areas:
    "a b c d"
    "a e f f";
  gap: 16px;
  margin-top: 36px;
}
.work-tile-a { grid-area: a; }
.work-tile-b { grid-area: b; }
.work-tile-c { grid-area: c; }
.work-tile-d { grid-area: d; }
.work-tile-e { grid-area: e; }
.work-tile-f { grid-area: f; }

.work-tile {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  background: #1a1830;
  color: #ffffff;
  box-shadow: 0 18px 36px -26px rgba(18, 20, 28, 0.6);
  transition: transform 450ms var(--header-ease), box-shadow 450ms var(--header-ease);
}
.work-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--header-ease);
}
/* dark fade at the bottom for the text */
.work-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 13, 24, 0) 35%, rgba(12, 13, 24, 0.82) 100%);
  transition: opacity 400ms ease;
}
/* gradient border on hover */
.work-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}
.work-tile:hover {
  color: #ffffff;
  transform: translateY(-5px);
  box-shadow: 0 30px 50px -28px rgba(232, 49, 138, 0.55);
}
.work-tile:hover img {
  transform: scale(1.07);
}
.work-tile:hover::after {
  opacity: 1;
}

.work-tile-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}
.work-tile-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-family: var(--text-font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.work-tile-title {
  display: block;
  margin-top: 8px;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.work-tile-a .work-tile-title {
  font-size: 24px;
}

/* arrow button: slides in on hover */
.work-tile-arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 10px 20px -8px rgba(232, 49, 138, 0.7);
  opacity: 0;
  transform: translate(-6px, 6px) rotate(-45deg);
  transition: opacity 350ms ease, transform 450ms var(--header-ease);
}
.work-tile:hover .work-tile-arrow {
  opacity: 1;
  transform: translate(0, 0) rotate(-45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .work-v2 {
    padding: 90px 0;
  }
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 300px repeat(3, 190px);
    grid-template-areas:
      "a a"
      "b c"
      "d e"
      "f f";
  }
}
@media (max-width: 767.98px) {
  .work-container {
    padding: 0 20px;
  }
  .work-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .work-grid {
    gap: 12px;
    grid-template-rows: 240px repeat(3, 160px);
  }
  .work-tile-title {
    font-size: 15px;
  }
  .work-tile-a .work-tile-title {
    font-size: 20px;
  }
  /* touch screens: show the arrow */
  .work-tile-arrow {
    opacity: 1;
    transform: rotate(-45deg);
    width: 34px;
    height: 34px;
  }
}
