/* Stone Grove — публичный сайт. Основа — стиль действующего stone-grove.ru: бумага, чернила, плиты. */

:root{
  --paper:#F1F1EF;
  --panel:#E6E6E3;
  --card:#FAFAF9;
  --line:#D3D4D0;
  --ink:#191A19;
  --dim:#4B4D4A;
  --muted:#6E716C;

  --display:'Unbounded', 'Arial Black', 'Segoe UI', sans-serif;
  --body:'Golos Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --chamfer:10px;
  --radius:3px;
  --container:1160px;
  --gutter:clamp(20px, 5vw, 64px);
  --section:clamp(64px, 9vw, 112px);
  --header:72px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:calc(var(--header) + 16px); -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--paper);
  color:var(--dim);
  font-family:var(--body);
  font-size:clamp(16px, 0.35vw + 15px, 17.5px);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-underline-offset:3px; }

h1,h2,h3{
  font-family:var(--display);
  color:var(--ink);
  margin:0 0 0.55em;
  letter-spacing:-0.012em;
  text-wrap:balance;
  overflow-wrap:break-word;
}
h1{ font-weight:700; line-height:1.08; font-size:clamp(2rem, 5.4vw, 4rem); }
h2{ font-weight:600; line-height:1.14; font-size:clamp(1.5rem, 3vw, 2.3rem); }
h3{ font-weight:600; line-height:1.3; font-size:1.02rem; letter-spacing:0; }
.page-title{ font-size:clamp(1.8rem, 4vw, 2.9rem); }

p{ margin:0 0 1.1em; text-wrap:pretty; }
p:last-child{ margin-bottom:0; }

::selection{ background:var(--ink); color:var(--paper); }
:focus-visible{ outline:3px solid var(--ink); outline-offset:3px; border-radius:var(--radius); }

.skip{
  position:absolute; left:16px; top:-60px; z-index:100;
  background:var(--ink); color:var(--paper); padding:10px 16px; border-radius:var(--radius);
  font-family:var(--mono); font-size:13px; text-decoration:none;
}
.skip:focus{ top:12px; }

/* ───────── layout ───────── */

.wrap{ max-width:var(--container); margin:0 auto; padding:0 var(--gutter); }
.section{ padding:var(--section) 0; }
.section.panel{ background:var(--panel); }

.eyebrow{
  font-family:var(--mono);
  font-size:12.5px;
  font-weight:500;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--muted);
  display:block;
  margin-bottom:16px;
}

.section-head{ max-width:680px; margin-bottom:clamp(32px, 5vw, 56px); }
.section-head p{ font-size:1.06em; max-width:60ch; }
.section-head:last-child{ margin-bottom:0; }

/* ───────── кнопки ───────── */

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:48px;
  padding:13px 26px;
  font-family:var(--mono);
  font-size:13.5px;
  font-weight:500;
  letter-spacing:0.03em;
  line-height:1.2;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
  border:1.5px solid var(--ink);
  border-radius:var(--radius);
  cursor:pointer;
  transition:background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:active{ transform:translateY(1px); }
