/* ============================================
   MANDELSON.CO — Component Styles
   Nav, Buttons, Cards, Footer, Cursor
   ============================================ */

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
  transition: width 0.4s var(--ease-out-expo),
              height 0.4s var(--ease-out-expo),
              background 0.3s ease;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000000;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor.is-hover {
  width: 56px;
  height: 56px;
  background: #ffffff;
}

.cursor.is-hover .cursor__label {
  opacity: 1;
}

.cursor.is-link {
  width: 48px;
  height: 48px;
}

.cursor.is-hidden {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Hide custom cursor when lightbox is open — restore native cursor */
.lightbox-open .cursor {
  display: none;
}
.lightbox-open,
.lightbox-open * {
  cursor: auto;
}
.lightbox-open .lightbox__close,
.lightbox-open .lightbox__nav {
  cursor: pointer;
}
.lightbox-open .lightbox__img {
  cursor: zoom-out;
}

/* --- Navigation — Desktop --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-lg) 0;
  transition: background 0.5s var(--ease-out-expo),
              padding 0.5s var(--ease-out-expo),
              border-color 0.5s ease;
}

.nav.is-scrolled {
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav.is-dark {
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
}

.nav.is-dark .nav__cta {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-on-dark);
}

.nav.is-dark .nav__cta:hover {
  background: var(--text-on-dark);
  color: var(--bg-dark);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.nav__logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Desktop link group — pill-shaped container */
.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-full);
  padding: 4px;
}

.nav.is-dark .nav__links {
  background: rgba(255, 255, 255, 0.08);
}

.nav.is-scrolled .nav__links {
  background: rgba(0, 0, 0, 0.04);
}

.nav__link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: background 0.3s var(--ease-out-expo),
              color 0.3s ease;
}

/* Remove underline effect, use bg highlight instead */
.nav__link::after {
  display: none;
}

.nav__link:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav.is-dark .nav__link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav__link.is-active {
  background: var(--text-primary);
  color: var(--bg-light);
}

.nav.is-dark .nav__link.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
}

/* Home link — mobile only */
.nav__link--home {
  display: none;
}

/* CTA sits outside the pill */
.nav__cta {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  margin-left: var(--space-md);
  border: 1.5px solid var(--text-primary);
  border-radius: var(--radius-full);
  transition: all 0.35s var(--ease-out-expo);
}

.nav__cta:hover {
  background: var(--text-primary);
  color: var(--bg-light);
  transform: translateY(-1px);
}

/* --- Mobile Nav Toggle (hamburger / close) --- */
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  transition: background 0.3s ease;
  position: relative;
  z-index: calc(var(--z-nav) + 2);
}

.nav__toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out-expo),
              opacity 0.3s ease,
              width 0.3s var(--ease-out-expo);
  position: absolute;
}

.nav__toggle span:nth-child(1) { transform: translateY(-6px); }
.nav__toggle span:nth-child(2) { transform: translateY(0); }
.nav__toggle span:nth-child(3) { transform: translateY(6px); width: 14px; }

/* X state */
.nav__toggle.is-open span:nth-child(1) {
  transform: rotate(45deg) translateY(0);
  width: 20px;
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: translateX(8px);
}
.nav__toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg) translateY(0);
  width: 20px;
}

