/* =========================================================
   TVA Atelier — homepage interaction layer
   Video hero, scroll reveal, mosaic, marquee, editorial band.
   Every effect degrades to a static, readable page.
   ========================================================= */

/* ---- scroll reveal (only under .tva-js; no-JS renders visible) ---- */
.tva-js [data-reveal]:not(.tva-vhero) {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .55s cubic-bezier(.22,.61,.36,1) var(--d, 0ms),
              transform .55s cubic-bezier(.22,.61,.36,1) var(--d, 0ms);
  will-change: opacity, transform;
}
.tva-js [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .tva-js [data-reveal]:not(.tva-vhero) { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Video hero
   ========================================================= */
.tva-vhero {
  position: relative;
  isolation: isolate;
  min-height: clamp(430px, 66vh, 660px);
  display: flex;
  align-items: flex-end;
  border-radius: 22px;
  overflow: hidden;
  margin-top: clamp(1rem, 2.5vw, 2rem);
  background: #17130d;
  /* Entrance animates transform only. The hero is the LCP element, so its
     visibility must never depend on an animation completing — a throttled or
     background-rendered document would otherwise leave it at opacity 0. */
  animation: tvaHeroIn .7s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes tvaHeroIn {
  from { transform: translate3d(0,10px,0); }
  to   { transform: none; }
}

.tva-vhero__media { position: absolute; inset: 0; z-index: 0; }
.tva-vhero__video,
.tva-vhero__still {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tva-vhero__video { z-index: 1; }
.tva-vhero__still.is-behind { z-index: 0; }

.tva-vhero__scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to top,   rgb(14 11 7 / .88) 0%, rgb(14 11 7 / .55) 38%, rgb(14 11 7 / .12) 68%, rgb(14 11 7 / .04) 100%),
    linear-gradient(to right, rgb(14 11 7 / .55) 0%, rgb(14 11 7 / .10) 55%, transparent 100%);
}

.tva-vhero__inner {
  position: relative; z-index: 3;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  color: #fff;
}
.tva-vhero__eyebrow { color: #e6cfa4; margin-bottom: .75rem; }
.tva-vhero__title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.02;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.4rem);
  margin: 0 0 1rem;
  color: #fff;
  text-shadow: 0 2px 24px rgb(0 0 0 / .35);
}
.tva-vhero__title em { font-style: italic; color: #e3c48c; }
.tva-vhero__lede {
  font-size: clamp(.98rem, .93rem + .28vw, 1.08rem);
  line-height: 1.62;
  color: rgb(255 255 255 / .84);
  max-width: 44ch;
  margin: 0 0 1.6rem;
  text-shadow: 0 1px 12px rgb(0 0 0 / .4);
}
.tva-vhero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.tva-btn--glass {
  background: rgb(255 255 255 / .10);
  color: #fff;
  border-color: rgb(255 255 255 / .38);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.tva-btn--glass:hover {
  background: rgb(255 255 255 / .2);
  color: #fff;
  border-color: rgb(255 255 255 / .7);
}

.tva-vhero__stats {
  display: flex;
  gap: clamp(1.4rem, 4vw, 3rem);
  margin: 1.9rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid rgb(255 255 255 / .22);
}
.tva-vhero__stats div { display: flex; flex-direction: column; gap: .1rem; }
.tva-vhero__stats dt {
  font-family: var(--wp--preset--font-family--body);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: rgb(255 255 255 / .62);
}
.tva-vhero__stats dd {
  margin: 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.35rem, 1.1rem + .7vw, 1.7rem);
  font-weight: 500; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* play / pause control */
.tva-vhero__toggle {
  position: absolute; z-index: 4;
  right: 1rem; top: 1rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .35);
  background: rgb(20 16 10 / .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
  transition: background .15s ease, border-color .15s ease;
}
.tva-vhero__toggle:hover { background: rgb(20 16 10 / .68); border-color: rgb(255 255 255 / .6); }
.tva-vhero__toggle:focus-visible { outline: 2px solid #e3c48c; outline-offset: 3px; }
.tva-vhero__toggle-ico {
  width: 9px; height: 11px;
  border-left: 3px solid #fff;
  border-right: 3px solid #fff;
}
.tva-vhero__toggle[aria-pressed="false"] .tva-vhero__toggle-ico {
  width: 0; height: 0;
  border: 0;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}

/* =========================================================
   Mosaic
   ========================================================= */
.tva-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(140px, 15vw, 200px);
  gap: var(--gap);
}
.tva-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 15px;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border);
  text-decoration: none;
  isolation: isolate;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.tva-tile:hover {
  border-color: #e0d3ba;
  box-shadow: 0 1px 2px rgb(33 29 23 / .04), 0 14px 30px -18px rgb(33 29 23 / .22);
}
.tva-tile--wide { grid-column: span 2; }
.tva-tile--tall { grid-row: span 2; }

.tva-tile__frame {
  position: absolute; inset: 0;
  display: block;
  background: var(--wp--preset--color--cream);
}
.tva-tile__frame img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 1.1rem 1.1rem 3.4rem;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.tva-tile__ph { position: absolute; inset: 0; background: linear-gradient(135deg,#f4ece0,#e9ddc8); }
.tva-tile:hover .tva-tile__frame img { transform: scale(1.05); }

.tva-tile__body {
  position: absolute; z-index: 2;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .8rem 1rem;
  background: linear-gradient(to top, rgb(253 248 239 / .97) 55%, rgb(253 248 239 / 0));
}
.tva-tile__label {
  font-family: var(--wp--preset--font-family--body);
  font-size: .9rem; font-weight: 500;
  color: var(--wp--preset--color--ink);
  line-height: 1.3;
}
.tva-tile__go {
  color: var(--wp--preset--color--gold-deep);
  font-size: 1rem;
  transform: translateX(-3px);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.tva-tile:hover .tva-tile__go,
.tva-tile:focus-visible .tva-tile__go { opacity: 1; transform: none; }
.tva-tile:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }

/* =========================================================
   Marquee
   ========================================================= */
.tva-marquee {
  margin-top: clamp(3rem, 6vw, 5.5rem);
  background: var(--wp--preset--color--sand);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 18px;
  padding: clamp(1.5rem, 3.2vw, 2.2rem) 0;
  text-align: center;
  overflow: hidden;
}
.tva-marquee__label { margin: 0 0 1.15rem; }
.tva-marquee__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.tva-marquee__track {
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0; padding: 0;
  width: max-content;
  animation: tvaMarquee 42s linear infinite;
}
.tva-marquee__track.is-paused { animation-play-state: paused; }
.tva-marquee__track.is-static {
  animation: none; flex-wrap: wrap; width: auto; justify-content: center;
}
.tva-marquee__track li {
  flex: 0 0 auto;
  font-family: var(--wp--preset--font-family--body);
  font-size: .86rem;
  color: #6f6757;
  background: var(--wp--preset--color--white);
  border: 1px solid #ece3d2;
  border-radius: 999px;
  padding: .48em 1.05em;
  white-space: nowrap;
}
@keyframes tvaMarquee {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* =========================================================
   Editorial band
   ========================================================= */
.tva-band {
  position: relative;
  isolation: isolate;
  margin-top: clamp(3rem, 6vw, 5.5rem);
  border-radius: 20px;
  overflow: hidden;
  min-height: clamp(340px, 44vh, 460px);
  display: flex; align-items: center;
  background: var(--wp--preset--color--ink);
}
.tva-band__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.tva-band__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, rgb(20 17 12 / .93) 0%, rgb(20 17 12 / .78) 42%, rgb(20 17 12 / .35) 100%);
}
.tva-band__inner {
  position: relative; z-index: 2;
  padding: clamp(1.75rem, 4.5vw, 3.5rem);
  max-width: 58ch;
}
.tva-band__inner .tva-h2 { color: #f6efe2; margin-bottom: 1.1rem; }
.tva-band__inner p {
  color: rgb(255 255 255 / .78);
  font-size: 1rem; line-height: 1.72;
  margin: 0 0 1.5rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .tva-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(150px, 26vw, 210px); }
  .tva-tile--wide { grid-column: span 2; }
  .tva-tile--tall { grid-row: span 1; }
}

@media (max-width: 600px) {
  .tva-vhero { min-height: clamp(400px, 76vh, 560px); border-radius: 16px; }
  .tva-vhero__inner { padding: 1.35rem 1.15rem 1.6rem; }
  .tva-vhero__lede { margin-bottom: 1.25rem; }
  .tva-vhero__actions { flex-direction: column; align-items: stretch; }
  .tva-vhero__actions .tva-btn { text-align: center; }
  .tva-vhero__stats { gap: 0; justify-content: space-between; margin-top: 1.5rem; padding-top: 1.05rem; }
  .tva-vhero__stats dt { font-size: .6rem; letter-spacing: .1em; }
  .tva-vhero__toggle { right: .7rem; top: .7rem; width: 34px; height: 34px; }

  .tva-mosaic { gap: .7rem; grid-auto-rows: clamp(132px, 38vw, 175px); }
  .tva-tile__frame img { padding: .75rem .75rem 2.9rem; }
  .tva-tile__label { font-size: .82rem; }
  .tva-tile__go { opacity: 1; transform: none; }

  .tva-band { border-radius: 16px; min-height: 0; }
  .tva-band__scrim { background: linear-gradient(to top, rgb(20 17 12 / .95) 30%, rgb(20 17 12 / .8) 100%); }
  .tva-band__inner p { font-size: .95rem; }
  .tva-marquee { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .tva-vhero { animation: none; }
  .tva-tile__frame img, .tva-tile__go { transition: none; }
  .tva-tile:hover .tva-tile__frame img { transform: none; }
  .tva-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}
