:root {
  --fur: #8a5a33;
  --fur-dark: #5d3a1f;
  --fur-light: #c99a63;
  --cream: #f7efe2;
  --paper: #fffaf2;
  --water: #9fd4d9;
  --green: #6f9e58;
  --ink: #33261a;
  --accent: #d97b3f;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(51, 38, 26, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "PT Sans", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
}

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

a { color: var(--accent); }

/* ---------- Навбар ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 28px;
  background: var(--fur-dark);
  color: var(--cream);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.4px;
  color: var(--cream);
  text-decoration: none;
}

.navbar nav { display: flex; gap: 16px; flex-wrap: wrap; }

.navbar nav a {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.95rem;
}

.navbar nav a:hover { opacity: 1; text-decoration: underline; }

.nav-auth { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.nav-auth #nav-user { font-size: 0.9rem; opacity: 0.9; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--fur-dark);
  border: 2px solid var(--fur-dark);
}
.btn-small { padding: 6px 14px; font-size: 0.85rem; }

/* ---------- Хиро ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--fur) 0%, var(--fur-dark) 100%);
  color: var(--cream);
  padding: 72px 28px 96px;
  overflow: hidden;
}

.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; }

.hero h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.15; margin-bottom: 18px; }

.hero p.lead { font-size: 1.2rem; max-width: 720px; opacity: 0.94; margin-bottom: 28px; }

.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-capy {
  position: absolute;
  right: -30px;
  bottom: -20px;
  width: 340px;
  opacity: 0.9;
  z-index: 1;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ---------- Секции ---------- */
section { padding: 64px 28px; }

.section-inner { max-width: 1100px; margin: 0 auto; }

section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin-bottom: 10px;
  color: var(--fur-dark);
}

section .section-sub { opacity: 0.8; margin-bottom: 32px; max-width: 780px; }

.section-alt { background: var(--paper); }

/* ---------- Стая SVG-капибар ---------- */
.herd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.herd-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 10px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.herd-card:hover { transform: translateY(-4px) rotate(-1deg); }

.herd-card .name { font-weight: 700; font-size: 0.9rem; margin-top: 4px; }
.herd-card .mood { font-size: 0.78rem; opacity: 0.65; }

/* ---------- Галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.photo-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.photo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.photo-card .photo-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.photo-card h3 { font-size: 1.05rem; color: var(--fur-dark); }

.photo-card p { font-size: 0.9rem; opacity: 0.8; flex: 1; }

/* ---------- Факты ---------- */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.fact {
  background: #fff;
  border-left: 6px solid var(--green);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.fact h3 { margin-bottom: 6px; font-size: 1.05rem; color: var(--fur-dark); }
.fact p { font-size: 0.92rem; opacity: 0.85; }

/* ---------- Блог ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.post {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.post .post-meta { font-size: 0.8rem; opacity: 0.6; margin-bottom: 8px; }
.post h3 { color: var(--fur-dark); margin-bottom: 10px; }
.post p { font-size: 0.93rem; margin-bottom: 10px; }

/* ---------- Цитаты ---------- */
.quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.quote {
  background: var(--paper);
  border: 2px dashed var(--fur-light);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-style: italic;
}

.quote .author { margin-top: 8px; font-style: normal; font-weight: 700; font-size: 0.88rem; color: var(--fur-dark); }

/* ---------- FAQ ---------- */
.faq details {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 20px;
  margin-bottom: 12px;
}

.faq summary { cursor: pointer; font-weight: 700; color: var(--fur-dark); }

.faq details p { margin-top: 8px; font-size: 0.94rem; opacity: 0.85; }

/* ---------- Модалка ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 10, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--paper);
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow: auto;
}

.modal h3 { color: var(--fur-dark); margin-bottom: 14px; }

.modal label { display: block; font-size: 0.85rem; font-weight: 700; margin: 12px 0 4px; }

.modal input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--fur-light);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
}

.modal .hint { font-size: 0.8rem; opacity: 0.6; margin-top: 6px; }

.modal .modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.token-box {
  margin-top: 14px;
  background: #2d2419;
  color: #d7e4b8;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.72rem;
  padding: 12px;
  border-radius: 10px;
  word-break: break-all;
  user-select: all;
}

.token-parts { margin-top: 12px; font-size: 0.82rem; }
.token-parts b { color: var(--fur-dark); }
.token-parts .json {
  background: #fff;
  border: 1px solid var(--fur-light);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px 0 10px;
  font-family: monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- Футер ---------- */
footer {
  background: var(--fur-dark);
  color: var(--cream);
  padding: 40px 28px 28px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

footer h4 { margin-bottom: 10px; }

footer ul { list-style: none; }
footer li { margin-bottom: 6px; font-size: 0.9rem; }

footer a { color: var(--cream); opacity: 0.85; }

.credits {
  max-width: 1100px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ---------- Адаптив ---------- */
@media (max-width: 720px) {
  .hero-capy { display: none; }
  .navbar { padding: 10px 16px; }
  section { padding: 44px 16px; }
}