/* --- Mobile Nav Overlay — Fullscreen Frosted Glass --- */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  /* Reset ALL desktop styles and force overlay */
  .nav__links,
  .nav.is-scrolled .nav__links,
  .nav.is-dark .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: calc(var(--z-nav) + 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out-expo),
                visibility 0.5s;
  }

  .nav.is-dark .nav__links {
    background: rgba(10, 15, 28, 0.94);
  }

  .nav__links.is-open,
  .nav.is-scrolled .nav__links.is-open,
  .nav.is-dark .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  /* Mobile menu links — large, centered, stacked */
  .nav__links .nav__link,
  .nav.is-dark .nav__links .nav__link,
  .nav.is-scrolled .nav__links .nav__link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: var(--space-md) var(--space-xl);
    border-radius: 0;
    background: none;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease,
                transform 0.5s var(--ease-out-expo),
                color 0.3s ease;
  }

  .nav.is-dark .nav__links .nav__link {
    color: var(--text-on-dark);
  }

  .nav__links .nav__link:hover,
  .nav.is-dark .nav__links .nav__link:hover {
    background: none;
    color: var(--accent);
  }

  .nav__links .nav__link.is-active,
  .nav.is-dark .nav__links .nav__link.is-active {
    background: none;
    color: var(--accent);
  }

  /* Stagger reveal when open — match all parent specificity variants */
  .nav__links.is-open .nav__link,
  .nav.is-scrolled .nav__links.is-open .nav__link,
  .nav.is-dark .nav__links.is-open .nav__link {
    opacity: 1;
    transform: translateY(0);
  }
  .nav__link--home {
    display: block;
  }

  .nav__links.is-open .nav__link:nth-child(1) { transition-delay: 0.05s; }
  .nav__links.is-open .nav__link:nth-child(2) { transition-delay: 0.1s; }
  .nav__links.is-open .nav__link:nth-child(3) { transition-delay: 0.15s; }
  .nav__links.is-open .nav__link:nth-child(4) { transition-delay: 0.2s; }
  .nav__links.is-open .nav__link:nth-child(5) { transition-delay: 0.25s; }

  /* Mobile CTA — full width at bottom of overlay */
  .nav__links .nav__cta,
  .nav.is-scrolled .nav__links .nav__cta,
  .nav.is-dark .nav__links .nav__cta {
    position: absolute;
    bottom: var(--space-4xl);
    left: var(--space-2xl);
    right: var(--space-2xl);
    margin-left: 0;
    text-align: center;
    justify-content: center;
    font-size: var(--text-base);
    padding: var(--space-md) var(--space-xl);
    border: 1.5px solid var(--text-primary);
    border-radius: var(--radius-full);
    background: none;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease 0.25s,
                transform 0.5s var(--ease-out-expo) 0.25s,
                background 0.3s ease,
                color 0.3s ease;
  }

  .nav.is-dark .nav__links .nav__cta {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-on-dark);
  }

  .nav__links.is-open .nav__cta,
  .nav.is-scrolled .nav__links.is-open .nav__cta,
  .nav.is-dark .nav__links.is-open .nav__cta {
    opacity: 1;
    transform: translateY(0);
  }

  .nav__links .nav__cta:hover {
    background: var(--text-primary);
    color: var(--bg-light);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  transition: all 0.35s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-light);
}

.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn--outline {
  border: 1.5px solid var(--text-primary);
  color: var(--text-primary);
}

.btn--outline:hover {
  background: var(--text-primary);
  color: var(--bg-light);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--text-primary);
  padding: 0.85rem 0;
}

.btn--ghost::after {
  content: '';
  position: absolute;
  bottom: 0.6rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

.btn--ghost:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn--large {
  font-size: var(--text-base);
  padding: 1.1rem 2.5rem;
}

.btn__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Dark variant buttons */
.section--dark .btn--outline {
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

.section--dark .btn--outline:hover {
  background: var(--text-on-dark);
  color: var(--bg-dark);
}

.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-on-dark);
}

.btn--on-dark:hover {
  background: var(--text-on-dark);
  color: var(--bg-dark);
}

/* --- Category Pills --- */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.3s ease;
}

.pill.is-active,
.pill:hover {
  background: var(--text-primary);
  color: var(--bg-light);
  border-color: var(--text-primary);
}

/* --- Project Cards --- */
.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-light-alt);
  transition: transform 0.6s var(--ease-out-expo);
}

.project-card:hover {
  transform: translateY(-8px);
}

.project-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand);
}

