/* ============================================================
   Традиција — design tokens
   Palette drawn from the ensemble's own costume: madder red,
   charcoal, ivory linen, aged gold thread.
   ============================================================ */

:root {
  --ivory: #efe4cb;
  --ivory-light: #faf5e8;
  --ink: #241b16;
  --red: #9c2b2b;
  --red-deep: #6f1f1f;
  --gold: #b8862e;

  --font-display: "Yeseva One", "PT Serif", serif;
  --font-body: "PT Sans", system-ui, sans-serif;

  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ivory-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--red-deep);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; color: var(--ink); }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--red-deep); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- signature motif: embroidered sawtooth strip ---------- */

.stitch-strip {
  height: 16px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpolygon points='0,16 8,0 16,16' fill='%239c2b2b'/%3E%3Cpolygon points='16,16 24,0 32,16' fill='%23241b16'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 32px 16px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--ivory-light);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(36, 27, 22, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 20px;
  height: 20px;
  background: var(--red);
  transform: rotate(45deg);
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--red-deep);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.97rem;
}

.main-nav a:hover { color: var(--red-deep); }

.nav-cta {
  background: var(--red);
  color: var(--ivory-light) !important;
  padding: 8px 16px;
  border-radius: 2px;
}

.nav-cta:hover { background: var(--red-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  height: 2px;
  background: var(--ink);
  width: 100%;
}

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  font-size: 0.95rem;
  color: var(--red);
  margin-bottom: 0.6em;
}

.hero-lede {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}

.hero-figure {
  margin: 0;
  justify-self: center;
}

.hero-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 10px solid var(--ivory-light);
  outline: 1px solid rgba(36, 27, 22, 0.15);
  box-shadow: 10px 10px 0 rgba(156, 43, 43, 0.15);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 2px;
  border: 2px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn-primary {
  background: var(--red);
  color: var(--ivory-light);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--red-deep);
  border-color: var(--red-deep);
}

.btn-ghost:hover {
  background: var(--red-deep);
  color: var(--ivory-light);
}

/* ---------- about ---------- */

.about { padding: 56px 0; }

.about-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--gold);
  margin: 0;
  line-height: 1;
}

.stat-label {
  margin: 0.4em 0 0;
  max-width: 24ch;
}

/* ---------- groups ---------- */

.groups { padding: 56px 0 64px; }

.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.group-card {
  background: var(--ivory);
  padding: 26px 22px 24px;
  position: relative;
  border: 1px solid rgba(36, 27, 22, 0.14);
}

.group-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpolygon points='0,10 5,0 10,10' fill='%239c2b2b'/%3E%3Cpolygon points='10,10 15,0 20,10' fill='%23b8862e'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 20px 10px;
}

.group-meta {
  margin: 1em 0 0;
  padding: 0;
}

.group-meta > div {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(36, 27, 22, 0.12);
}

.group-meta dt {
  font-weight: 700;
  min-width: 4.2em;
  color: var(--red-deep);
}

.group-meta dd { margin: 0; }

/* ---------- pricing ---------- */

.pricing {
  background: var(--red-deep);
  color: var(--ivory-light);
  padding: 40px 0;
}

.pricing-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  text-align: center;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin: 0;
}

.price-label { margin: 0.2em 0 0; }

.price-divider {
  width: 1px;
  height: 44px;
  background: rgba(250, 245, 232, 0.35);
}

/* ---------- signup ---------- */

.signup { padding: 64px 0; }

.signup-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

.signup-intro { align-self: start; position: sticky; top: 90px; }

.signup-form {
  background: var(--ivory-light);
  border: 1px solid var(--ink);
  outline: 4px solid var(--ivory);
  outline-offset: -10px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.form-row { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.form-row-half { grid-column: span 1; }

.form-row label { font-size: 0.92rem; font-weight: 700; }

.optional { font-weight: 400; color: #6b5f54; }

.form-row input,
.form-row select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid rgba(36, 27, 22, 0.35);
  background: #fff;
  color: var(--ink);
}

.form-row-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
}

.form-row-check input { margin-top: 4px; }
.form-row-check label { font-weight: 400; font-size: 0.9rem; }

.signup-form .btn { grid-column: 1 / -1; justify-self: start; border: none; cursor: pointer; }

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
}

.form-status.ok { color: #3c5a2f; }
.form-status.err { color: var(--red); }

/* ---------- contact ---------- */

.contact { padding: 56px 0 72px; text-align: center; }

.contact-name { font-size: 1.2rem; margin-bottom: 0.2em; }

.contact-phone { font-size: 1.5rem; font-family: var(--font-display); }

.contact-phone a { text-decoration: none; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: var(--ivory); }

.footer-inner {
  padding: 30px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand { font-family: var(--font-display); font-size: 1.2rem; margin: 0; color: var(--ivory); }

.footer-tag { margin: 0; color: rgba(239, 228, 203, 0.7); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 340px; margin: 0 auto; }
  .about-inner { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: 1fr; }
  .signup-inner { grid-template-columns: 1fr; }
  .signup-intro { position: static; }
}

@media (max-width: 640px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory-light);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid rgba(36, 27, 22, 0.12);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 24px; width: 100%; }
  .nav-cta { margin: 10px 24px; text-align: center; }
  .nav-toggle { display: flex; }
  .form-row-half { grid-column: 1 / -1; }
}
