/* ============================================================
   EUTRONIX TECHNOLOGIES — services.css
   Hero — code-based rotating globe (services.html)
   Relies on css/style.css for vars, nav, and footer.
   ============================================================ */

#svc-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  padding: calc(var(--nav-h) + 56px) 24px 60px;
  overflow: hidden;
}

.svc-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.svc-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-light);
  opacity: 0.85;
  margin-bottom: 18px;
}

.svc-heading {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 18px;
}

.svc-sub {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.58);
  max-width: 620px;
  margin: 0 auto;
}

/* ============================================================
   GLOBE SCENE
   ============================================================ */

.globe-scene {
  position: relative;
  z-index: 1;
  width: clamp(280px, 36vw, 440px);
  height: clamp(280px, 36vw, 440px);
  margin-top: clamp(48px, 7vw, 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Ambient glow ── */
.globe-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92%;
  height: 92%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 200, 232, 0.32), rgba(27, 156, 216, 0.12) 55%, transparent 75%);
  filter: blur(28px);
  animation: globeGlowPulse 6s ease-in-out infinite;
}

@keyframes globeGlowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.06); }
}

/* ── Orbit ring ── */
.globe-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 122%;
  height: 122%;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--dark), var(--dark)) padding-box,
    conic-gradient(from 0deg, var(--blue), var(--green), var(--blue)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  transform: translate(-50%, -50%) rotateX(68deg);
  opacity: 0.55;
  animation: globeOrbitSpin 14s linear infinite;
}

@keyframes globeOrbitSpin {
  from { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(360deg); }
}

/* ── Sphere ── */
.globe {
  position: relative;
  width: 78%;
  height: 78%;
  perspective: 900px;
}

.globe-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(circle at 60% 70%, rgba(58, 170, 53, 0.25), transparent 60%),
    radial-gradient(circle at 50% 50%, var(--blue-deep) 0%, var(--dark) 92%);
  box-shadow:
    inset -18px -18px 50px rgba(0, 0, 0, 0.55),
    inset 10px 10px 30px rgba(108, 200, 232, 0.18),
    0 0 60px rgba(27, 156, 216, 0.25);
  overflow: hidden;
}

.globe-equator {
  position: absolute;
  top: 50%;
  left: 2%;
  width: 96%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(140, 198, 63, 0.4) 20%, rgba(140, 198, 63, 0.4) 80%, transparent);
  transform: translateY(-50%) scaleY(6);
  border-radius: 50%;
}

.globe-rotor {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: globeSpin 22s linear infinite;
}

@keyframes globeSpin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

.globe-meridian {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(140, 198, 63, 0.28);
  box-shadow: 0 0 8px rgba(108, 200, 232, 0.08) inset;
}

/* ── Industry bubbles — positioned in a ring, gentle bob ── */
.globe-bubbles {
  position: absolute;
  inset: 0;
}

.globe-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  /* --bubble-radius is set in px by JS (percentages here would resolve
     against this element's own 0x0 box, not the globe-scene) */
  transform: rotate(var(--angle)) translate(var(--bubble-radius, 160px)) rotate(calc(var(--angle) * -1));
}

.globe-bubble-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(22, 25, 29, 0.75);
  border: 1px solid rgba(108, 200, 232, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
  animation: globeBubbleBob 4.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes globeBubbleBob {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 7px)); }
}

