/* SevinHub Portal Heroes
   Fullscreen, subject-specific hero stages for public marketing pages. */

html.sh-portal-active,
body.sh-portal-active { max-width: 100%; overflow-x: clip; }
body.sh-portal-active .sh-form-control,
body.sh-portal-active select { max-width: 100%; }

.sh-page-hero.sh-portal-hero,
.csg-hero.sh-portal-hero {
  --ph-accent: 139, 92, 246;
  --ph-secondary: 245, 158, 11;
  position: relative !important;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 76px);
  padding: clamp(4rem, 7vh, 6.5rem) 0 clamp(4.5rem, 8vh, 7rem) !important;
  overflow: clip !important;
  border-top: 1px solid rgba(var(--ph-accent), .12);
  border-bottom: 1px solid rgba(var(--ph-accent), .24);
  background:
    radial-gradient(ellipse 52% 64% at 82% 48%, rgba(var(--ph-accent), .13), transparent 72%),
    radial-gradient(ellipse 42% 48% at 18% 25%, rgba(var(--ph-secondary), .055), transparent 74%),
    linear-gradient(145deg, #070b17 0%, #0b1020 50%, #080c18 100%) !important;
  color: #f8fafc;
}

.sh-portal-hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--ph-accent), .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ph-accent), .026) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 88%, transparent);
}

.sh-portal-hero::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 8%, rgba(var(--ph-accent), .8), rgba(var(--ph-secondary), .78), transparent 92%);
  opacity: .78;
}

.sh-portal-hero > .v5-aurora-blob { display: none !important; }

.sh-portal-hero .sh-portal-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
  width: 100%;
  text-align: left !important;
}

.sh-portal-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.sh-portal-copy::before {
  content: attr(data-portal-index);
  display: block;
  margin-bottom: 1rem;
  color: rgba(var(--ph-accent), .78);
  font: 700 .64rem/1 'Inter', sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.sh-portal-hero .sh-section-label,
.sh-portal-hero .v5-kicker,
.sh-portal-hero .csg-tag {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 1rem !important;
}

.sh-portal-hero h1 {
  max-width: 720px;
  margin: 0 0 1.25rem !important;
  color: #f8fafc !important;
  font-family: 'Sora', 'Inter', sans-serif !important;
  font-size: clamp(2.55rem, 5vw, 5.35rem) !important;
  font-weight: 800 !important;
  line-height: .98 !important;
  letter-spacing: -.045em !important;
  text-wrap: balance;
}

.sh-portal-hero p {
  max-width: 680px !important;
  color: #b7c2d7 !important;
  font-family: 'Inter', sans-serif;
  font-size: clamp(.98rem, 1.25vw, 1.1rem) !important;
  line-height: 1.72 !important;
}

.sh-portal-hero .sh-portal-copy > p:last-of-type { margin-bottom: 0; }

.sh-portal-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  height: clamp(390px, 55vh, 590px);
  overflow: hidden;
  border: 1px solid rgba(var(--ph-accent), .3);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(var(--ph-accent), .12), rgba(7, 11, 25, .86) 46%, rgba(var(--ph-secondary), .05)),
    #080d1c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -70px 110px rgba(0,0,0,.28),
    0 34px 90px rgba(0,0,0,.38),
    0 0 80px rgba(var(--ph-accent), .12);
  transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
  transform-origin: center right;
}

.sh-portal-stage::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 14px;
  border: 1px solid rgba(var(--ph-accent), .13);
  border-radius: 20px;
  background: linear-gradient(115deg, rgba(255,255,255,.045), transparent 25%, transparent 74%, rgba(var(--ph-secondary), .035));
  pointer-events: none;
}

.sh-portal-stage::after {
  content: '';
  position: absolute;
  z-index: 3;
  left: 9%;
  right: 9%;
  bottom: -17px;
  height: 34px;
  border-radius: 50%;
  background: rgba(var(--ph-accent), .28);
  filter: blur(20px);
  pointer-events: none;
}

.sh-portal-stage canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: saturate(1.34) brightness(1.22) contrast(1.12) drop-shadow(0 0 14px rgba(var(--ph-accent), .16));
}

.sh-portal-coordinate {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(var(--ph-accent), .8);
  font: 700 .6rem/1 'Inter', sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  pointer-events: none;
}

