/* =========================================================================
   Trena — Лендинг (редизайн trena.site)
   Спортивный арт-дирекшен поверх дизайн-системы Trena. Только токены.
   Хром лендинга — orange + ink + neutrals (без радуги). Группы-цвета
   появляются только внутри реальных экранов продукта.
   ========================================================================= */

/* landing-local display scale (маркетинговый хиро — расширяет шкалу DS) */
:root {
  --ld-display: clamp(40px, 8.5vw, 88px);
  --ld-h2:      clamp(27px, 4.6vw, 50px);
  --ld-lead:    clamp(16px, 2vw, 21px);
  --ld-maxw:    1180px;
  --ld-gut:     clamp(20px, 5vw, 64px);
}

.lp { background: var(--surface); color: var(--ink); overflow-x: clip; }
.lp * { box-sizing: border-box; }
.lp-wrap { max-width: var(--ld-maxw); margin: 0 auto; padding-inline: var(--ld-gut); }

/* heavy display type */
.lp-display {
  font-size: var(--ld-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lp-h2 {
  font-size: var(--ld-h2);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lp-lead { font-size: var(--ld-lead); line-height: 1.5; color: var(--ink-secondary); text-wrap: pretty; }
.lp-mark { color: var(--brand); }
.lp-ink-flip { color: var(--surface); }

/* energetic underline swipe under a word */
.lp-swipe { position: relative; white-space: nowrap; }
.lp-swipe::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: 0.06em; height: 0.28em;
  background: var(--brand); opacity: 0.28; z-index: -1; transform: skewX(-12deg);
  border-radius: 2px;
}

/* kicker */
.lp-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--brand-active);
}
.lp-kicker::before { content: ''; width: 22px; height: 2px; background: var(--brand); border-radius: var(--r-full); }
.lp-kicker--flip { color: var(--brand); }

/* big landing CTA (extends .btn) */
.lp-cta {
  height: 56px; padding: 0 28px; font-size: var(--fs-lg); font-weight: var(--fw-bold);
  border-radius: var(--r-xl); gap: 10px; letter-spacing: -0.01em;
}
.lp-cta svg { width: 19px; height: 19px; }
.lp-cta--primary { box-shadow: 0 10px 24px -8px rgba(237, 89, 70, 0.55); }
.lp-cta--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(237, 89, 70, 0.6); }
.lp-cta--lg { height: 60px; font-size: var(--fs-xl); padding: 0 34px; }
@media (max-width: 560px) { .lp-cta, .lp-cta--lg { width: 100%; } }

/* =========================================================================
   NAVBAR
   ========================================================================= */
.lp-nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.lp-nav__inner { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.02em; }
.lp-brand__logo { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--brand); color: white; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.lp-nav__links { display: flex; align-items: center; gap: var(--s-6); margin-left: auto; }
.lp-nav__link { font-size: var(--fs-md); font-weight: var(--fw-medium); color: var(--ink-secondary); transition: color var(--t-fast); }
.lp-nav__link:hover { color: var(--ink); }
.lp-nav__cta { margin-left: var(--s-2); }
@media (max-width: 860px) { .lp-nav__links .lp-nav__link { display: none; } }

/* =========================================================================
   HERO — dark anchor, diagonal energy
   ========================================================================= */
.lp-hero {
  position: relative; overflow: hidden;
  background: var(--sb-bg);
  color: var(--surface);
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(56px, 8vw, 120px);
}
/* diagonal brand wash */
.lp-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 520px at 85% -8%, color-mix(in srgb, var(--brand) 34%, transparent), transparent 58%),
    radial-gradient(800px 480px at 6% 108%, color-mix(in srgb, var(--brand-active) 22%, transparent), transparent 60%);
}
/* diagonal slash */
.lp-hero::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -10%; bottom: -10%; left: 60%; width: 3px;
  background: linear-gradient(180deg, transparent, var(--brand), transparent);
  transform: rotate(14deg); opacity: 0.5; display: none;
}
.lp-hero__inner { position: relative; z-index: 1; }
.lp-hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 940px) { .lp-hero__grid { grid-template-columns: 1.02fr 0.98fr; }
  .lp-hero::after { display: block; } }

.lp-hero__eyebrow { color: var(--brand); margin-bottom: var(--s-4); }
.lp-hero__title { color: var(--surface); margin-bottom: var(--s-5); }
.lp-hero__sub { color: color-mix(in srgb, var(--sb-text) 92%, white); max-width: 36ch; margin-bottom: var(--s-7); }
.lp-hero__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.lp-hero__btn-ghost {
  height: 56px; padding: 0 22px; border-radius: var(--r-xl);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-lg); font-weight: var(--fw-semibold);
  color: var(--surface); border: 1px solid color-mix(in srgb, var(--sb-text) 40%, transparent);
  background: transparent; cursor: pointer; transition: all var(--t-fast);
}
.lp-hero__btn-ghost:hover { background: color-mix(in srgb, white 8%, transparent); border-color: var(--sb-text); }

