/* ==========================================================================
   components.css - buttons, eyebrow, spec rows, pills, stat cards,
                    analytics chart, media frames, video grid, lightbox
   ========================================================================== */

/* ------------------------------------------------------- 1. text bits ---- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--gold);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 2.25rem;
  height: 1px;
  background-color: var(--gold);
}

.lede {
  max-width: 54ch;
  color: var(--text-muted);
  font-size: var(--fs-lede);
}

/* --------------------------------------------------------- 2. buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-6);
  border: 1px solid var(--gold);
  border-radius: var(--r-pill);
  background-color: var(--gold);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}

/* ------------------------------------------------- 3. spec rows (dl) ----- */
.spec {
  max-width: 34rem;
  margin-block-start: var(--sp-6);
}

.spec__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}

.spec__row:last-child {
  border-bottom: 1px solid var(--line);
}

.spec dt {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.spec dd {
  color: var(--text);
  font-weight: 600;
  text-align: end;
}

/* --------------------------------------------------- 4. contact pills ---- */
/* Pills and the CTA share one row: LinkedIn first, the mail button to its
   right. Wraps to a second line only when the column is too narrow. */
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-5);
  margin-block-start: var(--sp-6);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-block-start: 0;
}

.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.contact__links a::after {
  content: "\2192";
  color: var(--gold);
  font-weight: 700;
  transition: translate var(--dur-fast) var(--ease-out);
}

/* ---------------------------------------------------- 5. stat cards ------ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-block-start: var(--sp-7);
}

.stat {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--bg-panel);
}

.stat__value {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
}

.stat__suffix {
  font-size: 0.6em;
}

.stat__label {
  display: block;
  margin-block-start: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------- 6. the chart ---- */
.chart {
  position: relative;
  margin-block-start: var(--sp-7);
}

.chart__plot {
  position: relative;
  width: 100%;
}

.chart__plot svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart__grid {
  stroke: var(--line);
}

.chart__axis {
  stroke: var(--line-strong);
}

.chart__ylabel {
  fill: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.chart__area {
  fill: var(--gold);
}

.chart__line {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset var(--dur-draw) var(--ease-out);
}

.chart__dot {
  fill: var(--gold);
  stroke: var(--bg-page);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--dur-mid) var(--ease-out);
}

.chart__area {
  transition: opacity var(--dur-draw) var(--ease-out);
}

.chart__labels {
  position: relative;
  height: 4.75rem;
  margin-block-start: var(--sp-3);
}

.chart__label {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 8rem;
  text-align: center;
  transition: opacity var(--dur-mid) var(--ease-out);
}

.chart__channel {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
}

.chart__views {
  color: var(--gold);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------- 7. media frames ----- */
.work__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.media {
  margin: 0;
}

.media:first-child {
  grid-column: 1 / -1;
}

.media__btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--bg-panel);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.media:first-child .media__btn {
  aspect-ratio: 16 / 9;
}

.media__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-mid) var(--ease-out);
}

/* ------------------------------------- 7b. video grid (work / videos) ---- */
/* Featured edits only: the thumbnail IS the link - clicking opens the video on
   YouTube in a new tab (no lightbox here). Two per row, the most-watched edit
   leading as a full-width card, creator + view count captioned underneath. */
.work__media--videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
}

.work__media--videos .media:first-child {
  grid-column: 1 / -1;
}

.vcard {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background-color: var(--bg-panel);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.vcard img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-mid) var(--ease-out);
}

.vcard-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  padding-block-start: var(--sp-2);
}

.vcard-cap__channel {
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.vcard-cap__views {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.vcard__play {
  position: absolute;
  inset: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-pill);
  background-color: rgba(4, 7, 15, 0.55);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.vcard__play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -50%);
  border-left: 0.6rem solid #FFFFFF;
  border-top: 0.4rem solid transparent;
  border-bottom: 0.4rem solid transparent;
}

/* ------------------------------------------------------ 8. lightbox ------ */
/* Solid near-opaque scrim - no backdrop-filter (plan hard ban). */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  flex-direction: column;
  background-color: var(--scrim);
  color: var(--text);
}

.lightbox.is-open {
  animation: rp-lightbox-in var(--dur-mid) var(--ease-out);
}

@keyframes rp-lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox__stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 3vw, 44px);
  touch-action: none;
}

.lightbox__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__img.is-zoomed {
  cursor: grab;
}

.lightbox__ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}

.lightbox__ui button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background-color: var(--bg-panel);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.lightbox__ui button[disabled] {
  opacity: 0.4;
  cursor: default;
}

.lightbox__counter {
  min-width: 4.5rem;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-align: center;
  text-transform: uppercase;
}

.lightbox__hint {
  padding: 0 var(--sp-4) var(--sp-5);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  text-align: center;
}

/* --------------------------------------------- 9. hover (pointer-fine) --- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background-color: var(--gold-bright);
    border-color: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  .btn--ghost:hover {
    background-color: transparent;
    border-color: var(--gold);
    color: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: none;
  }

  .contact__links a:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
  }

  .contact__links a:hover::after {
    translate: 3px 0;
  }

  .media__btn:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
  }

  .media__btn:hover img {
    transform: scale(1.04);
  }

  .vcard:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
  }

  .vcard:hover img {
    transform: scale(1.05);
  }

  .vcard:hover .vcard__play {
    opacity: 1;
  }

  .feature__link:hover {
    border-color: var(--gold);
  }

  .feature__link:hover .feature__img {
    transform: scale(1.02);
  }

  .feature__cta:hover {
    color: var(--gold-bright);
  }

  .lightbox__ui button:hover:not([disabled]) {
    border-color: var(--gold);
    color: var(--gold-bright);
  }
}