* {
  box-sizing: border-box;
}

:root {
  --bg: #fff7ec;
  --bg-alt: #fdefdd;
  --card: #ffffff;
  --ink: #4a3728;
  --ink-soft: #7c6650;
  --accent: #ff6b35;
  --accent-2: #e9a23b;
  --green: #3fb984;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(120, 80, 40, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg)
    radial-gradient(circle at 12% 8%, #ffe9c9 0, transparent 45%),
    radial-gradient(circle at 88% 30%, #ffe2d3 0, transparent 40%);
  background-attachment: fixed;
  line-height: 1.6;
}

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 900;
  margin: 0 0 0.5em;
}

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 247, 236, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #f3e2cb;
}

.logo {
  font-weight: 900;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 107, 53, 0.45);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.btn--small {
  padding: 0.45rem 1.1rem;
  font-size: 0.95rem;
}

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

.badge {
  display: inline-block;
  background: #ffe6d2;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.4em;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.hero__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: 1.8rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.hero__stats div {
  display: flex;
  flex-direction: column;
}

.hero__stats strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-2);
}

.hero__stats span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero__art {
  text-align: center;
}

.doggo {
  width: min(360px, 90%);
  filter: drop-shadow(0 18px 26px rgba(150, 95, 40, 0.25));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.doggo__tail {
  transform-origin: 262px 232px;
  animation: wag 0.45s ease-in-out infinite alternate;
}

@keyframes wag {
  from { transform: rotate(-16deg); }
  to { transform: rotate(22deg); }
}

.doggo__ear {
  transform-origin: center top;
}

.doggo__ear--left { animation: ear 3s ease-in-out infinite; }
.doggo__ear--right { animation: ear 3s ease-in-out infinite 0.4s; }

@keyframes ear {
  0%, 88%, 100% { transform: rotate(0); }
  92% { transform: rotate(-7deg); }
  96% { transform: rotate(5deg); }
}

.doggo__eyes {
  transform-origin: 160px 102px;
  animation: blink 4.5s infinite;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}

.doggo__tongue {
  transform-origin: 160px 168px;
  animation: tongue 2.4s ease-in-out infinite;
}

@keyframes tongue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.paw-trail {
  margin-top: -0.5rem;
  font-size: 1.4rem;
  letter-spacing: 1.2rem;
  opacity: 0.65;
  animation: crawl 6s linear infinite;
}

@keyframes crawl {
  from { transform: translateX(-14px); }
  to { transform: translateX(14px); }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
  text-align: center;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.section__sub {
  color: var(--ink-soft);
  margin-top: -0.3rem;
}

.section--alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 2px solid #f3e2cb;
}

.section--alt > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== КАРТОЧКИ ПОРОД ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
  text-align: left;
}

.breed {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.breed:hover {
  transform: translateY(-6px);
  border-color: #ffd7bd;
}

.breed__emoji {
  font-size: 3rem;
  display: block;
}

.breed h3 {
  margin: 0.6rem 0 0.2rem;
  font-size: 1.25rem;
}

.breed__tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breed p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.breed__more {
  display: none;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 2px dashed #f3e2cb;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}

.breed.open .breed__more {
  display: block;
}

.breed__bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.bar__track {
  height: 8px;
  background: #f3e2cb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
}

/* ===== ФАКТЫ ===== */
.fact-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem 1.5rem;
  max-width: 640px;
  margin: 2rem auto 0;
}

.fact-box__emoji {
  font-size: 3.4rem;
  animation: pop 0.4s ease;
}

@keyframes pop {
  from { transform: scale(0.4) rotate(-12deg); }
  to { transform: scale(1) rotate(0); }
}

.fact-box__text {
  font-size: 1.2rem;
  font-weight: 700;
  min-height: 3.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== УХОД ===== */
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
  text-align: left;
}

.care-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.care-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
}

.care-card__icon {
  font-size: 2.2rem;
}

.care-card h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.15rem;
}

.care-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ===== ВИКТОРИНА ===== */
.quiz {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 2rem auto 0;
  padding: 2rem 1.5rem;
  color: #000;
}

.quiz__emoji {
  font-size: 5rem;
  line-height: 1;
  animation: pop 0.4s ease;
}

.quiz__q {
  font-size: 1.25rem;
  font-weight: 800;
  color: #000;
}

.quiz__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.quiz__answers button {
  font: inherit;
  font-weight: 700;
  color: #000;
  padding: 0.8rem;
  border-radius: 14px;
  border: 2px solid #f3e2cb;
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.quiz__answers button:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quiz__answers button.correct {
  border-color: var(--green);
  background: #e7f9f1;
}

.quiz__answers button.wrong {
  border-color: #e5484d;
  background: #fdecec;
}

.quiz__answers button:disabled {
  cursor: default;
}

.quiz__score {
  font-weight: 800;
  color: #000;
  min-height: 1.6em;
  margin-bottom: 0;
}

/* ===== ОБ АВТОРЕ ===== */
.author {
  display: flex;
  gap: 1.8rem;
  align-items: flex-start;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 760px;
  margin: 2rem auto 0;
  border-left: 8px solid var(--accent-2);
}

.author__avatar {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe6d2, #ffd7bd);
  display: grid;
  place-items: center;
  font-size: 3rem;
  box-shadow: inset 0 0 0 4px #fff, 0 6px 16px rgba(150, 95, 40, 0.2);
}

.author__avatar-img {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(150, 95, 40, 0.25);
}

.author__body {
  min-width: 0;
}

.author__name {
  margin: 0 0 0.1rem;
  font-size: 1.4rem;
}

.author__role {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.author__bio {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.author__facts {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.author__facts strong {
  color: var(--ink);
}

.author__links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .author {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author__links {
    justify-content: center;
  }
}

/* ===== ФОТО ДОБЕРМАНА ===== */
.author-photo {
  max-width: 760px;
  margin: 1.5rem auto 0;
}

.author-photo img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 6px solid #fff;
}

.author-photo figcaption {
  text-align: center;
  font-weight: 800;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.footer p {
  margin: 0.3rem 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2.2rem;
  }

  .lead { margin-inline: auto; }

  .hero__actions,
  .hero__stats {
    justify-content: center;
  }

  .nav {
    display: none;
  }

  .quiz__answers {
    grid-template-columns: 1fr;
  }
}
