/* Курс «Куди йде твоя енергія» — mobile-first */

:root {
  --color-bg-deep: #1a1228;
  --color-bg-mid: #2d1f3d;
  --color-accent-purple: #5c4a6e;
  --color-peach: #e8b4a0;
  --color-peach-soft: #f5d4c4;
  --color-gold: #c9a961;
  --color-gold-bright: #e8d5a8;
  --color-text: #f7f3ef;
  --color-text-muted: rgba(247, 243, 239, 0.75);
  --color-line: rgba(201, 169, 97, 0.35);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Mulish", system-ui, sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.35);
  --max-w: 42rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* Градієнт + легка «зернистість» */
.page-bg {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(232, 180, 160, 0.22), transparent 55%),
    radial-gradient(90% 60% at 100% 40%, rgba(92, 74, 110, 0.45), transparent 50%),
    linear-gradient(165deg, #241834 0%, #1a1228 38%, #2a1c32 72%, #3d2430 100%);
  position: relative;
}

.page-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.page-inner {
  position: relative;
  z-index: 1;
  padding-bottom: calc(5rem + var(--safe-bottom));
}

/* Типографіка */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.85rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.55rem, 5.2vw, 2.1rem);
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  font-family: var(--font-body);
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

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

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.35rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  color: #1a1228;
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-peach-soft));
  box-shadow: 0 4px 24px rgba(201, 169, 97, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 213, 168, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--color-gold-bright);
  border: 1px solid var(--color-line);
}

/* Ціни */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}

.price-old {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(201, 169, 97, 0.6);
}

.price-new {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-gold-bright);
}

.trust-line {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
}

.ps-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

/* Секції */
.section {
  padding: 2.5rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section--tight {
  padding-top: 1.5rem;
}

.gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0.45;
  margin: 0 1.25rem;
  max-width: var(--max-w);
  margin-inline: auto;
}

.card {
  background: linear-gradient(145deg, rgba(45, 31, 61, 0.65), rgba(26, 18, 40, 0.82));
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.15rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-soft);
}

.card:last-child {
  margin-bottom: 0;
}

.card--glow {
  box-shadow:
    var(--shadow-soft),
    0 0 40px rgba(232, 180, 160, 0.08);
}

/* Hero: мобилка — как на макете: верх плотнее фон, фото с крылом снизу справа, список на тёмной зоне */
:root {
  --hero-mobile-min-height: min(84vh, 640px);
  --hero-m-obj-x: 72%;
  --hero-m-obj-y: 88%;
  --hero-m-tx: 0%;
  --hero-m-scale: 1;
  --hero-content-pad-top: 4.5rem;
  --hero-d-obj-x: 50%;
  --hero-d-obj-y: 15%;
  --hero-grad-strength: 100;
  --hero-grad-end: 85;
  --hero-grad-depth: 100;
}

/* Hero: mobile — кадр для узких экранов */
.hero {
  position: relative;
  isolation: isolate;
  min-height: var(--hero-mobile-min-height);
  padding: 0 0 2rem;
  overflow: hidden;
}

.hero__visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: var(--hero-mobile-min-height);
  margin: 0;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-m-obj-x) var(--hero-m-obj-y);
  transform: translateX(var(--hero-m-tx)) scale(var(--hero-m-scale));
  transform-origin: var(--hero-m-obj-x) var(--hero-m-obj-y);
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(26, 18, 40, calc(0.94 * var(--hero-grad-strength) / 100)) 0%,
      rgba(26, 18, 40, calc(0.82 * var(--hero-grad-strength) / 100))
        calc(var(--hero-grad-end) * (0.18 + 0.10 * var(--hero-grad-depth) / 100) * 1%),
      rgba(26, 18, 40, calc(0.45 * var(--hero-grad-strength) / 100))
        calc(var(--hero-grad-end) * (0.38 + 0.16 * var(--hero-grad-depth) / 100) * 1%),
      rgba(26, 18, 40, calc(0.15 * var(--hero-grad-strength) / 100))
        calc(var(--hero-grad-end) * (0.55 + 0.19 * var(--hero-grad-depth) / 100) * 1%),
      transparent calc(var(--hero-grad-end) * 1%)
    ),
    linear-gradient(
      180deg,
      rgba(26, 18, 40, 0.92) 0%,
      rgba(26, 18, 40, 0.38) 26%,
      transparent 42%,
      transparent 58%,
      rgba(26, 18, 40, 0.72) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding: var(--hero-content-pad-top) 1.25rem 1.25rem;
  max-width: min(26.5rem, 92vw);
  text-shadow: 0 1px 22px rgba(14, 10, 22, 0.55);
}

