/* =========================================================
   GraphiQ scroll effects (black & gold)
   A. Portfolio: tilted cards that slide left as you scroll
   B. Services: giant names sliding past a soft video window
   Everything is scoped to html.fx, which is added in <head>
   only when the visitor has NOT asked for reduced motion.
   Without it the page uses the normal grid layout.
   ========================================================= */

:root {
  --font-display: "Anton", Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif-condensed, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

/* Extra pieces that only exist for the effects */
.work-tag, .work-bottom, .fx-meta, .fx-idx, .svc-tabs, .svc-words, .svc-lens { display: none; }

/* ---------- Shared labels ---------- */
.fx .fx-idx { display: inline; font-family: var(--font-mono); letter-spacing: 0.05em; margin-right: 0.4em; color: var(--text); }
.fx .fx-meta {
  display: block; margin: 0; padding-top: 0.3rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
}

/* =========================================================
   A. Portfolio: horizontal tilted cards
   ========================================================= */
.fx .work-section { padding: 0; }                 /* height is set by js/scroll-fx.js */
.fx .work-pin {
  position: sticky; top: 0;
  width: 100%; max-width: none;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  overflow: clip;                 /* cannot be scrolled by focus, so cards stay in place */
  padding: calc(var(--header-h) + 1.5rem) 0 0;
}
.fx .work-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
  width: min(100% - 2.5rem, var(--max)); margin-inline: auto;
}
.fx .work-top .section-head { margin-bottom: 0; }
.fx .work-top .section-head h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0; line-height: 0.95; font-size: clamp(2rem, 4vw, 3.4rem);
}
.fx .work-top .section-intro { margin: 0; font-size: 0.95rem; }

/* The moving row */
.fx .work-grid {
  position: relative; z-index: 2;
  flex: 1 1 auto;
  display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 3rem);
  width: max-content;
  padding: 0 12vw;
  will-change: transform;
}
.fx .work {
  --media-h: min(40vh, 420px);
  flex: none;
  width: calc(var(--media-h) * 0.75 + 1.6rem);
  padding: 0.8rem 0.8rem 1.1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #19160f, #0f0e0b);
  border: 1px solid rgba(233, 184, 114, 0.32);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform-origin: 50% 120%;
  will-change: transform;
}
.fx .work-tag {
  display: flex; justify-content: space-between;
  margin: 0 0.15rem 0.65rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--accent);
}
.fx .work-media { aspect-ratio: 3 / 4; border-radius: 14px; }
.fx .work-media:hover { transform: none; border-color: rgba(233, 184, 114, 0.7); box-shadow: none; }
.fx .work-info { padding: 0.9rem 0.2rem 0; }
.fx .work-info h3 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.01em; line-height: 1; font-size: 1.3rem; margin-bottom: 0.4rem;
}
.fx .work-info p { font-size: 0.85rem; }

/* Big words at the bottom (behind the cards) */
.fx .work-bottom {
  position: absolute; z-index: 1; inset: auto 0 0 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  width: min(100% - 2.5rem, 1600px); margin-inline: auto;
  padding-bottom: 1.2rem;
  pointer-events: none;
}
.fx .fx-giant {
  margin: 0;
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(3.2rem, 9.5vw, 9.5rem); line-height: 0.86;
  color: rgba(244, 241, 234, 0.92);
}
.fx .fx-giant span { color: var(--accent); font-family: var(--font-serif); font-style: italic; vertical-align: 0.35em; font-size: 0.7em; }
.fx .fx-side { margin: 0; text-align: right; font-size: clamp(1.2rem, 2.4vw, 2.2rem); line-height: 1.05; color: var(--text); }
.fx .fx-side em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-size: 1.45em; }

/* =========================================================
   B. Services: giant names + soft video window
   ========================================================= */
.fx .svc-section { padding: 0; border: 0; background: transparent; }
.fx .svc-pin {
  --tint: #0b0a08;
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  overflow: clip;                 /* cannot be scrolled by focus, so cards stay in place */
  background: var(--tint);
  transition: background 0.6s ease;
}
.fx.u3d .svc-pin { background: color-mix(in srgb, var(--tint) 88%, transparent); }

