/* ---------- Reset / base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }
html { background: var(--bg); }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-body);
  font-size: var(--fs-base); line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden; width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--red); color: var(--white); }
button { font: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--red); color: var(--white);
  padding: var(--space-3) var(--space-5); z-index: 1300;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ---------- Reveal / motion primitives ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

.split-word { display: inline-block; white-space: nowrap; }
.split-title.split-chars .split-word > span {
  display: inline-block; opacity: 0; transform: translateY(0.4em);
  transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease-soft);
}
.split-title.split-chars.is-visible .split-word > span { opacity: 1; transform: none; }

.magnetic { display: inline-block; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); will-change: transform; }

/* ---------- Custom cursor ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); pointer-events: none; z-index: 1200; opacity: 0;
  transform: translate(-50%, -50%); transition: opacity 0.2s var(--ease), width 0.25s var(--ease-soft), height 0.25s var(--ease-soft), background 0.25s var(--ease), border 0.25s var(--ease);
}
.cursor-dot.is-active { opacity: 1; }
.cursor-dot.is-hover { width: 30px; height: 30px; background: transparent; border: 1.5px solid var(--red); }
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* ---------- Site background photo (fixed, behind everything) ---------- */
.site-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('../img/site-bg.jpg');
  background-size: cover; background-position: center 38%; background-repeat: no-repeat;
}
.site-bg::after { content: ''; position: absolute; inset: 0; background: rgba(247, 244, 236, 0.52); }

/* ---------- Ambient field (fixed, behind everything) ---------- */
.ambient-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100vw; height: 100vh; }
.ambient-vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(130% 90% at 50% 0%, transparent 58%, rgba(20,22,28,0.05) 100%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 40px rgba(20, 22, 28, 0.10), inset 0 1px 0 rgba(255,255,255,0.9);
  border-radius: var(--radius-lg);
}

