/* Neusarena / HW / ML01 — ABC News skin over the H&W VSL kit
   (assets/main/css/vsl-kit.css, loaded first): masthead, LIVE badge and
   headline, 16:9 player, the kit's single green button under it at the
   pitch, institutions strip, "sound on" notice and Facebook-style comments.
   The kit runs the stage; this file is the look.

   Where the page departs from the kit, same calls as the Oculume and
   Lunorell pages:
     - on stage the masthead stays (the logo folds to its "abc" circle) and
       the headline shrinks a little; the player only widens (to the screen
       edges on phones) with a slight zoom
     - at the pitch nothing changes but the button appearing: the player and
       the headline keep the size they had (the kit would shrink both)
     - the comments stay at the pitch (they are not .vsl-comments, which the
       kit would clear) */

:root {
  /* Inter for the page, as the original. The comments borrow Facebook's
     system stack and the comments title Georgia, both local fonts. */
  --font-display: Inter, "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, "Helvetica Neue", Arial, sans-serif;
  --font-fb: Helvetica, Arial, sans-serif;

  --vsl-top-h: 56px;

  /* 16:9 video: it fills the column. --rest-reserve is this page's own: the
     screen height masthead + badge + headline take, so the whole player
     fits under them on landing. On stage the headline shrinks, so the kit's
     --vsl-stage-reserve is smaller. With a wide video these rarely bind;
     they matter on a phone held sideways. */
  --vsl-player-ratio: 1.7778;
  --vsl-player-w: 688px;
  --vsl-player-w-stage: 720px;
  --rest-reserve: 300px;
  --vsl-stage-reserve: 260px;
  --rest-w: min(var(--vsl-player-w), (var(--vsl-screen-h) - var(--rest-reserve)) * var(--vsl-player-ratio));

  /* On stage the headline shrinks a little; at the pitch it stays. Sized to
     the width so it holds 4 lines at most on phones (down to 320px) and 3
     on desktop. */
  --vsl-headline: clamp(22px, 3.6vw, 26px);
  --vsl-headline-stage: 22px;
  --vsl-headline-pitch: var(--vsl-headline-stage);
  --vsl-headline-m: clamp(13px, 4.3vw, 19px);
  --vsl-headline-stage-m: clamp(12px, 3.9vw, 17px);
  --vsl-headline-pitch-m: var(--vsl-headline-stage-m);

  --ink: #111;
  --muted: #696f7d;
  --line: #d9d9d9;
  --live: #d0021b;
  --alert: #c20;
  --fb-blue: #385898;
  --fb-link: #4267b2;
  --fb-ink: #1c1e21;
  --paper: #fff;
  --wash: #f5f6f7;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--vsl-bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--vsl-maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

/* The kit folds .vsl-top away on stage; this page keeps it. */
body.is-stripped .vsl-top {
  height: var(--vsl-top-h);
  border-bottom-color: var(--line);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  height: 100%;
}

/* On stage the logo folds to its "abc" circle (35% of the image) and gets a
   little smaller: the box narrows and clips the image while the image
   shrinks, so it slides shut instead of swapping. */
.masthead__logo {
  display: block;
  width: 100px;
  overflow: hidden;
  transition: width 0.5s var(--vsl-ease);
}

.masthead__logo img {
  width: 100px;
  max-width: none;
  transition: width 0.5s var(--vsl-ease);
}

body.is-stripped .masthead__logo {
  width: 30px;
}

body.is-stripped .masthead__logo img {
  width: 84px;
}

/* News-site hamburger, phones only. Decorative: no menu behind it, so the
   page keeps no way out but the offer. */
.masthead__menu {
  display: flex;
  align-items: center;
  width: 22px;
  height: 22px;
  margin-right: 14px;
}

.masthead__menu span {
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  box-shadow:
    0 -7px 0 var(--ink),
    0 7px 0 var(--ink);
}

/* ---- Headline ---------------------------------------------------------- */

.article {
  padding: 16px 0 0;
}

.article__live {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 2px;
  background: var(--live);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
}

.article h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.article h1 strong {
  color: #000;
  font-weight: 900;
}

/* Sound never turned on: at the pitch the headline keeps its landing size
   (the kit's pitch size is the stage one here). */
body.is-revealed:not(.is-stripped) .vsl-headline h1 {
  font-size: var(--vsl-headline);
}

@media (max-width: 640px) {
  body.is-revealed:not(.is-stripped) .vsl-headline h1 {
    font-size: var(--vsl-headline-m);
  }
}

/* ---- Player ------------------------------------------------------------ */

.vsl-video {
  padding: 14px 0 0;
}

/* On landing the whole player is on screen (--rest-w); the kit copies that
   width when the stage opens. At the pitch the player keeps the size it
   had, where the kit would give width back: --rest-w if the sound never
   came on, the stage size if it did. The button below is brought into view
   by the reveal scroll ("fit"). */
.vsl-video__box,
body.is-revealed .vsl-video__box {
  --stage-w: var(--rest-w);
}

body.is-revealed.is-stripped .vsl-video__box {
  --stage-w: max(
    var(--vsl-rest-w),
    min(var(--vsl-player-w-stage), (var(--vsl-screen-h) - var(--vsl-stage-reserve)) * var(--vsl-player-ratio))
  );
}

/* Sound on: the player widens to the screen edges (the kit drops the gutter
   on phones) with a slight zoom that peaks and settles as it lands. Box and
   gutter share one duration, so the growth reads as one move. */
.vsl-video__gutter,
.vsl-video__box {
  transition-duration: 0.7s;
}

body.is-stage .vsl-video__box {
  animation: nsZoom 0.8s var(--vsl-ease);
}

@keyframes nsZoom {
  0%,
  100% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.02);
  }
}