.lp-trust { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-7); flex-wrap: wrap; color: var(--sb-text-muted); font-size: var(--fs-sm); }
.lp-trust__pill { display: inline-flex; align-items: center; gap: 7px; }
.lp-trust__pill svg { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }
.lp-trust__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--sb-text-muted); opacity: 0.5; }

/* =========================================================================
   DEVICE FRAMES
   ========================================================================= */
.lp-stage { position: relative; }
.browser-frame {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, white 12%, transparent);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.25);
}
.browser-frame__bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--bg-app); border-bottom: 1px solid var(--line); }
.browser-frame__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser-frame__addr { margin-left: 10px; flex: 1; height: 22px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; font-size: 11px; color: var(--ink-muted); font-family: var(--font-num); }
.browser-frame__body { background: var(--bg-app); }

.phone-frame {
  border-radius: 30px; padding: 8px; background: var(--ink); 
  box-shadow: 0 30px 60px -18px rgba(0,0,0,0.5), 0 6px 16px rgba(0,0,0,0.3);
  width: 248px; flex-shrink: 0;
}
.phone-frame__screen { border-radius: 23px; overflow: hidden; background: var(--surface); }
.phone-frame__notch { height: 18px; display: flex; justify-content: center; align-items: flex-start; background: var(--surface); }
.phone-frame__notch::before { content: ''; width: 56px; height: 5px; border-radius: var(--r-full); background: var(--ink); margin-top: 6px; }

/* hero composition: desktop + overlapping phone */
.lp-hero__composit { position: relative; }
.lp-hero__phone {
  position: absolute; right: -10px; bottom: -28px; z-index: 2;
  width: 168px; border-radius: 24px; padding: 6px;
}
.lp-hero__phone .phone-frame__screen { border-radius: 19px; }
@media (max-width: 939px) {
  .lp-hero__phone { width: 132px; right: -6px; bottom: -20px; }
}

/* floating toast over a screen */
.lp-float {
  position: absolute; z-index: 4;
  box-shadow: var(--sh-lg);
  animation: lp-float-in 0.5s var(--ease) both;
}
.lp-float .toast { box-shadow: none; min-width: 210px; }
@keyframes lp-float-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes lp-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.lp-float--bob { animation: lp-float-in 0.5s var(--ease) both, lp-bob 4s ease-in-out 0.6s infinite; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.lp-section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.lp-section--subtle { background: var(--bg-app); }
.lp-section--tight { padding-block: clamp(40px, 5vw, 64px); }

.lp-sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.lp-sec-head--center { margin-inline: auto; text-align: center; }
.lp-sec-head__kicker { margin-bottom: var(--s-3); }
.lp-sec-head__lead { margin-top: var(--s-4); }

/* pain block: screen + copy, alternating on desktop, screen-first on mobile */
.lp-pain { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lp-pain + .lp-pain { margin-top: clamp(56px, 8vw, 112px); }
@media (min-width: 900px) {
  .lp-pain { grid-template-columns: 1fr 1fr; }
  .lp-pain--flip .lp-pain__media { order: 2; }
}
.lp-pain__copy { max-width: 52ch; }
.lp-pain__num { font-size: var(--fs-sm); font-weight: 800; color: var(--brand); letter-spacing: var(--ls-wider); }
.lp-pain__title { margin: var(--s-3) 0 var(--s-4); }
.lp-pain__text { color: var(--ink-secondary); font-size: var(--ld-lead); line-height: 1.55; }
.lp-pain__win {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-5);
  font-weight: var(--fw-bold); color: var(--ink);
  background: var(--brand-soft); border: 1px solid var(--brand-soft-2);
  padding: 9px 14px; border-radius: var(--r-full); font-size: var(--fs-md);
}
.lp-pain__win svg { width: 16px; height: 16px; color: var(--brand-active); flex-shrink: 0; }

/* screen surface (a framed product card) */
.lp-screen {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-2xl); box-shadow: var(--sh-lg);
  overflow: hidden; position: relative;
}
.lp-screen__bar { display: flex; align-items: center; gap: var(--s-2); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); background: var(--bg-subtle); }
.lp-screen__bar-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-secondary); }
.lp-screen__bar-spacer { flex: 1; }
.lp-screen__body { padding: var(--s-4); }
.lp-screen__media-pad { padding: var(--s-5); }

