/* ================ Animations ================ */
@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ===================== Reusable ===================== */
.section-heading {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;

  @media screen and (min-width: 1024px) {
    gap: 30px;
  }
}
.section-title {
  color: var(--color-text);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -1px;

  @media screen and (min-width: 768px) {
    font-size: 60px;
  }

  @media screen and (min-width: 1024px) {
    font-size: 64px;
  }
  & span {
    color: var(--color-accent);
  }

  &:is(h1) {
    @media screen and (min-width: 768px) {
      font-size: 58px;
    }

    @media screen and (min-width: 1024px) {
      font-size: 80px;
    }
  }
}
.section-text {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;

  @media screen and (min-width: 768px) {
    font-size: 18px;
  }
}

/* ===================== Header ===================== */
.header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  width: 100%;
  transition:
    background-color 0.25s ease,
    backdrop-filter 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.header__inner {
  max-width: var(--page-max);
  min-height: var(--header-height);
  gap: 24px 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 32px 20px;
  margin-inline: auto;

  @media screen and (min-width: 768px) {
    flex-wrap: nowrap;
    align-items: center;
    padding-inline: 64px;
  }
}
.header--fixed {
  position: fixed;
  background: rgba(6, 27, 32, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.header__logo {
  width: 160px;
  height: auto;
  object-fit: contain;

  @media screen and (min-width: 768px) {
    width: 200px;
  }
}
.header__logo-extension {
  color: var(--color-text);
  font-size: 24px;
  line-height: 0.9;
  text-transform: lowercase;
  letter-spacing: 0;
  transform: translateY(-2px);

  @media screen and (min-width: 540px) {
    font-size: 32px;
    transform: translateY(-3px);
  }

  @media screen and (min-width: 1024px) {
    font-size: 40px;
    transform: translateY(-5px);
  }
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 6px;

  @media screen and (min-width: 768px) {
    gap: 10px;
  }
}
.header__nav-link {
  color: rgba(230, 236, 238, 0.94);
  border-radius: 80px;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  padding: 6px 24px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;

  @media screen and (min-width: 1024px) {
    font-size: 20px;
    padding: 8px 32px;
  }
}
.header__nav-link:hover,
.header__nav-link:focus-visible {
  background: rgba(230, 236, 238, 0.18);
  color: var(--color-text);
}
.header__nav-link--active {
  background: rgba(230, 236, 238, 0.3);
  box-shadow: 0px 4px 4px 0px #00000017;
}
.header__nav-dropdown {
  position: relative;
  max-width: 420px;
  margin-inline: auto;
}
.header__nav-dropdown-trigger {
  width: 100%;
  background: rgba(230, 236, 238, 0.2);
  box-shadow: 0px 4px 4px 0px #00000017;
  border-radius: 80px;
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  list-style: none;
  padding: 5px 20px;
  cursor: pointer;
  user-select: none;
}
.header__nav-dropdown-trigger::-webkit-details-marker {
  display: none;
}
.header__nav-dropdown-trigger::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  transform: translateY(-64%) rotate(45deg);
  transition: transform 0.2s ease;
}
.header__nav-dropdown[open] .header__nav-dropdown-trigger::after {
  transform: translateY(-36%) rotate(225deg);
}
.header__nav-dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  border-radius: 14px;
  background: rgba(6, 27, 32, 0.82);
  backdrop-filter: blur(8px);
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 8px;
}
.header__nav-dropdown-link {
  color: var(--color-text);
  border-radius: 10px;
  font-size: 20px;
  line-height: 1.1;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}