/* ---- Offer (the kit's button) ------------------------------------------ */

.vsl-cta {
  padding-top: 14px;
  padding-bottom: 6px;
}

/* The kit sizes the button to the player; a 16:9 player is wider than a
   button should be. */
.vsl-cta__button {
  max-width: 480px;
  font-size: 30px;
}

/* ---- Under the player -------------------------------------------------- */

.institutions {
  width: 100%;
  max-width: 400px;
  margin: 16px auto 0;
}

.notice {
  margin-top: 14px;
  color: #323232;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.notice strong {
  color: var(--alert);
}

/* It asks for the sound: once the sound is on, it has said its piece. */
body.is-stripped .notice {
  display: none;
}

.article__updated {
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Comments ---------------------------------------------------------- */

.comments {
  padding: 28px 0 40px;
  background: var(--wash);
  font-family: var(--font-fb);
}

.comments__title {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.comments__box {
  padding: 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.comments__count {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.comment {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.comment img {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.comment h3 {
  color: var(--fb-blue);
  font-size: 14px;
  font-weight: 600;
}

.comment p {
  color: var(--fb-ink);
  font-size: 14px;
  line-height: 1.36;
}

.comment .comment__meta {
  margin-top: 6px;
  color: var(--fb-link);
  font-size: 12px;
}

/* Facebook's blue thumb before the like count. */
.comment__likes::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 3px;
  background: url("../img/fb-like.webp") center / contain no-repeat;
  vertical-align: -2px;
}

.comments__closed {
  margin-top: 22px;
  color: var(--fb-blue);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* ---- Desktop ----------------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --rest-reserve: 320px;
    --vsl-stage-reserve: 270px;
  }

  .masthead__menu {
    display: none;
  }

  .masthead__logo,
  .masthead__logo img {
    width: 140px;
  }

  body.is-stripped .masthead__logo {
    width: 40px;
  }

  body.is-stripped .masthead__logo img {
    width: 112px;
  }

  .notice {
    font-size: 15px;
  }
}

/* ---- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.is-stage .vsl-video__box {
    animation: none;
  }

  .masthead__logo,
  .masthead__logo img {
    transition: none;
  }
}