/* ---------- Type / component primitives ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--red-deep); display: flex; align-items: center; gap: 12px;
  margin-bottom: var(--space-4); font-weight: 500;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--red); }
.h-section {
  font-family: var(--font-display); text-transform: uppercase; color: var(--ink); line-height: 1.15;
  font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; max-width: 16ch;
}
.h-section > span, .contact-title > span { display: block; }
.contact-title { font-family: var(--font-display); text-transform: uppercase; color: var(--ink); line-height: 0.94; font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
.lead { font-size: 0.98rem; color: var(--text-muted); max-width: 34ch; font-weight: 400; margin-top: var(--space-3); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: 13px 22px; border-radius: 11px; cursor: pointer; color: var(--ink); font-weight: 700; background: transparent;
  transition: transform 0.15s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; padding: 7px; border-radius: 11px; pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--red) 0px, var(--red) 9px, transparent 9px, transparent 18px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.btn__label { position: relative; }
.btn:hover { transform: translateY(-2px); }
.btn--line {
  background: var(--glass); color: var(--text); border-color: var(--line); box-shadow: none;
  backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%);
}
.btn--line:hover { background: var(--glass-2); border-color: var(--red); color: var(--red-deep); transform: translateY(-2px); box-shadow: none; }
.arrow-link {
  display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text); border-bottom: 1px solid var(--line);
  padding-bottom: 3px; transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.arrow-link:hover { border-color: var(--red); color: var(--red-deep); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.04em; padding: 4px 9px;
  border: 1px solid var(--line); color: var(--text-muted); border-radius: 6px; background: rgba(255,255,255,0.4);
}

/* ===== STAGE / DECK ===== */
.stage { position: relative; z-index: 1; }
body.h-on { overflow: hidden; height: 100vh; }
body.h-on .stage { position: fixed; inset: 0; overflow: hidden; z-index: 1; }
#htrack { display: flex; }
body.h-on #htrack { height: 100vh; transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1); will-change: transform; }
body:not(.h-on) #htrack { flex-direction: column; transform: none !important; }
@media (prefers-reduced-motion: reduce) { body.h-on #htrack { transition: none; } }

body.h-on .panel { width: 100vw; height: 100vh; flex: none; display: flex; align-items: center; padding: 60px 6vw 120px; }
body:not(.h-on) .panel {
  display: flex; align-items: center; min-height: 100vh; min-height: 100svh;
  padding: calc(84px + env(safe-area-inset-top)) 22px calc(112px + env(safe-area-inset-bottom));
}
body:not(.h-on) .pinner, body:not(.h-on) .slide { width: 100%; }
.pinner { width: 100%; max-width: 1080px; margin: 0 auto; }
.slide { display: flex; align-items: flex-start; gap: 44px; width: 100%; max-width: 1180px; margin: 0 auto; }
#works .slide { gap: var(--space-5); align-items: stretch; }
.shead { flex: 0 0 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#works .h-section { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
#works .lead { font-size: 0.86rem; max-width: 32ch; }

/* text sitting directly over the photo bg gets its own frosted panel for legibility */
.text-panel { padding: 28px 30px; border-radius: var(--radius-xl); }
.shead.text-panel { padding: 26px 26px; }

@media (min-width: 920px) and (max-height: 820px) {
  body.h-on .panel { padding-top: 48px; padding-bottom: 96px; }
  .pcard__desc { font-size: 0.86rem; }
  .hero__meta { padding: 16px 24px; }
  .hero-wrap { gap: var(--space-4); }
}

/* ---------- Hero panel ---------- */
.hero .pinner { max-width: 1080px; }
.hero-wrap { display: flex; flex-direction: column; gap: var(--space-5); }
.hero-top { position: relative; z-index: 5; display: flex; align-items: stretch; gap: var(--space-5); }
.hero-main {
  flex: 1; min-width: 0; padding: 36px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__name { margin: 0 0 var(--space-4); }
.hero__name .split-title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; color: var(--red);
  font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 0.9; letter-spacing: 0.005em; display: block;
  text-shadow: 3px 3px 0 rgba(20, 22, 28, 0.06);
}
.hero__rule { display: block; width: 52px; height: 3px; background: var(--red); box-shadow: 0 0 14px rgba(216,31,44,0.5); margin-bottom: var(--space-5); }
.hero__sub { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--text-muted); max-width: 46ch; margin-bottom: var(--space-6); font-weight: 400; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }

.hero-side { flex: 0 0 280px; display: flex; flex-direction: column; gap: var(--space-5); }

.hero-mark {
  flex: 0 0 auto; position: relative; padding: 20px 24px;
  display: flex; align-items: center; justify-content: center;
}
.hero-mark::before {
  content: ''; position: absolute; inset: 20%; border-radius: 50%; z-index: -1; filter: blur(26px);
  background: radial-gradient(circle at 50% 42%, rgba(216,31,44,0.22), transparent 70%);
}
.hero-mark__logo { font-family: var(--font-script); font-size: clamp(2.2rem, 3.6vw, 2.8rem); color: var(--red); transform: rotate(-2deg); line-height: 1; }

.hero-contacts { flex: 1; position: relative; z-index: 5; overflow: hidden; padding: 24px 22px; }

.hc-face {
  height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hc-widget.is-open .hc-face { filter: blur(6px); opacity: 0.35; pointer-events: none; }

.hc-promo-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.hc-promo { font-size: 1.05rem; color: var(--text-muted); line-height: 1.5; text-align: center; }
.hc-promo__hl {
  display: inline; white-space: nowrap; text-transform: uppercase; font-weight: 700;
  font-family: var(--font-display); color: var(--red);
}

.hc-toggle {
  width: 100%; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: 15px 20px; border: none; border-radius: 11px; cursor: pointer; background: var(--red); color: var(--white); font-weight: 600;
  box-shadow: 0 8px 26px rgba(216,31,44,0.32);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.hc-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(216,31,44,0.4); background: var(--red-deep); }

.hc-panel {
  position: absolute; inset: 24px 22px; z-index: 2; overflow-y: auto;
  background: var(--glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border); border-radius: 11px;
  padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  opacity: 0; transform: scale(0.97); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease-soft);
}
.hc-widget.is-open .hc-panel { opacity: 1; transform: none; pointer-events: auto; }
.hc-panel.is-static { position: static; inset: auto; width: 100%; opacity: 1; transform: none; pointer-events: auto; }

.hc-form { display: flex; flex-direction: column; gap: 9px; }
.hc-input {
  width: 100%; font-family: var(--font-body); font-size: 0.88rem; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass);
}
.hc-input::placeholder { color: var(--text-faint); }
.hc-input:focus { outline: none; border-color: var(--red); }
.hc-consent {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 0.72rem; line-height: 1.4; color: var(--text-muted);
}
.hc-consent input { flex: none; margin-top: 2px; width: 14px; height: 14px; accent-color: var(--red); cursor: pointer; }
.hc-submit {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: 12px; border: none; border-radius: 8px; cursor: pointer; background: var(--ink); color: var(--white); font-weight: 600;
  transition: background 0.2s var(--ease);
}
.hc-submit:hover { background: var(--red-deep); }
.hc-form__hint { font-family: var(--font-mono); font-size: 0.56rem; color: var(--text-faint); line-height: 1.5; }

.hc-links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.hc-mini {
  flex: 1; text-align: center; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 9px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hc-mini:hover { border-color: var(--red); color: var(--red-deep); background: rgba(216,31,44,0.06); }

.hero__meta {
  padding: 20px 30px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px 28px;
}
.meta-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.meta-item .k { font-family: var(--font-mono); font-size: 0.61rem; letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-faint); }
.meta-item .v { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; text-transform: none; }

