/* ═══════════════════════════════════════════════
   EVENTRO — service → projects view
   Clickable service cards (#services) and the
   full-screen service overlay (#serviceOverlay)
   that lists the projects delivered under one
   service. Loaded after animations.css.
   ═══════════════════════════════════════════════ */

/* ── Service card: whole card opens the service view ──
   main.js handles clicks anywhere on .svc[data-service]; the
   .svc__link is the keyboard target and carries the count line
   (its text styling lives with the card styles in style.css). */
.svc[data-service] { cursor: pointer; }
.svc__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap, 44px);
  margin-top: 8px;
  padding-right: 6px;
  border-radius: 8px;
}
.svc__link:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 4px; }

/* ── Overlay shell (mirrors .case, stacked below it) ── */
.svcov {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: var(--bg);
  color: var(--text);
  opacity: 0;
  transform: scale(.985);
  transition: opacity .32s cubic-bezier(.2, .7, .2, 1), transform .32s cubic-bezier(.2, .7, .2, 1);
}
.svcov[hidden] { display: none; }
.svcov.is-open { opacity: 1; transform: none; }
.svcov.is-closing { opacity: 0; transform: scale(.985); }
.svcov__scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.svcov__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 8, 18, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}
.svcov__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.svcov__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap, 44px);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(190, 140, 255, .4);
  background: rgba(147, 51, 234, .12);
  color: var(--text);
  font-family: var(--font-head);
  font-size: .9rem;
  cursor: pointer;
  transition: background .25s;
}
.svcov__close:hover { background: var(--brand); }
.svcov__close:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.svcov__crumb {
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--brand-soft);
  text-transform: uppercase;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── Header ──────────────────────────────────── */
.svcov__hero {
  position: relative;
  min-height: clamp(220px, 34vh, 360px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-2);
}
.svcov__hero-img { position: absolute; inset: 0; }
.svcov__hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.svcov__hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(11, 8, 18, .55) 55%, rgba(11, 8, 18, .15));
}
.svcov__hero-body { position: relative; z-index: 1; padding-block: clamp(22px, 4vw, 44px) clamp(18px, 3vw, 30px); }
.svcov__kicker {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand-soft);
}
.svcov__kicker .svc__icon { margin: 0; width: 46px; height: 46px; border-radius: 12px; }
.svcov__kicker .svc__icon svg { width: 24px; height: 24px; }
.svcov__title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 1.1rem + 2.8vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
  max-width: 20ch;
  margin-bottom: 12px;
}
.svcov__desc { color: #d9cff0; max-width: 62ch; font-size: clamp(.95rem, .9rem + .3vw, 1.1rem); line-height: 1.6; }
.svcov__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.svcov__stat {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 16, 38, .7);
  font-size: .82rem;
  color: var(--muted);
}
.svcov__stat b { font-family: var(--font-head); font-size: 1.05rem; color: var(--text); }

/* ── Project grid ───────────────────────────── */
.svcov__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(14px, 2vw, 22px);
  padding-block: clamp(22px, 4vw, 40px) clamp(28px, 5vw, 56px);
}
.svcov__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.svcov__card:hover, .svcov__card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.svcov__card:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.svcov__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
  display: block;
}
.svcov__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.svcov__card:hover .svcov__media img { transform: scale(1.05); }
.svcov__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14, 8, 24, .8), transparent 55%);
}
.svcov__soon, .svcov__badge {
  position: absolute;
  left: 12px; bottom: 10px;
  z-index: 1;
  font-family: var(--font-head);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 8, 18, .7);
  border: 1px solid rgba(190, 140, 255, .3);
  color: var(--muted);
  backdrop-filter: blur(6px);
}
.svcov__badge { color: #fff; background: var(--grad); border-color: transparent; }
.svcov__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; min-width: 0; }
.svcov__ptitle { font-family: var(--font-head); font-size: 1.04rem; line-height: 1.25; font-weight: 600; text-wrap: balance; }
.svcov__event { font-size: .84rem; color: #cfc4e6; }
.svcov__date { font-size: .78rem; color: var(--muted); }
.svcov__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.svcov__chips .chip { white-space: normal; }
.svcov__cta {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-head);
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--brand-soft);
}
.svcov__empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 0; }

/* ── Footer nav + CTA ───────────────────────── */
.svcov__foot {
  display: grid;
  gap: 18px;
  padding-block: 8px clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  padding-top: clamp(20px, 3vw, 32px);
}
.svcov__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svcov__nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: var(--tap, 44px);
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(23, 16, 38, .55);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.svcov__nav-btn:hover { border-color: var(--line-strong); background: rgba(147, 51, 234, .15); }
.svcov__nav-btn:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.svcov__nav-btn--next { text-align: right; align-items: flex-end; }
.svcov__nav-btn small { font-size: .7rem; letter-spacing: .18em; color: var(--brand-soft); text-transform: uppercase; }
.svcov__nav-btn b { font-family: var(--font-head); font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.svcov__foot-cta { display: flex; justify-content: center; }

@media (min-width: 769px) {
  .svcov__foot { grid-template-columns: 1fr auto; align-items: center; }
  .svcov__nav { min-width: 420px; }
}

/* ── Reduced motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .svcov { transition: none; }
  .svcov__card, .svcov__media img { transition: none; }
  .svcov__card:hover, .svcov__card:focus-visible { transform: none; }
  .svcov__card:hover .svcov__media img { transform: none; }
}
