/* ═══════════════════════════════════════════════════════
   SERVICES — section, glass cards, hover/touch states
   Depends on: tokens.css, base.css
   ═══════════════════════════════════════════════════════ */

.services {
  background: var(--bg-services);
}

.services__header {
  margin-bottom: clamp(56px, 8vw, 96px);
}

/* ── Card grid ─────────────────────────────────────────── */
.services__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 24px);
}

@media (max-width: 620px) {
  .services__list { grid-template-columns: 1fr; }
}

/* ── Liquid glass card ─────────────────────────────────── */
.service-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(26px, 3.5vw, 44px);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Glass base */
  background: linear-gradient(
    148deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.016) 100%
  );
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  /* Refraction border */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 20px 56px rgba(0, 0, 0, 0.32),
    0 4px 14px rgba(0, 0, 0, 0.18);
  transition:
    transform    0.45s var(--ease-out),
    box-shadow   0.45s var(--ease-soft),
    border-color 0.4s;
}

/* Colored top-edge highlight */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--svc, var(--accent)), transparent);
  opacity: 0.3;
  transition: opacity 0.4s, left 0.4s, right 0.4s;
}

/* Ambient inner glow */
.service-card::after {
  content: '';
  position: absolute;
  top: -70px; left: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--svc-glow, rgba(196,149,106,0.1)) 0%,
    transparent 70%
  );
  pointer-events: none;
  transition: opacity 0.4s;
}

/* ── Per-service color tokens ──────────────────────────── */
.service-card[data-service="film"]  { --svc: var(--c-film);  --svc-glow: var(--c-film-glow);  }
.service-card[data-service="comm"]  { --svc: var(--c-comm);  --svc-glow: var(--c-comm-glow);  }
.service-card[data-service="pod"]   { --svc: var(--c-pod);   --svc-glow: var(--c-pod-glow);   }
.service-card[data-service="music"] { --svc: var(--c-music); --svc-glow: var(--c-music-glow); }

/* ── Hover state (pointer/mouse devices) ───────────────── */
.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 28px 70px rgba(0, 0, 0, 0.38),
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 48px var(--svc-glow, rgba(196,149,106,0.12));
}
.service-card:hover::before {
  opacity: 0.9;
  left: 8%; right: 8%;
}

/* ── Card internals ────────────────────────────────────── */
.service-card__number {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--svc, var(--accent));
  opacity: 0.5;
  line-height: 1;
  transition: opacity 0.4s;
}
.service-card:hover .service-card__number { opacity: 1; }

.service-card__body { flex: 1; }

.service-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.7rem;
  line-height: 1.2;
  transition: color 0.35s;
}
.service-card:hover .service-card__title { color: var(--svc, var(--text)); }

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--svc, var(--accent));
  margin-top: 1.1rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), gap 0.3s;
}
.service-card:hover .service-card__link {
  opacity: 1;
  transform: translateY(0);
}
.service-card__link:hover { gap: 0.6rem; }

/* ── Touch device — show hover state when in-view ─────── */
@media (hover: none) {
  .service-card.is-visible {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(0, 0, 0, 0.16),
      0 28px 70px rgba(0, 0, 0, 0.38),
      0 8px 22px rgba(0, 0, 0, 0.22),
      0 0 48px var(--svc-glow, rgba(196,149,106,0.12));
  }
  .service-card.is-visible::before {
    opacity: 0.9;
    left: 8%; right: 8%;
  }
  .service-card.is-visible .service-card__number { opacity: 1; }
  .service-card.is-visible .service-card__link {
    opacity: 1;
    transform: translateY(0);
  }
  .service-card.is-visible .service-card__title { color: var(--svc, var(--text)); }
}

/* ── Light mode service cards — Terracotta Studio ─────── */
/* Grid gets perspective so card rotateX creates real 3D depth */
[data-theme="light"] .services__list {
  perspective: 1200px;
}

[data-theme="light"] .service-card {
  /* Paper/parchment surface with visible warm elevation */
  background: linear-gradient(
    148deg,
    rgba(255,255,255,0.82) 0%,
    rgba(240,237,228,0.68) 100%
  );
  border: 1px solid rgba(124,85,53,0.13);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(124,85,53,0.07),
    0 2px 4px rgba(92,52,20,0.06),
    0 6px 20px rgba(92,52,20,0.07),
    0 18px 50px rgba(92,52,20,0.05);
  /* No backdrop-filter — matte surface, not glass */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Top-edge highlight — more visible on paper surface */
[data-theme="light"] .service-card::before {
  opacity: 0.50;
}

/* Ambient blob → akvarell pigment folt a papír felszínen.
   mix-blend-mode: multiply = természetes, matt hatás
   (nem neon, hanem festékszerű beszivárgás a papírba)      */
[data-theme="light"] .service-card::after {
  mix-blend-mode: multiply;
  width: 300px;
  height: 300px;
  top: -100px;
  left: -80px;
}

[data-theme="light"] .service-card:hover {
  /* Subtle 3D lean within the grid perspective context */
  transform: translateY(-6px) rotateX(-1.5deg);
  border-color: rgba(124,85,53,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(124,85,53,0.09),
    0 4px 8px rgba(92,52,20,0.08),
    0 14px 36px rgba(92,52,20,0.10),
    0 30px 72px rgba(92,52,20,0.07),
    0 0 0 1px rgba(124,85,53,0.08),
    0 0 50px var(--svc-glow);
}
[data-theme="light"] .service-card:hover::before {
  opacity: 1.0;
  left: 4%; right: 4%;
}

@media (hover: none) {
  [data-theme="light"] .service-card.is-visible {
    transform: translateY(-6px) rotateX(-1.5deg);
    border-color: rgba(124,85,53,0.22);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,1),
      inset 0 -1px 0 rgba(124,85,53,0.09),
      0 4px 8px rgba(92,52,20,0.08),
      0 14px 36px rgba(92,52,20,0.10),
      0 30px 72px rgba(92,52,20,0.07),
      0 0 50px var(--svc-glow);
  }
  [data-theme="light"] .service-card.is-visible::before {
    opacity: 1.0;
    left: 4%; right: 4%;
  }
}

/* H-13: keyboard focus — make link visible for keyboard users */
.service-card__link:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