/* "SERVICES 03   WHY 04" heading */
.fx .svc-tabs {
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(1rem, 3vw, 2.5rem);
  position: absolute; z-index: 4; left: 0; right: 0; top: calc(var(--header-h) + 1.6rem);
  margin: 0;
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1;
}
.fx .svc-tab { position: relative; color: rgba(244, 241, 234, 0.32); }
.fx .svc-tab.is-on { color: #0b0a08; padding: 0 0.12em; }
.fx .svc-tab.is-on::before {
  content: ""; position: absolute; z-index: -1; inset: 8% -0.08em 2% -0.1em;
  background: var(--accent); transform: skewX(-6deg) rotate(-1.5deg); border-radius: 4px;
}
.fx .svc-tab sup { font-family: var(--font-mono); font-size: 0.22em; vertical-align: 2.6em; margin-left: 0.25em; color: inherit; letter-spacing: 0.05em; }
.fx .svc-tab.is-on sup { color: var(--text); position: absolute; left: 100%; top: 0.35em; vertical-align: 0; margin-left: 0.35em; }

/* Giant sliding names */
.fx .svc-words { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fx .svc-word {
  position: absolute; left: 50%; top: 50%;
  margin: 0; white-space: nowrap;
  font-size: clamp(5rem, 17vw, 17rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  color: rgba(244, 241, 234, 0.9);
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform, opacity;
}
.fx .svc-word:nth-child(2) { color: rgba(233, 184, 114, 0.9); }

/* The soft-edged window in the middle */
.fx .svc-lens {
  display: block;
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: min(36vw, 470px); height: 84vh; height: 84svh;
  transform: translate(-50%, -50%);
  overflow: hidden;
  overflow: clip;                 /* cannot be scrolled by focus, so cards stay in place */
  border-radius: 46% / 32%;
  -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
  pointer-events: none;
}
.fx .svc-strip { will-change: transform; }
.fx .svc-shot {
  width: 100%; height: 84vh; height: 84svh; aspect-ratio: auto;
  border: 0; border-radius: 0;
}

/* The service cards become the caption for the current name */
.fx .svc-content { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fx .svc-content .section-head { position: absolute; left: 0; top: calc(var(--header-h) + 0.9rem); margin: 0; }
.fx .svc-content .section-head .eyebrow { margin: 0; }
.fx .svc-content .section-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx .service-grid { display: block; }
.fx .service {
  position: absolute; left: 0; bottom: 2rem;
  width: min(25rem, 100%);
  padding: 1.5rem;
  background: rgba(12, 11, 9, 0.78);
  border-color: rgba(233, 184, 114, 0.28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fx .service:hover { transform: none; }
.fx .service.is-active { opacity: 1; transform: none; pointer-events: auto; }
.fx .service-icon { display: none; }
.fx .service h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; font-size: 1.6rem; }
.fx .service h3::before {
  content: attr(data-num); display: block; margin-bottom: 0.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--accent);
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .fx .work-top { flex-direction: column; gap: 0.25rem; }
  .fx .fx-meta { display: none; }
  .fx .work { --media-h: min(40vh, 360px); }
  .fx .work-grid { padding: 0 9vw; }
  .fx .work-bottom { padding-bottom: 4.2rem; }   /* clear of the scene dots and WhatsApp button */
  .fx .fx-side { display: none; }

  .fx .svc-lens { width: 64vw; height: 52vh; height: 52svh; top: 44%; }
  .fx .svc-shot { height: 52vh; height: 52svh; }
  .fx .svc-word { top: 44%; font-size: 26vw; }
  .fx .service { left: 0; right: 0; bottom: 5.2rem; width: auto; padding: 1.1rem 1.2rem; }
  .fx .service > p:not(.service-details) { display: none; }   /* keep the phone caption short */
  .fx .service h3 { font-size: 1.35rem; }
  .fx .svc-content .section-head { display: none; }
}

/* Short laptop screens */
@media (max-height: 640px) and (min-width: 761px) {
  .fx .work { --media-h: 40vh; }
  .fx .service > p:not(.service-details) { display: none; }
}
