/* ==========================================================================
   Badis / Вариант 4 "Мастерская"
   Направление: премиальная кинематографичная подача. Глубокий зелёный,
   костяной текст, один тёплый акцент - янтарный.
   Шрифт: Onest (кириллица), один суперсемейный набор весов.
   Радиусы: документированная система - кнопки pill (999px),
   карточки и медиа 18px, поля ввода 12px.
   Тема: страница зафиксирована в тёмной - это айдентика варианта.
   Дизайн-диалы: variance 7 / motion 6 / density 3.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg:      #0C201B;
  --deep:    #071411;
  --surface: #113028;
  --bone:    #E9E5D9;
  --muted:   #97ACA2;
  --amber:   #D6A756;      /* акцент; на фоне 7.7:1, тёмный текст на нём 7.7:1 */
  --amber-ink: #0C201B;
  --rule:    rgba(233, 229, 217, 0.14);

  --shell: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-card: 18px;
  --r-field: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Onest', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--bone);
  font-family: var(--font); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
svg[hidden] { display: none; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.028em; line-height: 1.08; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; z-index: 100; background: var(--amber); color: var(--amber-ink); padding: 12px 18px; border-radius: var(--r-pill); }
.skip:focus { left: 12px; top: 12px; }

.label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); font-weight: 500; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* --- кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  white-space: nowrap; padding: 15px 28px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .16s var(--ease);
}
.btn--primary { background: var(--amber); color: var(--amber-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--amber) 84%, #fff); }
.btn--ghost { border-color: var(--rule); color: var(--bone); }
.btn--ghost:hover { border-color: var(--bone); background: rgba(233,229,217,.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn--sm { padding: 11px 20px; font-size: 15px; }

/* --- шапка: плавающая пилюля --------------------------------------------- */

.head { position: sticky; top: 0; z-index: 40; padding: 12px 0; }
.head__row {
  height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 26px;
  padding-inline: 22px;
  border: 1px solid var(--rule); border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--deep) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(233,229,217,.08);
}
/* запасной вариант, когда прозрачность отключена системно */
@media (prefers-reduced-transparency: reduce) {
  .head__row { background: var(--deep); backdrop-filter: none; }
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.04em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav .btn { display: none; }
/* .nav a задаёт приглушённый цвет ссылок; кнопке нужен собственный */
.nav a.btn--primary { color: var(--amber-ink); }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { color: var(--bone); }
.head__cta { display: flex; align-items: center; gap: 14px; }
.head__tel { text-decoration: none; font-size: 15px; }

.burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: none; border: 1px solid var(--rule); border-radius: var(--r-pill); cursor: pointer; color: var(--bone); }
.burger span { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.burger span::before { top: -5.5px; } .burger span::after { top: 5.5px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-open .burger span::after { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 899px) {
  .burger { display: inline-flex; }
  .head__cta .btn, .head__tel { display: none; }
  .nav {
    position: fixed; inset: 92px var(--gutter) auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card);
    padding: 8px 22px 22px;
    opacity: 0; transform: translateY(-10px); pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--bone); font-size: 17px; }
  .nav .btn { display: inline-flex; margin-top: 18px; }
}

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

.hero { padding: clamp(24px, 4vw, 44px) 0 clamp(56px, 7vw, 96px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 47fr) minmax(0, 53fr); gap: clamp(30px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 3.7vw, 3.4rem); margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__sub { font-size: clamp(1.05rem, 1.3vw, 1.18rem); color: var(--muted); max-width: 42ch; margin-bottom: 34px; }
.hero__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero__media { border-radius: var(--r-card); overflow: hidden; position: relative; }
.hero__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 22%; }
@media (max-width: 899px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media img { aspect-ratio: 4 / 3; }
}

/* --- доверие ------------------------------------------------------------- */

.trust__row { display: flex; align-items: center; gap: clamp(26px, 5vw, 60px); flex-wrap: wrap; padding: 26px 0; border-top: 1px solid var(--rule); }
.trust__logos { display: flex; align-items: center; gap: clamp(26px, 4vw, 50px); }
.trust__logos svg { height: 25px; width: auto; color: var(--bone); opacity: .78; }

/* --- секции -------------------------------------------------------------- */

.section { padding: clamp(76px, 10vw, 136px) 0; }
.h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.2vw, 1.12rem); }

