/* =========================================================
   Lodger Films — Landing Page v3
   Experimental overrides for the Capabilities ("services")
   and Clients ("trusted by") sections, plus the Tweaks panel.
   Loaded AFTER landing.css so equal-specificity rules win.
   ========================================================= */

/* ===================== CAPABILITIES ===================== */
/* Section background tones (all lighter than the cards). */
.services[data-cap-bg="white"] { background: var(--paper); } /* matches the rest of the site */
.services[data-cap-bg="stone"] { background: #e6e3dd; }
.services[data-cap-bg="sand"]  { background: #efe7d8; }
.services[data-cap-bg="mist"]  { background: #e3e7ea; }

/* Hairline framing only when the band is tinted; white blends seamlessly. */
.services[data-cap-bg="stone"],
.services[data-cap-bg="sand"],
.services[data-cap-bg="mist"] {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.services .section-title { color: var(--ink); }

/* --- Card shell (shared) --- */
.services .svc-grid { align-items: stretch; }
.services .svc {
  /* reset the v2 minimal style */
  border-top: 0;
  padding: clamp(1.9rem, 2.4vw, 2.6rem) clamp(1.7rem, 2.2vw, 2.3rem) clamp(2rem, 2.6vw, 2.6rem);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #f3f2ef;
  box-shadow: 0 22px 55px rgba(11, 11, 12, 0.16);
  isolation: isolate;
}

/* snappier hover that survives the reveal stagger transition */
.services .svc-grid.in > .svc,
.services .svc {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), opacity 0.9s var(--ease);
  will-change: transform;
}
.services .svc:hover {
  transform: translateY(-7px);
  box-shadow: 0 34px 80px rgba(11, 11, 12, 0.30);
}

/* top accent hairline that grows on hover */
.services .svc::before {
  content: "";
  position: absolute;
  top: 0; left: clamp(1.7rem, 2.2vw, 2.3rem); right: clamp(1.7rem, 2.2vw, 2.3rem);
  height: 1px;
  background: var(--silver);
  background-size: 250% 100%;
  opacity: 0.5;
  transform: scaleX(0.18);
  transform-origin: left center;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
.services .svc:hover::before { transform: scaleX(1); opacity: 0.95; }

/* card type — invert for dark backgrounds */
.services .svc .num {
  font-size: 13px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  background: var(--silver);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.services .svc h3 {
  color: #f4f3f0;
  margin: 1.5rem 0 0.85rem;
}
.services .svc p {
  color: rgba(255, 255, 255, 0.60);
  margin: 0;
}
.services .svc .tags { margin-top: auto; padding-top: 1.6rem; }
.services .svc .tags span {
  color: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.18);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.services .svc:hover .tags span { border-color: rgba(255, 255, 255, 0.32); }

/* --- Card style: Charcoal (solid) --- */
.services[data-cap-card="charcoal"] .svc { background: #16161b; }

/* --- Card style: Graphite (gradient) --- */
.services[data-cap-card="graphite"] .svc {
  background: linear-gradient(156deg, #26262d 0%, #16161a 58%, #101013 100%);
}

/* --- Card style: Ink + hairline --- */
.services[data-cap-card="inkline"] .svc {
  background: #1a1a20;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 22px 55px rgba(11, 11, 12, 0.16);
}
.services[data-cap-card="inkline"] .svc:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 34px 80px rgba(11, 11, 12, 0.30);
}

/* ===================== CARD AMBIENT MOTION (always-on) ===================== */
/* keep text + top accent above the visual layer */
.services .svc > :where(.num, h3, p, .tags) { position: relative; z-index: 2; }
.services .svc::before { z-index: 3; }

.svc-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
/* a soft scrim (above the motion, below the text) so captions stay legible */
.services .svc::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(11,11,12,0.58) 0%, rgba(11,11,12,0.30) 42%, rgba(11,11,12,0.12) 100%);
  pointer-events: none;
}

/* --- Film & Television: soft anamorphic bloom (cool silver-blue) --- */
.svc-fx[data-fx="film"] { filter: blur(7px); opacity: 0.82; }
.svc-fx[data-fx="film"]::before {
  content: "";
  position: absolute;
  left: -22%; right: -22%; top: 34%; height: 40%;
  background: radial-gradient(58% 50% at 50% 50%,
    rgba(196,216,255,0.52) 0%, rgba(150,188,248,0.16) 44%, transparent 72%);
  animation: film-band var(--film-dur, 14s) ease-in-out infinite alternate;
}
.svc-fx[data-fx="film"]::after {
  content: "";
  position: absolute; inset: -34%;
  background:
    radial-gradient(30% 34% at 72% 24%, rgba(208,224,255,0.34) 0%, transparent 66%),
    radial-gradient(28% 32% at 28% 80%, rgba(120,150,212,0.26) 0%, transparent 70%);
  animation: film-drift calc(var(--film-dur, 14s) * 1.357) ease-in-out infinite alternate;
}
@keyframes film-band {
  0%   { transform: translateY(-9%) scaleY(0.88); opacity: 0.52; }
  100% { transform: translateY(9%) scaleY(1.16); opacity: 0.9; }
}
@keyframes film-drift {
  from { transform: translate(-6%, -4%); }
  to   { transform: translate(7%, 5%); }
}

/* --- Music: soft resonance — light rings over a breathing glow (violet/rose) --- */
.svc-fx[data-fx="wave"] { filter: blur(5px); opacity: 0.82; }
.svc-fx[data-fx="wave"] .glow {
  position: absolute;
  left: 50%; bottom: -14%;
  width: 128%; aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  background: radial-gradient(circle,
    rgba(206,158,230,0.30) 0%, rgba(150,124,212,0.11) 42%, transparent 66%);
  animation: music-breathe var(--music-glow, 7.5s) ease-in-out infinite;
}
.svc-fx[data-fx="wave"] .ring {
  position: absolute;
  left: 50%; bottom: 4%;
  width: 40%; aspect-ratio: 1 / 1;
  transform: translate(-50%, 50%) scale(0.35);
  border-radius: 50%;
  background: radial-gradient(circle,
    transparent 42%, rgba(214,178,240,0.34) 70%, transparent 92%);
  filter: blur(7px);
  animation: music-ripple var(--music-ring, 6.6s) ease-out infinite;
}
.svc-fx[data-fx="wave"] .ring.r2 { animation-delay: calc(var(--music-ring, 6.6s) / 3); }
.svc-fx[data-fx="wave"] .ring.r3 { animation-delay: calc(var(--music-ring, 6.6s) / 1.5); }
@keyframes music-ripple {
  0%   { transform: translate(-50%, 50%) scale(0.32); opacity: 0; }
  16%  { opacity: 0.85; }
  100% { transform: translate(-50%, 50%) scale(2.5); opacity: 0; }
}
@keyframes music-breathe {
  0%, 100% { transform: translateX(-50%) scale(0.9); opacity: 0.5; }
  50%      { transform: translateX(-50%) scale(1.1); opacity: 0.86; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-fx::before, .svc-fx::after,
  .svc-fx[data-fx="wave"] .glow, .svc-fx[data-fx="wave"] .ring { animation: none !important; }
  .svc-fx[data-fx="wave"] .ring { opacity: 0.4; }
}
.svc-fx[data-fx="grade"] { filter: blur(7px); opacity: 0.72; }
.svc-fx[data-fx="grade"]::before {
  content: "";
  position: absolute; inset: -35%;
  background:
    radial-gradient(42% 46% at 30% 32%, rgba(56,150,158,0.42) 0%, transparent 70%),
    radial-gradient(46% 42% at 76% 70%, rgba(205,124,58,0.34) 0%, transparent 72%);
  animation: grade-flow var(--grade-dur, 17s) ease-in-out infinite alternate;
}
.svc-fx[data-fx="grade"]::after {
  content: "";
  position: absolute; inset: -35%;
  background: radial-gradient(36% 42% at 64% 24%, rgba(124,96,184,0.30) 0%, transparent 70%);
  animation: grade-flow2 calc(var(--grade-dur, 17s) * 1.235) ease-in-out infinite alternate;
}
@keyframes grade-flow  { from { transform: translate(-7%, -5%) rotate(0deg); } to { transform: translate(9%, 7%) rotate(14deg); } }
@keyframes grade-flow2 { from { transform: translate(7%, 5%); } to { transform: translate(-9%, -7%); } }

/* ===================== CLIENTS ("trusted by") ===================== */

/* --- Style: Soft (the Capabilities section's former warm off-white) --- */
.clients[data-clients-style="soft"] {
  background: var(--soft); /* #f5f4f1 */
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.clients[data-clients-style="soft"] .marquee-track .client { color: #b6b5b1; }
.clients[data-clients-style="soft"] .marquee-track .client:hover { color: var(--ink); }
.clients[data-clients-style="soft"] .marquee-track .sep { background: #cfcdc8; }

/* --- Style: Dark band --- */
.clients[data-clients-style="band"] {
  background: #111114;
  border-top: 0;
  border-bottom: 0;
}
.clients[data-clients-style="band"] .eyebrow { color: rgba(255, 255, 255, 0.45); }
.clients[data-clients-style="band"] .marquee-track .client { color: rgba(255, 255, 255, 0.46); }
.clients[data-clients-style="band"] .marquee-track .client:hover { color: #ffffff; }
.clients[data-clients-style="band"] .marquee-track .sep { background: rgba(255, 255, 255, 0.26); }

/* --- Style: Chips (outlined pills on the light page) --- */
.clients[data-clients-style="chips"] { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.clients[data-clients-style="chips"] .marquee-track { gap: 0.85rem; padding-right: 0.85rem; }
.clients[data-clients-style="chips"] .marquee-track .sep { display: none; }
.clients[data-clients-style="chips"] .marquee-track .client {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 1.25rem;
  background: #fff;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.clients[data-clients-style="chips"] .marquee-track .client:hover {
  color: var(--ink);
  border-color: rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

/* ===================== TWEAKS PANEL ===================== */
.tw-panel {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 9999;
  width: 270px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  font-family: 'Inter', system-ui, sans-serif;
  padding: 6px 6px 14px;
  display: none;
  user-select: none;
}
.tw-panel.open { display: block; }
.tw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 12px;
  cursor: grab;
}
.tw-head.dragging { cursor: grabbing; }
.tw-title { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.tw-close {
  appearance: none; border: 0; background: #f1f0ed; color: var(--muted);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s ease, color 0.2s ease;
}
.tw-close:hover { background: #e7e6e2; color: var(--ink); }
.tw-close svg { width: 11px; height: 11px; }
.tw-section { padding: 4px 12px 2px; }
.tw-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin: 12px 0 8px; }
.tw-seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 4px; background: #f3f2ef; border-radius: 11px; padding: 4px;
}
.tw-seg button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 7px 4px; border-radius: 8px; letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tw-seg button:hover { color: var(--ink); }
.tw-seg button[aria-pressed="true"] {
  background: var(--ink); color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* slider control */
.tw-slider-head { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 0 8px; }
.tw-slider-head .tw-label { margin: 0; }
.tw-slider-val { font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tw-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: #e2e1dd; outline: none; cursor: pointer; margin: 2px 0 6px;
}
.tw-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: transform 0.15s ease;
}
.tw-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.tw-range::-moz-range-thumb {
  width: 16px; height: 16px; border: 0; border-radius: 50%;
  background: var(--ink); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
