/* ============================================================
   Video Referral Page — Figma node 1734:7104
   Exact UI replication with responsive breakpoints
   ============================================================ */

/* Design tokens from Figma */
:root {
  --vr-font: "Open Sans", sans-serif;
  --vr-font-dm: "DM Sans", sans-serif;
  --vr-bg-page: #f7f7f7;
  --vr-text-dark: #111827;
  --vr-text-body: #4b5563;
  --vr-text-muted: #6b7280;
  --vr-text-light: #9ca3af;
  --vr-blue: #1672c3;
  --vr-blue-dark: #093963;
  --vr-red: #ef4444;
  --vr-star: #FBBF24;
  --vr-card-bg: #111827;
  --vr-shadow-btn: 0px 4px 6px 0px rgba(22, 114, 195, 0.2), 0px 10px 15px 0px rgba(22, 114, 195, 0.2);
  --vr-shadow-card: 0px 25px 50px 0px rgba(17, 24, 39, 0.1);
  --vr-shadow-play: 0px 8px 10px 0px rgba(0, 0, 0, 0.1), 0px 20px 25px 0px rgba(0, 0, 0, 0.1);
  --vr-content-max: 1216px;
  --vr-col-width: 568px;
  --vr-gap: 80px;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..14,400;9..14,500;9..14,600;9..14,700&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ============================================================
   Public Header
   ============================================================ */
.vr-public-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.vr-public-header__inner {
  max-width: var(--vr-content-max);
  margin: 0 auto;
  padding: 16px 72px;
  display: flex;
  align-items: center;
}

.vr-public-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.vr-public-header__logo-img {
  display: block;
  max-width: 180px;
  height: auto;
}

@media (max-width: 640px) {
  .vr-public-header__inner {
    padding: 14px 16px;
  }

  .vr-public-header__logo-img {
    max-width: 150px;
  }
}

/* ============================================================
   Page Base
   ============================================================ */
.vr-page {
  background: var(--vr-bg-page);
  font-family: var(--vr-font);
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 48px;
  box-sizing: border-box;
}

.vr-page,
.vr-page * {
  box-sizing: border-box;
}

/* ============================================================
   Hero Section
   ============================================================ */
.vr-hero {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 72px;
}

.vr-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(420px, 568px);
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1216px;
  margin: 0 auto;
}

/* ============================================================
   Left Column — Headline, CTA, Social Proof
   ============================================================ */
.vr-hero__left {
  width: 100%;
  max-width: 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 46px;
}

.vr-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
  align-self: stretch;
  width: 100%;
  max-width: 488px;
  border: 0 solid #E5E7EB;
  background: rgba(0, 0, 0, 0);
}

.vr-hero__headline-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vr-hero__headline {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 700;
  font-size: 60px;
  line-height: 66px;
  letter-spacing: -0.7px;
  color: var(--vr-text-dark);
}

.vr-hero__headline-line {
  display: block;
}

.vr-hero__underline {
  width: 80px;
  height: 6px;
  background: var(--vr-blue);
  border-radius: 9999px;
}

.vr-hero__description {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 300;
  font-size: 20px;
  line-height: 33px;
  letter-spacing: -0.5px;
  color: var(--vr-text-body);
  max-width: 488px;
}

/* CTA block */
.vr-hero__cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vr-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 189px;
  height: 60px;
  background: var(--vr-blue);
  color: white;
  font-family: var(--vr-font);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.5px;
  text-decoration: none;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: var(--vr-shadow-btn);
  transition: opacity 0.2s;
}

.vr-hero__btn:hover,
.vr-hero__btn:focus {
  opacity: 0.9;
  outline: 2px solid var(--vr-blue);
  outline-offset: 2px;
}

.vr-hero__btn:focus {
  outline: 2px solid var(--vr-blue);
  outline-offset: 2px;
}

.vr-hero__btn-text {
  line-height: 1;
}

