/* Logged-out landing page for on-demand channel pages (custom-ondemand.hbs).
   Members keep the dashboard grid in dashboard-ondemand.css - this file is only
   loaded for guests, so everything is namespaced under .odl to stay out of its way. */

.odl {
  --odl-max: 1192px;
  --odl-gutter: 32px;
  background-color: var(--black);
  color: var(--white);
  font-family: Poppins, sans-serif;
}

.odl-wrap {
  box-sizing: border-box;
  max-width: calc(var(--odl-max) + (var(--odl-gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--odl-gutter);
  width: 100%;
}

.odl-section {
  padding: 80px 0;
}

/* ---------------------------------------------------------- Hero */

.odl-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
}

.odl-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.odl-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* keeps the copy legible over whatever feature image the post carries */
.odl-hero-media:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 16, 15, 0.55) 0%, rgba(9, 16, 15, 0.75) 45%, var(--black) 100%);
}

.odl-hero-no-image {
  background-image: url(/assets/img/eclipse-top-right-banner.svg);
  background-repeat: no-repeat;
  background-position: top right;
  background-size: cover;
}

.odl-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 200px;
  padding-bottom: 56px;
}

.odl-hero-copy {
  max-width: 720px;
}

/* inline-flex rather than the spec's flex so the pill hugs its label instead of
   stretching across the hero copy column */
.odl-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border: 1px solid #f9f8f5;
  border-radius: 40px;
  background-color: transparent;
  color: var(--white);
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 17px;
  text-align: center;
}

/* Both lines are IvyJournal italic in the design, not Poppins + italic accent. */
.odl-title {
  /* flow-root so the italic line's negative margin (below) resolves inside the
     heading instead of collapsing out and eating the 24px gap under it */
  display: flow-root;
  margin: 0 0 24px;
  font-family: IvyJournal !important;
  font-size: 64px;
  font-style: italic;
  font-weight: 400;
  line-height: 54px;
  letter-spacing: -1.92px;
  color: var(--white);
}

/* same treatment as .text-primary-coral-gradient in style.css, with the padding
   scaled for the 64px glyphs: the 54px line box is shorter than the type, so a
   clipped background would stop above the descenders */
.odl-title .odl-title-italic {
  display: block;
  padding-bottom: 16px;
  margin-bottom: -16px;
  background: var(--coral-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: rgba(0, 0, 0, 0);
}

.odl-lede {
  margin: 0 0 32px;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  color: var(--white);
  opacity: 0.9;
}

.odl-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  color: var(--white);
}

.odl-meta svg {
  flex-shrink: 0;
}

.odl-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 32px;
  padding-bottom: 4px;
}

.odl-sparkle {
  width: 92px;
  height: auto;
}

/* ---------------------------------------------------------- Buttons */

.odl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.odl-btn:hover {
  text-decoration: none;
}

.odl-btn-primary {
  background-color: var(--white);
  color: var(--black);
}

.odl-btn-primary:hover {
  background-color: #ff7369;
  color: var(--white);
}

.odl-btn-primary:hover svg path {
  fill: var(--white);
}

.odl-btn-outline {
  border-color: var(--white);
  color: var(--white);
  background-color: transparent;
}

.odl-btn-outline:hover {
  border-color: #ff7369;
  color: #ff7369;
}

/* ---------------------------------------------------------- Episode grid */

.odl-episodes {
  padding-bottom: 80px;
}

/* Only rendered for channels with more than 5 episodes (see custom-ondemand.hbs) */
.odl-search {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  height: 41px;
  margin-bottom: 32px;
  padding: 0 16px;
  border: 1px solid var(--white);
  border-radius: 5px;
  background-color: var(--black);
}

.odl-search-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

/* Scoped to .odl-search so it outweighs the theme's input[type="search"] rule in
   screen.css, which would otherwise give this a grey fill, border and 15px padding. */
.odl-search .odl-search-input {
  flex: 1 0 0;
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: none;
  outline: none;
  box-shadow: none;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 20px;
  color: var(--white);
}

.odl-search .odl-search-input::placeholder {
  color: var(--dark-grey);
  opacity: 1;
}

/* Safari draws its own magnifier and clear button inside type="search" */
.odl-search .odl-search-input::-webkit-search-decoration,
.odl-search .odl-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.odl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 16px;
}

.odl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: Poppins, sans-serif;
}

.odl-card:hover {
  text-decoration: none;
}

.odl-card-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  aspect-ratio: 16 / 9;
  background-color: #171e1d;
}

/* direct child only - the play icon nested in .odl-card-play keeps its own size */
.odl-card-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.odl-card:hover .odl-card-thumb > img {
  transform: scale(1.04);
}

.odl-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background-color: rgba(9, 16, 15, 0.35);
  transition: opacity 0.2s ease;
}

.odl-card-play img {
  width: 48px;
  height: 48px;
}

.odl-card:hover .odl-card-play,
.odl-card:focus-visible .odl-card-play {
  opacity: 1;
}

/* Figma's Light Grey. Not var(--lightgrey) - that token is #c5d2d9, a different
   (legacy) colour, and the #d4d4d4 one only exists in the Tailwind layer, which
   this page doesn't load. */
.odl-card-series {
  margin: 0;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  color: #d4d4d4;
}

.odl-card-title {
  margin: 0;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  color: var(--white);
}

.odl-card:hover .odl-card-title {
  color: #ff7369;
}

