/* ============================================================
   КОМПОНЕНТЫ FORTUNA LUNA
   ============================================================ */

/* ---- КОНТЕЙНЕР ---- */
.fl-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.fl-container--narrow {
  max-width: 720px;
}

.fl-container--hero {
  max-width: 800px;
  text-align: center;
}

/* ---- СЕКЦИИ ---- */
.fl-section {
  padding: var(--fl-space-section) 0;
}

.fl-section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--fl-gold-border) 20%,
    var(--fl-gold-border) 80%,
    transparent 100%
  );
  margin: 0;
  border: none;
}

/* ---- НАВИГАЦИЯ ---- */
.fl-nav {
  position: sticky;
  top: 0;
  z-index: var(--fl-z-nav);
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--fl-gold-border);
  padding: 18px 0;
  transition: background var(--fl-duration-base) var(--fl-ease);
}

.fl-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.fl-nav__links {
  display: flex;
  gap: var(--fl-space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.fl-nav__link {
  font-size: var(--fl-text-sm);
  font-weight: 400;
  letter-spacing: var(--fl-ls-wide);
  color: var(--fl-text-secondary);
  transition: color var(--fl-duration-fast) var(--fl-ease);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.fl-nav__link:hover,
.fl-nav__link[aria-current="page"] {
  color: var(--fl-text-primary);
  border-bottom-color: var(--fl-gold);
}

/* ---- КНОПКИ ---- */

/* Основная — золотая обводка */
.fl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  gap: var(--fl-space-2);
  padding: 14px 36px;
  font-family: var(--fl-font-sans);
  font-size: var(--fl-text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  border-radius: var(--fl-radius-full);
  border: 1px solid var(--fl-gold);
  background: transparent;
  color: var(--fl-gold);
  cursor: pointer;
  transition:
    background var(--fl-duration-base) var(--fl-ease),
    color var(--fl-duration-base) var(--fl-ease),
    box-shadow var(--fl-duration-base) var(--fl-ease);
}

.fl-btn:hover {
  background: var(--fl-gold);
  color: var(--fl-text-inverse);
  box-shadow: none;
}

/* Вторичная — призрак */
.fl-btn--ghost {
  border-color: var(--fl-gold-border);
  color: var(--fl-text-secondary);
}

.fl-btn--ghost:hover {
  border-color: var(--fl-gold);
  color: var(--fl-gold);
  background: transparent;
  box-shadow: none;
}

/* Полная заливка */
.fl-btn--solid {
  background: var(--fl-gold);
  color: var(--fl-text-inverse);
  border-color: var(--fl-gold);
}

.fl-btn--solid:hover {
  background: var(--fl-gold-bright);
  border-color: var(--fl-gold-bright);
  color: var(--fl-text-inverse);
}

/* Мобиль */
/* mobile fl-btn width → Fortuna ≤840 block below */

/* ---- КАРТОЧКИ ТАРИФОВ ---- */
.fl-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--fl-space-3);
  margin-top: var(--fl-space-4);
}

.fl-plan-card {
  background: transparent;
  border: 1px solid var(--fl-gold-border);
  border-radius: var(--radius-sm, 8px);
  padding: 20px 18px;
  position: relative;
  transition: border-color var(--fl-duration-base) var(--fl-ease);
  box-shadow: none;
  backdrop-filter: none;
}

.fl-plan-card:hover {
  border-color: var(--fl-gold-border-hover);
  box-shadow: none;
  transform: none;
}

/* VIP-карточка — featured */
.fl-plan-card--featured {
  border-color: rgba(201, 169, 110, 0.35);
  background: rgba(201, 169, 110, 0.06);
  box-shadow: none;
  padding-top: 28px;
}

.fl-plan-card--featured::before {
  content: 'Популярный выбор';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  color: var(--fl-gold-bright, var(--fl-gold));
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-top: 0;
  font-family: var(--fl-font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 0 0 var(--radius-sm, 8px) var(--radius-sm, 8px);
}

.fl-plan-card__label {
  font-family: var(--fl-font-sans);
  font-size: var(--fl-text-xs);
  font-weight: 500;
  letter-spacing: var(--fl-ls-caps);
  text-transform: uppercase;
  color: var(--fl-gold);
  margin: 0 0 var(--fl-space-1);
}

.fl-plan-card__title {
  font-family: var(--fl-font-serif);
  font-size: var(--fl-text-xl);
  font-weight: 300;
  color: var(--fl-text-primary);
  margin: 0 0 var(--fl-space-2);
  line-height: var(--fl-lh-snug);
}

.fl-plan-card__price {
  font-family: var(--fl-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 200;
  color: var(--fl-text-primary);
  letter-spacing: var(--fl-ls-tight);
  line-height: 1;
  margin: 0 0 var(--fl-space-1);
}

.fl-plan-card__period {
  font-size: var(--fl-text-sm);
  color: var(--fl-text-muted);
  margin: 0 0 var(--fl-space-3);
  line-height: 1.35;
}

.fl-plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--fl-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--fl-space-1);
}

.fl-plan-card__features li {
  font-size: var(--fl-text-sm);
  color: var(--fl-text-secondary);
  padding-left: var(--fl-space-4);
  position: relative;
  line-height: 1.35;
}

.fl-plan-card__features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--fl-gold);
  opacity: 0.6;
}

