/* albuquerquecoinclub.org
   Все значения взяты из листа «дизайн» ТЗ (цвета, размеры, высоты, отступы).
   Селекторы написаны под разметку build.py: если меняется класс в генераторе,
   правится и здесь, иначе блок молча перестанет применяться. */

:root{
  --bg:#EDDDBD;          /* фон страницы, тёплый бежевый */
  --ink:#393939;         /* основной текст */
  --accent:#0B5252;      /* акцент и ссылки, тёмно-зелёный */
  --foot:#1A2E29;        /* тёмный блок подвала */
  --red:#CC0A0A;         /* шапка */
  --red-dark:#660404;    /* полоса под шапкой */
  --yellow:#FFBC00;
  --yellow-2:#F3E52F;
  --cyan:#19BCBC;
  --cream:#FBEEB8;       /* подложки карточек */
  --grey:#545454;        /* второстепенный текст */
  --white:#FFFFFF;
  --wrap:1180px;         /* контейнер 1140-1200 */
  --gut:24px;            /* боковые отступы */

  /* Вертикальный ритм одной шкалой. Пока отступы задавались по месту,
     блоки стояли с разным шагом и страница выглядела тесной: воздух между
     секциями - половина опрятности. */
  --s1:12px;
  --s2:20px;
  --s3:32px;
  --s4:48px;
  --s5:64px;

  --radius:8px;                              /* ТЗ: скругление 6-8 */
  --shadow:0 2px 10px rgba(0,0,0,.08);       /* ТЗ: тень мягкая */
  --shadow-lift:0 8px 22px rgba(26,46,41,.16);
  --hair:1px solid rgba(26,46,41,.10);
  --ease:180ms ease;
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

@font-face{
  font-family:'Lato';
  src:url('/assets/fonts/lato-regular.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Lato';
  src:url('/assets/fonts/lato-bold.woff2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Lato', 'Source Sans 3', system-ui, -apple-system, Arial, sans-serif;
  font-size:16px;
  line-height:1.55;
}

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

a{ color:var(--accent); }
a:hover{ text-decoration:none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline:3px solid var(--red);
  outline-offset:2px;
}

.wrap{
  max-width:var(--wrap);
  margin:0 auto;
  padding-left:var(--gut);
  padding-right:var(--gut);
}
.wrap.narrow{ max-width:calc(820px + var(--gut) * 2); }

.skip{
  position:absolute; left:-9999px; top:0;
  background:var(--accent); color:var(--white);
  padding:10px 16px; z-index:50;
}
.skip:focus{ left:0; }

/* ---------- шапка: высота 72-80, красный фон, полоса #660404 ---------- */
.site-head{
  background:var(--red);
  border-bottom:4px solid var(--red-dark);
}
.head-row{
  min-height:76px;
  display:flex;
  align-items:center;
  gap:24px;
}
.logo{
  color:var(--white);
  font-weight:700;
  font-size:23px;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
}
.logo:hover{ text-decoration:underline; }

.site-menu{ margin-left:auto; }
.site-menu ul{
  display:flex;
  gap:6px;
  list-style:none;
  margin:0; padding:0;
  flex-wrap:wrap;
}
.site-menu a{
  display:block;
  color:var(--white);
  font-size:16px;
  text-decoration:none;
  padding:8px 14px;
  border-radius:6px;
}
.site-menu a:hover,
.site-menu a:focus-visible{ background:var(--red-dark); }
.site-menu a.is-current{
  background:var(--red-dark);
  font-weight:700;
}

.burger{
  display:none;
  margin-left:auto;
  width:44px; height:44px;
  background:transparent;
  border:1px solid rgba(255,255,255,.6);
  border-radius:6px;
  cursor:pointer;
  padding:10px 9px;
}
.burger span{
  display:block; height:2px; background:var(--white); border-radius:2px;
}
.burger span + span{ margin-top:5px; }

/* ---------- крошки: под шапкой, 13-14 px, #545454 ---------- */
.crumbs{ background:var(--bg); padding:var(--s2) 0 0; }
.crumbs ol{
  display:flex; flex-wrap:wrap; gap:6px;
  list-style:none; margin:0; padding:0;
  font-size:14px; color:var(--grey);
}
.crumbs li + li::before{ content:"\203A"; padding-right:6px; color:var(--grey); }
.crumbs a{ color:var(--grey); }
.crumbs [aria-current]{ color:var(--accent); }

/* ---------- фото-герой ---------- */
.hero{ margin:0; }
.hero img{
  width:100%;
  height:240px;         /* компактный герой раздела: 220-260 */
  object-fit:cover;
}
.hero-tall img{ height:360px; }   /* главная: 320-380 */

/* Главная: H1 лежит ПОВЕРХ фото на тёмном затемнении (лист «дизайн»,
   строка 9), а не отдельной полосой под ним. Затемнение градиентом снизу:
   плашка на всю высоту съела бы саму фотографию. */
.hero-wrap{ position:relative; }
.hero-overlay{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:var(--s5) 0 var(--s3);
  background:linear-gradient(to top, rgba(10,20,18,.88) 0%,
                                     rgba(10,20,18,.70) 45%,
                                     rgba(10,20,18,.18) 80%,
                                     rgba(10,20,18,0) 100%);
}
.hero-overlay h1{
  margin:0;
  /* Заголовок в одну длинную строку читается хуже, чем в две короткие:
     ограничиваем меру, а не растягиваем на весь контейнер. */
  max-width:20ch;
  color:var(--white);
  font-size:36px;
  line-height:1.15;
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

/* ---------- заголовки ---------- */
h1{ font-size:34px; line-height:1.2; margin:0 0 12px; color:var(--accent); }
h2{ font-size:25px; line-height:1.25; margin:1.9em 0 .6em; color:var(--accent); }
h3{ font-size:19px; line-height:1.3; margin:1.6em 0 .45em; color:var(--ink); }

.page-head{ padding:var(--s4) 0 var(--s2); }
.page-head h1{ margin-bottom:6px; }
.meta{ color:var(--grey); font-size:14px; margin:0; }

/* ---------- плитки главной ---------- */
.tiles{ padding:var(--s4) 0 var(--s1); }
.tiles-grid{ display:grid; grid-template-columns:40% 1fr; gap:24px; }
.tiles-four{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }

.tile{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:26px;
  border-radius:var(--radius);
  text-decoration:none;
  color:var(--white);
  min-height:170px;
  box-shadow:var(--shadow);
  transition:transform var(--ease), box-shadow var(--ease);
}
.tile h2,.tile h3{ color:var(--white); margin:0 0 8px; }
.tile h2{ font-size:25px; }
.tile h3{ font-size:20px; }
.tile p{ margin:0; font-size:15px; }
.tile:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lift); }

/* Ведущая плитка тянется на высоту правой сетки 2x2, поэтому её содержимое
   разнесено по краям: иначе текст висит по центру, а сверху и снизу остаётся
   пустой красный прямоугольник. */
.tile-lead{ background:var(--red); justify-content:space-between; }
.tile-lead h2{ font-size:28px; }
.tile-lead p{ font-size:16px; max-width:34ch; }
.tile-kicker{
  margin:0;
  font-size:13px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.85;
}
.tile-cta{
  margin:0;
  font-weight:700;
  font-size:15px;
}
.tile-cta::after{ content:" \2192"; }
.tile-lead:hover .tile-cta{ text-decoration:underline; }
.tile-teal{ background:var(--accent); }
.tile-dark{ background:var(--red-dark); }
/* Светлые плитки ТЗ (#FFBC00 и #19BCBC) с белым текстом дают 2.3:1 и 1.9:1,
   то есть нечитаемо. Цвет плитки из листа «дизайн» оставлен, а текст на них
   тёмный: это единственный способ удержать и палитру, и контраст. */
.tile-yellow{ background:var(--yellow); color:var(--ink); }
.tile-cyan{ background:var(--cyan); color:var(--ink); }
.tile-yellow h3,
.tile-cyan h3{ color:var(--ink); }

/* ---------- полноширинный блок-приглашение ---------- */
.invite{
  background:var(--cream);
  color:var(--ink);
  margin:var(--s4) 0 0;
  padding:var(--s4) 0;
  border-top:var(--hair);
  border-bottom:var(--hair);
}
.invite h2{ margin:0 0 8px; color:var(--ink); }
.invite p{ margin:0 0 10px; max-width:70ch; }

.btn{
  display:inline-block;
  background:var(--red);
  color:var(--white);
  text-decoration:none;
  font-weight:700;
  padding:13px 26px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  transition:background var(--ease), transform var(--ease),
             box-shadow var(--ease);
}
.btn:hover{ background:var(--red-dark); transform:translateY(-2px);
            box-shadow:var(--shadow-lift); }

/* ---------- полоса подразделов: фон #19BCBC, белые таблетки ---------- */
.subnav{ background:var(--cyan); margin-top:var(--s3); }
.subnav ul{
  display:flex; gap:10px; list-style:none; margin:0; padding:12px 0;
  overflow-x:auto;
}
.subnav a{
  display:block; white-space:nowrap;
  background:var(--white); color:var(--accent);
  text-decoration:none; font-weight:700; font-size:15px;
  padding:9px 18px; border-radius:999px;
  box-shadow:0 1px 4px rgba(0,0,0,.12);
  transition:background var(--ease), transform var(--ease);
}
.subnav a:hover{ background:var(--cream); transform:translateY(-1px); }

/* ---------- текст статьи в белой карточке ---------- */
.prose{ font-size:16px; line-height:1.6; }
.prose > :first-child{ margin-top:0; }
.prose p{ margin:0 0 1em; }
.prose ul,.prose ol{ margin:0 0 1em; padding-left:22px; }
.prose li{ margin:0 0 .4em; }
.prose li::marker{ color:var(--accent); }
.prose table{ border-collapse:collapse; width:100%; margin:0 0 1.2em;
              font-size:15px; }
.prose th,.prose td{ border:1px solid #d8c9a9; padding:8px 10px;
                     text-align:left; vertical-align:top; }
.prose th{ background:var(--cream); }
.prose .note{ font-size:14px; color:var(--grey); }

.card-sheet{
  background:var(--white);
  border:var(--hair);
  border-radius:var(--radius);
  padding:40px;
  box-shadow:var(--shadow);
  margin:0 0 var(--s4);
}

.shot{ margin:0 0 1.4em; }
.shot img{ width:100%; height:auto; border-radius:6px; }
.shot figcaption{ font-size:13px; color:var(--grey); padding-top:6px; }

.sources{ font-size:14px; }
.sources li{ overflow-wrap:anywhere; }

/* ---------- две колонки: основная 760-820 + узкая 280-300 ---------- */
.with-side{ padding:var(--s3) 0 0; }
.cols{ display:grid; grid-template-columns:minmax(0,1fr) 300px;
       gap:var(--s4); align-items:start; }
.page-head .cols{ gap:28px; }

.side{
  background:var(--white);
  border:var(--hair);
  border-radius:var(--radius);
  padding:24px;
  box-shadow:var(--shadow);
  position:sticky;
  top:var(--s2);
}
.side h2{
  margin:0 0 14px;
  font-size:19px;
  padding-bottom:10px;
  border-bottom:var(--hair);
}
.side ul{ list-style:none; margin:0; padding:0; font-size:15px; }
.side li{ margin:0 0 .7em; line-height:1.45; }

/* ---------- карточки ---------- */
.also{ padding:var(--s4) 0 var(--s5); }
.also h2{ margin-top:0; }
.cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }

.card{
  background:var(--white);
  border:var(--hair);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform var(--ease), box-shadow var(--ease);
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lift); }
.card:hover .card-media img{ transform:scale(1.03); }
.card-media{ display:block; overflow:hidden; }
.card-media img{ width:100%; object-fit:cover;
                 transition:transform 260ms ease; }