.project-card__media img,
.project-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}

.project-card__media--empty {
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__icon {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.project-card:hover .project-card__media img,
.project-card:hover .project-card__media video {
  transform: scale(1.05);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__info {
  padding: var(--space-lg);
}

.project-card__category {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.project-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Masonry grid layout */
.work-grid {
  columns: 3;
  column-gap: var(--space-lg);
}

.work-grid .project-card {
  break-inside: avoid;
  margin-bottom: var(--space-lg);
  display: inline-block;
  width: 100%;
}

/* Vary image aspect ratios for masonry rhythm */
.work-grid .project-card .project-card__media {
  aspect-ratio: 4 / 3;
}

.work-grid .project-card--tall .project-card__media {
  aspect-ratio: 3 / 4;
}

.work-grid .project-card--wide .project-card__media {
  aspect-ratio: 16 / 9;
}

@media (max-width: 1024px) {
  .work-grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  .work-grid {
    columns: 1;
  }
}

/* --- Case Study Teaser --- */
.case-teaser {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.case-teaser__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.case-teaser__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo);
}

.case-teaser:hover .case-teaser__bg img {
  transform: scale(1.04);
}

.case-teaser__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10, 15, 28, 0.85) 100%);
  z-index: 1;
}

.case-teaser__content {
  position: relative;
  z-index: 2;
  padding: var(--space-3xl);
  color: var(--text-on-dark);
  width: 100%;
}

.case-teaser__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: var(--space-md);
}

.case-teaser__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.case-teaser__excerpt {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  gap: var(--space-4xl);
  flex-wrap: wrap;
}

.stat {
  text-align: left;
}

.stat__number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.section--dark .stat__label {
  color: var(--text-on-dark-muted);
}

/* --- Capabilities Grid --- */
.capability {
  padding: var(--space-2xl) var(--space-xl);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  transition: all 0.4s var(--ease-out-expo);
}

.capability:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.capability__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.capability__icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-soft);
  stroke-width: 1.5;
  fill: none;
}

.capability__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.capability__desc {
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  line-height: 1.5;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.section-header__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  max-width: 700px;
}

.section-header__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 600px;
}

.section--dark .section-header__subtitle {
  color: var(--text-on-dark-muted);
}

/* Section header with flex-between: stack on mobile */
@media (max-width: 768px) {
  .section-header.flex-between {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-header.flex-between .btn {
    margin-top: var(--space-md);
  }
}

/* --- Footer --- */
.footer {
  padding: var(--space-4xl) 0 var(--space-2xl);
  border-top: 1px solid var(--border);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 320px;
}

.footer__links {
  display: flex;
  gap: var(--space-3xl);
}

.footer__col-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer__col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color 0.3s ease;
}

.footer__col a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  gap: var(--space-lg);
}

.footer__socials a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer__socials a:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .footer__top {
    flex-direction: column;
  }
  .footer__links {
    flex-direction: column;
    gap: var(--space-xl);
  }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* --- Divider --- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

.section--dark .divider {
  background: var(--border-on-dark);
}

/* --- Tech Stack Badges --- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  background: var(--bg-light-alt);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.section--dark .tech-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark-muted);
}

/* ============================================
   HORIZONTAL SCROLL GALLERY
   Pins in place, cards scroll left on scrub
   Based on GSAP ScrollTrigger horizontal pattern
   ============================================ */

.hscroll-section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-5xl);
}

@media (max-width: 768px) {
  .hscroll-section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-2xl);
  }
  .hscroll-section .section-header {
    margin-bottom: 0;
  }
}

.hscroll-wrap {
  overflow: hidden;
  width: 100%;
}

.hscroll-track {
  display: flex;
  gap: var(--space-xl);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  padding: 0 var(--container-pad);
  will-change: transform;
}

