/* Стрелковый клуб «Калибр» — фирменный стиль (brand.md) */

:root {
  --bg: #0E1116;
  --surface: #171D24;
  --text: #F4EFE6;
  --accent: #E8822A;
  --accent-dark: #A84E0F;
  --neutral: #8A939C;
  --error: #D64545;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fade: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: "Segoe UI", "Roboto", Arial, sans-serif;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

h1 { font-size: 52px; font-weight: 800; }
h2 { font-size: 36px; font-weight: 700; }
h3 { font-size: 24px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 460px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.6em;
}

.muted { color: var(--neutral); }
.per { color: var(--neutral); font-size: 14px; font-weight: 400; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
.btn-accent { background: var(--accent); color: #0E1116; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232, 130, 42, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--neutral); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--surface);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.brand-logo { width: 40px; height: 40px; }
.brand-name { font-size: 16px; }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a { color: var(--text); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.site-nav a:hover { color: var(--accent); }
.header-actions { display: flex; gap: 10px; margin-left: 16px; }
.burger { display: none; background: none; border: 0; cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: 72vh; display: flex; align-items: center; overflow: hidden; background: var(--bg); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,17,22,0.9) 0%, rgba(14,17,22,0.55) 55%, rgba(14,17,22,0.3) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 660px; padding: 80px 20px; }
.hero-sub { color: #d9d3c6; font-size: 18px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-content > * { animation: heroIn 400ms var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 60ms; }
.hero-content > *:nth-child(3) { animation-delay: 120ms; }
.hero-content > *:nth-child(4) { animation-delay: 180ms; }

/* Секции */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }

/* Появление секций */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 260ms var(--ease), transform 260ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* О клубе */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-media img { border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.about-points { list-style: none; padding: 0; margin: 16px 0 0; }
.about-points li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: #d9d3c6; }
.team { margin-top: 20px; }
.team .muted { display: block; margin-bottom: 8px; }
.team-avatars { display: flex; gap: 8px; }
.team-avatars img { border-radius: 50%; border: 2px solid rgba(232,130,42,0.4); }

/* Карточки */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.tournaments-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.card {
  background: var(--surface);
  border: 1px solid rgba(138, 147, 156, 0.18);
  border-radius: 12px;
  padding: 24px;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.45); border-color: var(--accent); }
.card img { margin-bottom: 14px; }
.card h3 { font-size: 20px; }
.price { font-size: 24px; font-weight: 800; color: var(--accent); margin: 0; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(232, 130, 42, 0.14); color: var(--accent); border: 1px solid rgba(232, 130, 42, 0.35);
}
.services-banner, .tournaments-banner { margin-top: 32px; }
.services-banner img, .tournaments-banner img { border-radius: 12px; width: 100%; }

/* Форма заявки */
.lead-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.lead-form { background: var(--surface); border: 1px solid rgba(138,147,156,0.18); border-radius: 12px; padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--neutral); margin-bottom: 6px; }
.field input, .field select, .field textarea, .search input, .select, .client-add input {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(138,147,156,0.3);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus, .select:focus, .client-add input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 130, 42, 0.2);
}
.field textarea { resize: vertical; }
.field-error { display: block; color: var(--error); font-size: 13px; min-height: 16px; margin-top: 4px; }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #d9d3c6; margin-bottom: 8px; }
.consent input { margin-top: 3px; accent-color: var(--accent); }
.form-status { min-height: 20px; font-size: 14px; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--error); }

/* Вход / панель */
.view { padding: 56px 0 80px; min-height: 70vh; }
.panel-card { background: var(--surface); border-radius: 12px; padding: 32px; border: 1px solid rgba(138,147,156,0.18); }
.back-link { display: inline-block; margin-top: 16px; color: var(--neutral); font-size: 14px; }
.back-link:hover { color: var(--accent); }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head-actions { display: flex; align-items: center; gap: 12px; }

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--surface); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--neutral);
  padding: 12px 16px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 220ms var(--ease-fade); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--surface); border-radius: 12px; padding: 20px; border: 1px solid rgba(138,147,156,0.18); }
.stat-value { display: block; font-size: 34px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--neutral); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }

.toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1; min-width: 200px; display: flex; align-items: center; }
.search img { position: absolute; left: 12px; pointer-events: none; }
.search input { padding-left: 36px; }
.select { width: auto; min-width: 160px; }

.list { display: grid; gap: 12px; }
.list-item {
  background: var(--surface);
  border: 1px solid rgba(138,147,156,0.18);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.list-item:hover { border-color: var(--accent); }
.list-item .avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.list-item .li-main { flex: 1; min-width: 160px; }
.list-item .li-main b { display: block; }
.list-item .li-sub { color: var(--neutral); font-size: 13px; }
.status {
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid rgba(138,147,156,0.35); color: var(--neutral); white-space: nowrap;
}
.status-new { color: var(--accent); border-color: rgba(232,130,42,0.5); background: rgba(232,130,42,0.12); }
.status-work { color: #F4EFE6; border-color: rgba(244,239,230,0.3); }
.status-result { color: #9fc1d8; border-color: rgba(159,193,216,0.4); }
.status-paid { color: #8fd08f; border-color: rgba(143,208,143,0.4); }
.li-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 8px 14px; font-size: 12px; }

.client-add { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.client-add input { flex: 1; min-width: 160px; }

.empty { text-align: center; padding: 40px 20px; color: var(--neutral); }
.empty img { margin: 0 auto 16px; }

/* Футер */
.site-footer { background: var(--surface); padding: 48px 0 24px; margin-top: 0; border-top: 1px solid rgba(138,147,156,0.15); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid a { display: block; color: var(--text); margin-bottom: 8px; font-size: 14px; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid h4 { color: var(--neutral); }
.footer-bottom { border-top: 1px solid rgba(138,147,156,0.15); margin-top: 32px; padding-top: 20px; display: flex; justify-content: space-between; }

/* Адаптивность */
@media (max-width: 860px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .about-grid, .lead-wrap { grid-template-columns: 1fr; }
  .services-grid, .tournaments-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--surface); }
  .site-nav.open { display: flex; }
  .header-actions .btn-ghost { display: none; }
  .burger { display: block; margin-left: auto; }
}
@media (max-width: 560px) {
  .services-grid, .tournaments-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-content { padding: 48px 20px; }
  h1 { font-size: 32px; }
  .header-actions .btn-accent { padding: 10px 14px; font-size: 12px; }
}

/* Доступность: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