/* typography is from Figma; the chip's padding, radius and fill were not specced */
.odl-card-duration {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 3px;
  background-color: rgba(249, 248, 245, 0.15);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  text-transform: uppercase;
  color: var(--white);
}

.odl-grid-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}

.odl-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.odl-spinner {
  box-sizing: border-box;
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 5px solid var(--white);
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: odl-rotation 1s linear infinite;
}

@keyframes odl-rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.odl-empty {
  margin: 0;
  padding: 24px 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  color: var(--dark-grey);
}

/* ---------------------------------------------------------- FAQs */

.odl-faqs .odl-wrap {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.odl-faqs-heading {
  flex: 0 0 300px;
}

.odl-faqs-heading h2 {
  margin: 0;
  font-size: 56px;
  font-weight: 300;
  line-height: 58px;
  letter-spacing: -2.24px;
  color: var(--white);
  text-transform: uppercase;
}

.odl-faqs-decal {
  display: block;
  margin-top: 40px;
  width: 160px;
}

.odl-faqs-list {
  flex: 1 1 auto;
  min-width: 0;
}

.odl-faq {
  border-bottom: 1px solid rgba(249, 248, 245, 0.2);
}

.odl-faq summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 0;
  list-style: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 300;
  line-height: 28px;
  letter-spacing: -0.4px;
  color: var(--white);
}

.odl-faq summary::-webkit-details-marker {
  display: none;
}

/* chevron drawn in CSS so it inherits the open/hover colour */
.odl-faq summary:before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.odl-faq[open] summary:before {
  transform: rotate(45deg);
}

.odl-faq[open] summary {
  color: #ff7369;
  padding-bottom: 8px;
}

.odl-faq-answer {
  padding: 0 0 24px 28px;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  color: var(--dark-grey);
}

.odl-faq-answer p {
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.odl-faq-answer p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------- Gradient CTA */

.odl-cta {
  background: linear-gradient(90deg, #4f6bff 0%, #a259ff 32%, #ff7369 66%, #ff9d3d 100%);
  padding: 80px 0;
}

.odl-cta h2 {
  margin: 0 0 32px;
  font-size: 56px;
  font-weight: 300;
  line-height: 58px;
  letter-spacing: -2.24px;
  color: var(--white);
}

.odl-cta h2 span {
  display: block;
  font-family: IvyJournal, serif;
  font-style: italic;
  font-weight: 400;
}

.odl-cta-divider {
  height: 1px;
  background-color: rgba(249, 248, 245, 0.4);
  margin-bottom: 32px;
}

.odl-socials {
  display: flex;
  gap: 12px;
}

.odl-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background-color: var(--white);
}

.odl-socials svg {
  width: 16px;
  height: 16px;
  fill: var(--black);
}

/* ---------------------------------------------------------- Video modal */

.odl-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(9, 16, 15, 0.85);
}

.odl-modal.is-open {
  display: flex;
}

.odl-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
}

.odl-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.odl-modal-close:before {
  content: url(/assets/img/Union.svg);
  filter: invert(98%) sepia(42%) saturate(345%) hue-rotate(294deg) brightness(105%) contrast(95%);
}

.odl-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
}

.odl-modal-caption {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--white);
}

/* ---------------------------------------------------------- Paywall

   A members-only or paid channel shows no landing page to a logged-out
   visitor - the CTA (reused from style.css) is the whole page instead. */

.odl-gated {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
}

.odl-paywall {
  display: flex;
  justify-content: center;
}

.odl-paywall .post-upgrade-cta {
  margin-bottom: 0;
  width: 100%;
  max-width: 587px;
}

.odl-paywall .post-upgrade-cta:before {
  display: none;
}

body.odl-modal-open {
  overflow: hidden;
}

/* ---------------------------------------------------------- Responsive */

@media (max-width: 1200px) {
  .odl-hero-inner {
    padding-top: 160px;
  }
  .odl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .odl-faqs .odl-wrap {
    gap: 40px;
  }
  .odl-faqs-heading {
    flex-basis: 220px;
  }
}

@media (max-width: 900px) {
  .odl-section,
  .odl-cta {
    padding: 56px 0;
  }
  .odl-hero {
    min-height: 520px;
  }
  .odl-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-top: 140px;
    padding-bottom: 40px;
  }
  .odl-hero-aside {
    align-items: flex-start;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
  }
  .odl-sparkle {
    width: 64px;
  }
  .odl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .odl-faqs .odl-wrap {
    flex-direction: column;
  }
  .odl-faqs-heading {
    flex-basis: auto;
  }
  .odl-faqs-decal {
    display: none;
  }
}

@media (max-width: 600px) {
  .odl {
    --odl-gutter: 24px;
  }
  /* not specced - desktop's 64/54/-1.92 ratios (0.844 leading, -0.03em) held
     at the theme's usual mobile heading step */
  .odl-title {
    font-size: 42px;
    line-height: 36px;
    letter-spacing: -1.26px;
  }
  .odl-faqs-heading h2,
  .odl-cta h2 {
    font-size: 42px;
    line-height: 44px;
    letter-spacing: -1.68px;
  }
  .odl-grid {
    grid-template-columns: 1fr;
  }
  .odl-grid-footer {
    justify-content: stretch;
  }
  .odl-grid-footer .odl-btn {
    width: 100%;
  }
  .odl-modal {
    padding: 16px;
  }
  .odl-modal-close {
    top: -32px;
  }
}