.header__nav-dropdown-link:hover,
.header__nav-dropdown-link:focus-visible {
  background: rgba(230, 236, 238, 0.18);
}
.header__nav-dropdown-link--active {
  background: rgba(230, 236, 238, 0.24);
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  background: var(--color-bg);
  min-height: min(100vh, 600px);
  overflow: hidden;
  width: 100%;

  @media screen and (min-width: 768px) {
    min-height: min(100vh, 640px);
  }

  @media screen and (min-width: 1024px) {
    min-height: min(100vh, 700px);
  }
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("./public/hero-bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  @media screen and (min-width: 1024px) {
    background-position: center -160px;
  }
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 27, 32, 0.5), rgba(6, 27, 32, 0.6));
}
.hero__inner {
  position: relative;
  z-index: 1;
  min-height: inherit;
  padding: calc(var(--header-height) + 52px) 20px 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  @media screen and (min-width: 768px) {
    padding-inline: 64px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }

  @media screen and (min-width: 1024px) {
    padding-top: calc(var(--header-height) + 78px);
    padding-bottom: 100px;
  }
}
.hero__content {
  max-width: 780px;
  width: 100%;
}
.hero__partnership {
  color: var(--color-text);
  gap: 10px;
  font-size: 15px;
  margin-top: 26px;
}
.hero__partner-logo {
  width: 102px;
  height: auto;
  object-fit: contain;
}
.marquee {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--color-accent);
}
.marquee__viewport {
  overflow: hidden;
  padding-block: 20px;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
  will-change: transform;

  @media screen and (prefers-reduced-motion: reduce) {
    animation: none;
  }
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 14px;
}
.marquee__item {
  color: var(--color-text);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;

  @media screen and (min-width: 768px) {
    font-size: 24px;
  }
}
.marquee__separator {
  width: 15px;
  height: auto;
  flex-shrink: 0;
}
/* ===================== Stats ===================== */
.stats {
  background: var(--color-bg);
}
.stats__inner {
  display: flex;
  flex-direction: column;
  gap: 30px;

  @media screen and (min-width: 1024px) {
    gap: 50px;
  }
}
.stats__cards {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 30px;

  @media screen and (min-width: 540px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media screen and (min-width: 1024px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 40px;
  }
}
.stats__card {
  background: var(--color-accent-full-transparent);
  border-radius: 10px;
  gap: 20px;
  text-align: start;
  padding: 28px 16px 24px;

  @media screen and (min-width: 1024px) {
    flex-direction: column;
    padding: 38px 16px 32px;
  }
}
.stats__value {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;

  @media screen and (min-width: 540px) and (max-width: 768px) {
    font-size: 56px;
  }
  @media screen and (min-width: 1024px) {
    font-size: 70px;
    text-align: center;
  }
}
.stats__label {
  margin-top: 10px;
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.1;

  @media screen and (min-width: 768px) {
    font-size: 20px;
  }

  @media screen and (min-width: 1024px) {
    font-size: 24px;
    text-align: center;
  }
}
.stats__study {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.2;

  @media screen and (min-width: 768px) {
    font-size: 20px;
  }
}
.stats__pill {
  border: 1px solid var(--color-accent);
  border-radius: 10px;
  background: var(--color-accent-transparent);
  color: var(--color-accent);
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
  padding: 20px;

  @media screen and (min-width: 768px) {
    border-radius: 80px;
    padding: 16px 20px;
  }
  @media screen and (min-width: 1024px) {
    font-size: 24px;
  }
}

/* ===================== Reviews ===================== */
.reviews {
  width: 100%;
  background: var(--color-bg);
  margin: 0;
}
.reviews__inner {
  gap: 20px;

  @media screen and (max-width: 1023px) {
    max-width: 640px;
    margin-inline: auto;
  }
  @media screen and (min-width: 1024px) {
    gap: 50px;
  }
}
.reviews__heading {
  gap: 14px;
}
.reviews__title {
  max-width: 16ch;
}
.reviews__content {
  gap: 20px;
  margin-top: 20px;

  @media screen and (min-width: 1024px) {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    margin-top: 30px;
  }
}
.reviews__panel {
  display: none;
  width: 100%;
}
.reviews__panel--active {
  display: block;
}
.reviews__panel-main {
  gap: 30px;

  @media screen and (min-width: 1024px) {
    flex-direction: row;
    align-items: stretch;
    gap: 40px;
  }
}
.reviews__media {
  min-height: 320px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;

  @media screen and (max-width: 1023px) {
    max-width: 540px;
    margin-inline: auto;
  }
  @media screen and (min-width: 768px) {
    min-height: 420px;
  }
  @media screen and (min-width: 1024px) {
    min-height: 520px;
    width: 48%;
  }
}
.reviews__panel-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  color: var(--color-text);

  @media screen and (min-width: 1024px) {
    max-width: 50%;
    justify-content: center;
  }
}
.reviews__quote-mark {
  width: 42px;
  height: auto;
  object-fit: contain;
}
.reviews__panel-text {
  font-size: 18px;
  line-height: 1.5;

  span {
    color: var(--color-accent);
  }

  @media screen and (min-width: 768px) {
    font-size: 20px;
  }
  @media screen and (min-width: 1280px) {
    font-size: 24px;
  }
}
.reviews__author {
  padding-top: 30px;
  border-top: 1px solid white;
  font-size: 16px;
  line-height: 1.2;
}
.reviews__nav {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-start;
  order: 2;

  @media screen and (min-width: 1024px) {
    order: 0;
    width: 64px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
.reviews__nav-btn {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 8px 4px;
  transition: all 0.2s ease;
}
.reviews__nav-btn::before {
  content: "";
  width: 0;
  height: 2px;
  background: var(--color-accent);
  margin-right: 0;
  transition: all 0.2s ease;
}
.reviews__nav-btn--active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.reviews__nav-btn--active::before {
  width: 0;
  margin-right: 0;
}
@media screen and (min-width: 1024px) {
  .reviews__nav-btn {
    border-bottom: 0;
  }
  .reviews__nav-btn--active {
    border-bottom: 0;
  }
  .reviews__nav-btn--active::before {
    width: 12px;
    margin-right: 8px;
  }
}

/* ===================== Runna Dl ===================== */
.runna-dl {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(4, 24, 30, 0.32), rgba(4, 24, 30, 0.72)), url("./public/download-runna-bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.runna-dl__inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-block: 48px;
}
.runna-dl__header {
  align-items: flex-end;
  gap: 8px;
}
.runna-dl__pulsetto-logo {
  width: 130px;
  height: auto;
  object-fit: contain;

  @media screen and (min-width: 768px) {
    width: 160px;
  }
}
.runna-dl__separator {
  color: var(--color-text);
  font-weight: 700;
  font-size: 26px;
  line-height: 0.8;

  @media screen and (min-width: 768px) {
    font-size: 30px;
  }
}
.runna-dl__runna-logo {
  width: 84px;
  height: auto;
  object-fit: contain;

  @media screen and (min-width: 768px) {
    width: 98px;
  }
}
.runna-dl__text {
  max-width: 800px;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}
.runna-dl__button {
  width: 100%;
  min-width: 260px;
  border: 1px solid var(--color-text);
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  padding: 12px 32px 14px;

  @media screen and (min-width: 768px) {
    width: fit-content;
  }
}
.runna-dl__button-arrow {
  display: inline-block;
  font-size: 20px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}
.runna-dl__button:hover .runna-dl__button-arrow,
.runna-dl__button:focus-visible .runna-dl__button-arrow {
  transform: translateX(4px);
}

/* ===================== Routine ===================== */
.routine {
  width: 100%;
  background: var(--color-bg-light);
  overflow: hidden;
}
.routine__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;

  @media screen and (min-width: 1024px) {
    flex-direction: row;
    align-items: stretch;
    gap: 30px;
  }
}
.routine__content {
  gap: 50px;
}
.routine__top {
  display: flex;
  flex-direction: column;
  gap: 50px;
  position: relative;
}
.routine__image {
  height: calc(100% - 200px + 40px);
  object-fit: contain;
  position: absolute;
  top: 200px;
  bottom: calc(0 - 40px);
  left: 0;
  transform: translateX(-70%);

  @media screen and (min-width: 540px) {
    transform: translateX(calc(-70% + 10vw));
  }
  @media screen and (min-width: 768px) {
    height: 80%;
    top: calc(20% + 40px);
    bottom: 0;
    left: unset;
    right: 0;
    transform: translateX(50%);
  }
  @media screen and (min-width: 1024px) {
    height: calc(100% + 160px);
    top: 0;
    transform: translateX(5vw);
  }
  @media screen and (min-width: 1280px) {
    transform: translateX(0);
  }
}
.routine__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.routine__title {
  max-width: 12ch;
}
.routine__intro {
  font-size: 18px;

  @media screen and (min-width: 1024px) {
    font-size: 24px;
  }
}
.routine__specs {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 10px;
  background: #04312b;
  padding: 30px 10px;
  padding-left: 88px;

  @media screen and (min-width: 540px) {
    padding-left: calc(100px + 10vw);
  }
  @media screen and (min-width: 768px) {
    padding: 20px;
  }
}
.routine__spec-row {
  width: fit-content;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;

  @media screen and (min-width: 768px) {
    flex-direction: row;
  }
}
.routine__spec-chip {
  flex-shrink: 0;
  min-width: 150px;
  width: fit-content;
  border-radius: 80px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0px 4px 4px 0px #00000017;
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  text-align: center;
  padding: 6px 24px;
}
.routine__spec-text {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.2;

  @media screen and (min-width: 1024px) {
    font-size: 20px;
  }
}
.routine__sub-title {
  color: var(--color-text);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;

  @media screen and (min-width: 1024px) {
    font-size: 45px;
  }
}
.routine__combine-grid {
  grid-template-columns: 1fr;
  gap: 30px 20px;

  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.routine__combine-col {
  color: var(--color-text);
  gap: 30px;
  @media screen and (min-width: 768px) {
    gap: 20px;
  }
}
.routine__combine-head {
  border: 1px solid var(--color-accent);
  border-radius: 80px;
  background: var(--color-accent-transparent);
  color: var(--color-accent);
  font-size: 24px;
  line-height: 1.1;
  text-align: center;
  padding: 18px;
}
.routine__combine-list li {
  font-size: 20px;
  line-height: 1.4;
}
.routine__note {
  background: var(--color-accent-full-transparent);
  border-radius: 10px;
  gap: 10px;
  padding: 20px;

  @media screen and (min-width: 768px) {
    margin-top: 20px;
  }
}
.routine__note-title {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
}
.routine__note-text {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.2;
}

/* ===================== Footer ===================== */
footer {
  background: var(--color-bg);
  padding: 48px;
}
