/* ==================== SERVICES PAGE (page-specific) ====================
   Loaded only by templates/services.html.
   Uses theme tokens from style.css (:root variables, fonts, buttons). */

/* ---------- Scroll reveal system ----------
   Reveal classes live on wrapper elements so hover transforms on inner
   cards never conflict with the reveal transition or its stagger delay. */
.sv-reveal,
.sv-reveal-left,
.sv-reveal-right {
  opacity: 0;
  transition: opacity 0.65s ease-out var(--sv-delay, 0s),
    transform 0.65s ease-out var(--sv-delay, 0s);
  will-change: opacity, transform;
}

.sv-reveal { transform: translateY(26px); }
.sv-reveal-left { transform: translateX(-40px); }
.sv-reveal-right { transform: translateX(40px); }

.sv-reveal.sv-visible,
.sv-reveal-left.sv-visible,
.sv-reveal-right.sv-visible {
  opacity: 1;
  transform: none;
}

/* anchored sections clear the fixed header when jumped to */
.services-page section,
.services-page .services-details {
  scroll-margin-top: 84px;
}

/* ---------- Shared section headings ---------- */
.services-section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin: 0 0 12px;
}

.services-section-title .hero-accent {
  color: var(--brand-600);
}

.services-section-sub {
  font-size: 1.02rem;
  color: var(--gray-600);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.6;
}

/* ==================== 1. HERO ==================== */
.services-page .services-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 88px 48px 72px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, var(--brand-50) 60%, var(--brand-100) 100%);
  border-bottom: 1px solid var(--brand-100);
}

.services-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.services-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

.services-hero-orb-1 {
  width: 420px;
  height: 420px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, var(--brand-200) 0%, transparent 70%);
  animation: sv-float 9s ease-in-out infinite;
}

.services-hero-orb-2 {
  width: 380px;
  height: 380px;
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, #c9d6f5 0%, transparent 70%);
  animation: sv-float 11s ease-in-out infinite reverse;
}

@keyframes sv-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

/* floating glass chips, desktop only */
.services-hero-float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--brand-700);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(63, 86, 160, 0.16);
}

.services-hero-float svg { color: var(--brand-600); flex-shrink: 0; }

.services-hero-float-left {
  left: 6%;
  top: 38%;
  animation: sv-float 7s ease-in-out infinite, landing-fade-in 0.8s ease-out 0.5s both;
}

.services-hero-float-right {
  right: 6%;
  top: 56%;
  animation: sv-float 8s ease-in-out 1.2s infinite, landing-fade-in 0.8s ease-out 0.7s both;
}

.services-hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
  animation: landing-fade-in-up 0.6s ease-out both;
}

.services-hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.95rem, 4.4vw, 3rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 auto 16px;
  line-height: 1.18;
  animation: landing-fade-in-up 0.6s ease-out 0.1s both;
}

.services-hero-title .hero-accent {
  color: var(--brand-600);
}

.services-hero-tagline {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
  animation: landing-fade-in-up 0.6s ease-out 0.2s both;
}

.services-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
  animation: landing-fade-in-up 0.6s ease-out 0.3s both;
}

.services-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  animation: landing-fade-in-up 0.6s ease-out 0.42s both;
}

.services-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 7px 15px;
  box-shadow: var(--shadow);
}

.services-hero-badge svg { color: var(--brand-600); }

/* ==================== SERVICE SUMMARY GRID (bottom of page) ==================== */
.services-overview {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 72px 48px;
  width: 100%;
}

.services-overview .services-grid {
  max-width: 1140px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 26px;
}

.service-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.92) 0%, var(--brand-50) 130%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(63, 86, 160, 0.14);
  border-color: var(--brand-200);
}

.service-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  margin-bottom: 18px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.service-card:hover .service-card-icon {
  transform: scale(1.06);
  background: var(--brand-600);
  color: var(--white);
}

.service-card-title {
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
  overflow-wrap: break-word;
}

.service-card-desc {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0 0 16px;
}

.service-card-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.service-card-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.service-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.service-card-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.service-card-more:hover {
  gap: 11px;
  color: var(--brand-700);
}

/* ==================== DETAILED SECTIONS ==================== */
.services-details {
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 48px 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.services-details-head {
  margin-bottom: 8px;
}

.services-details-head .services-section-sub {
  margin-bottom: 0;
}

.services-detail {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
  padding: 48px 44px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.05);
  scroll-margin-top: 88px;
}

.services-detail-flip .services-detail-content { order: 2; }
.services-detail-flip .services-detail-visual { order: 1; }

.services-detail-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.services-detail-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 10px;
}

.services-detail-lead {
  font-size: 0.98rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0 0 20px;
}

.services-detail-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 9px 22px;
}

.services-detail-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.services-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f56a0' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 9px 9px;
  background-position: center;
  background-repeat: no-repeat;
}

