/* ============================================================
   Easy Performance LLC — main.css
   Единая таблица стилей всех страниц. Направление «Amber Press»
   (дизайн-спека §5): тёплый песочный фон, один тёплый акцент
   (амбер/охра), карточная сетка с мягкими скруглениями и лёгкой
   тенью, БЕЗ сплошных линий-разделителей между секциями, пара
   шрифтов (заголовки — антиква Fraunces, текст — гротеск Inter),
   заголовки в обычном регистре. Движение — только плавное
   появление секций; выключается при prefers-reduced-motion.
   Обязателен контраст WCAG 2.1 AA (см. scripts/check-contrast.mjs).
   ============================================================ */

/* ---------- Шрифты: self-hosted, без внешних CDN ----------
   Файлы .woff2 приносит хендофф (в песочнице egress к CDN закрыт).
   До их появления работают фолбэк-стек: Georgia (антиква) / system
   (гротеск), поэтому сайт не «плывёт» без сети. */
@font-face{font-family:'Fraunces';font-style:normal;font-weight:600;font-display:swap;
  src:url('../assets/fonts/fraunces-latin-600.woff2') format('woff2')}
@font-face{font-family:'Fraunces';font-style:normal;font-weight:700;font-display:swap;
  src:url('../assets/fonts/fraunces-latin-700.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;
  src:url('../assets/fonts/inter-latin-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;
  src:url('../assets/fonts/inter-latin-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;
  src:url('../assets/fonts/inter-latin-600.woff2') format('woff2')}

/* ---------- Токены дизайн-системы (спека §5) ---------- */
:root{
  --bg:#FBF6EC;            /* песочный тёплый фон */
  --surface:#FFFFFF;       /* карточки */
  --accent:#B4530A;        /* амбер/охра: кнопки, активные, номера; белый текст 5.02:1 (AA) */
  --accent-2:#EA9A1E;      /* яркий амбер: только с ТЁМНЫМ текстом */
  --accent-hover:#97440A;
  --ink:#2A2018;           /* основной текст: 14.4:1 на фоне */
  --muted:#5C5142;         /* вторичный текст: ~5.5:1 на фоне (AA) */
  --border:#ECDFCB;
  --chip:#F7EACF;          /* мягкая амбер-подложка акцентных зон */
  --error:#B3261E;         /* ошибки формы (AA на фоне и surface) */
  --radius:14px;
  --radius-sm:10px;
  --container:1080px;
  --serif:'Fraunces',Georgia,'Times New Roman',serif;
  --sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  --shadow-card:0 14px 40px -26px rgba(60,40,15,.55),0 2px 6px -3px rgba(60,40,15,.15);
}

/* ---------- Reset и база ---------- */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:var(--sans);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:var(--serif);line-height:1.15;margin:0 0 .5em;font-weight:600;
  letter-spacing:-.01em;text-wrap:balance}
h1{font-size:clamp(30px,5vw,44px);font-weight:600}
h2{font-size:clamp(24px,3.4vw,30px)}
h3{font-size:19px}
h4{font-size:16.5px}
p{margin:0 0 1em}
a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
a:hover{color:var(--accent-hover)}
ul{margin:0 0 1em;padding-left:1.2em}
img,svg{max-width:100%;height:auto}
strong{font-weight:600}

/* Видимый фокус — обязательное требование WCAG (спека §14) */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}

/* Skip-link для клавиатуры/скринридеров */
.skip-link{position:absolute;left:-9999px;top:0;background:var(--ink);color:#fff;
  padding:10px 16px;border-radius:0 0 8px 0;z-index:100}
.skip-link:focus{left:0}

/* Якорь под sticky-шапку */
section[id],[id]{scroll-margin-top:84px}

/* ---------- Сетка и секции (БЕЗ линий-разделителей) ---------- */
.container{max-width:var(--container);margin:0 auto;padding:0 24px}
.section{padding:64px 0}
.section--tint{background:linear-gradient(180deg,#FCF8F0,#FBF3E7)}
.eyebrow{font-family:var(--sans);font-size:11.5px;letter-spacing:.13em;text-transform:uppercase;
  color:var(--accent);font-weight:700;margin:0 0 14px}
.section-lead{color:var(--muted);font-size:17px;max-width:60ch;margin:0 0 28px}

/* ---------- Карточки ---------- */
.cards{display:grid;gap:18px}
.cards--3{grid-template-columns:repeat(3,1fr)}
.cards--2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:22px 22px;box-shadow:var(--shadow-card)}
.card h3{margin-top:0}
.card p:last-child{margin-bottom:0}
.card__services{font-size:13.5px;color:var(--muted);margin:.6em 0 0;padding:0;list-style:none;
  display:flex;flex-wrap:wrap;gap:6px 14px}
.card__services li{display:flex;align-items:center;gap:7px}

/* ---------- Кнопки ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-weight:600;font-size:15px;line-height:1;cursor:pointer;
  padding:12px 20px;border-radius:var(--radius-sm);border:1px solid transparent;text-decoration:none;
  transition:background .15s ease,color .15s ease}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover);color:#fff}
.btn-ghost{background:transparent;color:var(--accent);border-color:var(--border)}
.btn-ghost:hover{background:var(--chip);color:var(--accent-hover)}

/* ---------- Шапка ---------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(251,246,236,.92);
  backdrop-filter:saturate(1.1) blur(6px);border-bottom:1px solid var(--border)}
.site-header .container{display:flex;align-items:center;justify-content:space-between;
  gap:16px;min-height:64px}
.brand{display:inline-flex;align-items:center;gap:10px;font-family:var(--serif);font-weight:700;
  font-size:20px;color:var(--ink);text-decoration:none;letter-spacing:-.01em}
.brand:hover{color:var(--ink)}
.brand svg{width:26px;height:26px;flex:none}
.site-nav{display:flex;align-items:center;gap:22px}
.site-nav a:not(.btn){color:var(--muted);text-decoration:none;font-size:14.5px;font-weight:500}
.site-nav a:not(.btn):hover{color:var(--ink)}
.nav-toggle{display:none;background:none;border:1px solid var(--border);border-radius:8px;
  padding:8px 10px;cursor:pointer;color:var(--ink)}

/* ---------- Hero ---------- */
.hero{padding:56px 0 48px}
.hero h1{max-width:16ch}
.hero .lead{font-size:18px;color:var(--muted);max-width:58ch;margin:0 0 24px}
.hero .cta{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:26px}
.markers{display:flex;flex-wrap:wrap;gap:2px 0;font-size:13.5px;color:var(--muted);list-style:none;padding:0;margin:0}
.markers li{padding:0 16px;border-left:2px solid var(--accent);line-height:1.25}
.markers li:first-child{padding-left:0;border-left:0}

/* ---------- Вертикали ---------- */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tile{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow-card)}
.tile svg{width:24px;height:24px;color:var(--accent);flex:none}
.tile span{font-weight:500}

/* ---------- Схемы (journey / exclusive) ---------- */
.figure{background:linear-gradient(180deg,#FCF8F0,#FBF4E9);border:1px solid var(--border);
  border-radius:16px;padding:26px 24px}
.figure svg{display:block;width:100%;height:auto}
.figure .sr-list{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

/* ---------- Приглушённый блок приложений (спека §8 блок 8) ---------- */
.muted-block{max-width:64ch}
.muted-block h2{font-weight:600}
.muted-block p{color:var(--muted)}

/* ---------- FAQ ---------- */
.faq details{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);
  padding:0 18px;margin:0 0 10px}
.faq summary{cursor:pointer;padding:16px 0;font-family:var(--serif);font-weight:600;font-size:17px;
  list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+';color:var(--accent);font-size:22px;line-height:1}
.faq details[open] summary::after{content:'–'}
.faq details[open] summary{padding-bottom:6px}
.faq details > p{margin:0 0 16px;color:var(--muted)}

/* ---------- Форма ---------- */
.lead-section{display:grid;grid-template-columns:5fr 7fr;gap:36px;align-items:start}
.lead-intro .contacts{font-size:14.5px;color:var(--muted);line-height:1.8;margin-top:18px}
.form-field{margin:0 0 16px}
.form-field label{display:block;font-weight:600;font-size:14px;margin:0 0 6px;color:var(--ink)}
.form-field .req{color:var(--accent)}
.form-field input,.form-field select,.form-field textarea{width:100%;font:inherit;color:var(--ink);
  background:var(--surface);border:1px solid #D7C7AC;border-radius:var(--radius-sm);padding:11px 13px}
.form-field textarea{min-height:120px;resize:vertical}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{outline:2px solid var(--accent);
  outline-offset:1px;border-color:var(--accent)}
.form-field .err{display:block;color:var(--error);font-size:13px;margin-top:6px;min-height:0}
.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{border-color:var(--error)}
.form-consent{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--muted)}
.form-consent input{width:auto;margin-top:3px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-status{margin:14px 0 0;font-size:14.5px}
.form-status.ok{color:#1E7A46}
.form-status.error{color:var(--error)}

/* ---------- Подвал (3 колонки + нижняя строка) ---------- */
.site-footer{background:#F4ECDD;border-top:1px solid var(--border);padding:48px 0 28px;margin-top:8px}
.footer-cols{display:grid;grid-template-columns:1.4fr 1fr 1.4fr;gap:32px}
.site-footer h2{font-size:14px;color:var(--muted);
  font-family:var(--sans);font-weight:700;margin:0 0 12px}
.site-footer a{color:var(--muted);text-decoration:none}
.site-footer a:hover{color:var(--ink);text-decoration:underline}
.site-footer .brand{margin-bottom:12px}
.footer-desc{font-size:14px;color:var(--muted);max-width:34ch}
.footer-nav,.footer-contact{list-style:none;padding:0;margin:0;font-size:14px;line-height:1.9;color:var(--muted)}
.footer-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;
  margin-top:32px;padding-top:18px;border-top:1px solid var(--border);font-size:13px;color:var(--muted)}
.footer-legal{display:flex;flex-wrap:wrap;gap:6px 16px}
.footer-legal a{white-space:nowrap}
[data-placeholder]{background:#FBE7C6;border-radius:3px;padding:0 3px}

/* ---------- Плавное появление (единственная анимация) ---------- */
.fade-in{opacity:1;transform:none}
html.js .fade-in{opacity:0;transform:translateY(14px);transition:opacity .5s ease,transform .5s ease}
html.js .fade-in.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html.js .fade-in{opacity:1;transform:none;transition:none}
  html{scroll-behavior:auto}
}

/* ---------- Адаптив ---------- */
@media (max-width:900px){
  .cards--3,.tiles{grid-template-columns:1fr 1fr}
  .lead-section{grid-template-columns:1fr;gap:24px}
  .footer-cols{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .cards--3,.cards--2,.tiles{grid-template-columns:1fr}
  .section{padding:48px 0}
  .site-nav{position:absolute;top:64px;left:0;right:0;flex-direction:column;align-items:stretch;
    gap:4px;background:var(--bg);border-bottom:1px solid var(--border);padding:12px 24px;display:none}
  .site-nav.open{display:flex}
  .site-nav a:not(.btn){padding:10px 0}
  .nav-toggle{display:inline-flex}
  .footer-cols{grid-template-columns:1fr}
  .markers li{border-left:0;padding:2px 0}
}


/* ---------- Герой с маскотом ---------- */
.hero-grid{display:grid;grid-template-columns:1.4fr .6fr;gap:8px 32px;align-items:center}
.hero-copy{min-width:0}
.hero-mascot{justify-self:center;max-width:320px;width:100%;height:auto}
.hero-grid .markers{grid-column:1 / -1;margin-top:10px}

/* ---------- Иллюстрации-схемы (PNG от Gemini, с маскотом) ---------- */
.figure-img{display:block;width:100%;max-width:980px;margin:10px auto 0;border-radius:16px;border:1px solid var(--border)}

@media (max-width:760px){
  .hero-grid{grid-template-columns:1fr}
  .hero-mascot{display:none}
}

/* ---------- Страница How it works: номера шагов ---------- */
.step-num{color:var(--accent);font-variant-numeric:tabular-nums;margin-right:.35em}
.process .card p:last-child{margin-bottom:0}
.dont-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.dont-list li{display:flex;gap:10px;align-items:flex-start;color:var(--muted)}
.dont-list li::before{content:"—";color:var(--accent);font-weight:700}
.page-hero{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center}
.page-hero .hero-mascot{max-width:160px}
@media (max-width:640px){ .page-hero{grid-template-columns:1fr} .page-hero .hero-mascot{display:none} }

/* ---------- Правовые страницы: читаемая проза ---------- */
.legal{max-width:760px}
.legal .legal-meta{color:var(--muted);font-size:14px;margin:0 0 14px}
.legal .legal-note{background:var(--chip);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:12px 14px;color:var(--muted);font-size:14px;margin:0 0 26px}
.legal h2{margin-top:1.7em;font-size:20px}
.legal h2:first-of-type{margin-top:.6em}
.legal h3{margin-top:1.2em;font-size:16.5px}
.legal ul{color:var(--muted)}

/* ---------- Схемы вёрсткой из блоков и подписей (без картинок; настоящий текст, WCAG 1.4.5) ---------- */
.flow{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;margin:8px 0 0}
.flow-step,.flow-node{flex:1 1 0;min-width:0;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:16px;box-shadow:var(--shadow-card)}
.flow-node{display:flex;align-items:center;justify-content:center;text-align:center;
  font-weight:500;color:var(--ink);min-height:66px;line-height:1.4}
.flow-node--accent{background:var(--accent);color:#fff;border-color:var(--accent)}
.flow-num{display:inline-block;font-family:var(--serif);font-weight:700;font-size:14px;color:var(--accent-hover);
  background:var(--chip);border-radius:8px;padding:2px 9px;margin:0 0 8px}
  /* цвет — accent-hover (#97440A): на подложке chip даёт 5.6:1 (AA),
     тогда как обычный accent #B4530A на chip = 4.21:1 и не проходит 1.4.3 */
.flow-step h3{margin:0 0 6px;font-size:17px}
.flow-step p{margin:0;font-size:13.5px;color:var(--muted);line-height:1.5}
.flow-arrow{align-self:center;color:var(--accent);font-size:20px;line-height:1;flex:0 0 auto}
.flow-note{margin:14px 0 0;color:var(--muted);font-size:14px}
@media (max-width:760px){
  .flow{flex-direction:column}
  .flow-arrow{transform:rotate(90deg)}
}

/* ---------- Блок «Working with us» (сверх ТЗ, перед формой) ---------- */
.vendor{border:1px solid var(--border);background:linear-gradient(180deg,#FCF8F0,#FBF3E7);
  border-radius:var(--radius);padding:22px 24px;margin:0 0 8px}
.vendor h2{font-size:20px;margin:0 0 12px}
.vendor ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px 24px}
.vendor li{display:flex;gap:10px;align-items:flex-start;color:var(--muted);font-size:14.5px}
.vendor li::before{content:"—";color:var(--accent);font-weight:700}
@media (max-width:640px){ .vendor ul{grid-template-columns:1fr} }
