:root {
  --bg: #000;
  --text: #fff;
  --muted: #cfd2d8;
  --gold: #FFD700;
  --gold-2: #ffec8b;
  --radius: 22px;
  --pad: clamp(12px, 2.4vw, 20px);
  --eyebrow: clamp(12px, 1.7cqi, 13px);
  --title: clamp(21px, 3.6cqi, 32px);
  --sub: clamp(14px, 1.9cqi, 17px);
}

.tech-ad-container {
  position: relative;
  width: min(96vw, 1040px);
  aspect-ratio: 16/9;
  min-height: clamp(440px, 56vh, 680px);
  margin: clamp(10px, 2.5vw, 24px) auto 0;
  padding: var(--pad);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text);
  background: radial-gradient(120% 140% at 50% 0%, rgba(255,255,255,.06) 0, rgba(255,255,255,.02) 28%, rgba(0,0,0,.9) 100%), #0b0b0b;
  box-shadow: 0 0 0 1px rgba(255,215,0,.08), 0 24px 70px rgba(0,0,0,.55), 0 0 120px rgba(255,215,0,.06);
  isolation: isolate;
}

.ad-layer {
  position: absolute;
  inset: var(--pad);
  display: grid;
  grid-template-areas: "eyebrow" "title" "sub" "image";
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  text-align: center;
  gap: clamp(.35rem, 1.5vw, .8rem);
  z-index: 5;
  opacity: 0;
  animation: slideFade 18s infinite;
}
.ad-layer:nth-of-type(1) { animation-delay: 0s; }
.ad-layer:nth-of-type(2) { animation-delay: 6s; }
.ad-layer:nth-of-type(3) { animation-delay: 12s; }

.tech-halo {
  position: absolute;
  inset: -22% -12%;
  background: radial-gradient(40% 35% at 18% 28%, color-mix(in oklab, var(--gold) 16%, transparent) 0, transparent 60%),
              radial-gradient(45% 40% at 82% 72%, color-mix(in oklab, var(--gold-2) 12%, transparent) 0, transparent 72%);
  filter: blur(80px);
  opacity: .22;
  animation: haloPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
}

.ad-eyebrow {
  grid-area: eyebrow;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: var(--eyebrow);
  padding: .4em .8em;
  border-radius: .6rem;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 10px 24px -14px color-mix(in oklab, var(--gold) 60%, transparent);
}

.ad-title {
  grid-area: title;
  margin: .2rem 0 .1rem;
  font-size: var(--title);
  line-height: 1.14;
  text-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.ad-title::after {
  content: "";
  display: block;
  height: 3px;
  width: clamp(44px, 9cqi, 86px);
  margin: .6rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,.9), rgba(255,165,0,.9), rgba(255,215,0,.9), transparent);
  border-radius: 2px;
  box-shadow: 0 0 22px rgba(255,215,0,.35);
  animation: underlineGlow 3.2s ease-in-out infinite alternate;
}

.ad-subtitle {
  grid-area: sub;
  color: var(--muted);
  max-width: 70ch;
  font-size: var(--sub);
  line-height: 1.5;
}

.ad-img {
  grid-area: image;
  align-self: end;
  width: min(88cqi, 560px);
  height: auto;
  max-height: clamp(160px, 42vh, 320px);
  object-fit: contain;
  border-radius: 16px;
  margin-top: clamp(.2rem, 1.5cqi, .8rem);
  border: 1px solid rgba(255,215,0,.12);
  filter: drop-shadow(0 16px 40px rgba(0,0,0,.45)) drop-shadow(0 0 18px rgba(255,215,0,.12));
  animation: imgFloat 6s ease-in-out infinite;
  position: relative;
  z-index: 6;
}

.ad-cta-out {
  display: flex;
  justify-content: center;
  margin: clamp(10px, 2.6vw, 20px) auto;
  transform: translateY(12px);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--gold) 0%, #FFA500 100%);
  color: #111;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: clamp(14px, 2.1cqi, 16px);
  box-shadow: 0 8px 28px rgba(255,215,0,.32), inset 0 1px 0 rgba(255,255,255,.22);
  border: 1px solid rgba(255,215,0,.5);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cta-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #FFE55C 0%, #FFB347 100%);
  box-shadow: 0 14px 36px rgba(255,215,0,.42), inset 0 1px 0 rgba(255,255,255,.22);
}

/* Animations */
@keyframes slideFade {
  0%,3% { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(8px); }
  12%,30% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  36%,100% { opacity: 0; transform: translateY(-12px) scale(1.01); filter: blur(6px); }
}
@keyframes underlineGlow {
  0% { box-shadow: 0 0 10px rgba(255,215,0,.2); }
  100% { box-shadow: 0 0 22px rgba(255,215,0,.35); }
}
@keyframes imgFloat {
  0% { transform: translateY(6px) scale(1.005); }
  50% { transform: translateY(-6px) scale(1.01); }
  100% { transform: translateY(6px) scale(1.005); }
}
@keyframes haloPulse {
  from { opacity: .16; transform: scale(1); }
  to { opacity: .28; transform: scale(1.03); }
}
