/* HD SofT – tuotevideo. Soittimen kuori: juliste, käynnistysnappi, ohjauspalkki, tekstitys ja loppukuvan linkit. */
.hdtv {
  --hdtv-blue: #1684B8;
  --hdtv-ink: #2a2622;
  --hdtv-paper: #FBF7EC;
  --hdtv-load: 0;
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
.hdtv-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #F6EEDC;
  box-shadow: 0 18px 50px -24px rgba(40, 28, 14, .55), 0 2px 0 rgba(255, 255, 255, .6) inset;
  -webkit-tap-highlight-color: transparent;
}
.hdtv-canvas, .hdtv-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hdtv-canvas { opacity: 0; transition: opacity .35s ease; }
.hdtv.is-started.is-ready .hdtv-canvas { opacity: 1; }
.hdtv-poster { object-fit: cover; transition: opacity .35s ease; }
.hdtv.is-started.is-ready .hdtv-poster { opacity: 0; pointer-events: none; }

/* Käynnistys */
.hdtv-start {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%) rotate(-1.5deg);
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: .8em 1.5em .8em .9em;
  border: 0;
  border-radius: 999px;
  background: var(--hdtv-paper);
  color: var(--hdtv-ink);
  font: 700 clamp(15px, 2.1vw, 22px)/1.1 Montserrat, "HDTV Mont", Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(40, 28, 14, .55), 0 0 0 3px rgba(22, 132, 184, .0);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hdtv-start:hover, .hdtv-start:focus-visible {
  transform: translateX(-50%) rotate(0deg) scale(1.04);
  box-shadow: 0 14px 30px -8px rgba(40, 28, 14, .6), 0 0 0 3px rgba(22, 132, 184, .55);
  outline: none;
}
.hdtv-start-ico {
  position: relative;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--hdtv-blue);
  flex: none;
}
.hdtv-start-ico::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: .45em 0 .45em .72em;
  border-color: transparent transparent transparent #fff;
}
.hdtv-start-dur {
  font-weight: 600;
  font-size: .8em;
  opacity: .65;
}
.hdtv.is-loading .hdtv-start-ico {
  background: conic-gradient(var(--hdtv-blue) calc(var(--hdtv-load) * 360deg), rgba(22, 132, 184, .25) 0);
}
.hdtv.is-loading .hdtv-start-ico::after { display: none; }
.hdtv.is-started.is-ready .hdtv-start { display: none; }

/* Ohjauspalkki */
.hdtv-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(30, 22, 12, .45), rgba(30, 22, 12, 0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.hdtv.is-started.is-ready .hdtv-stage:hover .hdtv-bar,
.hdtv.is-started.is-ready .hdtv-bar:focus-within,
.hdtv.is-paused .hdtv-bar,
.hdtv.is-ended .hdtv-bar {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.hdtv-b {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--hdtv-paper);
  color: var(--hdtv-ink);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5);
}
.hdtv-b:hover, .hdtv-b:focus-visible { outline: 3px solid rgba(22, 132, 184, .6); outline-offset: 1px; }
.hdtv-b svg { width: 18px; height: 18px; display: block; }
.hdtv-b-cc { font: 800 12px/1 Montserrat, "HDTV Mont", Arial, sans-serif; }
.hdtv-b[aria-pressed="true"] { background: var(--hdtv-blue); color: #fff; }
.hdtv .hdtv-b-play .i-play { display: none; }
.hdtv.is-paused .hdtv-b-play .i-play, .hdtv.is-ended .hdtv-b-play .i-play { display: block; }
.hdtv.is-paused .hdtv-b-play .i-pause, .hdtv.is-ended .hdtv-b-play .i-pause { display: none; }
.hdtv-b-mute .i-off { display: none; }
.hdtv-b-mute[aria-pressed="true"] .i-on { display: none; }
.hdtv-b-mute[aria-pressed="true"] .i-off { display: block; }
.hdtv-progress {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(251, 247, 236, .35);
  overflow: hidden;
}
.hdtv-progress i {
  display: block;
  height: 100%;
  background: var(--hdtv-paper);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Tekstitys */
.hdtv-cap {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  max-width: 86%;
  padding: .35em .7em;
  border-radius: 8px;
  background: rgba(24, 20, 16, .78);
  color: #fff;
  font: 600 clamp(13px, 1.9vw, 22px)/1.35 Inter, Arial, sans-serif;
  text-align: center;
  pointer-events: none;
}
.hdtv-cap[hidden] { display: none; }

/* Loppukuvan tuotelinkit tarrojen päällä */
.hdtv-links { position: absolute; inset: 0; pointer-events: none; }
.hdtv-link {
  position: absolute;
  width: 9%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 22%;
}
.hdtv-links.is-on .hdtv-link { pointer-events: auto; }
.hdtv-link:focus-visible { outline: 3px solid var(--hdtv-blue); outline-offset: 4px; }

@media (max-width: 600px) {
  .hdtv-stage { border-radius: 10px; }
  .hdtv-b { width: 32px; height: 32px; }
  .hdtv-b svg { width: 15px; height: 15px; }
  .hdtv-bar { gap: 6px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hdtv-start, .hdtv-bar, .hdtv-canvas, .hdtv-poster { transition: none; }
}
