/* Публичный сайт Татьяны Белевич.
   Композиция как у Roundy (круг + текст), стили свои.
   Нижняя лента — один столбец на всю ширину, не две колонки.
   Админка эти стили не подключает: у неё admin.css. */

:root {
  --bg: #fdfbf6;
  --bg-soft: #f5efe4;
  --surface: #ffffff;
  --accent: #a8b724;
  --accent-dark: #7c8b12;
  --wood-light: #e3c79c;
  --wood: #c89968;
  --wood-dark: #7a5638;
  --text: #2e2014;
  --text-mut: #6b5a48;
  --line: #efe6d6;
  --shadow: 0 10px 28px rgba(122, 86, 56, 0.08);
  --lead: #4a3b2c;
  --on-accent: #2e2014;
  --accent-hover: #b7c63a;
  --footer-bg: var(--wood-dark);
  --on-footer: #f5efe4;
  --footer-muted: rgba(245, 239, 228, 0.78);
  --footer-line: rgba(245, 239, 228, 0.2);
  --row-hover: rgba(227, 199, 156, 0.35);
  --focus: rgba(168, 183, 36, 0.35);
  --serif: "Noto Serif", "Liberation Serif", Georgia, serif;
  --sans: "Noto Sans", "Liberation Sans", "Segoe UI", sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

/* Тёмная тема — та же вёрстка, другие цвета. Кнопка в шапке ставит data-theme. */
[data-theme="dark"] {
  --bg: #1a1410;
  --bg-soft: #241c16;
  --surface: #2e241c;
  --accent: #c6d84a;
  --accent-dark: #d4e36a;
  --accent-hover: #d7e85e;
  --wood-light: #8d6a45;
  --wood: #c89968;
  --wood-dark: #e3c79c;
  --text: #f6f0e6;
  --text-mut: #cbbba8;
  --line: #4a3c32;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  --lead: #e4d5c4;
  --on-accent: #2e2014;
  --footer-bg: #120e0b;
  --on-footer: #f6f0e6;
  --footer-muted: rgba(246, 240, 230, 0.72);
  --footer-line: rgba(246, 240, 230, 0.16);
  --row-hover: rgba(200, 153, 104, 0.18);
  --focus: rgba(198, 216, 74, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

::selection { background: var(--wood-light); color: var(--text); }

.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-120%);
  background: var(--accent);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { transform: none; top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- шапка ---------- */

.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark { width: 36px; height: 36px; flex: none; }

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  margin-top: 1px;
  color: var(--text-mut);
  font-size: 12.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--accent-dark); }

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { border-color: var(--wood); }
.theme-toggle .when-dark { display: none; }
[data-theme="dark"] .theme-toggle .when-light { display: none; }
[data-theme="dark"] .theme-toggle .when-dark { display: inline; }

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--surface);
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }

/* ---------- герой ---------- */

.hero { padding: 8px 0 28px; }

.hero-stage {
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(280px, 1fr);
  align-items: center;
  column-gap: 36px;
  min-height: 560px;
}

.hero-photo {
  width: min(520px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  justify-self: start;
  display: block;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 22%;
}

.hero-photo.is-empty,
.circle.is-empty {
  background:
    radial-gradient(circle at 32% 30%, rgba(168, 183, 36, 0.85) 0 22%, transparent 23%),
    linear-gradient(145deg, var(--wood-light), var(--wood));
}

.hero-copy { min-width: 0; align-self: center; }

/* Плашка того же цвета, что фон: заезжает на круг и делает «вырез». */
.hero-title {
  position: relative;
  z-index: 1;
  margin-left: -168px;
  background: var(--bg);
  border-radius: 160px;
  padding: 34px 8px 30px 72px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title h1 {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.05;
}

.hero-title a:hover { color: var(--accent-dark); }

.hero-aside {
  max-width: 460px;
  padding: 6px 8px 0 12px;
}

.lead { margin: 0; font-size: 20px; line-height: 1.45; color: var(--lead); }
.lead p { margin: 0 0 8px; }
.lead p:last-child { margin: 0; }

.author { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
}
.author strong { display: block; font-size: 17px; }
.author span { display: block; color: var(--text-mut); font-size: 14px; }

/* ---------- витрина ---------- */

.sale {
  background: var(--bg-soft);
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2 { margin: 0; font-size: 36px; }

.section-head p {
  margin: 0;
  max-width: 420px;
  color: var(--text-mut);
  font-size: 15px;
}

.stack { display: flex; flex-direction: column; }

/* Одна строка на всю ширину: круг + текст. Не две колонки. */
.row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  color: inherit;
}

.row-sale {
  grid-template-columns: 148px minmax(0, 1fr) auto;
  background: var(--surface);
  border-radius: 999px;
  padding: 12px 28px 12px 12px;
  box-shadow: var(--shadow);
}

.row-sale + .row-sale { margin-top: 16px; }

.circle {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  flex: none;
}

.journal .circle,
.blog-list .circle { width: 168px; height: 168px; }

.circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 280ms ease;
}

.row-text h3 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; }
.row-text p { margin: 0; max-width: 68ch; color: var(--text-mut); }
.row-text a:hover { color: var(--accent-dark); }

