/* ===== tokens (Design.md, locked) ===== */
:root {
  --bg: #FBF6F1;
  --surface: #FFFFFF;
  --surface-alt: #F3E7DF;
  --accent: #BD7E68;
  --accent-hover: #A2664F;
  --accent-soft: #E9D2C6;
  --sage: #7F9271;
  --sage-soft: #E3E9DC;
  --gold: #BE9A46;
  --text: #2B2521;
  --text-muted: #6E645B;
  --border: #E6D9CD;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-img: 24px;
  --shadow-soft: 0 20px 40px -20px rgba(43,37,33,.18);
  --shadow-lift: 0 30px 60px -25px rgba(43,37,33,.28);
}

/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--accent-hover); }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--text); color: #fff;
  padding: 12px 20px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 14px 28px; border-radius: var(--radius-btn); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline { border-color: var(--accent-hover); color: var(--accent-hover); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-small { padding: 10px 18px; font-size: .9rem; }
.btn-large { padding: 18px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ===== header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,246,241,.9); backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 rgba(43,37,33,0);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(43,37,33,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--accent-hover); text-decoration: none; white-space: nowrap; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo span { color: var(--accent-hover); font-weight: 700; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding-bottom: 3px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent-hover); transition: right .25s ease;
}
.nav a:hover { color: var(--accent-hover); }
.nav a:hover::after { right: 0; }
@media (min-width: 900px) { .nav { display: flex; } }
.btn-tail { margin-left: .3em; }
@media (max-width: 480px) {
  .logo {
    font-size: 1.05rem; line-height: 1.15; letter-spacing: -.01em;
    white-space: normal; overflow: visible; text-overflow: clip; flex-basis: 60%;
  }
  .header-inner { align-items: center; }
  .header-inner .btn-small { padding: 9px 12px; font-size: .74rem; flex-shrink: 0; }
  .btn-tail { display: none; }
}
@media (max-width: 360px) {
  .logo { font-size: .96rem; }
}

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 56px 0 120px;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 78%);
  overflow: hidden;
}
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(2px); opacity: .55;
}
.hero-glow-a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -14%; right: -10%; background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 70%); }
.hero-glow-b { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; bottom: -8%; left: -8%; background: radial-gradient(circle at 50% 50%, var(--sage-soft), transparent 72%); }
.hero-deco { position: absolute; top: 18px; right: 8%; color: var(--gold); opacity: .35; z-index: 1; display: none; }
@media (min-width: 1280px) { .hero-deco { display: block; } }
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 40px; position: relative; z-index: 2;
}
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; align-items: start; }
}
.badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent-hover);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 14ch; }
.hero-sub { font-size: 1.1rem; max-width: 44ch; }
.hero-objection { color: var(--sage); font-weight: 600; font-size: .95rem; margin-bottom: 28px; }
.proof-bar { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 8px; }
.proof-bar li { display: flex; flex-direction: column; }
.proof-bar strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-hover); }
.proof-bar span { font-size: .82rem; color: var(--text-muted); max-width: 12ch; }

.hero-photo {
  position: absolute; right: -6vw; top: 40px; width: 42vw; max-width: 560px;
  border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-lift);
  transform: rotate(2deg); z-index: 1; display: none;
}
.hero-photo img { height: 620px; object-fit: cover; }
@media (min-width: 1280px) { .hero-photo { display: block; } }

.hero-form-card {
  background: var(--surface); border-radius: var(--radius-card); padding: 32px;
  box-shadow: var(--shadow-lift); border: 1px solid var(--border);
}
.hero-form-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.lead-form .field { display: block; margin-bottom: 16px; }
.lead-form .field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; background: var(--bg); color: var(--text);
}
.lead-form input:focus, .lead-form select:focus { outline: 2px solid var(--accent-hover); outline-offset: 1px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; font-size: .82rem; color: var(--text-muted); }
.checkbox-field input { margin-top: 3px; }
.checkbox-field span a { color: var(--accent-hover); }
.form-status { min-height: 1.2em; font-size: .9rem; margin-top: 10px; }
.form-status.ok { color: var(--sage); font-weight: 600; }
.form-status.err { color: #A2432F; font-weight: 600; }

/* ===== section shared ===== */
section { padding: 88px 0; position: relative; }
section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 20ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-hover); margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.eyebrow-light { color: var(--gold); }