/* Мобилка: плотнее колонка текста и воздух как в референсе */
@media (max-width: 719.98px) {
  .hero__content {
    max-width: min(22rem, 90vw);
    padding-left: 1.35rem;
    padding-right: 1.35rem;
    padding-bottom: 1.5rem;
  }

  .hero .eyebrow {
    margin-bottom: 0.9rem;
  }

  .hero h1 {
    margin-bottom: 1.05rem;
    font-size: clamp(1.8rem, 6.2vw, 2.55rem);
  }

  .hero .bullet-list {
    margin: 1.2rem 0 1.4rem;
  }

  .hero .price-row {
    margin-top: 0.15rem;
  }
}

@media (min-width: 720px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: end;
    min-height: min(88vh, 820px);
    padding-bottom: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    isolation: auto;
  }

  .hero__visual {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: auto;
    min-height: min(88vh, 820px);
    max-height: none;
  }

  .hero__overlay {
    background:
      linear-gradient(
        90deg,
        rgba(26, 18, 40, calc(0.92 * var(--hero-grad-strength) / 100)) 0%,
        rgba(26, 18, 40, calc(0.55 * var(--hero-grad-strength) / 100))
          calc(var(--hero-grad-end) * 0.54 * 1%),
        transparent calc(var(--hero-grad-end) * 1%)
      ),
      linear-gradient(180deg, transparent 50%, rgba(26, 18, 40, 0.5) 100%);
  }

  .hero__content {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
    padding: 2.5rem 2rem 3rem 2.5rem;
    max-width: 28rem;
    align-self: center;
    text-shadow: none;
  }

  .hero__visual img {
    min-height: min(88vh, 820px);
    height: 100%;
    object-position: var(--hero-d-obj-x) var(--hero-d-obj-y);
    transform: none;
    transform-origin: center center;
  }
}

.bullet-list {
  list-style: none;
  margin: 1rem 0 1.25rem;
  padding: 0;
}

.bullet-list li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 10px var(--color-peach-soft);
}

.meta-line {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

/* Подарунки — сітка */
.gift-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gift-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.1rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(36, 24, 52, 0.6);
  border: 1px solid var(--color-line);
}

.gift-card__emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.gift-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.gift-card p {
  font-size: 0.9rem;
  margin: 0;
}

.gift-sep {
  height: 0;
  margin: 0.15rem 0;
  border: none;
  border-top: 1px solid var(--color-line);
  opacity: 0.85;
}

/* Таймер */
.timer-panel {
  text-align: center;
  padding: 1.5rem 1rem;
}

.timer-panel .countdown {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-gold-bright);
  margin: 0.75rem 0;
  text-shadow: 0 0 28px rgba(232, 213, 168, 0.25);
}

.countdown.is-expired {
  opacity: 0.55;
}

.timer-caption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Болі */
.pain-item {
  margin-bottom: 1.1rem;
}

.pain-item:last-of-type {
  margin-bottom: 1.25rem;
}

.pain-item p:empty {
  display: none;
}

.pain-reframe {
  margin: 1.35rem 0 1rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 169, 97, 0.35);
  background: rgba(36, 24, 52, 0.45);
}

.pain-reframe__lead {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.pain-reframe p {
  margin: 0;
  font-size: 0.92rem;
}

.pain-item h3 {
  color: #f0c0b8;
  margin-bottom: 0.35rem;
}

.pain-close {
  font-weight: 700;
  color: var(--color-text);
  margin-top: 1rem;
}

/* Автор */
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.author-bio {
  font-size: 0.95rem;
  line-height: 1.55;
}

.author-bio p {
  margin: 0 0 0.75rem;
}

.author-bio p:last-child {
  margin-bottom: 0;
}

.stat-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.stat-list li:last-child {
  border-bottom: none;
}

/* Відгуки */
.quote {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--color-peach-soft);
  margin-top: 0.65rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-gold);
}

