/* ==========================================================================
   Aurem â€” Hero widget: preloader, headline, portrait arch, story + partner
   cards, giant marquee. Tokens, nav, buttons and cards live in the theme's
   aurem-base.css.
   ========================================================================== */

.ah-hero-wrap {
  z-index: 2; /* keeps fixed nav + menu above following sections */
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.ah-no-webgl.ah-hero-wrap {
  background:
    radial-gradient(60% 70% at 62% 40%, rgba(200, 16, 46, .75), transparent 70%),
    radial-gradient(40% 50% at 30% 90%, rgba(255, 90, 42, .35), transparent 70%),
    var(--ah-ink);
}

/* ---------- Preloader ---------- */
.ah-preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--ah-ink);
  clip-path: inset(0% 0% 0% 0%);
  /* safety net: never trap the page if JS fails */
  animation: ah-preloader-failsafe .01s 6s forwards;
}
@keyframes ah-preloader-failsafe { to { visibility: hidden; } }
.ah-js .ah-preloader { animation: none; }

.ah-preloader__inner { display: grid; justify-items: center; gap: 18px; }
.ah-preloader__num {
  font-family: var(--ah-display);
  font-size: clamp(5rem, 16vw, 12rem);
  font-weight: 700; line-height: .8; letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
  padding: 0 .08em .04em; /* room so background-clip:text doesn't cut glyph edges */
  background: linear-gradient(180deg, var(--ah-gold), var(--ah-ember) 55%, var(--ah-crimson));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ah-preloader__bar { width: min(280px, 60vw); height: 2px; background: var(--ah-line); overflow: hidden; }
.ah-preloader__bar i { display: block; height: 100%; background: var(--ah-ember); transform: scaleX(0); transform-origin: left; }
.ah-preloader__label { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ah-muted); }

/* ---------- Hero layout ---------- */
.ah-hero {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
}

.ah-hero__content {
  position: relative; z-index: 5;
  width: min(60rem, 56vw);
  padding: clamp(104px, 15vh, 190px) 0 clamp(48px, 9vh, 120px) var(--ah-gutter);
}

