/* ============ Design tokens (SamBat logo palette: red · white · blue) ============ */
:root{
  --bg: #f6f3ec;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eef0f4;
  --border: rgba(22,32,46,.12);
  --text: #16202e;
  --text-dim: #515b6a;
  --text-faint: #8a94a2;
  --accent: #d81f2a;        /* logo red */
  --accent-2: #b0121d;      /* deep red */
  --accent-ink: #ffffff;
  --blue: #1c50a0;          /* logo plane blue */
  --blue-2: #143f83;
  --maroon: #d81f2a;
  --maroon-dim: #b0121d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -22px rgba(22,32,46,.35);
  --card-shadow: 0 6px 22px -12px rgba(22,32,46,.22);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --container: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:90px; overflow-x:hidden; }
body{
  margin:0;
  overflow-x:hidden;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; line-height:1.15; font-weight:700; }
p{ margin:0 0 1em; color:var(--text-dim); }
.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }
.accent{ color:var(--accent); }

.skip-link{
  position:absolute; left:-999px; top:0; background:var(--accent); color:var(--accent-ink);
  padding:10px 16px; z-index:999; border-radius:0 0 8px 0;
}
.skip-link:focus{ left:0; }

/* ============ Buttons ============ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; border-radius:999px; font-weight:700; font-size:.95rem;
  border:1px solid transparent; cursor:pointer; transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-2px); }
.btn-accent{ background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:var(--accent-ink); box-shadow:0 10px 28px -10px rgba(216,31,42,.55); }
.btn-accent:hover{ box-shadow:0 16px 34px -10px rgba(216,31,42,.72); }
.btn-ghost{ background:rgba(28,80,160,.06); border-color:rgba(28,80,160,.32); color:var(--blue); }
.btn-ghost:hover{ background:rgba(28,80,160,.12); }
.btn-outline{ background:transparent; border-color:var(--accent); color:var(--accent); }
.btn-outline:hover{ background:rgba(216,31,42,.08); }
.btn-lg{ padding:16px 30px; font-size:1.05rem; }

/* ============ Header ============ */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:100;
  background:rgba(255,255,255,.72); backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid transparent; transition:border-color .3s ease, background .3s ease;
}
.site-header.scrolled{ border-color:var(--border); background:rgba(255,255,255,.93); }
.header-inner{ display:flex; align-items:center; justify-content:space-between; height:76px; gap:24px; }
.brand{ display:flex; align-items:center; gap:12px; flex-shrink:0; }