/* Таймлайн днів */
.day-step {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.day-step:last-child {
  margin-bottom: 0;
}

.day-step__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-gold-bright);
  background: rgba(201, 169, 97, 0.1);
}

.day-step__body h3 {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.day-step__body p {
  font-size: 0.9rem;
  margin: 0;
}

/* Кроки */
.steps .card p {
  padding-left: 0.15rem;
  font-size: 0.95rem;
}

/* Результати */
.result-item {
  margin-bottom: 1rem;
}

.result-item h3 {
  font-size: 1rem;
  color: var(--color-gold-bright);
  margin-bottom: 0.25rem;
}

.result-item p {
  font-size: 0.92rem;
}

.result-item p:empty {
  display: none;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--color-line);
  padding: 0.85rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
  color: var(--color-text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--color-gold);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

/* Футер */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.25rem calc(6rem + var(--safe-bottom));
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.site-footer a {
  color: var(--color-gold-bright);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0.65rem 1rem calc(0.65rem + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(26, 18, 40, 0.92) 25%);
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}

.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Пока открыта модалка: убрать нижний бар с hit-test полностью (iOS). */
body.modal-open .sticky-cta {
  display: none !important;
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.sticky-cta .btn {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
}

.sticky-cta__price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-gold-bright);
  white-space: nowrap;
}

/* Модальне вікно */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(10, 6, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2147483646;
  width: min(calc(100% - 1.5rem), 26rem);
  max-height: min(92vh, 640px);
  max-height: min(90dvh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  transform: translate3d(-50%, -50%, 0) scale(0.96);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    visibility 0.25s ease;
  background: linear-gradient(160deg, #2d2240, #1a1228);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem calc(1.35rem + var(--safe-bottom));
  box-shadow: var(--shadow-soft), 0 0 60px rgba(232, 180, 160, 0.12);
}

.modal.is-open {
  transform: translate3d(-50%, -50%, 0) scale(1);
  opacity: 1;
  visibility: visible;
}

.modal .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 2.75rem;
}

.modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal h2 {
  font-size: 1.35rem;
  padding-right: 2rem;
  margin-bottom: 0.5rem;
}

.modal .meta-line {
  margin-bottom: 1rem;
}

.form-field {
  margin-bottom: 0.85rem;
  text-align: left;
}

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 0.35rem;
}

.form-field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-field input::placeholder {
  color: rgba(247, 243, 239, 0.35);
}

.form-field input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
}

.form-legal {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 0.85rem;
  line-height: 1.4;
}

.form-legal a {
  color: var(--color-gold-bright);
}

.form-error {
  font-size: 0.85rem;
  color: #f3a8a8;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.form-error[hidden] {
  display: none !important;
}

.thanks-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
}

.payment-canceled-banner {
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.35);
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Юридичні сторінки */
.legal-shell {
  padding: 1.25rem 1.25rem 3rem;
  max-width: 40rem;
  margin: 0 auto;
}

.legal-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-gold-bright);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.legal-back:hover {
  text-decoration: underline;
}

.legal-doc {
  background: linear-gradient(145deg, rgba(45, 31, 61, 0.5), rgba(26, 18, 40, 0.82));
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem 2rem;
  box-shadow: var(--shadow-soft);
}

.legal-doc h1 {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  margin-bottom: 0.35rem;
}

.legal-doc .legal-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.legal-doc h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--color-gold-bright);
}

.legal-doc h2:first-of-type {
  margin-top: 1.25rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.legal-doc ul,
.legal-doc ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc li {
  margin-bottom: 0.35rem;
}

.legal-placeholder {
  background: rgba(201, 169, 97, 0.12);
  border-left: 3px solid var(--color-gold);
  padding: 0.65rem 0.85rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.88rem;
  color: var(--color-peach-soft);
}