.ah-headline {
  margin: 0;
  font-family: var(--ah-display);
  font-variation-settings: "opsz" 96;
  font-weight: 650;
  font-size: clamp(2.9rem, min(6.6vw, 11.5vh), 7.4rem);
  line-height: .94;
  letter-spacing: -.045em;
}
.ah-line {
  display: block; overflow: hidden;
  padding: 0 .06em .14em; margin: 0 -.06em -.1em;
}
.ah-word { display: inline-block; position: relative; white-space: nowrap; }
.ah-char { display: inline-block; will-change: transform; }
.ah-serif {
  font-family: var(--ah-serif); font-style: italic; font-weight: 400;
  font-size: 1.1em; letter-spacing: -.02em;
  color: var(--ah-blush);
}
.ah-accent { color: var(--ah-ember); }
.ah-swoosh {
  position: absolute; left: 2%; bottom: -.06em;
  width: 96%; height: .2em; overflow: visible;
}
.ah-swoosh path {
  fill: none; stroke: var(--ah-gold); stroke-width: 3; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.ah-swoosh path + path { stroke: var(--ah-ember); stroke-width: 2; opacity: .8; }

.ah-lead {
  max-width: 31rem; margin-top: 28px;
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; color: var(--ah-muted);
}

/* ---------- Social proof ---------- */
.ah-meta { display: flex; align-items: center; gap: 16px; margin-top: clamp(24px, 4.5vh, 44px); }
.ah-avatars { display: flex; }
.ah-avatars span {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-left: -10px; border-radius: 50%;
  border: 2px solid var(--ah-ink);
  background: var(--c, #333); color: var(--ah-ink);
  font-size: 12px; font-weight: 700;
}
.ah-avatars span:first-child { margin-left: 0; }
.ah-avatars .ah-plus { background: var(--ah-text); font-size: 18px; }
.ah-meta p { font-size: 14px; line-height: 1.4; }
.ah-meta p span { color: var(--ah-muted); }

/* ---------- Portrait ---------- */
.ah-portrait {
  position: absolute; z-index: 3; margin: 0;
  bottom: 0; left: 49%;
  width: clamp(320px, 29vw, 560px);
  height: min(82vh, 860px);
  perspective: 1200px;
}
.ah-portrait__frame {
  position: absolute; inset: 0;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  background: var(--ah-wine);
  /* keep blend layers clipped to the arch while GSAP tilts it in 3D */
  isolation: isolate;
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
  box-shadow: 0 -30px 120px -30px rgba(255, 90, 42, .45);
}
.ah-portrait__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%;
  filter: grayscale(1) contrast(1.45) brightness(.92);
  opacity: 0; transition: opacity .6s;
}
.ah-portrait__frame img.is-loaded { opacity: 1; }
/* duotone: ink shadows -> ember highlights */
.ah-portrait__frame::before,
.ah-portrait__frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.ah-portrait__frame::before {
  background:
    radial-gradient(70% 55% at 78% 22%, #ffc08a, transparent 70%),
    linear-gradient(170deg, #ff6a3a 0%, #c8102e 45%, #4a0612 80%, #12040a 100%);
  mix-blend-mode: multiply;
  z-index: 1;
}
.ah-portrait__frame::after {
  background:
    linear-gradient(to top, var(--ah-ink) 0%, rgba(7, 6, 10, .5) 18%, transparent 45%),
    radial-gradient(80% 50% at 70% 15%, rgba(255, 197, 143, .35), transparent 70%);
  z-index: 2;
}
.ah-portrait__ring {
  position: absolute; inset: -18px -18px 0;
  border: 1px solid rgba(255, 197, 143, .22);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.ah-portrait__glow {
  position: absolute; left: -30%; right: -30%; top: 5%; bottom: -10%;
  background: radial-gradient(closest-side, rgba(255, 90, 42, .45), transparent);
  filter: blur(40px);
}

/* ---------- Side cards ---------- */
.ah-side {
  position: absolute; z-index: 6;
  right: var(--ah-gutter); top: 0; bottom: 0;
  width: clamp(260px, 19vw, 320px);
  padding-top: 70px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.ah-story { cursor: pointer; }
.ah-story .ah-card__in { height: 300px; padding: 18px; display: flex; flex-direction: column; }
.ah-story__bars { position: relative; z-index: 2; display: flex; gap: 6px; }
.ah-story__bars span { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.ah-story__bars i { display: block; height: 100%; background: var(--ah-text); transform: scaleX(0); transform-origin: left; }

.ah-story__visual { position: absolute; inset: 0; z-index: 0; }
.ah-story__visual::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 5, 7, .92) 25%, transparent 75%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px);
}

.ah-story__slides { position: relative; z-index: 2; margin-top: auto; height: 120px; }
.ah-story__slide { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; visibility: hidden; }
.ah-story__slide.is-active { opacity: 1; visibility: visible; }
.ah-story__num {
  font-family: var(--ah-display); font-weight: 600;
  font-size: 64px; line-height: 1; letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.ah-story__num sup { font-size: .5em; color: var(--ah-ember); vertical-align: .7em; margin-left: 2px; }
.ah-story__text { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ah-muted); max-width: 16rem; }

.ah-partners .ah-card__in { padding: 18px 0 16px; }
.ah-partners__title {
  display: flex; justify-content: space-between;
  padding: 0 18px 12px; font-weight: 700; font-size: 15px;
}
.ah-partners__title span { color: var(--ah-ember); }
.ah-marquee {
  overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.ah-marquee__track {
  display: flex; gap: 28px; width: max-content;
  animation: ah-marquee 16s linear infinite;
}
.ah-marquee--rev .ah-marquee__track { animation-direction: reverse; animation-duration: 20s; }
.ah-partners:hover .ah-marquee__track { animation-play-state: paused; }
@keyframes ah-marquee { to { transform: translateX(calc(-50% - 14px)); } }
.ah-marquee span { font-size: 17px; color: rgba(247, 239, 233, .55); white-space: nowrap; transition: color .3s; }
.ah-marquee span:hover { color: var(--ah-text); }
.ah-marquee .l1 { font-family: var(--ah-display); font-weight: 700; letter-spacing: -.03em; }
.ah-marquee .l2 { font-family: var(--ah-sans); font-weight: 700; letter-spacing: .22em; font-size: 13px; }
.ah-marquee .l3 { font-family: var(--ah-serif); font-style: italic; font-size: 21px; }
.ah-marquee .l4 { font-family: var(--ah-display); font-weight: 800; letter-spacing: .02em; }

/* ---------- Giant outlined marquee ---------- */
.ah-bigtype {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: -.14em;
  font-family: var(--ah-display); font-weight: 800;
  font-size: clamp(6rem, 17vw, 18rem); line-height: 1; letter-spacing: -.05em;
  pointer-events: none; user-select: none;
}
.ah-bigtype__track { display: flex; width: max-content; animation: ah-marquee-big 40s linear infinite; }
.ah-bigtype span {
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 197, 143, .16);
}
.ah-bigtype b { font-weight: 400; font-size: .5em; vertical-align: .4em; -webkit-text-stroke: 0; color: rgba(255, 90, 42, .35); }
@keyframes ah-marquee-big { to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .ah-portrait { left: 52%; }
}

@media (max-width: 1100px) {
  .ah-side { display: none; }
  .ah-portrait { left: auto; right: var(--ah-gutter); width: clamp(300px, 38vw, 480px); }
  .ah-hero__content { width: min(44rem, 62vw); }
}

@media (max-width: 900px) {
  .ah-hero__content { width: 100%; padding-right: var(--ah-gutter); padding-top: 130px; }
  .ah-portrait { right: -8%; width: 68vw; height: 78vh; opacity: .6; }
  .ah-portrait .ah-badge { display: none; }
  .ah-lead { max-width: 26rem; }
}

@media (max-width: 560px) {
  .ah-portrait { right: -30%; width: 100vw; opacity: .42; }
  .ah-headline { font-size: clamp(2.6rem, 12.5vw, 4rem); }
  .ah-meta { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-hero-wrap *, .ah-hero-wrap *::before, .ah-hero-wrap *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