/* ---- Emblem (circular crop of the SamBat patch logo) ---- */
.emblem{ position:relative; border-radius:50%; overflow:hidden; flex-shrink:0; display:inline-block;
  background:#f2efe6; box-shadow:0 0 0 1px rgba(22,32,46,.10), 0 6px 18px -8px rgba(22,32,46,.28); }
.emblem img{ position:absolute; top:50%; left:50%; width:112%; height:112%; transform:translate(-50%,-50%); object-fit:cover; filter:saturate(1.2) brightness(1.06) contrast(1.05); }
.emblem-sm{ width:48px; height:48px; }
.emblem-md{ width:56px; height:56px; }
.emblem-hero{ display:block; width:104px; height:104px;
  box-shadow:0 0 0 1px rgba(22,32,46,.10), 0 16px 44px -14px rgba(216,31,42,.4); }
.hero-brand{ display:flex; align-items:center; gap:22px; margin-bottom:26px; }
.hero-brand-text{ display:flex; flex-direction:column; gap:4px; }
.hero-brand-name{ font-family:var(--font-body); font-weight:800; letter-spacing:.05em; color:#141619;
  font-size:clamp(1.9rem, 3.4vw, 2.6rem); line-height:1; }
.hero-brand-full{ font-size:clamp(1rem, 1.7vw, 1.25rem); font-weight:600; color:var(--text-dim); }
@media (max-width:480px){
  .emblem-hero{ width:74px; height:74px; }
  .hero-brand{ gap:14px; }
}
.brand-word{ font-family:var(--font-body); font-weight:800; font-size:1.32rem; letter-spacing:.04em; white-space:nowrap; color:#141619; }
.main-nav{ display:flex; gap:26px; margin-left:auto; }
.main-nav a{ font-weight:600; font-size:.95rem; color:var(--text-dim); transition:color .2s ease; position:relative; white-space:nowrap; }
.main-nav a:hover{ color:var(--accent); }
.header-actions{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.header-social{ display:flex; align-items:center; gap:8px; }
.hs-btn{
  width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--border); color:var(--blue);
  transition:transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.hs-btn svg{ width:20px; height:20px; }
.hs-btn:hover{ transform:translateY(-2px); }
.hs-tg:hover{ background:#229ED9; border-color:#229ED9; color:#fff; box-shadow:0 8px 18px -8px rgba(34,158,217,.7); }
.hs-vk:hover{ background:#0077FF; border-color:#0077FF; color:#fff; box-shadow:0 8px 18px -8px rgba(0,119,255,.7); }
.phone-link{ font-weight:700; color:var(--text-dim); font-size:.92rem; white-space:nowrap; }
.phone-link:hover{ color:var(--accent); }
.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px; width:40px; height:40px;
  background:var(--surface); border:1px solid var(--border); border-radius:10px; cursor:pointer;
}
.nav-toggle span{ display:block; height:2px; width:18px; margin:0 auto; background:var(--text); border-radius:2px; }

/* ============ Hero ============ */
.hero{ position:relative; padding:150px 0 60px; overflow:hidden; }
.hero-bg-emblem{
  position:absolute; z-index:0; pointer-events:none;
  right:-90px; top:46%; transform:translateY(-50%);
  width:min(600px, 55vw); aspect-ratio:1;
  background:url("../images/logo-emblem.jpg") center/contain no-repeat;
  opacity:.10;
}
@media (max-width:760px){
  .hero-bg-emblem{ right:-28%; top:34%; width:110vw; opacity:.06; }
}
.hero-glow{
  position:absolute; inset:-20% -10% auto -10%; height:900px; z-index:0; pointer-events:none;
  background:
    radial-gradient(600px 400px at 15% 20%, rgba(216,31,42,.10), transparent 60%),
    radial-gradient(520px 380px at 85% 10%, rgba(28,80,160,.11), transparent 60%),
    radial-gradient(700px 500px at 50% 60%, rgba(216,31,42,.05), transparent 65%);
  filter:blur(10px);
  animation:driftGlow 18s ease-in-out infinite alternate;
}
@keyframes driftGlow{ from{ transform:translate3d(0,0,0) scale(1);} to{ transform:translate3d(0,30px,0) scale(1.05);} }
.hero-inner{ position:relative; z-index:1; max-width:840px; }
.eyebrow{
  display:inline-block; font-weight:700; font-size:.85rem; letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent-2); background:rgba(216,31,42,.08); border:1px solid rgba(216,31,42,.22);
  padding:6px 14px; border-radius:999px; margin-bottom:20px;
}
.eyebrow.center{ display:block; width:fit-content; margin-left:auto; margin-right:auto; }
.hero-title{ font-size:clamp(2.4rem, 5.5vw, 4.2rem); margin-bottom:22px; }
.hero-sub{ font-size:1.15rem; max-width:640px; color:var(--text-dim); margin-bottom:34px; }
.hero-cta{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom:70px; }

.stats-strip{
  position:relative; z-index:1; display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
}
.stat-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:24px 18px; text-align:center; box-shadow:var(--card-shadow);
}
.stat-num{ display:block; font-family:var(--font-display); font-size:clamp(1.6rem,3vw,2.3rem); font-weight:700; color:var(--accent); }
.stat-label{ display:block; margin-top:6px; font-size:.85rem; color:var(--text-dim); }

/* ============ Sections ============ */
.section{ padding:100px 0; position:relative; }
.section-alt{ background:var(--bg-alt); }
.section-title{ font-size:clamp(1.8rem,3.4vw,2.6rem); margin-bottom:18px; }
.section-title.center{ text-align:center; max-width:760px; margin-left:auto; margin-right:auto; }
.section-sub{ color:var(--text-dim); font-size:1.05rem; max-width:620px; margin-bottom:56px; }
.section-sub.center{ text-align:center; margin-left:auto; margin-right:auto; }

/* ============ About ============ */
.about-section{ overflow:hidden; }
.section-bg-flag{
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background:url("../images/flag-bg.webp") center/cover no-repeat;
  opacity:.09;
}
.about-section .container{ position:relative; z-index:1; }
.about-grid{ display:grid; grid-template-columns:.85fr 1fr; gap:64px; align-items:center; }
.about-media{ position:relative; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.about-media img{ width:100%; height:100%; object-fit:cover; aspect-ratio:4/5; }
.about-media-badge{
  position:absolute; left:20px; bottom:20px; background:rgba(255,255,255,.92); backdrop-filter:blur(8px);
  border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 18px; display:flex; flex-direction:column;
  box-shadow:0 8px 20px -10px rgba(22,32,46,.35);
}
.about-media-badge strong{ color:var(--accent); font-family:var(--font-display); font-size:1.05rem; }
.about-media-badge span{ font-size:.78rem; color:var(--text-dim); }
.about-quote{
  margin-top:28px; padding:20px 24px; border-left:3px solid var(--accent);
  background:rgba(216,31,42,.05); border-radius:0 var(--radius-sm) var(--radius-sm) 0; font-style:italic; color:var(--text);
}
.about-help-list{ list-style:none; margin:20px 0; padding:0; display:grid; gap:12px; }
.about-help-list li{ position:relative; padding-left:28px; color:var(--text-dim); }
.about-help-list li::before{ content:""; position:absolute; left:2px; top:9px; width:10px; height:10px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(216,31,42,.12); }
.about-help-list b{ color:var(--text); }

.about-history{ margin-top:64px; }
.about-history-title{ font-size:clamp(1.4rem,2.6vw,1.95rem); margin-bottom:30px; text-align:center; }
.about-achievements{ list-style:none; padding:0; margin:0 auto; max-width:1020px; display:grid; grid-template-columns:1fr 1fr; gap:18px 34px; }
.about-achievements li{
  position:relative; padding:2px 0 2px 34px; color:var(--text-dim); font-size:.97rem; line-height:1.55;
}
.about-achievements li::before{
  content:""; position:absolute; left:0; top:3px; width:20px; height:20px; border-radius:6px;
  background:rgba(216,31,42,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d81f2a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
}
.about-achievements b{ color:var(--text); }

.about-quote-center{
  margin:56px auto 0; max-width:820px; text-align:center; font-size:1.12rem; font-style:normal; font-weight:600;
  border-left:0; border-top:3px solid var(--accent); border-radius:0; padding:26px 28px 0; background:transparent; color:var(--text);
}

/* ============ Direction / Result cards ============ */
.cards-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.dir-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:28px 24px; box-shadow:var(--card-shadow); transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.dir-card:hover{ transform:translateY(-6px); border-color:rgba(216,31,42,.35); box-shadow:0 16px 38px -16px rgba(22,32,46,.32); }
.dir-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:52px; height:52px; border-radius:14px; margin-bottom:16px; color:var(--accent);
  background:rgba(216,31,42,.09); border:1px solid rgba(216,31,42,.22);
}
.dir-icon svg{ width:26px; height:26px; }
.dir-card:hover .dir-icon{ background:rgba(216,31,42,.15); border-color:rgba(216,31,42,.4); }
.dir-num{ display:block; font-family:var(--font-display); color:var(--accent); font-weight:700; font-size:1.05rem; margin-bottom:8px; }
.dir-card h3{ font-size:1.1rem; margin-bottom:10px; }
.dir-card p{ font-size:.92rem; margin:0; }
.dir-note{
  display:inline-flex; align-items:center; gap:8px; margin-top:16px; padding:7px 14px;
  border-radius:999px; font-size:.82rem; font-weight:600; line-height:1.25;
}
.dir-note::before{ content:""; width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.dir-note-need{ background:rgba(216,31,42,.1); color:var(--accent-2); }
.dir-note-need::before{ background:var(--accent); box-shadow:0 0 0 3px rgba(216,31,42,.16); }
.dir-note-paused{ background:rgba(22,32,46,.06); color:var(--text-faint); }
.dir-note-paused::before{ background:#9aa3ad; }
.dir-note-info{ background:rgba(28,80,160,.09); color:var(--blue); }
.dir-note-info::before{ background:var(--blue); }

.results-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.result-card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:30px 26px; box-shadow:var(--card-shadow);
}
.result-card .r-num{ font-family:var(--font-display); font-size:1.7rem; font-weight:700; color:var(--blue); display:block; margin-bottom:10px; }
.result-card p{ margin:0; font-size:.94rem; }

/* ============ Gallery ============ */
.gallery-grid{ column-count:4; column-gap:16px; }
.gallery-item{ break-inside:avoid; margin-bottom:16px; border-radius:var(--radius-sm); overflow:hidden; cursor:zoom-in; position:relative; border:1px solid var(--border); box-shadow:var(--card-shadow); }
.gallery-item img{ width:100%; display:block; transition:transform .4s ease; }
.gallery-item:hover img{ transform:scale(1.06); }

/* ============ Help ============ */
.help-section{ background:radial-gradient(1200px 500px at 50% 0%, rgba(216,31,42,.08), transparent 70%), var(--bg); }
.help-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.help-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:32px 26px;
  text-align:center; display:flex; flex-direction:column; align-items:center; gap:12px; box-shadow:var(--card-shadow);
}
.help-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:64px; height:64px; border-radius:18px; color:var(--accent);
  background:rgba(216,31,42,.09); border:1px solid rgba(216,31,42,.22);
}
.help-icon svg{ width:30px; height:30px; }
.help-card h3{ font-size:1.2rem; }
.help-card p{ font-size:.92rem; min-height:66px; }
.help-card .btn{ margin-top:auto; width:100%; }
.help-card .btn + .btn{ margin-top:10px; }

.requisites-panel{
  margin-top:34px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:28px; max-width:900px; margin-left:auto; margin-right:auto; box-shadow:var(--card-shadow);
}
.requisites-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px 28px; }
.requisites-grid div{ display:flex; flex-direction:column; gap:4px; }
.requisites-grid span{ font-size:.78rem; color:var(--text-faint); text-transform:uppercase; letter-spacing:.04em; }
.requisites-grid b{ font-weight:700; cursor:pointer; border-bottom:1px dashed var(--text-faint); width:fit-content; }
.requisites-grid b:hover{ color:var(--accent); border-color:var(--accent); }
.requisites-hint{ text-align:center; margin:18px 0 0; font-size:.8rem; color:var(--text-faint); }

/* ============ Contacts ============ */
.contacts-grid{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:stretch; }
.contacts-list{ margin:26px 0 30px; display:flex; flex-direction:column; gap:18px; }
.contacts-list li{ display:flex; flex-direction:column; gap:4px; }
.contacts-list a, .contacts-list span{ font-weight:600; }
.contacts-list a:hover{ color:var(--accent); }
.ci-label{ font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); font-weight:600; }
.social-row{ display:flex; gap:12px; }
.social-row a{
  width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--border); font-weight:800; font-size:.72rem; color:var(--blue);
  transition:background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.social-row a:hover{ background:var(--accent); border-color:var(--accent); color:#fff; transform:translateY(-3px); }
.contacts-map{ border-radius:var(--radius); overflow:hidden; border:1px solid var(--border); min-height:340px; box-shadow:var(--shadow); }
.contacts-map iframe{ width:100%; height:100%; border:0; }

/* ============ Footer (deep logo-blue anchor) ============ */
.site-footer{ background:var(--blue-2); border-top:4px solid var(--accent); padding:64px 0 0; color:rgba(255,255,255,.82); }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px; padding-bottom:44px; }
.footer-brand-row{ display:flex; align-items:center; gap:14px; }
.site-footer .brand-word{ color:#fff; }
.site-footer .brand-word .accent{ color:#fff; }  /* на синем футере весь «СамБат» белый */
.footer-brand p{ margin-top:16px; font-size:.9rem; max-width:280px; color:rgba(255,255,255,.72); }
.footer-col h4{ font-size:.85rem; text-transform:uppercase; letter-spacing:.05em; color:rgba(255,255,255,.55); margin-bottom:16px; }
.footer-col{ display:flex; flex-direction:column; gap:10px; font-size:.92rem; color:rgba(255,255,255,.82); }
.footer-col a:hover{ color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.16); padding:20px 0; font-size:.82rem; color:rgba(255,255,255,.6); }

/* ============ Floating elements ============ */
.fab-help{
  position:fixed; right:22px; bottom:22px; z-index:90; width:56px; height:56px; border-radius:50%;
  background:linear-gradient(135deg,var(--maroon),var(--maroon-dim)); display:none; align-items:center; justify-content:center;
  color:#fff; box-shadow:0 12px 30px -8px rgba(216,31,42,.7); animation:pulse 2.4s ease-in-out infinite;
}
.fab-help svg{ width:24px; height:24px; }
@keyframes pulse{ 0%,100%{ box-shadow:0 12px 30px -8px rgba(216,31,42,.7);} 50%{ box-shadow:0 12px 30px -2px rgba(216,31,42,.95);} }
.back-to-top{
  position:fixed; right:22px; bottom:88px; z-index:90; width:44px; height:44px; border-radius:50%;
  background:var(--surface); border:1px solid var(--border); color:var(--text); cursor:pointer;
  display:none; align-items:center; justify-content:center; font-size:1.1rem; box-shadow:var(--card-shadow);
}
.fab-help.show, .back-to-top.show{ display:flex; }

/* ============ Lightbox ============ */
.lightbox{
  position:fixed; inset:0; background:rgba(12,18,28,.9); z-index:200; display:flex; align-items:center; justify-content:center;
  padding:40px; backdrop-filter:blur(6px);
}
.lightbox[hidden]{ display:none; }
.lightbox img{ max-width:100%; max-height:100%; border-radius:10px; box-shadow:0 30px 80px rgba(0,0,0,.6); }
.lightbox-close{
  position:absolute; top:24px; right:28px; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.3);
  color:#fff; width:42px; height:42px; border-radius:50%; cursor:pointer; font-size:1rem;
}

