/* =========================================================
   SCIRIDGE TECHNOLOGIES — SERVICE DETAIL STYLESHEET
   Refactored for Enhanced Typography, Depth & WCAG Contrast
   Tokens consumed directly from variable.css with fallbacks
========================================================= */

/* =========================================================
   01. PAGE FOUNDATION
========================================================= */

.service-detail-page {
  width: 100%;
  overflow-x: hidden;
  background: var(--color-bg, #ffffff);
  color: var(--color-text, #1e293b);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.service-page-hero-container,
.service-capabilities-container,
.service-solutions-container,
.service-approach-container {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), var(--container-wide, 1340px));
  margin-inline: auto;
}

/* =========================================================
   02. SECTION HEADINGS & KICKERS
========================================================= */

.service-capabilities-header h2,
.service-solutions-header h2,
.service-page-approach-header h2 {
  margin: 16px 0 0;
  color: var(--color-text-dark, #0f172a);
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: var(--weight-semibold, 600);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.service-page-hero-content h1 span,
.service-capabilities-header h2 span,
.service-solutions-header h2 span,
.service-page-approach-header h2 span {
  display: inline-block;
  color: var(--color-accent, #dc2626);
}

.service-section-intro,
.service-solutions-header > p,
.service-page-approach-header > p {
  margin: 16px 0 0;
  color: var(--color-text-light, #475569);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  max-width: 64ch;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent, #dc2626);
  font-size: 0.75rem;
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: currentColor;
}

/* =========================================================
   03. SCROLL REVEAL & PARALLAX
========================================================= */

[data-reveal] {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 35px, 0);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.75s;
  will-change: opacity, transform;
}

[data-reveal="left"] {
  transform: translate3d(-40px, 0, 0);
}

[data-reveal="right"] {
  transform: translate3d(40px, 0, 0);
}

[data-reveal="down"] {
  transform: translate3d(0, -35px, 0);
}

[data-reveal="up"] {
  transform: translate3d(0, 35px, 0);
}

[data-reveal="scale"] {
  transform: scale(0.96) translate3d(0, 20px, 0);
}

[data-reveal].is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.service-detail-list [data-reveal]:nth-child(2),
.service-solutions-grid [data-reveal]:nth-child(2),
.service-approach-grid [data-reveal]:nth-child(2) {
  transition-delay: 0.08s;
}

.service-detail-list [data-reveal]:nth-child(3),
.service-solutions-grid [data-reveal]:nth-child(3),
.service-approach-grid [data-reveal]:nth-child(3) {
  transition-delay: 0.16s;
}

.service-detail-list [data-reveal]:nth-child(4),
.service-solutions-grid [data-reveal]:nth-child(4),
.service-approach-grid [data-reveal]:nth-child(4) {
  transition-delay: 0.24s;
}

[data-parallax] {
  will-change: transform;
}

/* =========================================================
   04. HERO SECTION
========================================================= */

.service-page-hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: auto;
  padding-top: calc(var(--nav-height, 82px) + clamp(48px, 5.5vw, 76px));
  padding-bottom: clamp(64px, 7vw, 100px);
  background:
    radial-gradient(circle at 82% 45%, rgba(220, 38, 38, 0.08), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.service-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, black, rgba(0, 0, 0, 0.6), transparent);
  -webkit-mask-image: linear-gradient(to right, black, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.service-page-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -240px;
  top: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.09), transparent 68%);
  transform: translateY(-50%);
  z-index: -3;
  pointer-events: none;
}

.service-page-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  will-change: transform;
}

.service-page-orbit-one {
  width: 650px;
  height: 650px;
  right: -315px;
  top: 35px;
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.service-page-orbit-two {
  width: 390px;
  height: 390px;
  right: -185px;
  top: 165px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.service-page-hero-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: clamp(36px, 4.5vw, 56px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.service-page-hero-top .section-kicker {
  margin: 0;
  color: #475569;
}

.service-page-hero-top .section-kicker::before {
  background: var(--color-accent, #dc2626);
}

.service-page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.service-page-hero-content {
  max-width: 760px;
}

.service-page-hero-content h1 {
  margin: 0;
  color: var(--color-text-dark, #0f172a);
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: clamp(38px, 5vw, 70px);
  font-weight: var(--weight-bold, 700);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.service-page-hero-content > p {
  max-width: 62ch;
  margin: 24px 0 0;
  color: #334155;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.75;
}

.service-page-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.service-page-hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold, 600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* =========================================================
   HERO VISUAL
========================================================= */

.service-page-hero-visual {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md, 8px);
}

.service-page-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.service-page-hero-visual::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.service-visual-label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 4;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-visual-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  color: #64748b;
  font-size: 0.75rem;
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-visual-core {
  position: relative;
  z-index: 5;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(220, 38, 38, 0.6);
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: 28px;
  font-weight: var(--weight-semibold, 600);
  letter-spacing: -0.03em;
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(220, 38, 38, 0.04),
    0 0 0 56px rgba(220, 38, 38, 0.02),
    0 12px 24px -6px rgba(15, 23, 42, 0.08);
}

/* =========================================================
   05. CAPABILITIES
========================================================= */

.service-capabilities-section {
  position: relative;
  background: var(--color-bg-light, #f8fafc);
  padding: clamp(72px, 7.5vw, 120px) 0;
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.service-capabilities-header {
  max-width: 860px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.service-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.service-detail-item {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  background: #ffffff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.service-detail-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--color-accent, #dc2626);
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-detail-item:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.08);
}

.service-detail-item:hover::before {
  height: 100%;
}

.service-detail-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border, #f1f5f9);
}

.service-detail-label {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-detail-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 20px;
}

.service-detail-card-content h3 {
  margin: 0 0 12px;
  color: var(--color-text-dark, #0f172a);
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: var(--weight-semibold, 600);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.service-detail-card-content > p {
  max-width: 58ch;
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}

.service-detail-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-top: auto;
  padding: 24px 0 0;
  list-style: none;
}

.service-detail-points li {
  position: relative;
  padding-left: 16px;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: var(--weight-medium, 500);
}

.service-detail-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent, #dc2626);
}

/* =========================================================
   06. SOLUTIONS
========================================================= */

.service-solutions-section {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  padding: clamp(75px, 8vw, 120px) 0;
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.service-solutions-section::before {
  content: "";
  position: absolute;
  left: -250px;
  bottom: -250px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.service-solutions-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.6fr);
  align-items: end;
  gap: clamp(36px, 5vw, 80px);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.service-solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.service-solution-card {
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
  background: var(--color-bg-light, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease;
}

.service-solution-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -45px;
  bottom: -45px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-solution-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.35);
  background: #ffffff;
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.07);
}

.service-solution-card:hover::after {
  transform: scale(1.6);
}

.service-solution-card h3 {
  margin: 0 0 12px;
  color: var(--color-text-dark, #0f172a);
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  font-weight: var(--weight-semibold, 600);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.service-solution-card > p {
  max-width: 58ch;
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}

.service-solution-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.service-solution-tags span {
  padding: 5px 12px;
  border: 1px solid var(--color-border, #cbd5e1);
  background: #ffffff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold, 600);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm, 4px);
}

/* =========================================================
   07. APPROACH (DARK CONTRAST SECTION)
========================================================= */

.service-page-approach {
  position: relative;
  overflow: hidden;
  background: #090d16;
  color: #f8fafc;
  padding: clamp(80px, 8vw, 125px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.service-page-approach::before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  right: -400px;
  top: 50%;
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.service-page-approach::after {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  right: -225px;
  top: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.service-page-approach-header {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.service-page-approach-header .section-kicker {
  color: #94a3b8;
}

.service-page-approach-header .section-kicker::before {
  background: var(--color-accent, #dc2626);
}

.service-page-approach-header h2 {
  color: #ffffff;
}

.service-page-approach-header > p {
  color: #cbd5e1;
}

.service-approach-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-approach-card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 6px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease,
              border-color 0.25s ease;
}

.service-approach-card::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent, #dc2626);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-approach-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(220, 38, 38, 0.5);
}

.service-approach-card:hover::before {
  width: 100%;
}

.service-approach-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-family: var(--font-display, var(--font-primary, inherit));
  font-size: 1.15rem;
  font-weight: var(--weight-semibold, 600);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.service-approach-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.65;
}

.service-approach-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-approach-footer > span {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: var(--weight-semibold, 600);
  letter-spacing: 0.03em;
}

.service-approach-footer > p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* =========================================================
   08. RESPONSIVE
========================================================= */

@media (max-width: 1050px) {
  .service-page-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    gap: 40px;
  }

  .service-approach-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .service-page-hero-grid,
  .service-solutions-header {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .service-page-hero-visual {
    max-width: 100%;
    min-height: 340px;
  }
}

@media (max-width: 768px) {
  .service-page-hero {
    padding-top: calc(var(--nav-mobile-height, 68px) + 28px);
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 56px;
  }

  .service-capabilities-section,
  .service-solutions-section,
  .service-page-approach {
    padding: 60px 0;
  }

  .service-detail-list,
  .service-solutions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-detail-item,
  .service-solution-card {
    min-height: auto;
    padding: 24px;
  }

  .service-approach-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .service-page-hero-container,
  .service-capabilities-container,
  .service-solutions-container,
  .service-approach-container {
    width: calc(100% - 32px);
  }

  .service-page-hero-visual {
    min-height: 260px;
  }

  .service-visual-core {
    width: 96px;
    height: 96px;
    font-size: 22px;
  }

  .service-detail-points {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .service-approach-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   09. ACCESSIBILITY & REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .service-page-orbit {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }

  .service-detail-item,
  .service-solution-card,
  .service-approach-card,
  .service-detail-item::before,
  .service-solution-card::after,
  .service-approach-card::before {
    transform: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
  }

  [data-parallax] {
    transform: none !important;
  }
}