/* ---------- Works panel ---------- */
.works-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.card { padding: 16px 18px; border-radius: var(--radius-lg); display: flex; flex-direction: column; }

.pcard__top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.pcard__y { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--red-deep); }
.pcard__t { font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
.pcard__title { font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; letter-spacing: -0.01em; line-height: 1.24; margin-bottom: 6px; }
.pcard__desc { color: var(--text-muted); font-size: 0.78rem; line-height: 1.42; margin-bottom: 9px; }
.pcard__go { font-family: var(--font-mono); font-size: 0.54rem; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--red-deep); margin-top: auto; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }

a.pcard { text-decoration: none; color: inherit; transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease); }
a.pcard:hover { transform: translateY(-3px); box-shadow: 0 22px 54px rgba(20,22,28,0.16), inset 0 1px 0 rgba(255,255,255,0.95); }
a.pcard:hover .pcard__go { opacity: 1; transform: none; }

/* feature card: small preview window on the right instead of a full-width
   strip on top — keeps the card's overall footprint compact */
.pcard--feature { padding: 16px 18px; flex-direction: row; align-items: stretch; gap: var(--space-4); }
.pcard--feature .pcard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcard--feature .pcard__title { font-size: 0.98rem; max-width: 46ch; }
.pcard--feature .pcard__desc { max-width: 56ch; }

/* fixed to the text column's own height (measured), width derived from that
   via aspect-ratio — fills the window fully without growing the card itself */
.pcard__media { flex: none; align-self: center; width: auto; height: 142px; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--line-2); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s var(--ease); }
a.pcard:hover .pcard__media img { transform: scale(1.04); }

.grid--soon { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.pcard.is-soon { padding: 12px 14px; opacity: 0.62; cursor: default; }
.pcard.is-soon .pcard__top { margin-bottom: 6px; }
.pcard.is-soon .pcard__t { color: var(--text-faint); border-color: var(--line-2); }
.pcard.is-soon .pcard__title { font-size: 0.8rem; margin-bottom: 5px; }
.pcard__tag {
  font-family: var(--font-mono); font-size: 0.54rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-faint);
}

.pcard.is-add {
  padding: 12px 14px; width: 100%; border: none; -webkit-appearance: none; appearance: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px;
  cursor: pointer; font-family: inherit; color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.pcard.is-add:hover { transform: translateY(-3px); box-shadow: 0 22px 54px rgba(20,22,28,0.16), inset 0 1px 0 rgba(255,255,255,0.95); }
.pcard-add__icon { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--red); }
.pcard-add__label { font-family: var(--font-body); font-weight: 600; font-size: 0.78rem; line-height: 1.35; color: var(--text); max-width: 20ch; }

/* ---------- Lead-request modal (centered, backdrop-blurred) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(20, 22, 28, 0.5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 380px; max-height: 90vh; overflow-y: auto;
  padding: 34px 28px 28px; display: flex; flex-direction: column; gap: 14px;
  transform: scale(0.96) translateY(10px); transition: transform 0.3s var(--ease-soft);
}
.modal.is-open .modal__panel { transform: none; }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.5); color: var(--text); font-size: 1.1rem;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.modal__close:hover { border-color: var(--red); color: var(--red-deep); }
.modal__title {
  font-family: var(--font-display); text-transform: uppercase; color: var(--red);
  font-size: 1.5rem; text-align: center; margin-bottom: 4px;
}

/* ---------- Contact panel ---------- */
.contact-merged { display: flex; align-items: stretch; gap: var(--space-5); padding: 34px 32px; width: 100%; }
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.contact-text .contact-title { margin-bottom: var(--space-3); }

.contact-action { flex: 0 0 320px; min-height: 280px; position: relative; overflow: hidden; padding: 24px 22px; display: flex; align-items: center; justify-content: center; }
.contact-action .hc-face { justify-content: center; }

.contact-foot {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.05em; color: var(--text-faint);
  text-align: center; line-height: 1.5; align-self: center; padding: 10px 18px; border-radius: 999px;
}
#contact .slide { flex-direction: column; align-items: stretch; gap: var(--space-5); max-width: 1080px; }

/* ===== DOCK (bottom bar = brand + nav + progress) ===== */
.dock {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 18px; width: calc(100% - 36px); max-width: 760px;
  padding: 9px 12px 9px 20px; border-radius: 16px; overflow: hidden;
}
.dock__fill { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--red); box-shadow: 0 0 8px var(--red); transition: width 0.85s cubic-bezier(0.76,0,0.24,1); }
.dock__brand { display: flex; flex-direction: column; line-height: 1.16; flex: none; }
.dock__brand b { font-family: var(--font-script); font-size: 1.3rem; color: var(--red); transform: rotate(-2deg); display: inline-block; }
.dock__brand span { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--text-faint); margin-top: 1px; }
.dock__nav { display: flex; align-items: center; justify-content: center; gap: 2px; flex: 1; min-width: 0; }
.dock__item {
  font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-muted); padding: 8px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.dock__item:hover { color: var(--text); }