.card-media.r4x3 img{ aspect-ratio:4 / 3; }
.card-media.r16x9 img{ aspect-ratio:16 / 9; }
.card-body{ padding:18px 18px 16px; display:flex; flex-direction:column;
            flex:1; }
.card-body h3{ margin:0 0 8px; font-size:18px; line-height:1.3; }
.card-body h3 a{ color:var(--ink); text-decoration:none; }
.card-body h3 a:hover{ text-decoration:underline; }
.card-body p{ margin:0 0 14px; font-size:14px; color:var(--grey);
              line-height:1.5; }
.card-more{ margin-top:auto; }
.card-more a{ font-weight:700; text-decoration:none; }
.card-more a::after{ content:" \2192"; }
.card-more a:hover{ text-decoration:underline; }

/* ---------- форма обратной связи ---------- */
.editor-form{ margin:0 0 1em; }
.editor-form label{ display:block; font-weight:700; margin:0 0 4px; }
.editor-form input,
.editor-form textarea{
  width:100%;
  font:inherit;
  color:var(--ink);
  background:var(--white);
  border:1px solid #b9a887;
  border-radius:6px;
  padding:10px 12px;
  margin:0 0 14px;
}
.editor-form textarea{ min-height:140px; resize:vertical; }
.editor-form button{
  font:inherit; font-weight:700;
  background:var(--red); color:var(--white);
  border:0; border-radius:6px; padding:12px 22px; cursor:pointer;
}
.editor-form button:hover{ background:var(--red-dark); }

