/* Белое Перо — responsive layout. Tokens from the design masters. */
:root {
  --ink: #17253B;
  --brand: #315EA8;
  --brand-hover: #254B87;
  --sky: #DCEBFA;
  --sky-deep: #9EC4F0;
  --paper: #F7F4EE;
  --coral: #E36F5B;
  --coral-hover: #C95843;
  --mint: #DCEDE7;
  --muted: #566378;
  --white: #FFFFFF;
  --error: #9E2F24;
  --focus-ring: #E36F5B;
  --gutter: 20px;
  --font: 'DejaVu Sans', Arial, sans-serif;
  --transition: 160ms ease;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -56px; z-index: 100;
  padding: 10px 18px; background: var(--ink); color: var(--white);
  border-radius: 0 0 12px 12px; text-decoration: none; font-weight: 700;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }
.wrap { max-width: 1296px; margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
/* ---------- per-viewport copy: desktop default ---------- */
.vp { display: none; }
.vp-d { display: inline; }
/* ---------- visible focus ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}
/* ---------- buttons & control states ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 2px solid transparent; border-radius: 28px;
  font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition), opacity var(--transition);
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: default; transform: none !important; box-shadow: none !important;
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(23, 37, 59, 0.18);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-ghost:hover:not(:disabled) { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.btn-ghost:active:not(:disabled) { transform: translateY(0); }
.btn-coral { background: var(--coral); color: var(--white); }
.btn-coral:hover:not(:disabled) {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(23, 37, 59, 0.22);
}
.btn-coral:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
/* loading state: compact spinner inside the action */
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: currentColor;
  display: none;
}
.btn.is-loading .spinner { display: inline-block; animation: spin 800ms linear infinite; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-label { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }
/* success / error inline status */
.status {
  margin: 14px 0 0; padding: 12px 16px; border-radius: 12px;
  font-size: 15px; line-height: 1.4; font-weight: 600;
}
.status-success { background: var(--mint); color: var(--ink); border: 1px solid #9FC4B9; }
.status-error { background: #F7E3E0; color: var(--error); border: 1px solid var(--error); }
.status[hidden] { display: none; }
/* ---------- header ---------- */
.hero-band {
  position: relative;
  background: linear-gradient(135deg, #F7F4EE 0%, #DCEBFA 100%);
}
.hero-band::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(49, 94, 168, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}
.site-header { position: relative; z-index: 2; }
.header-inner {
  display: flex; align-items: center; gap: 24px;
  padding-top: 22px; padding-bottom: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 62px; height: 62px; border-radius: 50%; background: var(--white); }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: 1.4px; }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.nav-link {
  color: var(--muted); font-size: 14px; font-weight: 600;
  text-decoration: none; padding: 8px 2px;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.btn-call { min-height: 56px; flex: none; }
/* header phone icon: hidden on desktop, glyph-only on mobile */
.btn-icon { display: none; font-size: 18px; line-height: 1; }
/* mobile nav toggle: hidden on desktop, visible <=767px */
.nav-toggle {
  display: none; flex: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, 0.72); cursor: pointer;
  transition: background-color var(--transition);
}
.nav-toggle:hover { background: var(--white); }
.nav-toggle-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 22px; height: 20px; margin: 0 auto;
}
.nav-toggle-box span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* ---------- hero ---------- */
.hero { position: relative; z-index: 2; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 578px;
  gap: 56px; align-items: center;
  padding-top: 24px; padding-bottom: 56px; min-height: 620px;
}
.eyebrow { margin: 0; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: 2.2px; }
.hero-title { margin: 22px 0 0; font-size: 66px; line-height: 1.05; font-weight: 800; color: var(--ink); }
.hero-lead { margin: 32px 0 0; max-width: 430px; font-size: 20px; line-height: 1.5; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero-photo { margin: 0; position: relative; width: 578px; max-width: 100%; justify-self: end; }
.hero-photo img {
  width: 100%; height: 430px; object-fit: cover;
  border-radius: 36px; border: 8px solid var(--white); background: var(--white);
}
.photo-band {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px 34px; border-radius: 28px;
  background: rgba(23, 37, 59, 0.72);
}
.photo-rating { color: var(--white); font-size: 16px; font-weight: 700; }
.photo-address { color: var(--white); font-size: 18px; font-weight: 700; }
/* ---------- services ---------- */
.services { padding: 92px 0 40px; }
.section-title { margin: 16px 0 0; font-size: 40px; line-height: 1.15; font-weight: 800; color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 52px; }
.card {
  position: relative; border-radius: 28px; padding: 38px 28px 44px;
  min-height: 228px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 37, 59, 0.12); }
.card-white { background: var(--white); }
.card-sky { background: var(--sky); }
.card-mint { background: var(--mint); }
.card-num { position: absolute; top: 28px; left: 28px; color: var(--brand); font-size: 13px; font-weight: 700; letter-spacing: 2px; }
.card-title { margin: 48px 0 14px; font-size: 24px; font-weight: 700; color: var(--ink); }
.card-text { margin: 0; max-width: 270px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.card-arrow {
  position: absolute; top: 24px; right: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.82); color: var(--brand);
  font-size: 18px; font-weight: 700;
}
/* ---------- process ---------- */
.how { padding: 40px 0 88px; }
.how-panel {
  position: relative; border-radius: 40px; background: var(--ink);
  padding: 58px 50px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px; align-items: center;
}
.how-panel::before {
  content: ""; position: absolute; top: -110px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(49, 94, 168, 0.25); pointer-events: none;
}
.how-left { position: relative; }
.eyebrow-light { color: var(--sky-deep); }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 26px; }
.step { display: flex; align-items: center; gap: 22px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--brand); color: var(--white);
  font-size: 18px; font-weight: 800;
}
.step-text { color: var(--white); font-size: 18px; font-weight: 700; }
.how-contact { margin: 32px 0 0; color: var(--sky); font-size: 18px; line-height: 1.6; font-weight: 500; }
.how-phone { color: var(--sky); font-weight: 700; text-decoration: none; }
.how-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-call-2 { position: relative; }
/* ---------- footer ---------- */
.site-footer { background: var(--paper); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 28px;
}
.footer-note { color: var(--muted); font-size: 12px; font-weight: 600; }
.footer-brand { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; }
/* ---------- tablet: 40px gutters, 2-col cards ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .vp-d { display: none; }
  .vp-t { display: inline; }
  :root { --gutter: 40px; }
  .site-nav { display: none; }
  .header-inner { gap: 16px; padding-top: 28px; padding-bottom: 28px; }
  .brand-logo { width: 58px; height: 58px; }
  .brand-name { font-size: 17px; letter-spacing: 1.2px; }
  .btn-call { min-height: 56px; padding: 0 22px; margin-left: auto; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 66px; padding-bottom: 40px; min-height: 0; }
  .hero-title { font-size: 50px; }
  .hero-lead { font-size: 18px; max-width: 560px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: auto; }
  .hero-actions .vp-a-d { display: none; }
  .hero-photo { justify-self: stretch; width: 100%; }
  .hero-photo img { height: 380px; border-radius: 32px; }
  .services { padding-top: 48px; }
  .section-title { font-size: 34px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
  .card { min-height: 228px; padding: 34px 28px 40px; }
  .how-panel { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 52px 38px; border-radius: 36px; }
  .btn-call-2 { display: none; }
}
/* ---------- mobile: 20px gutters, stacked cards ---------- */
@media (max-width: 767px) {
  .vp-d { display: none; }
  .vp-m { display: inline; }
  :root { --gutter: 20px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 3;
    flex-direction: column; gap: 4px; margin: 0;
    background: var(--white); border-bottom: 2px solid var(--sky-deep);
    padding: 12px var(--gutter) 16px;
  }
  .site-nav[open] { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-inner { gap: 12px; padding-top: 18px; padding-bottom: 18px; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-name { font-size: 14px; letter-spacing: 1px; }
  /* mobile header CTA: master-390 white circle with phone glyph */
  .btn-call {
    margin-left: auto; min-height: 0; width: 52px; height: 52px;
    padding: 0; border-radius: 50%;
    background: var(--white); color: var(--brand);
  }
  .btn-call:hover:not(:disabled) { background: var(--white); transform: none; box-shadow: none; }
  .btn-call .btn-label { display: none; }
  .btn-call .btn-icon { display: inline-flex; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 48px; padding-bottom: 24px; min-height: 0; }
  .eyebrow { font-size: 11px; letter-spacing: 1.5px; }
  .hero-title { font-size: 44px; margin-top: 20px; }
  .hero-lead { font-size: 16px; margin-top: 22px; max-width: none; }
  .hero-actions { margin-top: 26px; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-actions .vp-a-d { display: none; }
  .hero-photo { justify-self: stretch; width: 100%; }
  .hero-photo img { height: 300px; border-radius: 28px; border-width: 6px; }
  .photo-band { left: 6px; right: 6px; bottom: 6px; padding: 20px 20px; border-radius: 22px; }
  .photo-rating { font-size: 13px; }
  .photo-address { font-size: 15px; }
  .services { padding: 56px 0 24px; }
  .section-title { font-size: 30px; }
  .cards { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; }
  .how { padding-bottom: 56px; }
  .how-panel { grid-template-columns: 1fr; gap: 26px; padding: 44px 28px; border-radius: 32px; }
  .steps { gap: 20px; margin-top: 28px; }
  .step-num { width: 44px; height: 44px; font-size: 15px; }
  .step-text { font-size: 15px; }
  .how-contact { font-size: 14px; }
  .btn-call-2 { display: none; }
}
/* ---------- very narrow / 200% zoom resilience ---------- */
@media (max-width: 479px) {
  .hero-title { font-size: 38px; }
  .btn { min-height: 52px; padding: 0 18px; font-size: 15px; }
}
@media (max-width: 300px) {
  .hero-title { font-size: 30px; }
  .section-title { font-size: 24px; }
  .btn { min-height: 48px; padding: 0 12px; font-size: 14px; }
  .brand-name { display: none; }
}