.btn-sm{ min-height:40px; padding:9px 18px; font-size:13px; }
.btn-primary{ background:var(--ink); color:var(--paper); box-shadow:0 1px 0 rgba(0,0,0,.08); }
.btn-primary:hover{ background:#000; border-color:#000; box-shadow:0 6px 18px -8px rgba(0,0,0,.55); transform:translateY(-1px); }
.btn-primary:active{ transform:translateY(1px); box-shadow:none; }
.btn-ghost{ background:transparent; color:var(--ink); }
.btn-ghost:hover{ background:var(--ink); color:var(--paper); }
.btn-light{ background:var(--paper); color:var(--ink); border-color:var(--paper); }
.btn-light:hover{ background:#fff; border-color:#fff; transform:translateY(-1px); }
@media (prefers-reduced-motion: reduce){ .btn{ transition:none; } .btn:hover,.btn:active{ transform:none; } }

.actions{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; }

/* ───────── шапка ───────── */

.site-header{
  position:sticky; top:0; z-index:40;
  background:rgba(241,241,239,0.9);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{ height:var(--header); display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand{ display:flex; align-items:center; flex:none; padding:6px 0; }
.brand-logo{ height:22px; width:auto; }

.nav{ display:flex; align-items:center; gap:clamp(16px, 2.4vw, 32px); }
.nav a:not(.btn), .menu-panel a{
  font-family:var(--mono);
  font-size:13.5px;
  letter-spacing:0.02em;
  text-decoration:none;
  color:var(--dim);
  padding:8px 0;
  border-bottom:1.5px solid transparent;
  transition:color .16s ease, border-color .16s ease;
}
.nav a:not(.btn):hover, .nav a.on{ color:var(--ink); border-bottom-color:var(--ink); }

.nav-mobile{ display:none; align-items:center; gap:10px; }
.menu{ position:relative; }
.menu summary{
  list-style:none; cursor:pointer;
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  border:1.5px solid var(--ink); border-radius:var(--radius);
}
.menu summary::-webkit-details-marker{ display:none; }
.menu-icon, .menu-icon::before, .menu-icon::after{
  display:block; width:18px; height:2px; background:var(--ink); content:''; position:relative;
}
.menu-icon::before{ position:absolute; top:-6px; }
.menu-icon::after{ position:absolute; top:6px; }
.menu[open] summary{ background:var(--ink); }
.menu[open] .menu-icon{ background:transparent; }
.menu[open] .menu-icon::before{ top:0; transform:rotate(45deg); background:var(--paper); }
.menu[open] .menu-icon::after{ top:0; transform:rotate(-45deg); background:var(--paper); }
.menu-panel{
  position:absolute; right:0; top:calc(100% + 14px);
  width:min(280px, calc(100vw - 2 * var(--gutter)));
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 18px 40px -18px rgba(0,0,0,.35);
  padding:8px 20px;
  display:flex; flex-direction:column;
}
.menu-panel a{ padding:14px 0; font-size:14.5px; border-bottom:1px solid var(--line); }
.menu-panel a:last-child{ border-bottom:0; }
.menu-panel a.on{ color:var(--ink); font-weight:500; }

/* ───────── hero ───────── */

.hero{ padding:clamp(48px, 9vw, 104px) 0 0; overflow:hidden; }
.hero-copy{ max-width:720px; }
.hero h1{ margin-bottom:24px; }
.hero-compact h1{ font-size:clamp(1.9rem, 4.6vw, 3.3rem); }
.hero-lede{ font-size:clamp(1.05rem, 0.6vw + 0.95rem, 1.22rem); max-width:56ch; margin-bottom:36px; }

/* дорожка из плит — сигнатурный элемент, он же эквалайзер */
.ridge{ margin-top:clamp(44px, 7vw, 72px); height:clamp(96px, 14vw, 160px); display:flex; align-items:flex-end; gap:clamp(3px, 0.45vw, 5px); }
.ridge-low{ height:clamp(64px, 9vw, 104px); }
.slab{
  flex:1 1 0;
  background:var(--ink);
  clip-path:polygon(var(--chamfer) 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%, 0 var(--chamfer));
  transform-origin:bottom;
  animation:slab-breathe 4.6s ease-in-out infinite;
}
@keyframes slab-breathe{ 0%,100%{ transform:scaleY(1); } 50%{ transform:scaleY(0.86); } }
@media (prefers-reduced-motion: reduce){ .slab{ animation:none; } }
.slab:nth-child(12n+1){ height:38%; animation-delay:0s; }
.slab:nth-child(12n+2){ height:64%; animation-delay:0.3s; }
.slab:nth-child(12n+3){ height:82%; animation-delay:0.1s; }
.slab:nth-child(12n+4){ height:50%; animation-delay:0.5s; }
.slab:nth-child(12n+5){ height:96%; animation-delay:0.2s; }
.slab:nth-child(12n+6){ height:70%; animation-delay:0.6s; }
.slab:nth-child(12n+7){ height:44%; animation-delay:0.4s; }
.slab:nth-child(12n+8){ height:88%; animation-delay:0s; }
.slab:nth-child(12n+9){ height:58%; animation-delay:0.35s; }
.slab:nth-child(12n+10){ height:100%; animation-delay:0.15s; }
.slab:nth-child(12n+11){ height:66%; animation-delay:0.55s; }
.slab:nth-child(12n){ height:30%; animation-delay:0.25s; }

/* ───────── карточки и сетки ───────── */

.grid{ display:grid; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.grid-2{ grid-template-columns:repeat(2, 1fr); }
.grid-3{ grid-template-columns:repeat(3, 1fr); }
.grid-4{ grid-template-columns:repeat(4, 1fr); }
.card{ background:var(--card); padding:clamp(24px, 3vw, 36px) clamp(22px, 2.6vw, 32px); transition:background-color .16s ease; }
.grid .card:hover{ background:#fff; }
.card-lg{ padding:clamp(28px, 4vw, 44px); }
.card-num{ font-family:var(--mono); font-size:12.5px; letter-spacing:0.06em; text-transform:uppercase; color:var(--muted); display:block; margin-bottom:18px; }
.card p{ font-size:0.94em; line-height:1.6; }

.genres{ display:flex; flex-wrap:wrap; gap:10px; }
.genre-chip{
  font-family:var(--mono); font-size:13.5px;
  padding:10px 18px;
  border:1px solid var(--line); border-radius:var(--radius);
  background:var(--card); color:var(--dim);
}

/* тёмная секция */
.section-dark{ background:var(--ink); color:#C9CBC6; }
.section-dark h2, .section-dark h3{ color:var(--paper); }
.section-dark .eyebrow, .section-dark .card-num{ color:#9A9D97; }
.section-dark :focus-visible{ outline-color:var(--paper); }
.split{ display:flex; align-items:flex-end; justify-content:space-between; gap:32px; flex-wrap:wrap; }
.split .section-head{ margin-bottom:0; }
.grid-dark{ background:#3A3C39; border-color:#3A3C39; }
.grid-dark .card{ background:#222422; }
.grid-dark .card:hover{ background:#2A2C2A; }

/* шаги */
.steps{ list-style:none; margin:0; padding:0; counter-reset:step; display:grid; grid-template-columns:repeat(5, 1fr); gap:clamp(16px, 2vw, 28px); }
.steps li{ counter-increment:step; border-top:2px solid var(--ink); padding-top:18px; }
.steps li::before{ content:counter(step, decimal-leading-zero); font-family:var(--mono); font-size:12.5px; color:var(--muted); display:block; margin-bottom:12px; }
.steps p{ font-size:0.94em; }

/* ───────── новости ───────── */

.news-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:28px; gap:20px; flex-wrap:wrap; }
.news-head h2{ margin:0; }
.news-head a{ font-family:var(--mono); font-size:13px; text-decoration:none; color:var(--dim); border-bottom:1px solid var(--muted); padding-bottom:2px; }
.news-head a:hover{ color:var(--ink); border-bottom-color:var(--ink); }

.post-row{ display:flex; gap:28px; align-items:flex-start; padding:26px 0; border-top:1px solid var(--line); text-decoration:none; color:inherit; }
.post-row:last-child{ border-bottom:1px solid var(--line); }
.post-meta{ font-family:var(--mono); font-size:12.5px; color:var(--muted); min-width:150px; flex:none; display:flex; flex-direction:column; gap:6px; }
.post-meta b{ color:var(--ink); font-weight:500; }
.post-title{ display:block; font-family:var(--display); font-weight:600; font-size:clamp(1.02rem, 1.2vw + 0.8rem, 1.2rem); line-height:1.3; color:var(--ink); margin-bottom:8px; }
.post-row:hover .post-title{ text-decoration:underline; text-underline-offset:4px; }
.post-excerpt{ display:block; font-size:0.92em; color:var(--dim); }

.chips{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:36px; }
.chip{
  font-family:var(--mono); font-size:12.5px;
  min-height:36px; display:inline-flex; align-items:center;
  padding:8px 16px;
  border:1px solid var(--line); border-radius:999px;
  text-decoration:none; color:var(--dim); background:var(--card);
  transition:border-color .16s ease, color .16s ease;
}
.chip.on{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.chip:hover:not(.on){ border-color:var(--ink); color:var(--ink); }

.article-head{ max-width:720px; margin:0 auto 44px; }
.article-meta{ font-family:var(--mono); font-size:12.5px; color:var(--muted); display:flex; gap:16px; flex-wrap:wrap; }
.article-meta b{ color:var(--ink); font-weight:500; }
.article-body{ max-width:720px; margin:0 auto; font-size:1.04em; line-height:1.7; }
.article-body .lead{ font-size:1.16em; color:var(--ink); line-height:1.55; }
.article-body h2{ font-size:clamp(1.2rem, 2vw, 1.5rem); margin-top:1.7em; }
.article-body a{ text-decoration-color:var(--muted); }
.article-body a:hover{ text-decoration-color:var(--ink); color:var(--ink); }
.article-body blockquote{ margin:1.6em 0; padding:4px 0 4px 24px; border-left:2px solid var(--ink); font-family:var(--display); font-weight:500; font-size:1.08em; line-height:1.4; color:var(--ink); }
.article-body ul,.article-body ol{ padding-left:1.3em; }
.article-body li{ margin-bottom:0.45em; }
.related{ max-width:720px; margin:64px auto 0; padding-top:36px; border-top:1px solid var(--line); }
.related h3{ margin-bottom:8px; }

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

.site-footer{ border-top:1px solid var(--line); padding:56px 0 40px; }
.footer-top{ display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:32px; margin-bottom:40px; }
.footer-logo{ height:20px; width:auto; }
.footer-links{ display:flex; gap:12px 28px; flex-wrap:wrap; }
.footer-links a, .footer-bottom a{ font-family:var(--mono); font-size:13px; text-decoration:none; color:var(--dim); padding:4px 0; }
.footer-links a:hover, .footer-bottom a:hover{ color:var(--ink); text-decoration:underline; }
.footer-bottom{ font-family:var(--mono); font-size:12px; color:var(--muted); padding-top:24px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; }
.footer-bottom a{ font-size:12px; color:var(--muted); }

/* ───────── адаптивность ───────── */

@media (max-width:1080px){
  .grid-4{ grid-template-columns:repeat(2, 1fr); }
  .steps{ grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:920px){
  .nav{ display:none; }
  .nav-mobile{ display:flex; }
  .grid-3{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  :root{ --header:64px; --chamfer:6px; }
  .grid-2, .grid-4{ grid-template-columns:1fr; }
  .steps{ grid-template-columns:1fr; }
  .brand-logo{ height:19px; }
  .actions .btn{ flex:1 1 220px; }
  .site-header .btn-sm{ padding:9px 14px; }
  .post-row{ flex-direction:column; gap:10px; padding:22px 0; }
  .post-meta{ flex-direction:row; gap:12px; min-width:0; }
  .footer-top{ flex-direction:column; }
  .split{ align-items:flex-start; }
}
@media (max-width:400px){
  .brand-logo{ height:17px; }
  .site-header .wrap{ gap:10px; }
  .site-header .btn-sm{ font-size:12px; padding:8px 10px; }
}
@media (max-width:350px){
  :root{ --gutter:14px; }
  .brand-logo{ height:15px; }
  .nav-mobile{ gap:8px; }
}

/* ───────── дополнения WordPress-версии ───────── */

/* первый абзац статьи — лид (в записях WP класс .lead вручную ставить не нужно) */
.article-body > p:first-child{ font-size:1.16em; color:var(--ink); line-height:1.55; }
.article-body h3{ margin-top:1.5em; }
.article-body img{ height:auto; border-radius:var(--radius); }

/* пагинация ленты */
.pagination{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:36px; }
.pagination:empty{ display:none; }
.page-link{
  font-family:var(--mono); font-size:12.5px;
  min-height:36px; display:inline-flex; align-items:center;
  padding:8px 14px;
  border:1px solid var(--line); border-radius:var(--radius);
  text-decoration:none; color:var(--dim); background:var(--card);
  transition:border-color .16s ease, color .16s ease;
}
.page-link.on{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.page-link:hover:not(.on){ border-color:var(--ink); color:var(--ink); }
.page-gap{ color:var(--muted); font-family:var(--mono); padding:0 4px; }

/* панель администратора не должна перекрывать липкую шапку */
.admin-bar .site-header{ top:32px; }
@media (max-width:782px){ .admin-bar .site-header{ top:46px; } }
@media (max-width:600px){ .admin-bar .site-header{ top:0; } }
