/* ══════════════════════════════════════════════════════════════════════════
   CITREA — Custom Solutions Page  (csw-*)
   Extends consulting.css base design system.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.csw-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  overflow: hidden;
  background:
    linear-gradient(to bottom,
      rgba(7, 11, 7, 0.20) 0%,
      rgba(7, 11, 7, 0.58) 50%,
      rgba(7, 11, 7, 1.00) 100%
    ),
    radial-gradient(ellipse 130% 90% at 50% 0%, rgba(15, 28, 12, 0.75) 0%, rgba(7, 11, 7, 0.95) 75%),
    #070b07;
}

/* Top cinematic edge */
.csw-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 113, 54, 0.5)    20%,
    rgba(245, 223, 77, 0.45) 50%,
    rgba(0, 113, 54, 0.5)    80%,
    transparent 100%
  );
  z-index: 3;
}

/* Grain texture */
.csw-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(245, 223, 77, 0.015) 1px, transparent 1px),
    radial-gradient(circle, rgba(0, 113, 54, 0.018)   1px, transparent 1px);
  background-size: 60px 60px, 95px 95px;
  background-position: 0 0, 30px 30px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Atmospheric veil */
.csw-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%,  rgba(245, 223, 77, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 55% at 92%  30%, rgba(0, 113, 54, 0.10)   0%, transparent 60%),
    radial-gradient(ellipse 45% 60% at 8%   75%, rgba(0, 0, 0, 0.50)      0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Container above overlays */
.csw-hero .container {
  position: relative;
  z-index: 2;
}

/* ── SVG Circuit Background ───────────────────────────────────────────── */
.csw-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  z-index: 1;
  pointer-events: none;
}
.csw-circuit path {
  fill: none;
  stroke: rgba(0, 113, 54, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}
.csw-circuit path#cswPathMain,
.csw-circuit path#cswPathMain2 {
  stroke: rgba(0, 113, 54, 0.60);
  stroke-width: 2;
  stroke-dasharray: 0; /* GSAP controls this */
}
.csw-circuit path.soft {
  stroke: rgba(245, 223, 77, 0.15);
  stroke-width: 1;
  stroke-dasharray: 3 12;
}
.csw-pulse {
  fill: #F5DF4D;
  opacity: 0.9;
  filter: drop-shadow(0 0 5px rgba(245, 223, 77, 0.65));
}

/* ── Text Mask (GSAP reveal) ──────────────────────────────────────────── */
.csw-mask {
  overflow: hidden;
  display: block;
  line-height: 1.04;
}
.csw-mask > span {
  display: block;
  transform: translateY(108%);
  will-change: transform;
}

/* ── Kicker ───────────────────────────────────────────────────────────── */
.csw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #F5DF4D;
  line-height: 1;
}
.csw-kicker::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 1.5px;
  background: #F5DF4D;
  border-radius: 99px;
}

/* ── Glass Card (main, hero panels) ──────────────────────────────────── */
.csw-glass {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.006) 100%),
    rgba(9, 13, 9, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.csw-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, #007136 0%, #F5DF4D 55%, transparent 100%);
  opacity: 0.6;
  border-radius: 99px;
}

/* ── Wall (secondary glass panel) ────────────────────────────────────── */
.csw-wall {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.018) 0%, rgba(255, 255, 255, 0.004) 100%),
    rgba(9, 14, 9, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.csw-wall::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, #007136 0%, #F5DF4D 55%, transparent 100%);
  opacity: 0.35;
  border-radius: 99px;
}

/* ── Tile ─────────────────────────────────────────────────────────────── */
.csw-tile {
  position: relative;
  background:
    linear-gradient(148deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%),
    rgba(9, 14, 9, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  overflow: hidden;
  transition:
    transform    0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow   0.3s ease;
}
.csw-tile::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 223, 77, 0.35) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.csw-tile:hover::after { opacity: 1; }
.csw-tile:hover {
  border-color: rgba(245, 223, 77, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(245, 223, 77, 0.06);
}
.csw-tile p {
  color: rgba(241, 243, 245, 0.85);
  font-size: 0.9rem;
  line-height: 1.72;
}

/* ── Accent Bar ───────────────────────────────────────────────────────── */
.csw-bar {
  height: 1.5px;
  background: linear-gradient(90deg, #007136 0%, #F5DF4D 55%, transparent 100%);
  border-radius: 99px;
  transform-origin: left center;
}

/* ── Chapters Section ─────────────────────────────────────────────────── */
.csw-chapters {
  position: relative;
}
.csw-chapters::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  pointer-events: none;
}

/* ── Chapter (content block) ──────────────────────────────────────────── */
.csw-chapter {
  padding: 72px 0;
  position: relative;
}
.csw-chapter + .csw-chapter {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Section Flip (interactive grid) ─────────────────────────────────── */
.cp-page #cswFlip {
  padding: 80px 0;
}
.csw-flip-item {
  cursor: pointer;
}
.csw-flip-item .csw-tile {
  cursor: pointer;
  user-select: none;
}
.csw-flip-item .csw-tile:active {
  transform: scale(0.97);
}

/* ── Typography ───────────────────────────────────────────────────────── */
.csw-hero h1 {
  letter-spacing: -0.038em;
  line-height: 1.02;
  color: #f1f3f5;
}
.csw-hero .fw-light,
#cswHeroLead {
  font-size: clamp(0.94rem, 1.1vw, 1.06rem);
  line-height: 1.82;
  color: #9ba5a0;
}
.csw-chapters h2,
.cp-page #cswFlip h2 {
  letter-spacing: -0.026em;
  line-height: 1.12;
  color: #f1f3f5;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.csw-hero .btn {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 30px;
  border-radius: 11px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.csw-hero .btn-primary:hover {
  box-shadow: 0 0 0 4px rgba(245, 223, 77, 0.18), 0 10px 36px rgba(245, 223, 77, 0.15);
  transform: translateY(-2px);
}
.csw-hero .btn-outline-light:hover {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ── Badges ───────────────────────────────────────────────────────────── */
.csw-hero .badge {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  padding: 6px 13px;
  border-radius: 8px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .csw-hero {
    min-height: auto;
    padding: 116px 0 72px;
  }
  .csw-chapter {
    padding: 56px 0;
  }
}
@media (max-width: 767.98px) {
  .csw-hero {
    padding: 104px 0 60px;
  }
  .csw-hero h1 {
    font-size: clamp(2.2rem, 9vw, 3rem) !important;
    letter-spacing: -0.025em;
  }
  .csw-glass,
  .csw-wall {
    border-radius: 13px;
  }
  .csw-chapter {
    padding: 48px 0;
  }
}
@media (max-width: 575.98px) {
  .csw-hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.6rem) !important;
  }
}
