/* JTBD landing: mobile-first; desktop from 1024 (5/7 + hero 2×2) */

:root {
  --accent: #4da3ff;
  --accent-rgb: 77, 163, 255;
  --primary-gradient: linear-gradient(135deg, #4da3ff 0%, #7f5cff 50%, #00e0ff 100%);
  --accent-glow: rgba(77, 163, 255, 0.5);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #e6e9ff;
  --text-muted: #94a3b8;
  --modal-content-bg: rgba(12, 18, 45, 0.4);
  --fedat-section-pad-y: 1.75rem;
  --zachem-nav-offset: 72px;
}

body.theme-futuristic.theme-orange {
  --accent: #e89b2c;
  --accent-rgb: 232, 155, 44;
  --primary-gradient: linear-gradient(135deg, #e89b2c 0%, #d4770a 50%, #f0b429 100%);
  --accent-glow: rgba(232, 155, 44, 0.5);
  --modal-content-bg: rgba(35, 22, 10, 0.45);
}

html {
  scroll-padding-top: var(--zachem-nav-offset);
}

body.landing-page.theme-futuristic {
  background: radial-gradient(circle at 20% 20%, #1a1f3a 0%, #0c0f1f 60%, #05070f 100%);
  color: var(--text-primary);
  font-family: 'Exo 2', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body.landing-page.theme-futuristic::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

body.theme-futuristic.theme-orange .landing-nav .nav-link:hover {
  color: var(--accent) !important;
  text-shadow: 0 0 10px var(--accent-glow);
}

body.theme-futuristic.theme-orange .btn-primary,
body.theme-futuristic.theme-orange #hero .btn-primary,
body.theme-futuristic.theme-orange #form .btn-primary,
body.theme-futuristic.theme-orange .jtbd-block .btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.55);
}

body.theme-futuristic.theme-orange .btn-primary:hover,
body.theme-futuristic.theme-orange #hero .btn-primary:hover,
body.theme-futuristic.theme-orange #form .btn-primary:hover {
  box-shadow: 0 6px 28px var(--accent-glow);
}

body.theme-futuristic.theme-orange .btn-outline-primary,
body.theme-futuristic.theme-orange #hero .btn-outline-primary {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

body.theme-futuristic.theme-orange .btn-outline-primary:hover,
body.theme-futuristic.theme-orange #hero .btn-outline-primary:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

body.theme-futuristic.theme-orange #faq .accordion-button {
  color: var(--text-primary);
}

body.theme-futuristic.theme-orange #faq .accordion-button:not(.collapsed) {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--card-border);
}

body.theme-futuristic.theme-orange #faq .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--accent-rgb), 0.25);
  border-color: var(--accent);
}

body.theme-futuristic.theme-orange .text-info {
  color: var(--accent) !important;
}

.text-accent { color: var(--accent) !important; }

.theme-switch {
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 36px;
}

.theme-switch:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); }
.theme-switch.active {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

/* —— Short hero —— */
#hero.zachem-hero {
  position: relative;
  overflow: hidden;
  padding-top: max(4.25rem, calc(env(safe-area-inset-top, 0px) + 3.25rem));
  padding-bottom: 1.5rem;
}

#hero.zachem-hero::before,
#hero.zachem-hero::after {
  content: "";
  position: absolute;
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}

#hero.zachem-hero::before {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28), transparent 70%);
  top: -160px;
  right: -120px;
}

#hero.zachem-hero::after {
  background: radial-gradient(circle, rgba(212, 119, 10, 0.18), transparent 70%);
  bottom: -180px;
  left: -140px;
}

body.theme-futuristic.theme-orange #hero.zachem-hero::before {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.3), transparent 70%);
}

body.theme-futuristic.theme-orange #hero.zachem-hero::after {
  background: radial-gradient(circle, rgba(212, 119, 10, 0.2), transparent 70%);
}