/* =========================================================================
   RETENTION ("Внимание") — hero feature board, composed from DS
   ========================================================================= */
.call-list { display: flex; flex-direction: column; gap: var(--s-2); }
.call-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: var(--s-3); align-items: center;
  padding: 10px var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.call-row__ava { width: 34px; height: 34px; border-radius: var(--r-full); display: grid; place-items: center; color: white; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.call-row__main { min-width: 0; display: flex; flex-direction: column; }
.call-row__name { font-weight: var(--fw-semibold); font-size: var(--fs-md); line-height: 1.3; }
.call-row__reason { font-size: var(--fs-sm); color: var(--ink-muted); margin-top: 1px; line-height: 1.3; }
.call-row__btn { flex-shrink: 0; }
.call-row__btn .btn { height: 30px; }
@media (max-width: 420px) {
  .call-row { grid-template-columns: 28px 1fr; }
  .call-row__btn { grid-column: 2; justify-self: start; margin-top: 4px; }
}

.lp-metricrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-bottom: var(--s-4); }
.lp-metricrow .metric { min-height: auto; padding: var(--s-3); }
.lp-metricrow .metric__value { font-size: var(--fs-2xl); }
@media (max-width: 480px) { .lp-metricrow { gap: 8px; } .lp-metricrow .metric { padding: 10px; } }

/* =========================================================================
   MONTH PREVIEW MINI (reuse mgrid look, compact)
   ========================================================================= */
.mini-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); background: var(--line); gap: 1px; border-radius: var(--r-md); overflow: hidden; }
.mini-mgrid__h { background: var(--ink); color: var(--sb-text-muted); font-size: 9px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--ls-wide); padding: 4px 5px; }
.mini-mgrid__c { background: var(--surface); min-height: 52px; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.mini-mgrid__c--out { background: var(--bg-subtle); }
.mini-mgrid__d { font-size: 10px; font-weight: var(--fw-semibold); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mini-chip { font-size: 8.5px; font-weight: var(--fw-medium); padding: 1px 4px; border-radius: 3px; border-left: 2px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-chip.g-senior { background: var(--g-senior-tint); color: var(--g-senior-ink); border-color: var(--g-senior-stripe); }
.mini-chip.g-middle { background: var(--g-middle-tint); color: var(--g-middle-ink); border-color: var(--g-middle-stripe); }
.mini-chip.g-junior { background: var(--g-junior-tint); color: var(--g-junior-ink); border-color: var(--g-junior-stripe); }
.mini-chip--draft { background: var(--surface); color: var(--ink-secondary); border-style: dashed; border-color: var(--ink-disabled); box-shadow: inset 0 0 0 1px var(--line); }

/* rule card mini */
.mini-rule { display: grid; grid-template-columns: 4px 1fr; gap: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.mini-rule__stripe { background: var(--g-senior-stripe); }
.mini-rule__body { padding: 10px 0; }
.mini-rule__title { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.mini-rule__meta { font-size: var(--fs-sm); color: var(--ink-muted); margin-top: 2px; }

/* =========================================================================
   ATTENDANCE mini
   ========================================================================= */
.att-row { display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3); border-bottom: 1px solid var(--line-soft); }
.att-row:last-child { border-bottom: none; }
.att-row__name { flex: 1; font-weight: var(--fw-medium); font-size: var(--fs-md); }
.att-mark { width: 30px; height: 30px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; }
.att-mark--in { background: var(--success-soft); color: var(--success-ink); }
.att-mark--out { background: var(--danger-soft); color: var(--danger-ink); }
.att-mark svg { width: 16px; height: 16px; }

/* =========================================================================
   ROLES — 3-column comparison (no interaction; compare at a glance)
   ========================================================================= */
.lp-rolecols { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 760px) { .lp-rolecols { grid-template-columns: repeat(3, 1fr); } }
.lp-rolecard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-2xl); padding: var(--s-5);
  display: flex; flex-direction: column;
}
.lp-rolecard--lead { border-color: var(--brand-soft-2); box-shadow: 0 1px 0 var(--brand-soft-2); background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 22%); }
.lp-rolecard__head { display: flex; align-items: center; gap: var(--s-3); padding-bottom: var(--s-4); margin-bottom: var(--s-4); border-bottom: 1px solid var(--line-soft); }
.lp-rolecard__ava { width: 40px; height: 40px; border-radius: var(--r-lg); display: grid; place-items: center; color: white; flex-shrink: 0; }
.lp-rolecard__ava svg { width: 21px; height: 21px; }
.lp-rolecard__name { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.lp-rolecard__role { font-size: var(--fs-sm); color: var(--ink-muted); }
.lp-access { display: flex; flex-direction: column; gap: 6px; }
.lp-access__row { display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3); border-radius: var(--r-md); font-size: var(--fs-md); }
.lp-access__row svg { width: 18px; height: 18px; flex-shrink: 0; }
.lp-access__row--yes { color: var(--ink); }
.lp-access__row--yes svg { color: var(--success); }
.lp-access__row--no { color: var(--ink-muted); background: var(--bg-subtle); }
.lp-access__row--no svg { color: var(--ink-disabled); }
.lp-access__row--no span { text-decoration: line-through; text-decoration-color: var(--ink-disabled); }

/* =========================================================================
   STEPS (how to start)
   ========================================================================= */
.lp-steps { display: grid; grid-template-columns: 1fr; gap: var(--s-4); counter-reset: step; }
@media (min-width: 760px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
.lp-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-6); position: relative; }
.lp-step__n { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xl); margin-bottom: var(--s-4); }
.lp-step:first-child .lp-step__n { background: var(--brand); }
.lp-step__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: 6px; }
.lp-step__text { color: var(--ink-secondary); font-size: var(--fs-md); }