@media (prefers-reduced-motion: reduce) {
  .globe-glow,
  .globe-orbit,
  .globe-rotor,
  .globe-bubble-inner {
    animation: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .globe-scene { width: clamp(260px, 42vw, 360px); height: clamp(260px, 42vw, 360px); }
  .globe-bubble-inner { font-size: 0.68rem; padding: 6px 12px; }
}

/* Below 768px, .globe-bubbles drops out of the orbiting layout and
   becomes a normal in-flow flex item (see further down) — so the
   scene switches to a COLUMN stack with fixed, non-shrinkable
   pixel sizes for the globe itself (percentages of an "auto" height
   container are unreliable, and a row layout was squashing the
   globe to make room for the bubble list). */
@media (max-width: 768px) {
  #svc-hero { padding: calc(var(--nav-h) + 40px) 20px 48px; min-height: auto; }
  .svc-heading { margin-bottom: 14px; }

  .globe-scene {
    flex-direction: column;
    width: 240px;
    height: auto;
    margin: 64px auto 12px;
  }

  .globe-glow  { width: 221px; height: 221px; }
  .globe-orbit { width: 293px; height: 293px; }

  .globe {
    width: 187px;
    height: 187px;
    flex: 0 0 auto;
  }

  /* Reflow bubbles into a row that wraps two-plus per line, filling
     the left/right space beside center instead of stacking into one
     narrow column — width is intentionally wider than .globe-scene
     (240px) and allowed to overflow it since .globe-scene has no
     clipping and centers it via align-items. */
  .globe-bubbles {
    position: static;
    flex: 0 0 auto;
    width: min(440px, 92vw);
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .globe-bubble {
    position: static;
    width: auto;
    height: auto;
    transform: none;
  }

  .globe-bubble-inner {
    position: static;
    transform: none;
    animation: none;
  }
}

@media (max-width: 480px) {
  .globe-scene { width: 200px; margin-top: 56px; }
  .globe-glow  { width: 184px; height: 184px; }
  .globe-orbit { width: 244px; height: 244px; }
  .globe       { width: 156px; height: 156px; }
  .globe-bubbles { width: min(360px, 94vw); gap: 9px; }
  .globe-bubble-inner { font-size: 0.66rem; padding: 6px 11px; }
}

/* ============================================================
   SECTION — INDUSTRIES WE SERVE
   ============================================================ */

#industries {
  background: var(--dark);
  padding: 100px 40px 120px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ind-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.ind-heading {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  text-align: center;
  margin-bottom: 56px;
}

.ind-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ind-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 30px 26px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.ind-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(27, 156, 216, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.ind-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-light);
  margin-bottom: 18px;
  transition: color 0.3s ease;
}

.ind-icon svg {
  width: 28px;
  height: 28px;
}

.ind-card:hover .ind-icon {
  color: var(--green-light);
}

.ind-title {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 8px;
}

.ind-text {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Responsive: Industries We Serve ─────────────────────────── */

@media (max-width: 1024px) {
  #industries { padding: 88px 28px 100px; }
  .ind-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .ind-heading { margin-bottom: 48px; }
}

@media (max-width: 768px) {
  #industries { padding: 72px 24px 88px; }
}

@media (max-width: 480px) {
  #industries { padding: 56px 18px 72px; }
  .ind-grid { grid-template-columns: 1fr; gap: 16px; }
  .ind-card { padding: 26px 22px; }
}

/* ============================================================
   SECTION — OUR SERVICES  (alternating full-width rows)
   ============================================================ */

#our-services {
  background: var(--dark);
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.osv-heading {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  text-align: center;
  margin: 0 auto;
  padding: 100px 40px 64px;
  max-width: 800px;
}

/* ── Row ── */
.osv-row {
  padding: 64px 40px;
}

/* Alternate tone: base dark vs a touch lighter charcoal */
.osv-row--a { background: var(--dark); }
.osv-row--b { background: #1c2026; }

.osv-row-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
}

.osv-row--reverse .osv-row-inner {
  flex-direction: row-reverse;
}

/* ── Media ── */
.osv-media {
  flex: 0 0 44%;
}

.osv-frame {
  width: 100%;
  aspect-ratio: 750 / 550;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.osv-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder used until images/services/embedded.jpg is supplied */
.osv-frame--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(27, 156, 216, 0.18), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(58, 170, 53, 0.16), transparent 55%),
    var(--dark-mid);
}

.osv-placeholder-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Content ── */
.osv-content {
  flex: 1;
}

.osv-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 12px;
}

.osv-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--blue), var(--green));
}

.osv-text {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.58);
  max-width: 480px;
  margin-bottom: 30px;
}

.osv-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--green);
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.osv-btn:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(58, 170, 53, 0.35);
}

/* ── Responsive: Our Services ────────────────────────────────── */

@media (max-width: 1024px) {
  .osv-heading { padding: 88px 28px 52px; }
  .osv-row { padding: 52px 28px; }
  .osv-row-inner { gap: 40px; }
  .osv-media { flex: 0 0 46%; }
}

@media (max-width: 768px) {
  .osv-heading { padding: 72px 24px 44px; }
  .osv-row { padding: 44px 24px; }

  .osv-row-inner,
  .osv-row--reverse .osv-row-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  .osv-media { flex: none; }
  .osv-text { max-width: none; }
}

@media (max-width: 480px) {
  .osv-heading { padding: 56px 18px 36px; }
  .osv-row { padding: 36px 18px; }
}