.zachem-hero h1 {
  font-family: 'Tektur', sans-serif;
  font-size: clamp(1.55rem, 5.4vw, 1.9rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  hyphens: none;
  -webkit-hyphens: none;
}

.zachem-hero .lead {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.hero-ctas .hero-cta-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-ctas {
  gap: 0.65rem;
}

/* Hero desk: stack below 1024; 2×2 grid from 1024 (covers 1360 @ 110–125% zoom) */
.hero-desk {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-desk__a {
  margin-bottom: 1.1rem;
}

.hero-badge-wrap {
  text-align: center;
  margin-bottom: 1.15rem;
}

.hero-slogan {
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
}

.hero-slogan .athlete-clear-pointer {
  color: var(--text-muted);
}

.badge-glow {
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-family: 'Tektur', sans-serif;
  font-size: 0.75rem;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.28);
}

.text-hyphenate {
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* —— JTBD blocks: vertical stack on mobile —— */
#jtbd {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.jtbd-block {
  padding: 1.35rem 0;
}

.jtbd-block--alt {
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.jtbd-block--inset {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.jtbd-block--compact {
  padding: 1.1rem 0;
}

.jtbd-block__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Mobile: текст → скрин → кнопка (CTA выходит из copy через contents) */
.jtbd-block__copy {
  display: contents;
}

.jtbd-block__copy h2 {
  order: 1;
  font-family: 'Tektur', sans-serif;
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
  line-height: 1.25;
  margin-bottom: 0.65rem;
  hyphens: none;
  -webkit-hyphens: none;
}

.jtbd-block__copy p {
  order: 2;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.jtbd-block__mock {
  order: 3;
}

.jtbd-block__cta {
  order: 4;
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jtbd-block--compact .jtbd-block__copy p {
  font-size: 0.9rem;
}

/* Phone frame */
.zachem-phone {
  width: min(100%, 280px);
  margin-inline: auto;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 11px 9px 13px;
  background: linear-gradient(160deg, #151a2e 0%, #0a0d18 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
}

.zachem-phone__speaker {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 auto 8px;
}

.zachem-phone__screen {
  border-radius: 18px;
  overflow: hidden;
  background: #f8f9fa;
  max-height: 58vh;
  aspect-ratio: 9 / 16;
}

.jtbd-block--compact .zachem-phone {
  width: min(100%, 220px);
}

.jtbd-block--compact .zachem-phone__screen {
  max-height: 38vh;
  aspect-ratio: 9 / 14;
}

.zachem-phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.zachem-phone--placeholder .zachem-phone__screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Sections rhythm */
#whats-included,
#faq,
#form {
  padding-top: var(--fedat-section-pad-y);
  padding-bottom: calc(var(--fedat-section-pad-y) + 0.5rem);
}

#whats-included h2,
#faq h2,
#form h3 {
  font-family: 'Tektur', sans-serif;
}

/* Segment tabs */
.fedat-segment-tabs {
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.35rem;
}

.fedat-segment-tabs .nav-link {
  border-radius: 10px;
  color: var(--accent);
  border: 1px solid transparent;
  font-family: 'Tektur', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.1;
  padding: 0.7rem 0.75rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.fedat-segment-tabs .nav-link:hover {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.fedat-segment-tabs .nav-link.active {
  background: var(--primary-gradient);
  color: #05070f;
  border-color: transparent;
  box-shadow: 0 0 16px var(--accent-glow);
}

.fedat-segment-panes { min-height: 5.25rem; }

#lead-submit-btn.opacity-50 { pointer-events: auto; }

.fedat-preview-iframe {
  width: 100%;
  border: 0;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--card-bg);
}

#profilePreviewModal .modal-content { height: 100%; }
#profilePreviewModal .modal-body { min-height: 0; }
#profilePreviewModal .modal-footer {
  border-top: 1px solid var(--card-border);
}

footer {
  padding: 2rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

/* —— Mobile navbar —— */
@media (max-width: 991.98px) {
  .landing-nav .navbar-nav .nav-item { width: 100%; }

  .landing-nav .navbar-nav .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    min-height: 44px;
  }

  .landing-nav--in-hero .navbar-toggler-icon {
    filter: invert(1);
  }
}

@media (max-width: 575.98px) {
  .fedat-segment-tabs .nav-link {
    padding: 0.7rem 0.4rem;
    font-size: 1rem;
  }

  .fedat-segment-tabs .nav-link .bi {
    margin-right: 0 !important;
    font-size: 1.15rem;
  }
}

/* —— Desktop from 1024: HD tokens, JTBD 5/7, hero 2×2.
   1280 CSS is too high: a 1360-wide Chrome window at 110% zoom is ~1236px,
   at 125% ~1088px — both stayed on the mobile stack. */ 
@media (min-width: 1024px) {
  #hero.zachem-hero {
    padding-top: clamp(5.5rem, 10vh, 7rem);
    padding-bottom: 2.75rem;
  }

  #hero .hero-desk-col {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .hero-badge-wrap {
    margin-bottom: 1.5rem;
  }

  .hero-desk {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "q a"
      "ctas ctas";
    column-gap: 2.5rem;
    row-gap: 1.75rem;
    align-items: center;
  }

  .hero-desk__q {
    grid-area: q;
    text-align: right;
    align-self: center;
  }

  .hero-desk__a {
    grid-area: a;
    align-self: center;
    margin-bottom: 0;
  }

  .hero-desk__a .lead {
    margin-bottom: 0;
    max-width: none;
  }

  .hero-desk__ctas { grid-area: ctas; }

  .zachem-hero h1 {
    font-size: clamp(2.5rem, 3.2vw, 3.1rem);
    margin-bottom: 0;
  }

  .zachem-hero .lead {
    font-size: 1.25rem;
  }

  .hero-ctas {
    flex-direction: row !important;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-ctas .hero-cta-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 56px;
    font-size: 1.1rem;
  }

  .hero-slogan {
    margin-top: 2.25rem;
  }

  #jtbd {
    padding-top: 1.75rem;
  }

  .jtbd-block {
    padding: 2.75rem 0;
  }

  .jtbd-block--compact {
    padding: 2.25rem 0;
  }

  /* Text 5 / phone 7; DOM is mock then copy → order puts copy left */
  .jtbd-block__inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 2.5rem 3rem;
    align-items: center;
  }

  .jtbd-block__copy {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    min-width: 0;
    min-height: 0;
  }

  .jtbd-block__mock {
    order: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }

  .jtbd-block__cta {
    order: unset;
  }

  .jtbd-block__copy h2,
  .jtbd-block__copy p {
    order: unset;
  }

  /* Flip: phone left (7), text right (5) */
  .jtbd-block--flip .jtbd-block__inner {
    grid-template-columns: 7fr 5fr;
  }

  .jtbd-block--flip .jtbd-block__mock { order: 1; }
  .jtbd-block--flip .jtbd-block__copy { order: 2; }

  .jtbd-block__copy h2 {
    font-size: 2.05rem;
    line-height: 1.2;
    margin-bottom: 0.85rem;
  }

  .jtbd-block__copy p {
    font-size: 1.18rem;
    line-height: 1.5;
    margin-bottom: 1.1rem;
  }

  .jtbd-block--compact .jtbd-block__copy p {
    font-size: 1.12rem;
    margin-bottom: 1.1rem;
  }

  .jtbd-block__cta {
    width: auto;
    align-self: flex-start;
    min-width: 15rem;
    min-height: 52px;
    font-size: 1.05rem;
  }

  /* Unified phone size — shorter so row height matches copy */
  .zachem-phone,
  .jtbd-block--compact .zachem-phone,
  .jtbd-block--wide-mock .zachem-phone {
    width: min(100%, 330px);
    box-shadow:
      0 28px 60px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(var(--accent-rgb), 0.12),
      inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .zachem-phone__screen,
  .jtbd-block--compact .zachem-phone__screen {
    max-height: none;
    height: 500px;
    aspect-ratio: auto;
  }
}