/* =========================================================================
   PHONE HOME SCREEN (mobile-first section) — Trena icon on home screen
   ========================================================================= */
.lp-home { background: linear-gradient(165deg, var(--bg-app) 0%, var(--brand-soft) 100%); padding: var(--s-3) var(--s-4) var(--s-5); min-height: 372px; }
.lp-home__time { text-align: center; font-weight: var(--fw-bold); font-size: 13px; color: var(--ink); padding: 6px 0 16px; font-variant-numeric: tabular-nums; }
.lp-home__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
.lp-home__app { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.lp-home__icon { width: 46px; height: 46px; border-radius: 13px; overflow: hidden; background: color-mix(in srgb, var(--ink) 7%, var(--surface)); box-shadow: var(--sh-sm); }
.lp-home__icon svg { width: 100%; height: 100%; display: block; }
.lp-home__icon--n { background: color-mix(in srgb, var(--ink) 9%, var(--surface)); }
.lp-home__label { font-size: 10px; color: var(--ink-muted); }
.lp-home__app--trena .lp-home__icon { box-shadow: 0 8px 18px -4px rgba(237, 89, 70, 0.65); }
.lp-home__app--trena .lp-home__label { color: var(--ink); font-weight: var(--fw-semibold); }

/* =========================================================================
   FAQ
   ========================================================================= */
.lp-faq { max-width: 760px; margin-inline: auto; }
.lp-faq__item { border-bottom: 1px solid var(--line); }
.lp-faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) 0; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--ink); }
.lp-faq__q svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; transition: transform var(--t-base); }
.lp-faq__item.is-open .lp-faq__q svg { transform: rotate(45deg); }
.lp-faq__a { max-height: 0; overflow: hidden; transition: max-height var(--t-slow) var(--ease); }
.lp-faq__a-inner { padding-bottom: var(--s-5); color: var(--ink-secondary); font-size: var(--ld-lead); line-height: 1.55; }

/* =========================================================================
   FINAL CTA band (dark)
   ========================================================================= */
.lp-final { background: var(--sb-bg); color: var(--surface); position: relative; overflow: hidden; }
.lp-final::before { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 400px at 50% 120%, color-mix(in srgb, var(--brand) 36%, transparent), transparent 60%); }
.lp-final__inner { position: relative; z-index: 1; text-align: center; padding-block: clamp(56px, 9vw, 120px); }
.lp-final__title { color: var(--surface); margin-bottom: var(--s-6); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.lp-foot { background: var(--sb-bg); color: var(--sb-text-muted); border-top: 1px solid color-mix(in srgb, white 8%, transparent); }
.lp-foot__inner { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; padding-block: var(--s-6); font-size: var(--fs-sm); }
.lp-foot__brand { display: flex; align-items: center; gap: 8px; color: var(--sb-text); font-weight: var(--fw-bold); }
.lp-foot__brand .lp-brand__logo { width: 26px; height: 26px; font-size: 14px; }

/* =========================================================================
   STICKY MOBILE CTA
   ========================================================================= */
.lp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 10px var(--s-4) calc(10px + env(safe-area-inset-bottom, 0));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(120%); transition: transform var(--t-slow) var(--ease);
}
.lp-sticky.is-shown { transform: none; }
.lp-sticky .lp-cta { width: 100%; height: 52px; }
@media (min-width: 760px) { .lp-sticky { display: none; } }

/* reveal on scroll */
.lp-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.lp-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lp-reveal { opacity: 1; transform: none; transition: none; }
  .lp-float, .lp-float--bob { animation: none; }
}
