/* ==========================================================================
   Door Stud — homepage
     1. the hero's Pro/Heavy series tabs
     2. the "Watch It Work" video facade
   Loaded on the front page only (see includes/homepage-series-tabs.php).

   The markup lives in the Divi layout (provisioning/doorstud-homepage-divi-
   layout.STAGING.json), which is why these blocks are class-based while the
   rest of that layout is inline-styled: :checked can't be expressed inline.

   Everything here sits on the hero's black background, hence the light type
   and the translucent-white panels.
   ========================================================================== */

/* ==========================================================================
   Series tabs.
   Two hidden radios drive them, so they work with JavaScript off. Pro is the
   default; the Heavy rules only take over once its radio is checked, so a
   browser without :has() support still shows a full Pro panel rather than an
   empty hero.
   ========================================================================== */

.ds-series {
  position: relative;
}

/* The radios live in their own block wrapper for wpautop's benefit: left loose
   between the section's <div>s, they read as a stray paragraph and WordPress
   closes a </p> around them, which lands as an empty, padded paragraph above
   the tab strip. Visually hidden rather than display:none, so they stay
   keyboard-focusable and the tabs can be driven with arrow keys. */
.ds-series-controls {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ds-series-radio {
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

/* ── Tab strip ──────────────────────────────────────────────────────────── */
.ds-series-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0 0 2.75rem;
}

.ds-series .ds-series-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-family: var(--ds-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ds-series .ds-series-tab:hover {
  color: #fff;
}

.ds-series-tab-note {
  font-family: var(--ds-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.ds-series:has(#ds-tab-pro:checked) .ds-series-tab[for="ds-tab-pro"],
.ds-series:has(#ds-tab-heavy:checked) .ds-series-tab[for="ds-tab-heavy"] {
  color: #fff;
  border-bottom-color: var(--ds-yellow);
}

.ds-series:has(#ds-tab-pro:focus-visible) .ds-series-tab[for="ds-tab-pro"],
.ds-series:has(#ds-tab-heavy:focus-visible) .ds-series-tab[for="ds-tab-heavy"] {
  outline: 2px solid var(--ds-yellow);
  outline-offset: 2px;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.ds-series-panel {
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.ds-series-panel--pro {
  display: grid;
}

.ds-series-panel--heavy {
  display: none;
}

.ds-series:has(#ds-tab-heavy:checked) .ds-series-panel--pro {
  display: none;
}

.ds-series:has(#ds-tab-heavy:checked) .ds-series-panel--heavy {
  display: grid;
}

/* The product shots were photographed on white, so they keep a white card of
   their own rather than being knocked out against the black. */
.ds-series-media {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  background: #ffffff;
  padding: 48px;
  box-shadow: 0 12px 80px -18px rgba(0, 0, 0, 0.7);
}

.ds-series-media img {
  display: block;
  max-width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* ── Right column: name on top, spec panel under it ─────────────────────── */
.ds-series .ds-series-eyebrow {
  font-family: var(--ds-font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.5rem;
}

.ds-series-name {
  font-family: var(--ds-font-display);
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 0.4rem;
  color: #fff;
}

.ds-series .ds-series-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1.25rem;
}

.ds-series-bestfor {
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--ds-yellow);
  padding: 0.7rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.ds-series-bestfor strong {
  font-weight: 600;
  color: #fff;
}

.ds-series-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1.25rem;
  margin: 0 0 1.5rem;
}

.ds-series-spec {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ds-series-spec-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.ds-series-spec-value {
  font-family: var(--ds-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.ds-series .ds-series-points {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ds-series .ds-series-points li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
}

.ds-series .ds-series-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-yellow);
}

.ds-series-price {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}

.ds-series-price-now {
  font-family: var(--ds-font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
}

.ds-series-price-was {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: line-through;
}

.ds-series-price-save {
  background: var(--ds-yellow);
  color: var(--ds-black);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Buttons (matched to the Divi button styling used elsewhere) ────────── */
.ds-series-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ds-series .ds-btn {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--ds-font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* The #main-content prefix is load-bearing: doorstud-site.css de-blues Divi
   with `#main-content a { color: var(--ds-black) }`, and an ID beats any class
   selector — without it the outlined button's label renders black on black. */
#main-content .ds-series .ds-btn--buy {
  background: var(--ds-yellow);
  border-color: var(--ds-yellow);
  color: var(--ds-black);
}

#main-content .ds-series .ds-btn--buy:hover {
  background: var(--ds-yellow-dark);
  border-color: var(--ds-yellow-dark);
}

#main-content .ds-series .ds-btn--manual {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#main-content .ds-series .ds-btn--manual:hover {
  border-color: #fff;
  color: #fff;
}

/* ── Stacked ────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .ds-series-panel {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ds-series .ds-series-tab {
    padding: 0.8rem 0.75rem;
    font-size: 1.15rem;
  }
  .ds-series-media {
    padding: 32px;
  }
}

/* ==========================================================================
   "Watch It Work" — a poster image that becomes a muted YouTube player on
   click (see assets/doorstud-homepage.js). Nothing is requested from YouTube
   until a visitor asks for the video.
   ========================================================================== */

.ds-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* wpautop wraps the loose <button> in a paragraph; the padding it inherits
   would push the poster off-center inside the frame. */
.ds-video p {
  margin: 0;
  padding: 0;
}

.ds-video .ds-video-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.ds-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.4s ease;
}

.ds-video .ds-video-facade:hover .ds-video-poster {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Yellow play triangle, drawn rather than shipped as an asset. */
.ds-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  background: var(--ds-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.ds-video .ds-video-facade:hover .ds-video-play {
  background: var(--ds-yellow-dark);
}

.ds-video-play::after {
  content: "";
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--ds-black);
  margin-left: 5px;
}

.ds-video-note {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  font-family: var(--ds-font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}

.ds-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .ds-video-play {
    width: 64px;
    height: 64px;
  }
  .ds-video-play::after {
    border-width: 10px 0 10px 16px;
  }
}
