/* PRIME Карта Роста · Global styles */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-page-1);
  min-height: 100vh;
  text-wrap: pretty;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(123, 165, 217, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(197, 167, 110, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-page-1) 0%, var(--bg-page-2) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

/* ===== SCREEN CONTAINER ===== */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-7) var(--sp-5) var(--sp-7);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
.screen--narrow {
  max-width: 560px;
}
.screen--center {
  align-items: center;
  justify-content: center;
}

/* ===== HEADERS ===== */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

p { margin: 0; }

/* ===== BUTTONS ===== */
.btn {
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 16px 28px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 250ms ease, background 250ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  color: #1B1107;
  box-shadow: var(--shadow-cta);
}
.btn--primary:not(:disabled):hover { box-shadow: var(--shadow-cta-hover); transform: translateY(-1px); }
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.30), transparent 40%);
  pointer-events: none;
}

.btn--ghost {
  background: rgba(15, 31, 61, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.btn--ghost:hover { background: rgba(15, 31, 61, 0.07); }

.btn--full { width: 100%; }
.btn--lg { padding: 20px 36px; font-size: 17px; }

/* ===== PILL / EYEBROW ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pill--accent {
  background: var(--accent-soft);
  color: var(--accent-3);
  border: 1px solid rgba(197, 167, 110, 0.30);
  box-shadow: 0 0 0 4px rgba(197, 167, 110, 0.06);
}
.pill--accent-dark {
  background: rgba(197, 167, 110, 0.16);
  color: var(--accent-1);
  border: 1px solid rgba(197, 167, 110, 0.30);
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: dot-pulse 2.2s ease-in-out infinite;
}
.pill__dot--green { background: var(--positive); box-shadow: 0 0 10px var(--positive-soft); }

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ===== ACCENT TEXT ===== */
.accent-text {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-2); /* fallback */
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
}
.card--xl { border-radius: var(--radius-xl); }

/* ===== FORM ELEMENTS ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-secondary);
}
.field__input {
  font-family: inherit;
  font-size: var(--t-body);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background: #FAFBFC;
  color: var(--text-primary);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  outline: none;
}
.field__input::placeholder { color: var(--text-muted); }
.field__input:focus {
  border-color: var(--accent-2);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field__hint {
  font-size: var(--t-small);
  color: var(--text-muted);
  line-height: 1.5;
}
.field--error .field__input { border-color: #D45A5A; box-shadow: 0 0 0 4px rgba(212, 90, 90, 0.10); }
.field__error {
  font-size: var(--t-small);
  color: #D45A5A;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Checkbox */
.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}
.checkbox__box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 1.5px solid var(--border-medium);
  background: #FAFBFC;
  display: grid;
  place-items: center;
  transition: all 180ms ease;
}
.checkbox--on .checkbox__box {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-soft);
}
.checkbox__check {
  width: 12px;
  height: 12px;
  color: #1B1107;
  opacity: 0;
  transform: scale(0.5);
  transition: all 180ms ease;
}
.checkbox--on .checkbox__check { opacity: 1; transform: scale(1); }
.checkbox__label {
  font-size: var(--t-small);
  color: var(--text-secondary);
  line-height: 1.55;
}
.checkbox__label a {
  color: var(--accent-3);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}
.checkbox__label a:hover { border-bottom-color: var(--accent-2); }

/* Radio option cards */
.opt-card {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: #FAFBFC;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 180ms ease;
  font-size: var(--t-body);
  line-height: 1.55;
  position: relative;
}
.opt-card:hover { border-color: rgba(197, 167, 110, 0.45); background: #FFFFFF; }
.opt-card--on {
  background: #FFFFFF;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 22px rgba(15, 31, 61, 0.06);
}
.opt-card__title { display: block; font-weight: 600; font-size: var(--t-body); }
.opt-card__sub { display: block; font-size: var(--t-small); color: var(--text-secondary); margin-top: 4px; line-height: 1.45; }

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--accent-2) 0%, var(--accent-2) var(--val, 0%), rgba(15, 31, 61, 0.08) var(--val, 0%), rgba(15, 31, 61, 0.08) 100%);
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--accent-2);
  box-shadow: 0 2px 8px rgba(15, 31, 61, 0.20);
  cursor: pointer;
  transition: transform 180ms ease;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--accent-2);
  cursor: pointer;
}

/* ===== HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(242, 243, 245, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.app-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px var(--sp-5);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 180ms ease;
}
.brand-lockup:hover { opacity: 0.78; }
.brand-lockup__mark {
  height: 28px;
  width: auto;
  display: block;
}
.brand-lockup__text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, #C8845D 0%, #9C5A38 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-lockup__divider {
  width: 1px;
  height: 20px;
  background: var(--border-medium);
}
.brand-lockup__tagline {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: var(--t-small);
  color: var(--text-secondary);
  font-weight: 500;
}
.app-header__time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Progress bar in header */
.progress {
  width: 240px;
  max-width: 32vw;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress__track {
  flex: 1;
  height: 4px;
  background: rgba(15, 31, 61, 0.08);
  border-radius: var(--radius-pill);
  position: relative;
  overflow: hidden;
}
.progress__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  transform-origin: left;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.progress__segments {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  pointer-events: none;
}
.progress__segments::before, .progress__segments::after,
.progress__segments > span {
  content: "";
  display: block;
  border-left: 1px solid rgba(255, 255, 255, 0.85);
}
.progress__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ===== FOOTER ===== */
.app-footer {
  margin-top: auto;
  padding: var(--sp-6) var(--sp-5);
  font-size: var(--t-small);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-soft);
  background: rgba(242, 243, 245, 0.40);
}
.app-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.app-footer__col h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.app-footer__col p { line-height: 1.55; }
.app-footer__col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 180ms ease;
}
.app-footer__col a:hover { color: var(--accent-3); }
.app-footer__telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.app-footer__telegram svg { flex-shrink: 0; }

@media (max-width: 760px) {
  .app-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
  .app-header__inner { padding: 10px var(--sp-4); }
  .brand-lockup__tagline { display: none; }
  .progress { width: 140px; }
  .app-header__time { display: none; }
  .screen { padding: var(--sp-5) var(--sp-4); }
}

/* ===== ENTRANCE ANIM ===== */
/* No-op in iframe contexts that throttle CSS animations.
   Real animations are handled by JS where smoothness matters. */
.fade-up {
  opacity: 1;
  transform: translateY(0);
}
.delay-1, .delay-2, .delay-3, .delay-4, .delay-5, .delay-6, .delay-7 {
  /* Reserved for future JS-orchestrated stagger. CSS animation removed for iframe stability. */
}
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }
.delay-5 { animation-delay: 400ms; }
.delay-6 { animation-delay: 480ms; }
.delay-7 { animation-delay: 560ms; }

@keyframes pulse-cta {
  0%, 100% { box-shadow: var(--shadow-cta); }
  50% { box-shadow: var(--shadow-cta-hover); }
}
.btn--breathing {
  animation: pulse-cta 2.8s ease-in-out infinite;
}

/* Reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
