/* ============================================================
   ΤΗΛΕΜΑΤΙΚΗ ICT — Decorative layer
   Ambient depth for every section: glow orbs, engineering grid,
   wave dividers, shimmer text, glows. All in-brand (navy/cyan),
   all transform/opacity, all reduced-motion aware.
   ============================================================ */

/* ---------- Glow orbs ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 20s ease-in-out infinite alternate;
  will-change: transform;
}
.orb--cyan { background: radial-gradient(circle, rgba(91, 196, 236, 0.35), transparent 70%); }
.orb--blue { background: radial-gradient(circle, rgba(42, 98, 190, 0.4), transparent 70%); }
.orb--soft { background: radial-gradient(circle, rgba(91, 196, 236, 0.16), transparent 70%); }
.orb--sm { width: 260px; height: 260px; }
.orb--md { width: 420px; height: 420px; }
.orb--lg { width: 640px; height: 640px; }
.orb--d2 { animation-delay: -7s; animation-duration: 26s; }
.orb--d3 { animation-delay: -13s; animation-duration: 32s; }
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6%, -8%, 0) scale(1.15); }
}

/* Sections that host decor must clip it */
.has-decor { position: relative; overflow: hidden; }
.has-decor > .container { position: relative; z-index: 2; }

/* ---------- Engineering grid pattern ---------- */
.pattern-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(27, 77, 160, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 77, 160, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}
[data-theme="dark"] .pattern-grid::before,
.on-dark.pattern-grid::before,
.pattern-grid--dark::before {
  background-image:
    linear-gradient(rgba(91, 196, 236, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 196, 236, 0.06) 1px, transparent 1px);
}

/* ---------- Wave divider — disabled: sections use straight edges ---------- */
.divider-wave { display: none; }
.divider-wave svg { width: 100%; height: clamp(28px, 5vw, 64px); display: block; }
.divider-wave .fill-page { fill: var(--surface-page); }
.divider-wave .fill-subtle { fill: var(--surface-subtle); }

/* ---------- Shimmer gradient text ---------- */
.shimmer {
  background: linear-gradient(110deg, #5BC4EC 15%, #4E83D6 35%, #A6DDF4 50%, #5BC4EC 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerSlide 7s linear infinite;
}
@keyframes shimmerSlide {
  from { background-position: 0% 0; }
  to { background-position: -220% 0; }
}

/* ---------- Floating accents (rings / plus / dots) ---------- */
.fl {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  color: var(--tm-cyan-500);
  opacity: 0.5;
  animation: flDrift 9s ease-in-out infinite alternate;
}
.fl--d2 { animation-delay: -3s; animation-duration: 12s; }
.fl--d3 { animation-delay: -6s; animation-duration: 15s; }
.fl svg { display: block; }
@keyframes flDrift {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-16px) rotate(8deg); }
}

/* ---------- Premium glows ---------- */
.btn--primary { box-shadow: 0 6px 22px rgba(91, 196, 236, 0.22); }
.btn--primary:hover { box-shadow: 0 10px 32px rgba(91, 196, 236, 0.38); }

.on-dark .card:hover,
.on-dark .method-card:hover {
  border-color: rgba(91, 196, 236, 0.45);
  box-shadow: 0 12px 44px rgba(91, 196, 236, 0.14);
}
.card--rule:hover { border-color: rgba(91, 196, 236, 0.45); }

/* Case study: gradient edge */
.case-card {
  border: 1px solid transparent;
  background-image:
    linear-gradient(var(--tm-navy-950), var(--tm-navy-950)),
    linear-gradient(135deg, rgba(91, 196, 236, 0.5), rgba(42, 98, 190, 0.15) 40%, rgba(91, 196, 236, 0.35));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ---------- Hero layered video ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease-standard);
}
.hero-video video.is-on { opacity: 0.32; }
.hero-video::after {
  /* keeps copy legible over the footage */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 20, 38, 0.85) 20%, rgba(8, 20, 38, 0.35) 65%, rgba(8, 20, 38, 0.55) 100%);
}

/* ---------- Ambient living backgrounds (js/ambient.js) ---------- */
.ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Live city-data overlay (Smart Cities band) ---------- */
.city-data {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
@media (max-width: 960px) { .city-data { display: none; } }
.cd-node { position: absolute; opacity: 0; } /* JS match-moves position + visibility */
.cd-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tm-cyan-500);
  box-shadow: 0 0 10px rgba(91, 196, 236, 0.9);
}
.cd-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(91, 196, 236, 0.8);
  animation: cdPing 3.2s ease-out infinite;
}
@keyframes cdPing {
  0% { transform: scale(0.4); opacity: 0.9; }
  70%, 100% { transform: scale(1.9); opacity: 0; }
}
.cd-line {
  position: absolute;
  left: 4px;
  bottom: 8px;
  width: 1px;
  height: 26px;
  background: linear-gradient(to top, rgba(91, 196, 236, 0.85), rgba(91, 196, 236, 0.15));
}
.cd-chip {
  position: absolute;
  left: -6px;
  bottom: 36px;
  white-space: nowrap;
  background: rgba(8, 20, 38, 0.62);
  border: 1px solid rgba(91, 196, 236, 0.35);
  border-radius: 6px;
  padding: 6px 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cdFloat 7s ease-in-out infinite alternate;
}
.cd-chip b {
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--tm-cyan-500);
  font-weight: 600;
}
.cd-chip span {
  display: block;
  font-family: var(--font-body);
  font-size: 11.5px;
  color: #E6F3FB;
  margin-top: 2px;
}
.cd-node:nth-child(2) .cd-dot::after { animation-delay: -1.1s; }
.cd-node:nth-child(3) .cd-dot::after { animation-delay: -2.2s; }
.cd-node:nth-child(4) .cd-dot::after { animation-delay: -0.6s; }
.cd-node:nth-child(2) .cd-chip { animation-delay: -2s; }
.cd-node:nth-child(3) .cd-chip { animation-delay: -4s; }
.cd-node:nth-child(4) .cd-chip { animation-delay: -6s; }
@keyframes cdFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .orb, .fl, .shimmer { animation: none; }
}