.vr-hero__btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vr-hero__cta-note {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: -0.2px;
  color: var(--vr-text-light);
}

/* Social proof */
.vr-hero__social-proof {
  display: flex;
  align-items: center;
  gap: 24px;
}

.vr-hero__avatars {
  display: flex;
  position: relative;
}

.vr-hero__avatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
}

.vr-hero__avatar:nth-child(1) { z-index: 4; }
.vr-hero__avatar:nth-child(2) { margin-left: -12px; z-index: 3; }
.vr-hero__avatar:nth-child(3) { margin-left: -12px; z-index: 2; }
.vr-hero__avatar:nth-child(4) { margin-left: -12px; z-index: 1; }

.vr-hero__members-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vr-hero__members-count {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.5px;
  color: var(--vr-text-dark);
}

.vr-hero__members-sub {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--vr-text-muted);
}

/* ============================================================
   Right Column — Video Card
   ============================================================ */
.vr-hero__right {
  width: 100%;
  max-width: 568px;
  justify-self: end;
}

.vr-video-card {
  width: 100%;
}



.vr-video-card__media {
  position: relative;
  display: flex;
  width: 100%;
  height: 568px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 0 solid #E5E7EB;
  background: rgba(0, 0, 0, 0);
  border-radius: 16px;
}

.vr-video-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.vr-video-card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 50%);
  pointer-events: none;
}

.vr-video-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--vr-shadow-play);
  transition: transform 0.2s, background 0.2s;
}

.vr-video-card__play:hover,
.vr-video-card__play:focus {
  background: white;
  transform: translate(-50%, -50%) scale(1.05);
}

.vr-video-card__play:focus {
  outline: 2px solid white;
  outline-offset: 4px;
}

.vr-video-card__play-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vr-blue);
  margin-left: 4px;
}

.vr-video-card__info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 13px 21px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

.vr-video-card__title {
  margin: 0 0 4px 0;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 14px;
  line-height: normal;
  letter-spacing: -0.5px;
  color: white;
}

.vr-video-card__duration {
  margin: 0;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.vr-video-card__meta {
  display: flex;
  width: 100%;
  min-height: 20px;
  margin-top: 24px;
  padding: 0 8px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  border: 0 solid #E5E7EB;
  background: rgba(0, 0, 0, 0);
}

.vr-video-card__live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.5px;
  color: var(--vr-text-body);
}

.vr-video-card__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--vr-red);
  opacity: 0.54;
}

.vr-video-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--vr-font);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.5px;
  color: var(--vr-text-body);
}

.vr-video-card__stars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vr-video-card__stars svg {
  flex-shrink: 0;
}

/* ============================================================
   Responsive — Tablet (max 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  .vr-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    max-width: none;
    gap: 48px;
  }

  .vr-hero__left,
  .vr-hero__right {
    width: 100%;
    max-width: 480px;
  }

  .vr-video-card__media {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .vr-video-card__meta {
    height: auto;
    padding: 16px 8px 0;
    flex-wrap: wrap;
  }

  .vr-hero__headline {
    font-size: 52px;
    line-height: 58px;
  }

  .vr-hero__description {
    font-size: 18px;
    line-height: 30px;
  }
}

/* ============================================================
   Responsive — Tablet stack (max 992px)
   ============================================================ */