.row-buy { text-align: right; padding-right: 8px; }

.price {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--wood-dark);
  letter-spacing: -0.03em;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--accent-hover); }

.btn-quiet { background: var(--bg-soft); color: var(--text); padding: 12px 28px; }
.btn-quiet:hover { background: var(--wood-light); }

.note { margin: 14px 4px 0; color: var(--text-mut); font-size: 13.5px; }

/* ---------- журнал ---------- */

.journal { padding: 64px 0 36px; }
.journal .section-head { margin-bottom: 8px; }

.journal .row,
.blog-list .row {
  padding: 26px 12px;
  border-radius: 999px 28px 28px 999px;
}

.journal .row:hover,
.blog-list .row:hover { background: var(--row-hover); }

.journal .row:hover img,
.blog-list .row:hover img { transform: scale(1.06); }

.journal .row:hover h3,
.blog-list .row:hover h3 { color: var(--accent-dark); }

.more { text-align: center; margin: 28px 0 10px; }

.blog-list { padding: 12px 0 64px; }
.blog-list h1 { margin: 12px 0 8px; font-size: 42px; }

/* ---------- текст и формы ---------- */

.page, .order, .article { padding: 12px 0 72px; }

.page-card, .order-card, .article-body {
  width: min(720px, 100%);
}

.page h1, .order h1 { margin: 8px 0 16px; font-size: clamp(32px, 4vw, 44px); }

.article-hero {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto 28px;
  text-align: center;
}

.article-hero .hero-photo { width: min(420px, 78vw); margin: 0 auto 8px; }

.article-hero .author { justify-content: center; }
.article-hero h1 {
  margin: 18px auto 0;
  max-width: 18ch;
  font-size: clamp(34px, 5vw, 52px);
}

.article-body { margin: 0 auto; font-size: 18px; line-height: 1.7; }
.article-body p { margin: 0 0 16px; }
.article-body h2 { font-size: 28px; margin: 32px 0 10px; }

.photos { display: grid; gap: 16px; margin: 8px 0 20px; }
.photos img { border-radius: 20px; width: 100%; }

.order-card {
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

.order-card h1, .order-card h2 { margin: 0 0 8px; font-size: 32px; }
.order-card > div > p { margin: 0; color: var(--text-mut); }

form { display: grid; gap: 12px; }

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

input, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--wood-light);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}

textarea { min-height: 120px; resize: vertical; }

input:focus, textarea:focus {
  outline: 3px solid var(--focus);
  border-color: var(--accent-dark);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-foot p, .fine {
  margin: 0;
  color: var(--text-mut);
  font-size: 13px;
  font-weight: 400;
}

.flashes { list-style: none; margin: 12px auto; padding: 0; width: min(var(--wrap), calc(100% - 40px)); }
.flashes li {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent-dark);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 8px;
}

.back { color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.back:hover { text-decoration: underline; }

.files { margin: 20px 0 0; padding: 0; list-style: none; }
.files a { color: var(--accent-dark); font-weight: 700; }
.files a:hover { text-decoration: underline; }

.empty { color: var(--text-mut); }

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

.site-footer {
  background: var(--footer-bg);
  color: var(--on-footer);
  padding: 42px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.site-footer a:hover { color: var(--wood-light); }
.site-footer .brand-name { color: var(--on-footer); }
.site-footer .brand-sub { color: var(--footer-muted); max-width: 46ch; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}
.footer-links a { font-weight: 700; font-size: 15px; }

.legal {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--footer-line);
  color: var(--footer-muted);
  font-size: 13.5px;
}

:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    min-height: 0;
    row-gap: 8px;
    padding-bottom: 36px;
  }
  .hero-photo { width: min(380px, 86vw); }
  .hero-title {
    margin-left: 0;
    padding: 8px 0 0;
    border-radius: 0;
    background: transparent;
  }
  .hero-aside { padding: 0; margin: 0 auto; }
  .author { justify-content: center; }
  .row-sale {
    grid-template-columns: 120px minmax(0, 1fr);
    border-radius: 28px;
    padding: 16px;
  }
  .row-buy { grid-column: 2; text-align: left; padding: 0; }
  .order-card, .footer-grid, .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .section-head { align-items: start; }
}

@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .header-inner { min-height: 72px; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .journal .row, .blog-list .row, .row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    border-radius: 20px;
  }
  .circle, .journal .circle, .blog-list .circle { width: 96px; height: 96px; }
  .row-text h3 { font-size: 22px; }
  .row-sale { grid-template-columns: 96px minmax(0, 1fr); }
  .form-foot { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .circle img { transition: none; }
}
