/* ==========================================================================
   Agency page — Canva-style sections, dark theme, scroll/text animations.
   All rules are scoped under .agency-page so nothing leaks to other routes.
   ========================================================================== */

.agency-page {
  --ag-bg: #000000;
  --ag-accent: #4f7bd6;
  --ag-card: #6f86b3;
  --ag-text-dim: #ffffff;
  background: var(--ag-bg);
  color: #fff;
  overflow-x: hidden;
}

.agency-page section {
  position: relative;
}

.agency-page .ag-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.agency-page h1,
.agency-page h2 {
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.05;
}

/* ---------- Scroll reveal animations ---------- */
.agency-page [data-reveal] {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.agency-page [data-reveal='left'] {
  transform: translateX(-60px);
}
.agency-page [data-reveal='right'] {
  transform: translateX(60px);
}
.agency-page [data-reveal='scale'] {
  transform: scale(0.86);
}
.agency-page [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .agency-page [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 1. Hero with looping video ---------- */
.agency-page .ag-hero {
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.agency-page .ag-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.agency-page .ag-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.75) 100%
    );
}
.agency-page .ag-hero .ag-container {
  max-width: 1000px;
}
.agency-page .ag-hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.9rem);
  margin: 0 0 16px;
  color: #ffffff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7);
}
.agency-page .ag-hero p {
  font-size: clamp(0.88rem, 1.2vw, 1.02rem);
  max-width: 640px;
  margin: 0 auto;
  color: #ffffff;
}
.agency-page .ag-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
}
.agency-page .ag-scroll-cue::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: agScroll 1.6s ease-in-out infinite;
}
@keyframes agScroll {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 0; }
}

/* ---------- Generic dark section with ambient video ---------- */
.agency-page .ag-section {
  padding: 120px 0;
}
.agency-page .ag-section.center {
  text-align: center;
}
.agency-page .ag-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  z-index: 0;
  pointer-events: none;
}
.agency-page .ag-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ag-accent);
  margin-bottom: 16px;
}
.agency-page .ag-section h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  margin: 0 0 22px;
  color:#fff;
}
.agency-page .ag-lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ag-text-dim);
  max-width: 820px;
  line-height: 1.7;
}
.agency-page .ag-section.center .ag-lead {
  margin: 0 auto;
}

/* ---------- 3. Timeline ---------- */
.agency-page .ag-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.agency-page .ag-tl-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 44px 28px;
  text-align: center;
}
.agency-page .ag-tl-card.accent {
  background: var(--ag-card);
}
.agency-page .ag-tl-year {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 28px;
}
.agency-page .ag-ring {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agency-page .ag-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.agency-page .ag-ring .ag-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
}
.agency-page .ag-ring .ag-ring-bar {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 408;
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 1.6s ease 0.2s;
}
.agency-page .ag-tl-card.accent .ag-ring .ag-ring-bar {
  stroke: #0d1b3a;
}
.agency-page .ag-ring.is-visible .ag-ring-bar {
  stroke-dashoffset: var(--ring-offset, 110);
}
.agency-page .ag-ring span {
  max-width: 110px;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* ---------- 5. We build brands (split) ---------- */
.agency-page .ag-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.agency-page .ag-split-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.agency-page .ag-split-media video,
.agency-page .ag-split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "We build brands" — smoke wisp on the left behind the text */
.agency-page .ag-build {
  overflow: hidden;
}
.agency-page .ag-build-smoke {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 95%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}

/* AI neural head (right side) */
.agency-page .ag-head-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.agency-page .ag-head {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  filter: drop-shadow(0 0 26px rgba(43, 111, 255, 0.55));
}
.agency-page .ag-head svg {
  width: 100%;
  height: auto;
  display: block;
}
.agency-page .ag-outline {
  fill: none;
  stroke: #5aa0ff;
  stroke-width: 1.4;
  opacity: 0.5;
}
.agency-page .ag-link {
  stroke: #2b6fff;
  stroke-width: 0.6;
  opacity: 0.22;
}
.agency-page .ag-node {
  fill: #7db4ff;
  transform-box: fill-box;
  transform-origin: center;
  animation: agTwinkle 3s ease-in-out infinite;
}
@keyframes agTwinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.agency-page .ag-head-float {
  animation: agFloat 6.5s ease-in-out infinite;
}
@keyframes agFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .agency-page .ag-node,
  .agency-page .ag-head-float {
    animation: none;
  }
}

/* ---------- 6. Services carousel ---------- */
.agency-page .ag-services {
  overflow: hidden;
}
.agency-page .ag-carousel {
  margin-top: 60px;
  position: relative;
}
.agency-page .ag-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.agency-page .ag-svc-card {
  flex: 0 0 300px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: scale(0.9);
  opacity: 0.55;
  transition: transform 0.6s ease, opacity 0.6s ease;
}
.agency-page .ag-svc-card.active {
  transform: scale(1);
  opacity: 1;
}
.agency-page .ag-svc-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.agency-page .ag-svc-label {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 700;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
}
.agency-page .ag-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}
.agency-page .ag-carousel-nav button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.agency-page .ag-carousel-nav button:hover {
  background: var(--ag-accent);
  border-color: var(--ag-accent);
}

/* ---------- 7. What you will get (radial) ---------- */
.agency-page .ag-radial {
  position: relative;
  width: min(620px, 92vw);
  aspect-ratio: 1 / 1;
  margin: 50px auto 0;
}
.agency-page .ag-radial-core {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0.5;
}
.agency-page .ag-radial-core video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agency-page .ag-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--ag-card);
  color: #fff;
  padding: 16px 22px;
  border-radius: 12px;
  font-size: 0.98rem;
  text-align: center;
  width: 200px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.agency-page .ag-badge.light {
  background: #e7e7e3;
  color: #111;
  font-weight: 600;
}

/* ---------- 8. How we do it ---------- */
.agency-page .ag-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.agency-page .ag-step {
  text-align: center;
}
.agency-page .ag-step-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto -40px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7e7e3;
  border: 6px solid #000;
}
.agency-page .ag-step:nth-child(even) .ag-step-icon {
  background: var(--ag-card);
}
.agency-page .ag-step-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.agency-page .ag-step-body {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 56px 22px 30px;
  height: 100%;
}
.agency-page .ag-step:nth-child(even) .ag-step-body {
  background: var(--ag-card);
}
.agency-page .ag-step-body h4 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
  margin-bottom: 14px;
}
.agency-page .ag-step-body p {
  color: var(--ag-text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}
.agency-page .ag-step:nth-child(even) .ag-step-body p {
  color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .agency-page .ag-section { padding: 84px 0; }
  .agency-page .ag-timeline { grid-template-columns: 1fr; }
  .agency-page .ag-split { grid-template-columns: 1fr; gap: 36px; }
  .agency-page .ag-steps { grid-template-columns: 1fr 1fr; }
  .agency-page .ag-radial { width: 92vw; }
  .agency-page .ag-badge { width: 150px; font-size: 0.85rem; padding: 12px 14px; }
}
@media (max-width: 560px) {
  .agency-page .ag-steps { grid-template-columns: 1fr; }
  .agency-page .ag-svc-card { flex-basis: 78vw; }
  .agency-page .ag-radial-core { inset: 32%; }
}