.sh-portal-coordinate::before {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.sh-portal-hero[data-portal='marketplace'] { --ph-accent: 245, 158, 11; --ph-secondary: 139, 92, 246; }
.sh-portal-hero[data-portal='services'] { --ph-accent: 6, 182, 212; --ph-secondary: 245, 158, 11; }
.sh-portal-hero[data-portal='portfolio'] { --ph-accent: 167, 139, 250; --ph-secondary: 6, 182, 212; }
.sh-portal-hero[data-portal='security'] { --ph-accent: 239, 68, 68; --ph-secondary: 6, 182, 212; }
.sh-portal-hero[data-portal='open'] { --ph-accent: 16, 185, 129; --ph-secondary: 245, 158, 11; }
.sh-portal-hero[data-portal='affiliate'] { --ph-accent: 236, 72, 153; --ph-secondary: 245, 158, 11; }
.sh-portal-hero[data-portal='seller'] { --ph-accent: 245, 158, 11; --ph-secondary: 16, 185, 129; }
.sh-portal-hero[data-portal='editorial'] { --ph-accent: 6, 182, 212; --ph-secondary: 167, 139, 250; }
.sh-portal-hero[data-portal='journey'] { --ph-accent: 245, 158, 11; --ph-secondary: 236, 72, 153; }
.sh-portal-hero[data-portal='contact'] { --ph-accent: 6, 182, 212; --ph-secondary: 139, 92, 246; }
.sh-portal-hero[data-portal='support'] { --ph-accent: 16, 185, 129; --ph-secondary: 6, 182, 212; }
.sh-portal-hero[data-portal='answers'] { --ph-accent: 167, 139, 250; --ph-secondary: 245, 158, 11; }
.sh-portal-hero[data-portal='broadcast'] { --ph-accent: 236, 72, 153; --ph-secondary: 6, 182, 212; }
.sh-portal-hero[data-portal='knowledge'] { --ph-accent: 6, 182, 212; --ph-secondary: 16, 185, 129; }
.sh-portal-hero[data-portal='brief'] { --ph-accent: 245, 158, 11; --ph-secondary: 6, 182, 212; }
.sh-portal-hero[data-portal='versions'] { --ph-accent: 16, 185, 129; --ph-secondary: 167, 139, 250; }
.sh-portal-hero[data-portal='origin'] { --ph-accent: 139, 92, 246; --ph-secondary: 245, 158, 11; }
.sh-portal-hero[data-portal='consulting'] { --ph-accent: 245, 158, 11; --ph-secondary: 139, 92, 246; }

body.sh-calm-mode .sh-portal-stage canvas { opacity: .72; filter: saturate(.9); }

[data-theme='light'] .sh-page-hero.sh-portal-hero,
[data-theme='light'] .csg-hero.sh-portal-hero {
  color: #151324;
  background:
    radial-gradient(ellipse 52% 64% at 82% 48%, rgba(var(--ph-accent), .105), transparent 72%),
    radial-gradient(ellipse 42% 48% at 18% 25%, rgba(var(--ph-secondary), .07), transparent 74%),
    linear-gradient(145deg, #fbfaff 0%, #f4f2fb 52%, #fbf9ff 100%) !important;
}
[data-theme='light'] .sh-portal-hero h1 { color: #151324 !important; }
[data-theme='light'] .sh-portal-hero p { color: #514c67 !important; }
[data-theme='light'] .sh-portal-stage {
  background:
    linear-gradient(145deg, rgba(var(--ph-accent), .13), rgba(246, 243, 252, .92) 48%, rgba(var(--ph-secondary), .075)),
    #f5f2fb;
  box-shadow: inset 0 1px 0 #fff, inset 0 -70px 110px rgba(94, 74, 140, .06), 0 30px 75px rgba(57, 40, 95, .16), 0 0 70px rgba(var(--ph-accent), .08);
}
[data-theme='light'] .sh-portal-stage canvas { filter: saturate(1.15) brightness(.84) contrast(1.2); }

@media (max-width: 991.98px) {
  .sh-page-hero.sh-portal-hero,
  .csg-hero.sh-portal-hero {
    min-height: calc(100svh - 66px);
    padding: 3.25rem 0 5.5rem !important;
    align-items: flex-start;
  }
  .sh-portal-hero .sh-portal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
  }
  .sh-portal-stage {
    height: clamp(270px, 44vh, 390px);
    border-radius: 23px;
    transform: perspective(1000px) rotateX(1.5deg);
    transform-origin: center;
  }
  .sh-portal-hero h1 { font-size: clamp(2.35rem, 10vw, 4.1rem) !important; }
}

@media (max-width: 575.98px) {
  .sh-page-hero.sh-portal-hero,
  .csg-hero.sh-portal-hero { padding: 2.75rem 0 5.25rem !important; }
  .sh-portal-hero .sh-portal-layout { gap: 1.8rem; }
  .sh-portal-copy::before { margin-bottom: .8rem; }
  .sh-portal-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.25rem) !important;
    line-height: 1.02 !important;
  }
  .sh-portal-hero p { font-size: .96rem !important; line-height: 1.64 !important; }
  .sh-portal-stage { height: 260px; border-radius: 20px; }
  .sh-portal-stage::before { inset: 10px; border-radius: 14px; }
  .sh-portal-coordinate { top: 17px; right: 16px; font-size: .52rem; }
  .sh-portal-coordinate::before { width: 20px; }
  .sh-portal-hero .v51-stat-strip { gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-portal-stage { transform: none; }
  .sh-portal-stage canvas { opacity: .75; filter: saturate(.9); }
}
