/* Fox&Hens — стиль сайта по графике игры: Rubik, деревянные плашки, тёплые цвета курятника. */

@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbf3e4;
  --bg-deep: #f3e3c6;
  --surface: #ffffff;
  --text: #2b1a0e;
  --heading: #3a1f0c;
  --muted: #6b5340;
  --accent: #a6460f;
  --border: #ecd8b8;
  --shadow: 0 10px 30px rgba(90, 48, 16, 0.12), 0 2px 6px rgba(90, 48, 16, 0.08);
  --bar: rgba(74, 42, 18, 0.86);
  --bar-text: #fff1df;
  --plate-top: #95541f;
  --plate-bottom: #6a3816;
  --plate-rim: #e9b44c;
  --plate-text: #fff1df;
  --ok: #3f7d1f;
  --ok-text: #ffffff;
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c;
    --bg-deep: #120d09;
    --surface: #241a12;
    --text: #f3e9dc;
    --heading: #ffe2bd;
    --muted: #c9b6a0;
    --accent: #f5a25d;
    --border: #3a2b1f;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    --bar: rgba(36, 22, 10, 0.86);
    --ok: #8fd16a;
    --ok-text: #12200a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%) fixed;
  color: var(--text);
  font: 400 17px/1.6 "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- Шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  color: var(--bar-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 20px rgba(0, 0, 0, 0.18);
}

.top-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.2px;
  margin-right: auto;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }

.top nav { display: flex; gap: 4px; }

.top nav a {
  color: var(--bar-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.top a:focus-visible, .foot a:focus-visible { outline: 2px solid var(--plate-rim); outline-offset: 2px; }

.top nav a:hover { background: rgba(255, 255, 255, 0.1); }
.top nav a[aria-current="page"] { background: rgba(255, 241, 223, 0.18); font-weight: 700; }

.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 14px;
  font-weight: 800;
}

.lang a, .lang span {
  padding: 4px 11px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.4;
}

.lang a { color: var(--bar-text); }
.lang a:hover { background: rgba(255, 255, 255, 0.12); }
.lang span { background: #f5a43a; color: #301000; }

@media (max-width: 640px) {
  .top nav { order: 3; width: 100%; justify-content: space-between; }
  .top nav a { font-size: 14px; padding: 6px 10px; }
}

/* ---------- Плашка (как кнопки в игре) ---------- */

.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 26px;
  border-radius: 18px;
  border: 3px solid var(--plate-rim);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(176deg, rgba(0, 0, 0, 0) 0 7px, rgba(0, 0, 0, 0.05) 7px 9px),
    linear-gradient(180deg, var(--plate-top), var(--plate-bottom));
  --plate-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 4px 0 #4a2610, 0 8px 18px rgba(0, 0, 0, 0.25);
  box-shadow: var(--plate-shadow);
  color: var(--plate-text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  text-shadow: 0 1px 0 #301000, 0 0 2px #301000;
  transition: transform 0.08s ease;
}

a.plate:active { transform: translateY(2px) scale(0.97); }
a.plate:focus-visible {
  outline: 3px solid #301000;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--plate-text), var(--plate-shadow);
}

@media (max-width: 380px) {
  .plate { padding-inline: 18px; }
}

@media (max-width: 340px) {
  .plate { padding-inline: 14px; font-size: 16px; }
  .email { font-size: 16px; }
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 78vh, 720px);
  text-align: center;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

/* Картинка растворяется в фоне страницы маской, а не заливкой цветом: фон страницы — градиент, и заливка одним цветом давала шов. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #8cc4ea url("img/bg.jpg") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 60px), transparent);
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 16px 0;
}

.hero h1 { margin: 0; line-height: 0; }
.hero h1 img { width: min(560px, 92%); filter: drop-shadow(0 6px 12px rgba(48, 16, 0, 0.35)); }

.tagline {
  margin: 14px 0 22px;
  font-size: clamp(19px, 4.6vw, 26px);
  font-weight: 800;
  line-height: 1.3;
  color: #fff1df;
  text-shadow:
    -2px -2px 0 #301000, 2px -2px 0 #301000, -2px 2px 0 #301000, 2px 2px 0 #301000,
    0 -2px 0 #301000, 0 2px 0 #301000, -2px 0 0 #301000, 2px 0 0 #301000, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.hero-cast {
  position: relative;
  margin-top: auto;
  padding: 20px 0 64px;   /* ноги выше нижних 60 px, которые маска фона растворяет */
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2vw;
  pointer-events: none;
}

.hero-cast .fox { width: clamp(150px, min(26vw, 34vh), 260px); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25)); }
.hero-cast .hens { width: clamp(130px, min(22vw, 29vh), 220px); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25)); }

/* Невысокие окна (320×568, 1024×600): первый экран по содержимому и плотнее, чтобы лиса и куры помещались целиком. */
@media (max-height: 620px) {
  .hero { min-height: 0; }
  .hero-text { padding-top: 20px; }
  .tagline { margin: 10px 0 16px; }
}

/* ---------- Содержимое ---------- */

main { display: block; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow { max-width: 760px; }

section.block { padding: 40px 0 8px; }

h1, h2, h3 { color: var(--heading); font-weight: 900; letter-spacing: -0.2px; }
h1 { font-size: clamp(24px, 7.5vw, 42px); line-height: 1.15; margin: 36px 0 12px; overflow-wrap: break-word; }
h2 { font-size: clamp(24px, 4.6vw, 30px); line-height: 1.2; margin: 0 0 18px; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 6px; font-weight: 800; }

.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.how .card { display: flex; gap: 16px; align-items: center; }
.how .card img { width: 76px; height: 76px; object-fit: contain; flex: none; }
.how .card p { margin: 0; color: var(--muted); font-size: 16px; }

.story p { margin: 0 0 14px; }

/* Галерея снимков */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 20px;
  margin: 0 -16px;
  scrollbar-width: thin;
}

.gallery:focus-visible { outline: 2px solid var(--plate-rim); outline-offset: -2px; border-radius: 12px; }

.gallery::after { content: ""; flex: 0 0 1px; }

.gallery figure {
  flex: 0 0 min(86%, 720px);
  margin: 0;
  scroll-snap-align: center;
}

.gallery img {
  display: block;
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hint { color: var(--muted); font-size: 15px; margin: 0; }

/* Списки с галочками */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--ok-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
}

.cta { text-align: center; padding: 40px 0 8px; }
.cta p { font-size: 22px; font-weight: 900; color: var(--heading); margin: 0 0 16px; }

/* Поддержка */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.contact img { width: 96px; height: auto; flex: none; }
.contact div { flex: 1 1 220px; }
.contact p { margin: 0 0 6px; }
.email { font-weight: 700; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 15px; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 0 0 12px;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  position: relative;
  font-weight: 800;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.35;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0; padding: 0 20px 18px; }

/* Политика */
.prose h2 { font-size: 22px; margin: 30px 0 8px; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.date { color: var(--muted); font-size: 15px; margin: 0 0 16px; }

/* ---------- Подвал ---------- */

footer {
  margin-top: 56px;
  background: linear-gradient(180deg, #6b3b18, #4a2610);
  color: #fff1df;
  border-top: 4px solid var(--plate-rim);
}

.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  font-size: 15px;
}

.foot a { color: #fff1df; overflow-wrap: anywhere; }
.foot .brand { font-size: 18px; margin-right: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot small { flex-basis: 100%; color: #e8d3b8; font-size: 14px; }