/* ---------- 404 и 410 ---------- */
.status{ padding:var(--s5) 0 var(--s3); text-align:center; }
.status-code{
  font-size:96px; line-height:1; font-weight:700;
  color:var(--accent); margin:0 0 8px;
}
.status h1{ font-size:24px; margin:0 0 10px; }
.status p{ max-width:60ch; margin:0 auto 14px; }

/* ---------- подвал: #1A2E29, 14 px ---------- */
.site-foot{
  background:var(--foot);
  color:var(--white);
  padding:var(--s5) 0 var(--s3);
  font-size:14px;
}
.foot-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:var(--s4);
}
.foot-logo{ font-weight:700; font-size:18px; margin:0 0 8px; }
.foot-about p{ margin:0 0 8px; max-width:46ch; }
.site-foot h2{ font-size:15px; color:var(--white); margin:0 0 10px;
               text-transform:uppercase; letter-spacing:.04em; }
.foot-col ul{ list-style:none; margin:0; padding:0; }
.foot-col li{ margin:0 0 .7em; }
.site-foot a{ color:var(--white); }
.foot-bottom{
  border-top:1px solid rgba(255,255,255,.25);
  margin-top:var(--s4);
  padding-top:var(--s2);
}
.foot-bottom p{ margin:0 0 6px; }
.copy{ color:#cfe0d9; }

/* ---------- адаптация ---------- */
@media (max-width:1000px){
  .cols{ grid-template-columns:1fr; }
  .cards{ grid-template-columns:repeat(2,1fr); }
  .foot-grid{ grid-template-columns:1fr 1fr; }
}

@media (max-width:860px){
  .burger{ display:block; }
  .site-menu{
    display:none;
    flex-basis:100%;
    margin-left:0;
    padding-bottom:12px;
  }
  .site-menu.is-open{ display:block; }
  .head-row{ flex-wrap:wrap; gap:12px; }
  .site-menu ul{ flex-direction:column; gap:2px; }
  .site-menu a{ padding:12px 14px; }
  .tiles-grid{ grid-template-columns:1fr; }
  .hero-title h1{ font-size:28px; }
}

@media (max-width:640px){
  :root{ --s4:32px; --s5:40px; }
  h1{ font-size:28px; }
  .hero-overlay{ padding:var(--s4) 0 var(--s2); }
  .hero-overlay h1{ font-size:26px; max-width:none; }
  .card-sheet{ padding:22px; }
  h2{ font-size:22px; }
  .cards{ grid-template-columns:1fr; }
  .foot-grid{ grid-template-columns:1fr; }
  .hero img{ height:200px; }
  .hero-tall img{ height:220px; }
  .status-code{ font-size:72px; }
  .tiles-four{ grid-template-columns:1fr; }
}