/* diagonal seam between sections via clip-path wrapper */
.pains { background: var(--surface); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; }
.process { background: var(--surface-alt); clip-path: polygon(0 0, 100% 3vw, 100% calc(100% - 3vw), 0 100%); margin-top: -3vw; }
.catalog { background: var(--bg); overflow: hidden; }
.catalog-deco {
  position: absolute; left: 0; right: 0; top: -90px; bottom: -90px; width: 100%; height: calc(100% + 180px);
  z-index: 0; pointer-events: none; will-change: transform;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, transparent 100%);
}
.catalog > .wrap { position: relative; z-index: 1; }
.portfolio { background: var(--surface); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; }
.trust { background: var(--text); color: #fff; clip-path: polygon(0 0, 100% 3vw, 100% calc(100% - 3vw), 0 100%); margin-top: -3vw; }
.trust h2 { color: #fff; }
.faq { background: var(--bg); }
.cta-final { background: var(--accent-soft); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; padding-bottom: 110px; }

/* ===== pains ===== */
.pains h2 { margin-bottom: 40px; }
.pains-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 700px) { .pains-grid { grid-template-columns: repeat(2, 1fr); } }
.pain-card {
  background: var(--surface-alt); border-radius: var(--radius-card); padding: 28px;
  border: 1px solid var(--border);
}
.pain-num { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-hover); display: block; margin-bottom: 10px; }
.pain-card p { color: var(--text); font-size: 1.02rem; margin: 0; }

/* ===== process ===== */
.process h2 { margin-bottom: 44px; }
.process-steps { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
@media (min-width: 800px) { .process-steps { grid-template-columns: repeat(4, 1fr); } }
.step-num { font-family: var(--font-head); font-size: 2.6rem; font-weight: 600; color: var(--accent); opacity: .55; display: block; }
.process-steps h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.process-steps p { margin: 0; font-size: .95rem; }

/* ===== catalog ===== */
.catalog h2 { margin-bottom: 40px; }
.catalog-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
.catalog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 24px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.catalog-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.catalog-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.catalog-card p { margin: 0; font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { .catalog-card:hover { transform: none; } }

/* ===== portfolio (asymmetric) ===== */
.portfolio h2 { margin-bottom: 8px; }
.portfolio-note { max-width: 56ch; margin-bottom: 36px; }
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.pf-item {
  margin: 0; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3; position: relative; isolation: isolate;
}
.pf-item::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); pointer-events: none;
}
.pf-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.pf-item:hover img { transform: scale(1.06); }
@media (min-width: 720px) {
  /* именованные области вместо span-авторазмещения - гарантирует отсутствие наложений.
     Этот блок идёт ПОСЛЕ .pf-item, чтобы override aspect-ratio:auto не перебивался каскадом. */
  .portfolio-grid {
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 260px 220px;
    grid-template-areas:
      "a b c"
      "a d d";
    gap: 20px;
  }
  .pf-1 { grid-area: a; aspect-ratio: auto; }
  .pf-2 { grid-area: b; aspect-ratio: auto; }
  .pf-3 { grid-area: c; aspect-ratio: auto; }
  .pf-4 { grid-area: d; aspect-ratio: auto; }
}

/* ===== trust ===== */
.trust-inner { text-align: center; }
.trust h2 { max-width: none; margin: 0 auto 40px; }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-grid strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); margin-bottom: 6px; }
.trust-grid span { font-size: .9rem; color: #E7DFD6; }

/* ===== faq ===== */
.faq h2 { margin-bottom: 32px; }
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 18px 0;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-hover); margin-left: 12px; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 12px 0 0; }

/* ===== cta-final ===== */
.cta-final-inner { display: flex; flex-direction: column; gap: 28px; align-items: stretch; text-align: center; }
.cta-final-inner > div { max-width: 640px; margin: 0 auto; }
.cta-final h2 { margin-bottom: 8px; }
.cta-final .btn-large { padding-top: 20px; padding-bottom: 20px; font-size: 1.15rem; }

/* ===== footer ===== */
.site-footer { background: var(--text); color: #C9BFB4; padding: 32px 0; font-size: .85rem; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .footer-inner { flex-direction: row; justify-content: space-between; } }
.footer-inner a { color: #E7DFD6; }

/* ===== scroll-reveal (JS-driven, progressive enhancement) ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pf-item img, .site-header, .nav a::after, .btn, .btn-primary::before { transition: none; }
  .pf-item:hover img { transform: none; }
  .btn-primary::before { display: none; }
  html { scroll-behavior: auto; }
}
