/* ============================================================
   Благоденствие — дизайн-система, съвпадаща с webinar.coopblagodenstvie.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap&subset=cyrillic');

:root {
  --bg:          #0F1712;
  --surface:     #1A2E1F;
  --surface-2:   #223828;
  --cream:       #FFF8EA;
  --cream-dim:   rgba(255, 248, 234, 0.65);
  --cream-muted: rgba(255, 248, 234, 0.40);
  --gold:        #C8A84B;
  --gold-dim:    rgba(200, 168, 75, 0.18);
  --green-line:  #7A9B57;
  --green-glow:  rgba(122, 155, 87, 0.15);
  --input-bg:    #162116;
  --input-bd:    rgba(255, 248, 234, 0.14);
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-pill: 9999px;
  --shadow-card: 0 24px 60px -16px rgba(0, 0, 0, 0.55);
  --shadow-btn:  0 4px 20px rgba(0, 0, 0, 0.35);
  --transition:  0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--cream);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Marquee strip ---- */
.marquee-wrap {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255,248,234,0.06);
  border-bottom: 1px solid rgba(255,248,234,0.06);
  padding: 10px 0;
  background: rgba(255,248,234,0.025);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-muted);
  white-space: nowrap;
  padding: 0 2rem;
}
.marquee-track span.dot {
  color: var(--gold);
  padding: 0 0.5rem;
  letter-spacing: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Header / Nav ---- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: relative;
  z-index: 10;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}
.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-back {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.nav-back:hover { color: var(--cream); }

/* ---- Page wrapper ---- */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
.wrap--narrow {
  max-width: 640px;
}

/* ---- Entrance animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.28s; }
.fade-up:nth-child(4) { animation-delay: 0.42s; }
.fade-up:nth-child(5) { animation-delay: 0.56s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Brand header ---- */
.brand {
  text-align: center;
  margin-bottom: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 4px;
  /* fallback emblem if logo doesn't load */
}
.brand-logo-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--green-line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.brand-logo-fallback svg { width: 28px; height: 28px; }
.brand .eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--green-line);
  font-weight: 600;
}
.brand .wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  color: var(--cream);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ---- Lede ---- */
.lede {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.lede h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--cream);
}
.lede h1 em {
  font-style: italic;
  color: var(--gold);
}
.lede p {
  font-size: 1.05rem;
  color: var(--cream-dim);
  margin: 0;
  font-weight: 400;
}

/* ---- Two-path layout ---- */
.paths {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  color: var(--cream-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: rgba(255,248,234,0.1);
  height: 60%;
}
.divider::before { bottom: 56%; }
.divider::after  { top: 56%; }

/* ---- Cards ---- */
.card {
  border-radius: var(--radius-md);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255,248,234,0.08);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 36px 72px -20px rgba(0, 0, 0, 0.7);
}

.card .tag {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.card h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.card .desc {
  font-size: 0.96rem;
  line-height: 1.6;
  flex: 1;
  margin: 0 0 28px;
}

/* Voucher card — cream/warm background, stands out on dark page */
.card--voucher {
  background: var(--cream);
  color: #0F1712;
  border-color: transparent;
}
.card--voucher .tag { color: #8B6914; }
.card--voucher h2   { color: #0F1712; }
.card--voucher .desc { color: #3a4a3e; }
.card--voucher .price {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #0F1712;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.card--voucher .price small {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #5a6b5e;
  letter-spacing: 0;
}

/* Coop card — dark surface, feels deeper/more committed */
.card--coop {
  background: var(--surface);
  border-color: var(--green-line);
  border-width: 1px;
  color: var(--cream);
}
.card--coop .tag  { color: var(--gold); }
.card--coop h2    { color: var(--cream); }
.card--coop .desc { color: var(--cream-dim); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-btn);
}
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Primary: dark text on cream — matches existing site's main CTA */
.btn--primary {
  background: var(--cream);
  color: #0F1712;
  border-color: transparent;
}
.btn--primary:hover {
  background: #EDE9D8;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Secondary: outlined cream — used for the coop card on dark bg */
.btn--secondary {
  background: transparent;
  color: var(--cream);
  border-color: rgba(255,248,234,0.35);
}
.btn--secondary:hover {
  background: rgba(255,248,234,0.08);
  border-color: var(--cream);
}

/* Ghost green — used on dark page for form submit, back-link area */
.btn--green {
  background: var(--green-line);
  color: #0F1712;
  border-color: transparent;
}
.btn--green:hover {
  background: #8daf68;
  box-shadow: 0 8px 28px rgba(122,155,87,0.35);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none !important;
}

/* ---- Form ---- */
.form-card {
  background: var(--surface);
  border: 1px solid rgba(255,248,234,0.08);
  border-radius: var(--radius-md);
  padding: 44px 40px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--cream-dim);
  letter-spacing: 0.02em;
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--input-bd);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  background: var(--input-bg);
  color: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--cream-muted); }
.field input:focus,
.field textarea:focus {
  border-color: var(--green-line);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.field .opt {
  font-weight: 400;
  color: var(--cream-muted);
  font-size: 0.8rem;
}

.msg {
  margin-top: 18px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  display: none;
  font-weight: 500;
}
.msg.ok {
  display: block;
  background: rgba(122, 155, 87, 0.18);
  color: #a8d87e;
  border: 1px solid rgba(122,155,87,0.3);
}
.msg.err {
  display: block;
  background: rgba(220, 80, 60, 0.12);
  color: #f08878;
  border: 1px solid rgba(220,80,60,0.25);
}

/* ---- Status pages (success / cancel) ---- */
.status-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
}
.status .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}
.status h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 12px;
  color: var(--cream);
  letter-spacing: -0.01em;
}
.status p {
  color: var(--cream-dim);
  font-size: 1.05rem;
  margin: 0 0 32px;
}
.status .btn { max-width: 340px; margin: 0 auto; }

/* ---- Back link ---- */
.back {
  text-align: center;
  margin-top: 32px;
}
.back a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.back a:hover { color: var(--cream); }

/* ---- Footer ---- */
footer {
  text-align: center;
  margin-top: 72px;
  font-size: 0.8rem;
  color: var(--cream-muted);
  padding-bottom: 24px;
  border-top: 1px solid rgba(255,248,234,0.06);
  padding-top: 28px;
}

/* ---- Pill badge ---- */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(122,155,87,0.15);
  border: 1px solid rgba(122,155,87,0.35);
  border-radius: var(--radius-pill);
  padding: 5px 14px 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-line);
  margin-bottom: 20px;
}
.pill-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-line);
  box-shadow: 0 0 8px var(--green-line);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ---- Responsive ---- */
@media (max-width: 740px) {
  .site-nav { padding: 16px 20px; }
  .wrap     { padding: 28px 20px 60px; }
  .form-card { padding: 28px 22px; }
  .paths {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .divider {
    padding: 0;
    flex-direction: row;
    gap: 12px;
  }
  .divider::before,
  .divider::after { display: none; }
  .card { padding: 28px 24px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .fade-up          { animation: none; opacity: 1; transform: none; }
  .marquee-track    { animation: none; }
  .pill-badge::before { animation: none; }
  .card, .btn, .nav-back, .back a, .field input, .field textarea {
    transition: none;
  }
  .card:hover, .btn:hover { transform: none; }
}
