/* ==========================================================================
   Devran Makina — cinematic construction hero (photo assembly V3)
   Scoped to .hero so it can live inside the full site. The construction
   sequence itself (motion.js + gen/) is unchanged.
   ========================================================================== */
.hero { --shade: 0; --hero-overlay: 1; height: 100vh; height: 100svh; min-height: 560px; position: relative; isolation: isolate;
  overflow: hidden; background: #a9a59b; color: #f0f0e7; }
.hero.is-static, html:not(.js) .hero { --shade: 1; }

/* ---------------------------------------------------------------- fallback */
.hero .fallback, .hero .fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 55%; z-index: -5; }
.hero.is-fallback .viewport { display: none; }
html:not(.js) .hero .viewport, html:not(.js) .hero .phase { display: none; }

/* ------------------------------------------------------------------ scene */
.hero .viewport { position: absolute; inset: 0; overflow: hidden; z-index: -4; }
.hero .sky {
  position: absolute; left: -40px; right: -40px; top: -40px; height: 60%; display: none;
  background: var(--lqip, #8c8a80) 50% 0 / auto 200% no-repeat; filter: blur(24px);
}
.hero.portrait .sky { display: block; }
.hero .ground { position: absolute; left: -30px; right: -30px; bottom: -30px; display: none;
  background: var(--lqip, #6f6a5e) 50% 100% / auto 900% no-repeat; filter: blur(10px); }
.hero.portrait .ground { display: block; }
.hero .camera { position: absolute; inset: 0; will-change: transform; }
.hero .scene {
  position: absolute; left: 50%; top: 50%; width: 1672px; height: 941px; transform-origin: 0 0;
  transform: translate(-50%, -50%) scale(1.15);
  transform: translate(-50%, -50%) scale(max(calc(100vw / 1672px), calc(100vh / 941px)));
}
.hero.portrait .scene { -webkit-mask-image: linear-gradient(transparent 0, #000 16%); mask-image: linear-gradient(transparent 0, #000 16%); }
.hero .base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; max-width: none; }
.hero .scene::before { content: ""; position: absolute; inset: 0; background: var(--lqip) center / cover no-repeat;
  filter: blur(18px); transform: scale(1.12); }
.js .hero .base { opacity: 0; transition: opacity .5s ease; }
.js .hero .base.loaded { opacity: 1; }
.hero .still { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity .9s ease; }
.hero .still.ready { opacity: 1; }
.hero.is-static .layers { display: none; }
.hero .layers { position: absolute; inset: 0; }
.hero .el { position: absolute; transform-origin: 50% 100%; }
.hero .el img { display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; user-select: none; }
.hero.js-anim .el { visibility: hidden; }

.hero .el.reveal-radial {
  --r: 0%; --cx: 50%; --cy: 50%;
  -webkit-mask-image: radial-gradient(ellipse var(--r) calc(var(--r) * .55) at var(--cx) var(--cy), #000 70%, transparent 100%);
          mask-image: radial-gradient(ellipse var(--r) calc(var(--r) * .55) at var(--cx) var(--cy), #000 70%, transparent 100%);
}
.hero .el.reveal-x { --p: 0%;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--p) - 14%), transparent var(--p));
          mask-image: linear-gradient(90deg, #000 calc(var(--p) - 14%), transparent var(--p)); }
.hero .el.reveal-sweep { --p: 0%; --ang: 90deg;
  -webkit-mask-image: linear-gradient(var(--ang), #000 calc(var(--p) - 20%), transparent var(--p));
          mask-image: linear-gradient(var(--ang), #000 calc(var(--p) - 20%), transparent var(--p)); }

.hero .mask-vis { position: absolute; inset: 0; display: none; pointer-events: none; background: hsla(var(--h, 30), 90%, 55%, .55);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.hero.show-masks .mask-vis { display: block; }
.hero.show-masks .base { filter: grayscale(1) brightness(.45); }

/* ---------------------------------------------------------------- overlay */
.hero .darkness { position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: calc(var(--shade) * var(--hero-overlay));
  background: linear-gradient(0deg, #15241ce8 0%, #15241cb0 32%, #15241c55 62%, #15241c30 100%); }
.hero.is-static .darkness { transition: opacity .6s ease; }
.hero .vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(#16221c66, transparent 24%, transparent 75%, #16221c80); }
.hero.portrait .darkness { background: linear-gradient(180deg, #15241ce6 0%, #15241c99 45%, #15241c20 75%, #15241c50 100%); }

/* --------------------------------------------------------------------- copy */
.hero .copy { position: absolute; left: 50%; bottom: calc(3vh + 124px); transform: translateX(-50%); width: min(1100px, 90%); text-align: center; }
.js .hero .copy { visibility: hidden; }
.hero.is-fallback .copy, .hero.is-static .copy { visibility: visible !important; opacity: 1 !important; }
.hero .eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .32em; margin-bottom: 22px; overflow: hidden; }
.hero .eyebrow span, .hero .description span, .hero .sectors span { display: inline-block; }
.hero h1 { font-family: var(--font-head, inherit); font-weight: 500; font-size: clamp(46px, 5.4vw, 86px);
  letter-spacing: -.045em; line-height: 1.02; margin: 0; color: #f4f2ea; }
.hero h1 > span { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.03em; }
.hero h1 em { display: block; font-style: normal; }
.hero h1 > span:last-child { color: #d5dcc3; }
.hero .description { font-size: 14px; line-height: 1.8; max-width: 460px; margin: 22px auto 0; overflow: hidden; color: #e7e6dc; }
.hero .sectors { font-size: 9px; font-weight: 500; letter-spacing: .2em; margin-top: 18px; line-height: 2; overflow: hidden; color: #d9dccd; }
.hero .hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 28px; }
.js .hero:not(.is-static) .hero-actions, .js .hero:not(.is-static) .hero-note { visibility: hidden; }

/* hero buttons (light on dark) */
.hero .hero-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 2px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
.hero .hero-btn svg { width: 16px; height: 16px; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.hero .hero-btn:hover svg { transform: translateX(4px); }
.hero .hero-btn--solid { background: #f4f2ea; color: #15191c; }
.hero .hero-btn--solid:hover { background: #fff; }
.hero .hero-btn--line { border: 1px solid rgba(244, 242, 234, .45); color: #f4f2ea; }
.hero .hero-btn--line:hover { border-color: #f4f2ea; background: rgba(244, 242, 234, .08); }

.hero .hero-note { position: absolute; right: 4.5%; bottom: 40px; font-size: 9px; font-weight: 600; letter-spacing: .3em; color: #e6e6dc; }

/* ----------------------------------------------------------------- phase */
.hero .phase { position: absolute; left: 4.5%; bottom: 40px; display: flex; align-items: center; gap: 17px; text-shadow: 0 2px 15px #152219; }
.hero .phase-count { font-family: var(--font-head, inherit); font-size: 36px; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.hero .phase-label { font-size: 9px; font-weight: 600; letter-spacing: .2em; border-left: 1px solid #ffffff60; padding-left: 17px; }
.hero.is-fallback .phase, .hero.is-static .phase { display: none; }
.js .hero:not(.is-playing) .phase { visibility: hidden; }

/* ------------------------------------------------------------ scroll cue */
.hero .scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 9px; color: #e9ecdf; text-decoration: none; }
.js .hero .scroll-cue { visibility: hidden; }
.hero.is-fallback .scroll-cue, .hero.is-static .scroll-cue { visibility: visible !important; opacity: 1 !important; }
.hero .scroll-cue__line { position: relative; width: 1px; height: 38px; overflow: hidden; background: #ffffff2e; }
.hero .scroll-cue__glow { position: absolute; left: 0; top: 0; width: 1px; height: 14px;
  background: linear-gradient(#ffffff00, #c5ceae); animation: hero-cue-fall 1.9s cubic-bezier(.6, 0, .3, 1) infinite; }
.hero .scroll-cue__label { font-size: 8px; font-weight: 600; letter-spacing: .4em; padding-left: .4em; opacity: .8; }
.hero .scroll-cue:hover .scroll-cue__label { opacity: 1; }
@keyframes hero-cue-fall { 0% { transform: translateY(-16px); opacity: 0; } 25% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero .scroll-cue__glow { animation: none; top: 12px; } }

/* ------------------------------------------------------------- responsive */
@media (max-height: 760px) and (min-width: 651px) {
  .hero .copy { bottom: 128px; }
  .hero h1 { font-size: 60px; }
  .hero .description { margin-top: 16px; }
  .hero .hero-actions { margin-top: 20px; }
}
.hero.portrait .copy { top: max(96px, 13%); bottom: auto; }
@media (max-width: 650px) {
  .hero .copy { left: 6%; right: 6%; top: 104px; bottom: auto; transform: none; width: auto; text-align: left; }
  .hero.portrait .copy { top: 104px; }
  .hero .description { margin-left: 0; font-size: 14px; max-width: 330px; }
  .hero h1 { font-size: clamp(40px, 11vw, 60px); }
  .hero .eyebrow { font-size: 9px; letter-spacing: .24em; margin-bottom: 16px; }
  .hero .sectors { font-size: 8px; max-width: 290px; letter-spacing: .16em; }
  .hero .hero-actions { justify-content: flex-start; margin-top: 22px; }
  .hero .hero-btn { height: 44px; padding: 0 18px; font-size: 12.5px; }
  .hero .phase { left: 6%; bottom: 28px; }
  .hero .phase-count { font-size: 28px; } .hero .phase-label { font-size: 8px; }
  .hero .hero-note { display: none; }
  .hero .scroll-cue { bottom: 16px; }
}
