/* Общая мобильная компоновка. Десктопные стили остаются в файлах страниц. */
@media (max-width: 700px) {
  body { overflow-wrap: break-word; }
  header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 22px 22px 0;
    gap: 18px;
    background: #050505;
  }
  header .brand { align-self: flex-start; font-size: 21px; letter-spacing: -1px; }
  header nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 0 14px;
    border-bottom: 1px solid #ffffff1c;
  }
  header nav .services-link {
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #b8b8bf;
    font-size: 12px;
    line-height: 1.3;
    gap: 0;
    white-space: nowrap;
    transform: none;
  }
  header nav .services-link span { display: none; }
  header nav .services-link[aria-current] { color: #fff; }
  .hero { padding: 0 22px; min-height: auto; background: radial-gradient(ellipse at 80% 20%,#1b1b1f,#050505 65%); }
  .hero-content { display: grid; grid-template-columns: minmax(0,1fr); gap: 40px; padding: 42px 0 32px; }
  .hero-message { min-width: 0; padding: 0; }
  .hero h1 { font-size: clamp(38px,10.4vw,62px); line-height: 1.04; letter-spacing: -.055em; padding: 0; }
  .hero-copy { font-size: 18px; line-height: 1.55; letter-spacing: -.3px; margin: 22px 0 26px; max-width: 36ch; }
  .hero .call { min-height: 48px; font-size: 14px; padding: 14px 20px; gap: 22px; }
  .workflow-visual { width: 100%; max-width: 430px; }
  .workflow-panel { max-width: none; width: 100%; border-radius: 20px; }
  .app-body { padding: 4px 18px 0; }
  .workflow-result { display: grid; grid-template-columns: minmax(0,1fr) 32px; font-size: clamp(23px,6.8vw,32px); gap: 10px; margin: 20px 0 22px; letter-spacing: -1px; }
  .result-check { width: 32px; height: 32px; font-size: 18px; }
  .workflow-row { padding: 13px 0; gap: 12px; }
  .workflow-row strong { font-size: 14px; }
  .workflow-row small { font-size: 12px; margin-top: 4px; }
  .step-icon { flex-shrink: 0; width: 30px; height: 30px; }
  .money-saved { margin: 10px -18px 0; padding: 18px; gap: 10px; }
  .money-saved strong { font-size: 14px; letter-spacing: -.3px; }
  .money-check { flex-shrink: 0; }
  .hero-bottom { padding: 0 0 32px; }
  .hero-bottom .scroll { display: none; }
  .stats { width: 100%; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 12px; }
  .stats strong, .stats .hours-value { font-size: 27px; letter-spacing: -1px; }
  .stats p { font-size: 12px; line-height: 1.4; margin-top: 6px; }
  .problems { padding: 44px 22px 26px; }
  .section-intro { text-align: left; margin-bottom: 30px; }
  .section-intro h2 { font-size: 34px; max-width: 100%; line-height: 1.08; }
  .scenario { padding: 28px 0; gap: 16px; }
  .scenario h3 { font-size: 27px; line-height: 1.14; letter-spacing: -.035em; }
  .scenario p { font-size: 17px; line-height: 1.55; letter-spacing: -.2px; margin-bottom: 16px; }
  .automate { min-height: 44px; font-size: 15px; }
  .services-page { width: 100%; padding: 40px 22px 36px; }
  .services-page h1 { font-size: 42px; line-height: 1.06; padding: 0; }
  .services-intro { font-size: 20px; line-height: 1.5; margin: 22px 0 32px; }
  .services-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .service { padding: 24px; border-radius: 20px; }
  .service h2 { font-size: 28px; line-height: 1.14; margin-bottom: 16px; }
  .service p { font-size: 18px; line-height: 1.55; }
  .service-benefit { font-size: 14px; margin-bottom: 22px; }
  .project-grid { grid-template-columns: minmax(0,1fr); gap: 18px; margin: 30px 0 48px; }
  .project-grid .project-card > div { min-height: 80px; padding: 20px; }
  .project-grid .project-card h2 { font-size: 24px; }
  .stack-explorer { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .stack-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .stack-tab { padding: 12px; font-size: 13px; min-height: 64px; gap: 8px; }
  .stack-panel { min-height: 0; padding: 0; }
  .stack-panel ul { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stack-panel li { min-height: 64px; padding: 13px; font-size: 16px; }
  .about-hero, .reason { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .about-hero { margin-bottom: 48px; }
  .about-page .about-identity h1 { font-size: 44px; }
  .about-description p, .reason p { font-size: 18px; line-height: 1.6; }
  .reason { padding: 28px 0; }
  .reason h3 { font-size: 27px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); padding: 28px 20px 24px; border-radius: 22px; }
  dialog h2 { font-size: 28px; padding-right: 24px; margin-top: 6px; }
  dialog form { margin-top: 24px; gap: 12px; }
  dialog form input, dialog form textarea { font-weight: 400; font-size: 16px; }
  dialog form textarea { height: 104px; min-height: 104px; }
  dialog form .call { min-height: 48px; }
  .project-heading { padding: 0; }
  main:has(.viewer) { padding: 34px 16px; }
  .project-heading h1 { font-size: 34px; }
}
@media (max-width: 350px) {
  header, .hero, .services-page { padding-left: 16px; padding-right: 16px; }
  header nav { gap: 8px; }
  header nav .services-link { font-size: 11px; }
}