.dock__item.active { color: var(--white); background: var(--red); }

/* ---------- Mobile top header — hidden on desktop ---------- */
.mhead, .mmenu { display: none; }
.burger { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; opacity: 1; transform: none; }
  .split-chars > span { transition: none !important; opacity: 1; transform: none; }
  .magnetic { transition: none; }
  .cursor-dot { display: none; }
  .ambient-field { display: none; }
}

/* =====================================================
   MOBILE / narrow-desktop vertical fallback (<= 919px)
   ===================================================== */
@media (max-width: 919px) {
  /* dock stays the nav everywhere now (desktop decision from an earlier round) —
     the old top glass bar + hamburger menu is retired, not just hidden here */

  /* mobile dock: brand mark drops out so Главная/Примеры/Контакты sit centered/symmetric */
  .dock { justify-content: center; padding: 9px 14px; }
  .dock__brand { display: none; }

  /* a mobile hero (5 stacked/paired blocks) is taller than one screen more often
     than desktop's row layout ever was — let a panel scroll internally instead of
     silently clipping top+bottom (align-items:center would hide both ends).
     Horizontal swipe-to-next-panel still works: it's gated on dx > dy, so a
     vertical scroll gesture here never fires it. */
  body.h-on .panel {
    align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: calc(16px + env(safe-area-inset-top)) 5vw calc(100px + env(safe-area-inset-bottom));
  }

  .slide { flex-direction: column; align-items: stretch; gap: 20px; }
  .shead { flex: none; margin-bottom: 2px; }

  /* hero: custom mobile arrangement (blocks numbered by the user):
     1 hero-main, 2 hero-mark (logo), 3 hero-contacts (lead form), 4 hero__meta */
  .hero-wrap { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "mark mark" "main main" "contacts meta"; gap: var(--space-3); width: 100%; }
  .hero-top, .hero-side { display: contents; }
  .hero-mark { grid-area: mark; padding: 16px; }
  .hero-mark__logo { font-size: 1.8rem; }
  .hero-main { grid-area: main; max-width: none; width: 100%; padding: 22px; }
  .hero-main .eyebrow { margin-bottom: var(--space-2); }
  .hero__rule { margin-bottom: var(--space-3); }
  .hero__sub { font-size: 0.9rem; line-height: 1.45; margin-bottom: var(--space-4); }
  .hero__actions { margin-top: 0; }
  .hero-contacts { grid-area: contacts; min-width: 0; padding: 14px 12px; }
  .hero-contacts .hc-promo { font-size: 1rem; line-height: 1.42; }
  .hero-contacts .hc-promo__hl { white-space: normal; }
  .hero-contacts .hc-toggle { font-size: 0.62rem; padding: 12px 8px; }
  .hero-contacts .hc-panel { inset: 14px 12px; padding: 12px; }
  .hero__name .split-title { font-size: clamp(2rem, 11vw, 3.2rem); }
  .hero__meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; }
  .hero__meta .meta-item .v { font-size: 0.8rem; }
  .hero__meta .meta-item .k { font-size: 0.56rem; }

  .grid--soon { grid-template-columns: 1fr 1fr; }
  /* the side-window preview only works with room to spare — on narrower
     viewports the thumbnail goes back to a top strip so the text isn't squeezed */
  .pcard--feature { padding: 22px; flex-direction: column; }
  .pcard__media { width: 100%; height: auto; align-self: stretch; aspect-ratio: 21 / 8; }

  .contact-merged { flex-direction: column; padding: 26px 24px; }
  .contact-action { flex: none; min-height: 340px; }
}

@media (max-width: 640px) {
  body:not(.h-on) .panel { padding: 88px 18px 100px; }
  .card { padding: 20px; }
  .contact-merged { padding: 22px 20px; }
  .contact-action { padding: 20px 18px; min-height: 320px; }
  .h-section { font-size: clamp(1.6rem, 8vw, 2.1rem); }
  .hero__name .split-title { font-size: clamp(2.1rem, 14vw, 3rem); }
  .hero__sub { font-size: 1rem; }
  .hero__actions { gap: 12px; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .pcard--feature { padding: 20px; }
  .pcard--feature .pcard__title { font-size: 1.1rem; }
  .grid--soon { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard.is-soon { padding: 12px 14px; }
  .pcard.is-soon .pcard__title { font-size: 0.82rem; }
  .hero-mark { padding: 18px; }
  .hero-mark__logo { font-size: 2.1rem; }
}
