/* Hexagone — Hero Maknor-style (cards stack → split → brand + projection) */

.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 85% 55% at 50% -5%, rgba(42, 96, 144, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(15, 40, 71, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 90% 60%, rgba(30, 73, 118, 0.35) 0%, transparent 40%),
    #061018;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-vignette {
  display: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero-glow {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

.hero-glow--left,
.hero-glow--right {
  display: none;
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 6.5rem 1rem 5.5rem;
  box-sizing: border-box;
  --hero-card-w: min(20rem, 88vw);
  --hero-card-h: min(calc(var(--hero-card-w) * 1.15), 58vh);
  --hero-card-gap: clamp(1.25rem, 3vw, 2rem);
  --hero-split-offset: calc(var(--hero-card-w) / 2 + var(--hero-card-gap) + 4.25rem);
}

.hero-stage__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--hero-card-gap);
  width: min(96rem, 100%);
  min-height: var(--hero-card-h);
  margin: 0 auto;
}

.hero-card {
  width: var(--hero-card-w);
  height: var(--hero-card-h);
  will-change: transform;
  pointer-events: none;
}

.hero-card--left { grid-column: 1; grid-row: 1; justify-self: end; z-index: 3; }
.hero-card--right { grid-column: 3; grid-row: 1; justify-self: start; z-index: 4; }

.hero-stage--ready .hero-card--left,
.hero-stage--ready .hero-card--right { pointer-events: auto; }

@media (min-width: 768px) {
  .hero-card {
    opacity: 0;
    transform: translateX(0) scale(0.96);
    transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .hero-stage--stacked:not(.hero-stage--split) .hero-card--left {
    opacity: 1;
    transform: translateX(var(--hero-split-offset)) scale(1);
  }

  .hero-stage--stacked:not(.hero-stage--split) .hero-card--right {
    opacity: 1;
    transform: translateX(calc(-1 * var(--hero-split-offset))) scale(1);
  }

  .hero-stage--split .hero-card--left,
  .hero-stage--logo .hero-card--left,
  .hero-stage--title .hero-card--left,
  .hero-stage--ready .hero-card--left,
  .hero-stage--split .hero-card--right,
  .hero-stage--logo .hero-card--right,
  .hero-stage--title .hero-card--right,
  .hero-stage--ready .hero-card--right {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.hero-center {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  justify-self: center;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: min(22rem, 52vw);
  z-index: 6;
  pointer-events: none;
}

.hero-projection-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35em;
  margin: -0.45rem 0 0.55rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.hero-stage--ready .hero-projection-banner {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
}

.hero-projection__word {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--hx-gold);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  filter: blur(10px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s ease;
}

.hero-projection__word.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero-projection__word.is-exiting {
  opacity: 0;
  transform: translateY(-12px) scale(1.05);
  filter: blur(8px);
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.hero-stage--intro .hero-brand,
.hero-stage--split .hero-brand { opacity: 0; visibility: hidden; }

.hero-stage--logo .hero-brand,
.hero-stage--title .hero-brand,
.hero-stage--ready .hero-brand {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
}

.hero-brand__dots {
  position: relative;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.35);
  filter: blur(3px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.hero-brand__dots span {
  position: absolute;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--hx-navy-500, #2a6090);
  opacity: 0.85;
}

.hero-brand__dots span:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.hero-brand__dots span:nth-child(2) { top: 50%; right: 0; transform: translateY(-50%); }
.hero-brand__dots span:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%); }
.hero-brand__dots span:nth-child(4) { top: 50%; left: 0; transform: translateY(-50%); }

.hero-stage--logo .hero-brand__dots,
.hero-stage--title .hero-brand__dots,
.hero-stage--ready .hero-brand__dots {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  animation: heroDotsSpin 2.4s linear infinite;
}

.hero-brand__title {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.22em;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.94);
  filter: blur(5px);
}

.hero-stage--title .hero-brand__title,
.hero-stage--ready .hero-brand__title {
  visibility: visible;
  animation: brandTitleIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-brand__print {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  color: var(--hx-gold);
}

.hero-brand__custom {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  font-style: italic;
  color: var(--hx-gold);
}

.hero-card__glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: 100%;
  padding: 1.125rem 1rem;
  border-radius: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-card__glass::before {
  display: none;
}

.hero-card__glass > * { position: relative; z-index: 1; }

.hero-card__glass--media { padding: 0.65rem; justify-content: center; }

.hero-showcase__figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1.1rem;
}

.hero-showcase__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0.9rem;
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  filter: blur(5px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}

.hero-showcase__img.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

.hero-showcase__img.is-hiding {
  opacity: 0;
  transform: scale(1.04) translateY(-8px);
  filter: blur(4px);
  transition-duration: 0.45s;
}

.hero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 0 auto 1rem;
  padding: 0.375rem 0.875rem 0.375rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hx-gold);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}

.hero-badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--hx-gold);
  box-shadow: 0 0 8px rgba(232, 195, 130, 0.55);
  animation: heroBadgeDotBlink 1.6s ease-in-out infinite;
}

.hero-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--hx-muted-light);
}

.hero-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--hx-white);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

.hero-feature__icon { font-size: 0.875rem; color: var(--hx-gold); }

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-btn:not(.hx-cta-sparkle):hover { transform: translateY(-2px); }