.fl-plan-card .fl-element-icon,
.fl-plan-card img.fl-element-icon {
  width: 28px;
  height: 28px;
  margin-bottom: var(--fl-space-2);
  padding: 0;
}

/* ---- FAQ АККОРДЕОН ---- */
.fl-faq {
  border-top: 1px solid var(--fl-gold-border);
}

.fl-faq__item {
  border-bottom: 1px solid var(--fl-gold-border);
}

.fl-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: var(--fl-space-6) 0;
  cursor: pointer;
  text-align: left;
  color: var(--fl-text-primary);
  font-family: var(--fl-font-sans);
  font-size: var(--fl-text-base);
  font-weight: 400;
  transition: color var(--fl-duration-fast);
}

.fl-faq__trigger:hover {
  color: var(--fl-gold);
}

.fl-faq__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--fl-gold-border);
  border-radius: var(--fl-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fl-gold);
  font-size: 14px;
  transition:
    transform var(--fl-duration-base) var(--fl-ease),
    background var(--fl-duration-base) var(--fl-ease);
}

.fl-faq__item[data-open="true"] .fl-faq__icon {
  transform: rotate(45deg);
  background: var(--fl-gold-dim);
}

.fl-faq__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--fl-duration-slow) var(--fl-ease);
}

.fl-faq__item[data-open="true"] .fl-faq__body {
  max-height: 400px;
}

.fl-faq__content {
  padding: 0 0 var(--fl-space-6);
  color: var(--fl-text-secondary);
  line-height: var(--fl-lh-relaxed);
  font-size: var(--fl-text-sm);
}

/* ---- HERO СЕКЦИЯ ---- */
.fl-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  padding: var(--fl-space-6) 0;
}

.fl-hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    rgba(201, 169, 110, 0.04) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Декоративный паттерн (астрологическая сетка) */
.fl-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(201, 169, 110, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}

.fl-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--fl-space-6);
}

.fl-hero__eyebrow {
  font-family: var(--fl-font-sans);
  font-size: var(--fl-text-xs);
  font-weight: 500;
  letter-spacing: var(--fl-ls-caps);
  text-transform: uppercase;
  color: var(--fl-gold);
  margin-bottom: var(--fl-space-6);
  display: block;
}

.fl-hero__title {
  font-family: var(--fl-font-serif);
  font-size: var(--fl-text-hero);
  font-weight: 300;
  line-height: var(--fl-lh-tight);
  letter-spacing: -0.025em;
  color: var(--fl-text-primary);
  margin: 0 0 var(--fl-space-6);
}

.fl-hero__title em {
  font-style: italic;
  color: var(--fl-gold);
}

.fl-hero__subtitle {
  font-size: var(--fl-text-lg);
  color: var(--fl-text-secondary);
  line-height: var(--fl-lh-relaxed);
  max-width: 56ch;
  margin: 0 auto var(--fl-space-12);
}