@media (max-width: 992px) {
  .vr-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }

  .vr-hero__left {
    max-width: 568px;
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .vr-hero__content {
    align-items: center;
  }

  .vr-hero__headline-wrap {
    align-items: center;
  }

  .vr-hero__underline {
    margin: 0 auto;
  }

  .vr-hero__description {
    text-align: center;
    max-width: 100%;
  }

  .vr-hero__cta-wrap {
    align-items: center;
  }

  .vr-hero__social-proof {
    flex-direction: column;
    gap: 16px;
  }

  .vr-hero__right {
    max-width: 568px;
    width: 100%;
  }

  .vr-video-card__media {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

/* ============================================================
   Responsive — Mobile (max 640px)
   ============================================================ */
@media (max-width: 640px) {
  .vr-page {
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .vr-hero {
    padding: 0 16px;
  }

  .vr-hero__inner {
    gap: 40px;
  }

  .vr-hero__left {
    gap: 24px;
  }

  .vr-hero__headline {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -0.6px;
  }

  .vr-hero__underline {
    width: 64px;
    height: 5px;
  }

  .vr-hero__description {
    font-size: 16px;
    line-height: 26px;
  }

  .vr-hero__btn {
    width: 100%;
    max-width: 280px;
    height: 56px;
    font-size: 16px;
  }

  .vr-hero__social-proof {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .vr-hero__avatar:nth-child(2),
  .vr-hero__avatar:nth-child(3),
  .vr-hero__avatar:nth-child(4) {
    margin-left: -10px;
  }

  .vr-video-card__media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .vr-video-card__info {
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 10px 16px;
  }

  .vr-video-card__title {
    font-size: 13px;
  }

  .vr-video-card__duration {
    font-size: 11px;
  }

  .vr-video-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 8px 0;
    margin-top: 12px;
    height: auto;
  }

  .vr-video-card__play {
    width: 64px;
    height: 64px;
  }

  .vr-video-card__play-inner svg {
    width: 14px;
    height: 18px;
  }
}

/* ============================================================
   Responsive — Small mobile (max 400px)
   ============================================================ */
@media (max-width: 400px) {
  .vr-hero__headline {
    font-size: 34px;
    line-height: 40px;
  }

  .vr-hero__description {
    font-size: 15px;
    line-height: 24px;
  }

  .vr-hero__avatars .vr-hero__avatar {
    width: 38px;
    height: 38px;
  }

  .vr-hero__avatar:nth-child(2),
  .vr-hero__avatar:nth-child(3),
  .vr-hero__avatar:nth-child(4) {
    margin-left: -8px;
  }
}

/* ============================================================
   Video Modal Overlay
   ============================================================ */
.vr-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vr-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.vr-modal__container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 48px);
  z-index: 1;
}

.vr-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  color: #111827;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.vr-modal__close:hover,
.vr-modal__close:focus {
  background: white;
  transform: scale(1.05);
}

.vr-modal__close:focus {
  outline: 2px solid var(--vr-blue);
  outline-offset: 2px;
}

.vr-modal__video-wrap {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 48px);
  background: #111827;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.vr-modal__video {
  width: 100%;
  height: auto;
  display: block;
}

/* Modal responsive */
@media (max-width: 640px) {
  .vr-modal {
    padding: 16px;
  }

  .vr-modal__close {
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
  }

  .vr-modal__close svg {
    width: 20px;
    height: 20px;
  }

  .vr-modal__video-wrap {
    max-height: calc(100vh - 32px);
  }
}

/* ============================================================
   Invalid Referral Dialog
   ============================================================ */
.vr-error-modal .vr-modal__backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.vr-error-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.vr-error-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.vr-error-modal__close:hover,
.vr-error-modal__close:focus {
  background: #f3f4f6;
  color: #111827;
  outline: none;
}

.vr-error-modal__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.vr-error-modal__title {
  margin: 0 0 12px;
  font-family: var(--vr-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--vr-text-dark);
  line-height: 1.3;
}

.vr-error-modal__message {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--vr-text-body);
}

.vr-error-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 44px;
  padding: 0 24px;
  background: var(--vr-blue);
  color: #ffffff;
  font-family: var(--vr-font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--vr-shadow-btn);
  transition: opacity 0.2s;
}

.vr-error-modal__btn:hover,
.vr-error-modal__btn:focus {
  opacity: 0.9;
  outline: 2px solid var(--vr-blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .vr-error-modal__card {
    padding: 28px 20px 24px;
  }

  .vr-error-modal__title {
    font-size: 18px;
  }

  .vr-error-modal__message {
    font-size: 14px;
  }
}
