/* =========================================================
   Cove Craft — "Our Work" service gallery page
   Layered on top of base.css + home.css + project.css.
   Pure HTML/CSS flow; one template driven by ?service=.
   ========================================================= */

.work-flow {
  /* inherits .proj-flow padding / max-width / dark bg */
}

/* ---------- HEADER ---------- */
.work-flow__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(14px, 1.6vw, 24px);
  max-width: 880px;
  margin-bottom: clamp(48px, 7vw, 110px);
}
.work-flow__service {
  margin: 0;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.work-flow__mission {
  margin: 0;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 1.5vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.86);
  max-width: 60ch;
}
/* gradient highlight word inside the mission */
.work-flow__mission .grad {
  background: linear-gradient(95deg, #22e07a 0%, #2540ff 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.work-flow__cta {
  margin-top: clamp(6px, 1vw, 14px);
}

/* ============================================================
   PROJECT GRID — up to 4 tiles. Two-column on desktop; the
   layout reads like the reference: pairs of tall cards with the
   occasional full-width hero when a row has a single tile.
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 36px);
  margin-bottom: clamp(60px, 8vw, 140px);
}

.work-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.18;
  border-radius: 18px;
  overflow: hidden;
  background: #0e1418;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.45);
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 26px 50px rgba(0, 0, 0, 0.6);
}

/* A single trailing tile (odd count) spans the full row as a wide hero */
.work-card--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7.5;
}

.work-card__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 600ms cubic-bezier(.16,1,.3,1);
}
.work-card:hover .work-card__media { transform: scale(1.04); }

/* video tiles fill the card edge-to-edge, no letterbox */
.work-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* legibility scrim behind the label */
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 38%);
  pointer-events: none;
}

.work-card__label {
  position: absolute;
  top: clamp(18px, 2vw, 30px);
  left: clamp(18px, 2vw, 30px);
  right: clamp(18px, 2vw, 30px);
  z-index: 2;
  pointer-events: none;
}
.work-card__title {
  margin: 0;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.work-card__cat {
  display: block;
  margin-top: 4px;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.74);
}

/* ---------- EMPTY STATE (services with no projects yet) ---------- */
.work-grid--empty {
  grid-template-columns: 1fr;
}
.work-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: clamp(280px, 38vw, 460px);
  border-radius: 18px;
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(34,224,122,.10), transparent 60%),
    radial-gradient(60% 60% at 80% 80%, rgba(37,64,255,.12), transparent 60%),
    #0c1116;
  text-align: center;
  padding: 40px;
}
.work-empty__title {
  margin: 0;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 40px);
  color: #ffffff;
}
.work-empty__sub {
  margin: 0;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(13px, 1.2vw, 17px);
  color: rgba(255, 255, 255, 0.6);
  max-width: 44ch;
}

/* ============================================================
   RESPONSIVE — phone
   ============================================================ */
@media (max-width: 768px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card,
  .work-card--wide {
    aspect-ratio: 1 / 1.05;
    grid-column: auto;
  }
  .work-flow__service { font-size: clamp(30px, 9vw, 52px); }
  .work-flow__mission { font-size: clamp(14px, 4vw, 19px); }
}