.fl-hero__cta-group {
  display: flex;
  gap: var(--fl-space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- SVG ИКОНКИ ЭЛЕМЕНТОВ ---- */
.fl-element-icon {
  width: 40px;
  height: 40px;
  color: var(--fl-gold);
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.85;
  transition: opacity var(--fl-duration-base), transform var(--fl-duration-base) var(--fl-ease);
}

.fl-element-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* <img> fallbacks (plan cards) — tint to lunar gold */
img.fl-element-icon {
  opacity: 0.9;
  filter: brightness(0) saturate(100%) invert(72%) sepia(28%) saturate(650%) hue-rotate(5deg) brightness(95%);
}

/* ---- BREADCRUMB ---- */
.fl-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--fl-space-2);
  font-size: var(--fl-text-xs);
  color: var(--fl-text-muted);
  letter-spacing: var(--fl-ls-wide);
  margin-bottom: var(--fl-space-12);
}

.fl-breadcrumb a {
  color: var(--fl-text-muted);
  transition: color var(--fl-duration-fast);
}

.fl-breadcrumb a:hover {
  color: var(--fl-gold);
}

.fl-breadcrumb__sep {
  opacity: 0.4;
}

/* ============================================================
   Fortuna Luna breakpoints (canon: 560 / 840 / 1140)
   Maps design-doc 640/768/1024 → project mobile skill
   ============================================================ */

@media (max-width: 1140px) {
  .fl-container,
  .fl-nav__inner {
    padding-inline: clamp(13px, 4vw, 34px);
  }

  .fl-plans-grid {
    gap: var(--fl-space-3);
  }
}

@media (max-width: 840px) {
  .fl-nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .fl-nav__links {
    gap: var(--fl-space-2);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .fl-nav__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .fl-plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--fl-space-2);
    margin-top: var(--fl-space-3);
  }

  .fl-plan-card {
    padding: 16px 14px;
  }

  .fl-plan-card--featured {
    padding-top: 24px;
  }

  .fl-plan-card:hover {
    transform: none;
  }

  .fl-hero {
    min-height: unset;
    padding: 34px 0;
  }

  .fl-hero__cta-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--fl-space-2);
  }

  .fl-hero__cta-group .fl-btn {
    flex: 1 1 calc(50% - var(--fl-space-2));
    min-width: min(100%, 160px);
    min-height: 52px;
    padding: 13px 21px;
    text-align: center;
  }

  .fl-faq__trigger {
    min-height: 44px;
    font-size: max(16px, var(--fl-text-base));
    padding-block: var(--fl-space-4);
  }

  .fl-section {
    padding-block: var(--space-4, 21px);
  }

  h1 {
    font-size: clamp(2rem, 14cqi, 2.25rem);
  }
}

@media (max-width: 560px) {
  .fl-plans-grid {
    grid-template-columns: 1fr;
  }

  .fl-hero__cta-group {
    flex-direction: column;
  }

  .fl-hero__cta-group .fl-btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .fl-plan-card {
    padding: 14px 12px;
  }

  .fl-plan-card--featured {
    padding-top: 22px;
  }

  .fl-plan-card__price,
  .fl-numeral {
    font-size: var(--fl-text-2xl);
  }

  .fl-element-icon {
    width: 34px;
    height: 34px;
  }

  .fl-hero__subtitle {
    font-size: var(--fl-text-base);
  }
}

@media (hover: none) and (pointer: coarse) {
  .fl-plan-card:hover {
    transform: none;
    box-shadow: none;
  }

  .fl-plan-card:active {
    border-color: var(--fl-gold-border-hover);
  }

  .fl-btn:hover {
    box-shadow: none;
  }

  .fl-btn:active {
    background: var(--fl-gold);
    color: var(--fl-text-inverse);
  }

  .fl-element-icon:hover {
    transform: none;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .fl-hero {
    min-height: unset;
    padding-block: 21px;
  }

  .fl-hero__grid,
  .fl-hero__bg {
    opacity: 0.35;
  }
}