.hscroll-card {
  flex: 0 0 auto;
  width: clamp(320px, 28vw, 480px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-light-alt);
  transition: transform 0.6s var(--ease-out-expo);
  display: block;
}

.hscroll-card:hover {
  transform: translateY(-8px);
}

.hscroll-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand);
}

.hscroll-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}

.hscroll-card:hover .hscroll-card__media img {
  transform: scale(1.05);
}

.hscroll-card__info {
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}

.hscroll-card__cat {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.hscroll-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.hscroll-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   PINNED FULLSCREEN CASE STUDY SLIDES
   Each panel is 100vh, pinned. Next panel
   scrolls up and covers the previous one.
   Based on GSAP "Pinned Slides with Overscroll"
   ============================================ */

.pinned-cases {
  position: relative;
}

.pinned-cases__header {
  padding: var(--space-5xl) 0 var(--space-3xl);
}

.pinned-cases__panels {
  position: relative;
}

.pinned-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  text-decoration: none;
  color: white;
  /* Each panel will be pinned by GSAP */
}

.pinned-panel__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pinned-panel__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pinned-panel__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 28, 0.15) 0%,
    rgba(10, 15, 28, 0.4) 40%,
    rgba(10, 15, 28, 0.88) 100%
  );
}

.pinned-panel__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-top: var(--space-5xl);
  padding-bottom: var(--space-5xl);
  max-width: none;
}

.pinned-panel__top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
}

.pinned-panel__number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-4xl);
  font-weight: 700;
  opacity: 0.25;
  line-height: 1;
}

.pinned-panel__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  padding-top: var(--space-sm);
}

.pinned-panel__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.pinned-panel__info {
  max-width: 600px;
}

.pinned-panel__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.pinned-panel__excerpt {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  line-height: 1.6;
}

.pinned-panel__btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Corner embellishments */
.pinned-panel__corner {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.pinned-panel__corner--tl {
  top: 1rem;
  left: 1rem;
  border-top: 1.5px solid rgba(255, 255, 255, 0.25);
  border-left: 1.5px solid rgba(255, 255, 255, 0.25);
}

.pinned-panel__corner--tr {
  top: 1rem;
  right: 1rem;
  border-top: 1.5px solid rgba(255, 255, 255, 0.25);
  border-right: 1.5px solid rgba(255, 255, 255, 0.25);
}

.pinned-panel__corner--bl {
  bottom: 1rem;
  left: 1rem;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25);
  border-left: 1.5px solid rgba(255, 255, 255, 0.25);
}

.pinned-panel__corner--br {
  bottom: 1rem;
  right: 1rem;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25);
  border-right: 1.5px solid rgba(255, 255, 255, 0.25);
}

/* Progress indicator for pinned section */
.pinned-cases__progress {
  position: fixed;
  right: var(--space-xl);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.pinned-cases__progress.is-visible {
  opacity: 1;
}

.pinned-cases__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
}

.pinned-cases__dot.is-active {
  background: white;
  transform: scale(1.4);
}

@media (max-width: 768px) {
  .pinned-panel__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .pinned-panel__btn {
    margin-top: var(--space-lg);
  }
  .pinned-panel__corner {
    width: 32px;
    height: 32px;
  }
  .pinned-panel__corner--tl,
  .pinned-panel__corner--bl {
    left: 0.5rem;
  }
  .pinned-panel__corner--tr,
  .pinned-panel__corner--br {
    right: 0.5rem;
  }
  .pinned-panel__corner--tl,
  .pinned-panel__corner--tr {
    top: 0.5rem;
  }
  .pinned-panel__corner--bl,
  .pinned-panel__corner--br {
    bottom: 0.5rem;
  }
  .pinned-panel__title {
    font-size: var(--text-3xl);
  }
  .pinned-panel__number {
    font-size: var(--text-3xl);
  }
  .hscroll-card {
    width: 85vw;
  }
  .hscroll-card__media {
    aspect-ratio: 16 / 10;
  }
}
