/* Hero reel: GIF clips as the hero background on the meautodoors site.
 * Desktop: a tall slanted panel (the mountain slope of the brand mark) on the right with an oxide edge line.
 * Mobile: a full-width banner with a slanted foot above the copy.
 * Only transform / opacity animate, so it stays on the compositor. */
.t-hero2.has-reel .t-hero2__bg,.t-hero2.has-reel .t-hero2__plate,.t-hero2.has-reel .t-hero2__badge{display:none}
.t-hero2.has-reel{--reel-slant:9%}

.t-reel{position:absolute;inset-block-start:0;inset-inline-end:0;inline-size:var(--reel-w,100%);block-size:var(--reel-h,420px);z-index:0}
.t-reel__frame{position:absolute;inset:0;overflow:hidden;background:#1C1A17;isolation:isolate;
  clip-path:polygon(var(--reel-slant) 0,100% 0,100% 100%,0 100%)}
[dir=rtl] .t-reel__frame{clip-path:polygon(0 0,calc(100% - var(--reel-slant)) 0,100% 100%,0 100%)}
.t-reel__frame,.t-reel__edge{opacity:0;transition:opacity .9s cubic-bezier(.2,.6,.2,1)}
.t-reel.is-ready .t-reel__frame,.t-reel.is-ready .t-reel__edge{opacity:1}
/* quiet placeholder while the first clip loads: a soft sand panel with a slow shimmer, no controls, no picture */
.t-reel::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(100deg,#EAE2D2 30%,#F4EFE6 50%,#EAE2D2 70%) 0 0/250% 100%;
  clip-path:polygon(var(--reel-slant) 0,100% 0,100% 100%,0 100%);animation:t-reel-sk 1.8s ease-in-out infinite;transition:opacity .6s ease .2s}