.hero-btn--primary {
  color: var(--hx-brown);
  background: var(--hx-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-btn--primary:not(.hx-cta-sparkle):hover { background: var(--hx-white); color: var(--hx-black); }

.hero-btn--ghost {
  color: var(--hx-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-btn__arrow { font-size: 1.125rem; }

.hero-scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-decoration: none;
  animation: scrollCueFloat 3s ease-in-out infinite;
}

.hero-scroll-cue__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hx-muted-light);
  background: rgba(7, 7, 7, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.hero-scroll-cue__icon { font-size: 0.875rem; }

@keyframes brandTitleIn {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes heroDotsSpin {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1) rotate(360deg); }
}

@keyframes heroBadgeDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.88); }
}

@keyframes scrollCueFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

/* Service cards — scroll reveal */
.service-card--reveal.reveal {
  opacity: 0;
  transform: translateY(1.75rem) scale(0.985);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.55s ease, border-color 0.45s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.service-card--reveal.reveal.is-visible,
.service-card--reveal.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.typewriter-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(4px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.typewriter-char.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (min-width: 900px) {
  .hero-stage {
    --hero-card-w: min(24rem, 26vw);
    --hero-card-h: min(calc(var(--hero-card-w) * 1.12), 68vh);
    --hero-card-gap: clamp(2rem, 4.5vw, 4rem);
    padding: 6.5rem clamp(1rem, 2.5vw, 2.5rem) 5.5rem;
  }

  .hero-brand__dots { width: 1.75rem; height: 1.75rem; }
  .hero-brand__dots span { width: 0.45rem; height: 0.45rem; }
}

@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    min-height: 100dvh;
    align-items: flex-start;
  }

  .hero-stage {
    --hero-card-w: min(22rem, 92vw);
    --hero-card-h: auto;
    padding: 5rem 0.75rem 4.5rem;
  }

  .hero-stage__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 0;
  }

  .hero-card,
  .hero-stage--intro .hero-card,
  .hero-stage--stacked .hero-card,
  .hero-stage--split .hero-card,
  .hero-stage--ready .hero-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  .hero-center {
    order: 1;
    max-width: 100%;
    width: 100%;
  }

  .hero-card--right {
    order: 2;
    display: block !important;
    width: var(--hero-card-w);
    height: auto;
    pointer-events: auto;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .hero-card--right .hero-card__glass--media {
    padding: 0.5rem;
  }

  .hero-card--right .hero-showcase__figure {
    aspect-ratio: 4 / 3;
    min-height: 10.5rem;
    max-height: 14rem;
    height: auto;
  }

  .hero-card--right .hero-showcase__img {
    min-height: 10rem;
    height: 100%;
  }

  .hero-card--left {
    order: 3;
    width: var(--hero-card-w);
    height: auto;
  }

  .hero-projection__word {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
  }

  .hero-brand__title {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }

  .hero-card--left .hero-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.75rem;
  }

  .hero-card--left .hero-feature {
    justify-content: flex-start;
    font-size: 0.6rem;
    padding: 0.4rem 0.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-scroll-cue {
    bottom: 0.75rem;
  }

  .hero-stage--intro .hero-card--right,
  .hero-stage--split .hero-card--right,
  .hero-stage--logo .hero-card--right,
  .hero-stage--title .hero-card--right {
    opacity: 0 !important;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    pointer-events: none;
    visibility: hidden !important;
  }

  .hero-stage--ready .hero-card--right {
    opacity: 1 !important;
    max-height: none;
    overflow: visible;
    visibility: visible !important;
    transition: opacity 0.5s ease;
  }

  .hero-stage--intro .hero-brand,
  .hero-stage--split .hero-brand,
  .hero-stage--logo .hero-brand,
  .hero-stage--title .hero-brand,
  .hero-stage--ready .hero-brand {
    opacity: 1;
    visibility: visible;
  }

  .hero-stage--intro .hero-projection-banner,
  .hero-stage--split .hero-projection-banner { opacity: 0; visibility: hidden; }
  .hero-stage--ready .hero-projection-banner { opacity: 1; visibility: visible; }
}

/* Dark mode hero */
body.dark .hero-section {
  background:
    radial-gradient(ellipse 85% 55% at 50% -5%, rgba(42, 96, 144, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(15, 40, 71, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 90% 60%, rgba(30, 73, 118, 0.35) 0%, transparent 40%),
    #061018;
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .hero-card__glass {
  background: #070707;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark .hero-lead { color: var(--hx-gold-light); }
body.dark .hero-feature { color: var(--hx-gold-light); background: rgba(15, 40, 71, 0.5); border-color: var(--hx-navy-border-a); }
body.dark .hero-badge { color: var(--hx-gold-bright); background: rgba(15, 40, 71, 0.6); border-color: var(--hx-navy-border-a); }
body.dark .hero-brand__print { color: var(--hx-gold-bright); }
body.dark .hero-projection__word { color: var(--hx-gold); }
body.dark .hero-btn--ghost { color: var(--hx-gold-light); background: rgba(15, 40, 71, 0.45); border-color: var(--hx-navy-border-a); }
body.dark .hero-scroll-cue__pill { color: var(--hx-blue-light); background: rgba(6, 15, 24, 0.8); border-color: var(--hx-navy-border-a); }

@media (prefers-reduced-motion: reduce) {
  .hero-card, .hero-brand__dots, .hero-brand__title, .hero-showcase__img, .hero-projection__word, .hero-scroll-cue {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .hero-brand__title, .hero-stage .hero-brand { visibility: visible !important; }
  .hero-stage .hero-card { pointer-events: auto; }
}