.services-detail-note {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  background: var(--brand-50);
  border-left: 3px solid var(--brand-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 0 0 20px;
}

.services-detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.services-detail-cta:hover {
  gap: 12px;
  color: var(--brand-700);
}

/* visual panel */
.services-detail-visual {
  display: flex;
  justify-content: center;
}

.services-detail-panel {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(165deg, var(--brand-50) 0%, rgba(255, 255, 255, 0.9) 55%, var(--brand-100) 130%);
  border: 1px solid var(--brand-100);
  border-radius: 18px;
  padding: 14px 14px 18px;
  box-shadow: 0 14px 40px rgba(63, 86, 160, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.services-detail-panel:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 22px 52px rgba(63, 86, 160, 0.2);
}

.services-detail-img-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--brand-100);
  background: var(--white);
}

.services-detail-img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.services-detail-panel:hover .services-detail-img {
  transform: scale(1.04);
}

.services-detail-panel-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.services-detail-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--white);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  padding: 5px 13px;
}

/* ==================== 4. PROCESS ==================== */
.services-process {
  background: linear-gradient(160deg, var(--brand-50) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-top: 1px solid var(--brand-100);
  border-bottom: 1px solid var(--brand-100);
  padding: 72px 48px;
  width: 100%;
  margin-top: 48px;
}

.services-process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.services-process-step {
  height: 100%;
  text-align: center;
  padding: 30px 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.services-process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.services-process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-600);
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(63, 86, 160, 0.3);
}

.services-process-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 7px;
}

.services-process-text {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0;
}

/* ==================== 5. REPORT & TOOL SUPPORT ==================== */
.services-tools {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 48px;
  width: 100%;
}

.services-tools-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.services-tools-group {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.services-tools-label {
  flex: 0 0 130px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.services-tools-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.services-tool-badge {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-700);
  background: linear-gradient(170deg, var(--white) 0%, var(--brand-50) 100%);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  padding: 9px 20px;
  box-shadow: var(--shadow);
  transition: opacity 0.5s ease-out var(--sv-delay, 0s),
    transform 0.5s ease-out var(--sv-delay, 0s),
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.services-tool-badge:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-md);
}

/* ==================== 6. WHY CHOOSE STUWIUS ==================== */
.services-why {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 48px 72px;
  width: 100%;
}

.services-why .services-section-title {
  margin-bottom: 40px;
}

.services-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 18px;
}

.services-why-item {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.services-why-item:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
}

.services-why-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-600);
}

.services-why-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.35;
}

/* ==================== 7. FINAL CTA ==================== */
.services-cta {
  padding: 24px 48px 96px;
  width: 100%;
  scroll-margin-top: 88px;
}

.services-cta-inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(150deg, var(--brand-600) 0%, var(--brand-800) 100%);
  border-radius: 22px;
  padding: 60px 48px;
  box-shadow: 0 18px 48px rgba(43, 62, 114, 0.32);
  overflow: hidden;
}

.services-cta-inner.sv-visible {
  animation: sv-cta-glow 4.5s ease-in-out 1s infinite;
}

@keyframes sv-cta-glow {
  0%, 100% { box-shadow: 0 18px 48px rgba(43, 62, 114, 0.32); }
  50% { box-shadow: 0 18px 64px rgba(63, 86, 160, 0.5); }
}

.services-cta-inner::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: -180px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.services-cta-title {
  position: relative;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--white);
  max-width: 640px;
  margin: 0 auto 12px;
  line-height: 1.3;
}

.services-cta-text {
  position: relative;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 30px;
}

.services-cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
}

.services-cta-btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.services-cta-btn:hover { transform: translateY(-2px); }
.services-cta-btn:active { transform: scale(0.98); }

.services-cta-btn-primary {
  background: var(--white);
  color: var(--brand-700);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.services-cta-btn-primary:hover {
  background: var(--brand-50);
}

.services-cta-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.services-cta-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
}

.services-cta-meta {
  position: relative;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  margin: 26px 0 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .services-hero-float {
    display: none;
  }

  .services-detail {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 32px;
  }

  .services-detail-flip .services-detail-content { order: 1; }
  .services-detail-flip .services-detail-visual { order: 2; }

  .services-detail-visual {
    order: 2;
  }
}

@media (max-width: 768px) {
  .services-page .services-hero {
    padding: 64px 24px 52px;
  }

  .services-overview,
  .services-tools,
  .services-why {
    padding-left: 24px;
    padding-right: 24px;
  }

  .services-details {
    padding-left: 24px;
    padding-right: 24px;
  }

  .services-detail {
    padding: 32px 22px;
  }

  .services-process,
  .services-cta {
    padding-left: 24px;
    padding-right: 24px;
  }

  .services-cta-inner {
    padding: 44px 26px;
  }

  .services-tools-group {
    flex-direction: column;
    gap: 12px;
  }

  .services-tools-label {
    flex: none;
  }

  .services-hero-actions .btn-landing,
  .services-cta-actions .services-cta-btn {
    width: 100%;
    text-align: center;
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .sv-reveal,
  .sv-reveal-left,
  .sv-reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .services-hero-orb,
  .services-hero-float,
  .services-hero-eyebrow,
  .services-hero-title,
  .services-hero-tagline,
  .services-hero-actions,
  .services-hero-badges {
    animation: none;
  }

  .services-cta-inner.sv-visible {
    animation: none;
  }

  .service-card,
  .services-process-step,
  .services-why-item,
  .services-tool-badge,
  .services-cta-btn,
  .services-detail-panel,
  .services-detail-img {
    transition: none;
  }
}