/* блок 3D: крупное медиа сверху, текст двумя колонками снизу */
.threed { background: var(--deep); }
.threed__media {
  border-radius: var(--r-card); overflow: hidden;
  margin: 0 auto clamp(34px, 4vw, 56px);
  max-width: 760px; /* иначе рендер на всю ширину съедает экран целиком */
}
.threed__media img { width: 100%; }
.threed__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.threed h2 { max-width: 15ch; }
.threed__list { display: grid; gap: 14px; margin-top: 26px; }
.threed__item { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.threed__item svg { flex: none; margin-top: 4px; color: var(--amber); }
@media (max-width: 899px) { .threed__body { grid-template-columns: 1fr; } }

/* --- этапы: аккордеон ---------------------------------------------------- */

.steps__head { margin-bottom: clamp(30px, 4vw, 50px); max-width: 620px; }
.steps__head p { color: var(--muted); margin-top: 16px; }
.acc { display: grid; gap: 12px; }
.acc details {
  border: 1px solid var(--rule); border-radius: var(--r-card);
  background: var(--surface);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.acc details[open] { border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.acc summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px clamp(20px, 2.4vw, 30px);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 500; letter-spacing: -0.02em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--amber); }
.acc__plus { flex: none; width: 20px; height: 20px; position: relative; color: var(--amber); }
.acc__plus::before, .acc__plus::after {
  content: ''; position: absolute; inset: 50% 0 auto; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease);
}
.acc__plus::after { transform: rotate(90deg); }
.acc details[open] .acc__plus::after { transform: rotate(0deg); }
.acc__body { padding: 0 clamp(20px, 2.4vw, 30px) 24px; color: var(--muted); max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .acc__plus::before, .acc__plus::after { transition: none; } }

/* --- мастерская: два кадра ----------------------------------------------- */

.craft { background: var(--deep); }
.craft__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(18px, 2.4vw, 28px); align-items: stretch; }
.craft__shot { border-radius: var(--r-card); overflow: hidden; }
.craft__shot img { width: 100%; height: 100%; object-fit: cover; }
.craft__side { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.craft__note {
  border-radius: var(--r-card); border: 1px solid var(--rule);
  padding: clamp(26px, 3vw, 38px); background: var(--surface);
  align-content: center; display: grid; gap: 14px;
}
.craft__note h2 { font-size: clamp(1.5rem, 2.4vw, 2.15rem); max-width: 16ch; }
.craft__note p { color: var(--muted); max-width: 46ch; }
.craft__wide { border-radius: var(--r-card); overflow: hidden; min-height: 220px; }
.craft__wide img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .craft__grid { grid-template-columns: 1fr; } .craft__shot { aspect-ratio: 4/3; } }

/* --- заявка -------------------------------------------------------------- */

.cta__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(34px, 5vw, 76px); }
.cta h2 { margin-bottom: 18px; }
.cta__lead { color: var(--muted); margin-bottom: 34px; max-width: 38ch; }
.contacts { display: grid; gap: 18px; border-top: 1px solid var(--rule); padding-top: 26px; }
.contacts div { display: grid; gap: 4px; }
.contacts .k { font-size: 12px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.contacts .v { font-size: 18px; text-decoration: none; }
a.v:hover { color: var(--amber); }

.form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card); padding: clamp(24px, 3vw, 38px); position: relative; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; }
.field label span { color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--bone);
  background: var(--deep); border: 1px solid var(--rule); border-radius: var(--r-field);
  padding: 13px 15px; width: 100%; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #83968D; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 20%, transparent); }
.field .err { font-size: 13.5px; color: #F0836E; }
.field.has-error input, .field.has-error textarea { border-color: #F0836E; }
.form__foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.form__note { font-size: 13.5px; color: var(--muted); max-width: 32ch; }
.form__error { grid-column: 1/-1; font-size: 14.5px; color: #F0836E; margin-top: 14px; }

.is-sending .btn--primary::after {
  content: ''; width: 14px; height: 14px;
  border: 2px solid color-mix(in srgb, var(--amber-ink) 38%, transparent);
  border-top-color: var(--amber-ink); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-sending .btn--primary::after { animation-duration: 2s; } }

.success[hidden] { display: none; }
.success { position: absolute; inset: 0; background: var(--surface); border-radius: var(--r-card); display: grid; align-content: center; gap: 14px; padding: clamp(24px, 3vw, 38px); }
.success h3 { font-size: 1.5rem; }
.success p { color: var(--muted); }
.success a { color: var(--amber); }
.success__mark { width: 40px; height: 40px; color: var(--amber); }

@media (max-width: 899px) { .cta__grid { grid-template-columns: 1fr; } .form__grid { grid-template-columns: 1fr; } }

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

.foot { border-top: 1px solid var(--rule); padding: 32px 0; }
.foot__row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--amber); }


/* --- мобильные правки ---------------------------------------------------- */

/* якорные ссылки не должны уводить заголовок под липкую шапку */
:where(section[id], div[id]) { scroll-margin-top: 92px; }

@media (max-width: 899px) {
  /* высота зоны нажатия не меньше 44px */
  .contacts .v { padding: 8px 0; }
  .foot a { display: inline-block; padding: 8px 0; }
  .brand { padding: 6px 0; }
}
