/* ==========================================================================
   GSP Capital - Visual Enhancements & Effects
   ========================================================================== */

/* --------------------------------------------------------------------------
   Diagonal Split Banner (Portfolio page)
   -------------------------------------------------------------------------- */

.page-hero--diagonal {
  position: relative;
  display: flex;
  align-items: center;
  height: 380px;
  background-color: var(--color-primary);
  margin-top: 80px; /* offset for fixed header */
}

/* Remove the navy scrim overlay — diagonal variant controls its own image */
.page-hero--diagonal::before {
  display: none;
}

.page-hero__diagonal-text {
  position: relative;
  z-index: 2;
  width: 40%;
  padding: 0 3rem 0 clamp(1.5rem, 5vw, 5rem);
  flex-shrink: 0;
  color: var(--color-white);
}

.page-hero--diagonal .page-hero__diagonal-text .section-header__label {
  color: var(--color-accent);
}

.page-hero--diagonal .page-hero__diagonal-text .section-header__title {
  color: var(--color-white);
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  margin-bottom: 0;
}

.page-hero__diagonal-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  background-size: cover;
  background-position: center;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
  .page-hero--diagonal {
    height: auto;
    flex-direction: column;
    margin-top: 70px;
    position: relative;
    z-index: 2;
  }

  /* Pull the portfolio section up so category banners slide just behind the hero bottom */
  .page-hero--diagonal + .section {
    position: relative;
    z-index: 1;
    margin-top: -1.5rem;
  }

  /* Image-variant hero: image fills background behind the title */
  .page-hero--diagonal:has(.page-hero__diagonal-image) {
    min-height: 260px;
    justify-content: flex-end;
  }

  .page-hero__diagonal-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    clip-path: none;
  }

  /* Dark scrim so title text stays readable */
  .page-hero__diagonal-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(44, 24, 16, 0.92) 0%,
      rgba(44, 24, 16, 0.45) 60%,
      rgba(44, 24, 16, 0.15) 100%
    );
  }

  .page-hero__diagonal-text {
    width: 100%;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
    position: relative;
    z-index: 2;
  }

}

/* --------------------------------------------------------------------------
   Hover Effects
   -------------------------------------------------------------------------- */

.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (hover: hover) {
  .hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
  }
}

/* --------------------------------------------------------------------------
   Dividers
   -------------------------------------------------------------------------- */

.divider--gold {
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  height: 2px;
}

/* --------------------------------------------------------------------------
   Badge Styles
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-full);
}

.badge--gold {
  background: var(--color-accent-muted);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

/* --------------------------------------------------------------------------
   Scrollbar Styling
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-400) var(--color-gray-100);
}

/* --------------------------------------------------------------------------
   Selection Styling
   -------------------------------------------------------------------------- */

::selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Mobile wheel: hidden by default, shown only at ≤767px */
.page-hero__mobile-wheel {
  display: none;
}

/* --------------------------------------------------------------------------
   Hub-and-Spoke Sector Wheel (Portfolio Hero)
   -------------------------------------------------------------------------- */

.page-hero__diagonal-wheel {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(135deg, #3a1e12 0%, #1a0f0a 60%, #0a0a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sector-wheel {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Orbit ring */
.wheel__orbit {
  opacity: 0;
  animation: wheel-fade-in 0.8s ease 0.2s forwards;
}

/* Center circle + text */
.wheel__center,
.wheel__center-text {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

/* Pulse ring emanating from center */
.wheel__pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-pulse 2.8s ease-out 1.8s infinite;
}

@keyframes wheel-pulse {
  0%   { transform: scale(1);   opacity: 0.35; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Spokes — draw outward from center */
.wheel__spoke {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}
.wheel__spoke--0 { animation: wheel-draw-spoke 0.55s ease 0.85s forwards; }
.wheel__spoke--1 { animation: wheel-draw-spoke 0.55s ease 1.00s forwards; }
.wheel__spoke--2 { animation: wheel-draw-spoke 0.55s ease 1.15s forwards; }
.wheel__spoke--3 { animation: wheel-draw-spoke 0.55s ease 1.30s forwards; }
.wheel__spoke--4 { animation: wheel-draw-spoke 0.55s ease 1.45s forwards; }

@keyframes wheel-draw-spoke {
  to { stroke-dashoffset: 0; }
}

/* Nodes — spring-pop after their spoke finishes */
.wheel__node-group {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.wheel__node-group--0 { animation: wheel-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.35s forwards; }
.wheel__node-group--1 { animation: wheel-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.50s forwards; }
.wheel__node-group--2 { animation: wheel-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.65s forwards; }
.wheel__node-group--3 { animation: wheel-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.80s forwards; }
.wheel__node-group--4 { animation: wheel-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.95s forwards; }

@keyframes wheel-pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes wheel-fade-in {
  to { opacity: 1; }
}

/* Hover effects on nodes */
.wheel__node-link { cursor: pointer; }

.wheel__node-link:hover .wheel__node {
  stroke: rgba(243, 112, 33, 0.9);
  stroke-width: 2;
  fill: rgba(243, 112, 33, 0.1);
}

.wheel__node-link:hover .wheel__label {
  fill: rgba(243, 112, 33, 0.9);
}

/* Wheel: fill behind title on smaller screens */
@media (max-width: 991px) {
  .page-hero__diagonal-wheel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    clip-path: none;
    background: linear-gradient(135deg, #3a1e12 0%, #1a0f0a 60%, #0a0a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .page-hero__diagonal-wheel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(44, 24, 16, 0.92) 0%,
      rgba(44, 24, 16, 0.45) 60%,
      rgba(44, 24, 16, 0.15) 100%
    );
    pointer-events: none;
  }
}

/* Mobile-only sector wheel — must come after the ≤991px block so display:none wins */
@media (max-width: 767px) {
  /* Hide desktop diagonal wheel */
  .page-hero__diagonal-wheel {
    display: none;
  }

  /* Portfolio hero: tall enough to show the fanned wheel */
  .page-hero--diagonal:has(.page-hero__mobile-wheel) {
    min-height: 310px;
    justify-content: flex-end;
  }

  /* Mobile wheel fills hero background */
  .page-hero__mobile-wheel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #3a1e12 0%, #1a0f0a 60%, #0a0a1a 100%);
    overflow: hidden;
  }

  /* Gradient scrim so title text stays readable */
  .page-hero__mobile-wheel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(44, 24, 16, 0.90) 0%,
      rgba(44, 24, 16, 0.35) 50%,
      rgba(44, 24, 16, 0.05) 100%
    );
    pointer-events: none;
  }

  .sector-wheel--mobile {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  /* Mobile spokes are ~82px long */
  .sector-wheel--mobile .wheel__spoke {
    stroke-dasharray: 84;
    stroke-dashoffset: 84;
  }
}

/* --------------------------------------------------------------------------
   Mobile stats bar (portfolio page — hidden on desktop)
   -------------------------------------------------------------------------- */

.portfolio-stats-mobile {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(to bottom, #1a0f0a, #0a0a1a);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
}

.portfolio-stats-mobile__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  gap: var(--spacing-1);
}

.portfolio-stats-mobile__item + .portfolio-stats-mobile__item {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-stats-mobile__number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: var(--font-bold);
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}

.portfolio-stats-mobile__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Founder photo — reduced size on mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .founder-photo {
    max-width: 180px;
    margin-bottom: var(--spacing-6);
  }
}

/* --------------------------------------------------------------------------
   Home page — logo matches all other pages (consistent left-aligned)
   -------------------------------------------------------------------------- */