/* ============ Reveal animation ============ */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:none; }

/* ============ Responsive ============ */
@media (max-width: 1280px){
  .phone-link{ display:none; }
  .main-nav{ gap:22px; }
}
@media (max-width: 980px){
  .about-grid, .contacts-grid{ grid-template-columns:1fr; }
  .cards-grid, .results-grid, .help-grid{ grid-template-columns:repeat(2,1fr); }
  .gallery-grid{ column-count:3; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .stats-strip{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 760px){
  .main-nav{ position:fixed; top:76px; left:0; right:0; background:rgba(255,255,255,.98); backdrop-filter:blur(14px);
    flex-direction:column; padding:20px 24px; gap:6px; border-bottom:1px solid var(--border); box-shadow:0 20px 40px -20px rgba(22,32,46,.3);
    transform:translateY(-130%); transition:transform .3s ease; }
  .main-nav.open{ transform:translateY(0); }
  .main-nav a{ padding:12px 0; border-bottom:1px solid var(--border); }
  .nav-toggle{ display:flex; }
  .phone-link{ display:none; }
  .cards-grid, .results-grid, .help-grid{ grid-template-columns:1fr; }
  .gallery-grid{ column-count:2; }
  .footer-grid{ grid-template-columns:1fr; }
  .requisites-grid{ grid-template-columns:1fr 1fr; }
  .about-achievements{ grid-template-columns:1fr; }
  .hero{ padding-top:130px; }
  .section{ padding:70px 0; }
}
@media (max-width: 480px){
  .gallery-grid{ column-count:1; }
  .requisites-grid{ grid-template-columns:1fr; }
  .stats-strip{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 560px){
  .header-actions .btn-accent{ display:none; }  /* donate stays reachable via floating heart */
}
@media (max-width: 420px){
  .header-inner{ gap:12px; }
  .brand-word{ font-size:1.12rem; }
  .emblem-sm{ width:42px; height:42px; }
  .header-actions{ gap:10px; }
  .header-social{ gap:6px; }
  .hs-btn{ width:38px; height:38px; }
}
@media (max-width: 340px){
  .header-social{ display:none; }
}