[dir=rtl] .t-reel::before{clip-path:polygon(0 0,calc(100% - var(--reel-slant)) 0,100% 100%,0 100%)}
.t-reel.is-ready::before{opacity:0;animation:none}
@keyframes t-reel-sk{from{background-position:100% 0}to{background-position:-100% 0}}
.t-reel__edge{position:absolute;inset:0;z-index:6;pointer-events:none;background:linear-gradient(180deg,#E8845F,#B33F1B 55%,#8B2F12);
  clip-path:polygon(var(--reel-slant) 0,calc(var(--reel-slant) + 7px) 0,7px 100%,0 100%);filter:drop-shadow(0 0 10px rgba(179,63,27,.5))}
[dir=rtl] .t-reel__edge{clip-path:polygon(calc(100% - var(--reel-slant) - 7px) 0,calc(100% - var(--reel-slant)) 0,100% 100%,calc(100% - 7px) 100%)}

.t-reel__s{position:absolute;inset:0;margin:0;opacity:0;visibility:hidden}
.t-reel__s.is-on{opacity:1;visibility:visible;z-index:1}

/* automatic-door transition: two leaves close over the clip that is ending, the clip swaps behind them, they part on the next one */
.t-reel__d{position:absolute;z-index:5;inset-block:0;inline-size:50.4%;pointer-events:none;will-change:transform;
  background:linear-gradient(90deg,#14120F,#26221D 55%,#1C1A17),#1C1A17;
  transition:transform 1s cubic-bezier(.76,0,.24,1)}
.t-reel__d::before{content:"";position:absolute;inset:0;opacity:.5;background:repeating-linear-gradient(90deg,rgba(244,239,230,.05) 0 1px,transparent 1px 7px)}
.t-reel__d::after{content:"";position:absolute;inset-block:0;inline-size:3px;background:linear-gradient(180deg,transparent,#E8845F 30%,#B33F1B 70%,transparent);box-shadow:0 0 22px 2px rgba(232,132,95,.6);opacity:0;transition:opacity .3s ease .35s}
.t-reel__d--a{inset-inline-start:0;transform:translateX(-102%)}.t-reel__d--a::after{inset-inline-end:0}
.t-reel__d--b{inset-inline-end:0;transform:translateX(102%)}.t-reel__d--b::after{inset-inline-start:0}
[dir=rtl] .t-reel__d--a{transform:translateX(102%)}[dir=rtl] .t-reel__d--b{transform:translateX(-102%)}
.t-reel.is-shut .t-reel__d{transition-duration:.6s;transition-timing-function:cubic-bezier(.65,0,.35,1)}
.t-reel.is-shut .t-reel__d--a,.t-reel.is-shut .t-reel__d--b,[dir=rtl] .t-reel.is-shut .t-reel__d--a,[dir=rtl] .t-reel.is-shut .t-reel__d--b{transform:none}
.t-reel.is-shut .t-reel__d::after{opacity:1}
.t-reel__ui{transition:opacity .35s ease}
.t-reel.is-shut .t-reel__ui{opacity:0}

.t-reel__v,.t-reel__m,.t-reel__p{position:absolute;inset:0;inline-size:100%;block-size:100%;object-fit:cover}
.t-reel__p,.t-reel__m,.t-reel__v{transform:scale(1.07);transform-origin:60% 55%;will-change:transform}
.t-reel.is-ready .t-reel__s.is-on .t-reel__p,.t-reel.is-ready .t-reel__s.is-on .t-reel__m,.t-reel.is-ready .t-reel__s.is-on .t-reel__v{transform:scale(1);transition:transform 8s cubic-bezier(.2,.6,.2,1)}
.t-reel__m,.t-reel__v{opacity:0;transition:opacity .45s ease,transform 8s cubic-bezier(.2,.6,.2,1)}
.t-reel__m.is-live,.t-reel__v.is-live{opacity:1}
.t-reel__v{z-index:1;background:transparent}
.t-reel__s[data-kind=port] .t-reel__p,.t-reel__s[data-kind=port] .t-reel__m,.t-reel__s[data-kind=port] .t-reel__v{object-position:50% 64%}

.t-reel__shade{position:absolute;inset:0;z-index:3;pointer-events:none;
  background:linear-gradient(180deg,rgba(28,26,23,.62) 0,rgba(28,26,23,.2) 20%,transparent 38%,transparent 72%,rgba(28,26,23,.5) 100%),linear-gradient(90deg,rgba(28,26,23,.35),transparent 28%)}
[dir=rtl] .t-reel__shade{background:linear-gradient(180deg,rgba(28,26,23,.62) 0,rgba(28,26,23,.2) 20%,transparent 38%,transparent 72%,rgba(28,26,23,.5) 100%),linear-gradient(270deg,rgba(28,26,23,.35),transparent 28%)}
.t-reel__ui{position:absolute;z-index:4;inset-inline:calc(var(--reel-slant) + clamp(16px,2.4vw,36px)) clamp(16px,2.4vw,36px);inset-block-start:clamp(18px,2.2vw,32px);display:flex;flex-direction:column;align-items:flex-start;gap:12px;color:#F4EFE6}
.t-reel__cap{display:grid;gap:4px;min-inline-size:0;margin:0}
.t-reel__n{font:700 .78rem/1 var(--f-cond,inherit);letter-spacing:.2em;color:#E8845F}
.t-reel__t{font:700 clamp(1.05rem,.8rem + 1vw,1.6rem)/1.1 var(--f-cond,inherit);letter-spacing:.02em;text-transform:uppercase;text-shadow:0 2px 14px rgba(0,0,0,.5);animation:t-reel-cap .7s cubic-bezier(.2,.7,.2,1) both}
@keyframes t-reel-cap{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.t-reel__dots{display:flex;gap:6px;flex:none;margin:0;padding:0;list-style:none}
.t-reel__dots button{position:relative;display:block;inline-size:clamp(26px,3.6vw,46px);block-size:4px;padding:0;border:0;border-radius:2px;background:rgba(244,239,230,.32);cursor:pointer;overflow:hidden}
.t-reel__dots button::before{content:"";position:absolute;inset:-14px -3px}
.t-reel__dots button::after{content:"";position:absolute;inset:0;background:#F4EFE6;transform:scaleX(0);transform-origin:left center}
[dir=rtl] .t-reel__dots button::after{transform-origin:right center}
.t-reel__dots button.is-done::after{transform:scaleX(1)}
.t-reel__dots button.is-on::after{animation:t-reel-fill var(--ms,4000ms) linear forwards}
.t-reel[data-paused] .t-reel__dots button.is-on::after{animation-play-state:paused}
@keyframes t-reel-fill{to{transform:scaleX(1)}}
.t-reel__dots button:focus-visible{outline:2px solid #E8845F;outline-offset:3px}

/* desktop: copy column narrows so the panel can take the width */
@media(min-width:1024px){
  .t-hero2.has-reel .t-hero2__copy{grid-column:1/span 11}
  .t-hero2.has-reel .t-lead,.t-hero2.has-reel .t-hero2__copy>p:not(.t-brand):not(.t-rot){max-inline-size:36ch}
  .t-hero2.has-reel{--reel-w:50%;--reel-h:100%}
}
@media(min-width:1200px){.t-hero2.has-reel{--reel-w:56%}.t-hero2.has-reel .t-hero2__copy{grid-column:1/span 10}}
@media(min-width:1700px){.t-hero2.has-reel{--reel-w:59%}}

@media(max-width:1023px){
  .t-hero2.has-reel{--reel-w:100%;--reel-h:clamp(250px,62vw,460px);--reel-slant:0px;padding-block-start:calc(clamp(250px,62vw,460px) + 22px)}
  .t-reel__frame{clip-path:polygon(0 0,100% 0,100% 90%,0 100%)}
  [dir=rtl] .t-reel__frame{clip-path:polygon(0 0,100% 0,100% 100%,0 90%)}
  .t-reel__edge{display:none}
  .t-reel__ui{inset-inline:16px;inset-block-start:14px}
}
@media(prefers-reduced-motion:reduce){
  .t-reel::before{animation:none}
  .t-reel__d{display:none}
  .t-reel__p,.t-reel__m,.t-reel__v,.t-reel__s.is-on .t-reel__p,.t-reel__s.is-on .t-reel__m,.t-reel__s.is-on .t-reel__v{transform:none;transition:opacity .3s}
  .t-reel__t{animation:none}
}
