/* Общие компоненты: шапка, меню, кнопки, работы, форма, подвал, служебные страницы. */

/* Шапка */
.site-header { border-bottom: 1px solid var(--line); }
.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
}
.brand, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.035em;
}
.brand:hover, .footer-logo:hover { text-decoration: none; }
.brand-symbol, .footer-logo img { display: block; flex: none; width: 36px; height: 36px; }
.nav .menu-list { display: flex; gap: 40px; font-size: 14px; font-weight: 500; }
.menu-list a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}
.pill:hover { text-decoration: none; background: var(--ink); color: var(--paper); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Мобильное меню: работает без JavaScript через details/summary. */
.mobile-nav { display: none; }
.mobile-nav summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.menu-icon { position: relative; display: block; width: 22px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.mobile-nav[open] .menu-icon { border: 0; }
.mobile-nav[open] .menu-icon::before, .mobile-nav[open] .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.mobile-nav[open] .menu-icon::after { transform: rotate(-45deg); }
.mobile-nav nav {
  position: absolute;
  z-index: 20;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(100% - 6px);
  padding: 8px 20px 20px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
}
.mobile-nav .menu-list { display: flex; flex-direction: column; }
.mobile-nav .menu-list a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.mobile-nav .menu-list a:hover { text-decoration: none; }
.mobile-nav-action { margin-top: 20px; }

/* Кнопки. Оранжевый — только главное действие. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 30px;
  border: 0;
  border-radius: 99px;
  background: var(--accent);
  color: #1d1d1d;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s;
}
.button:hover { text-decoration: none; background: var(--accent-hover); }
.button span { font-weight: 400; font-size: 18px; }

/* Шапка раздела: заголовок слева, пояснение справа. */
.section-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: end;
  padding: 120px 0 56px;
}
.section-head > p { font-size: 17px; color: var(--soft); max-width: 400px; }

/* Работы: экспонат в рамке видоискателя и строка метаданных. */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.case { display: flex; flex-direction: column; min-width: 0; }
.case-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 40px;
  background: var(--pale);
  border-radius: 4px;
}
.case-frame::before, .case-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--ink);
}
.case-frame::before { top: 16px; left: 16px; border-top-width: 1.5px; border-left-width: 1.5px; }
.case-frame::after { right: 16px; bottom: 16px; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.case-frame img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .35s; }
.case-frame:hover img { transform: scale(1.015); }
.case-meta {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 24px;
  align-items: baseline;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.case-meta h3 { font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.case-tags { margin: 10px 0 12px; }
.case-meta p:last-child { font-size: 14px; color: var(--soft); max-width: 420px; }
.case-link { font-size: 20px; }
.case-link:hover { text-decoration: none; color: var(--accent); }

/* Контакт и форма заявки */
.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 96px;
  padding-top: 140px;
  padding-bottom: 150px;
  scroll-margin-top: 20px;
}
.contact-intro .display { margin-top: 28px; font-size: clamp(42px, 5vw, 72px); }
.contact-intro > p:last-child { margin-top: 28px; font-size: 17px; color: var(--soft); max-width: 360px; }
.project-form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-content: start; }
.form-wide, .form-status { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; padding-top: 30px; border-bottom: 1px solid var(--ink); }
.field-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  letter-spacing: -.02em;
  resize: vertical;
}
.field textarea { min-height: 96px; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field:focus-within { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field:focus-within .field-label { color: var(--ink); }
.form-send { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 44px; }
.form-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--soft); max-width: 420px; }
.form-consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.form-consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.form-trap { position: absolute !important; left: -10000px; }
.form-status { padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--pale); }
.preview-note { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* Подвал */
.site-footer { background: var(--graphite); color: #d8dbda; padding: 72px 0 40px; }
.footer-main { display: grid; grid-template-columns: 6fr 3fr 3fr; gap: 40px; }
.footer-logo { color: #fff; }
.footer-identity p { margin-top: 22px; font-size: 14px; line-height: 1.9; color: var(--graphite-soft); }
.site-footer h2.label { margin-bottom: 16px; font-weight: 400; color: var(--graphite-muted); }
.site-footer .menu-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.9; }
.footer-wordmark {
  margin: 32px 0 48px;
  font-size: clamp(64px, 18vw, 180px);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.07em;
  color: #2b2f30;
  user-select: none;
  overflow: hidden;
}
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; border-top: 1px solid var(--graphite-line); color: var(--graphite-muted); }
.footer-bottom a:hover { color: #fff; }

/* Служебные и правовые страницы */
.legal-page { max-width: calc(960px + 2 * var(--gutter)); margin-left: 0; padding-top: 80px; padding-bottom: 120px; }
.legal-page h1 { font-size: clamp(28px, 4.5vw, 56px); overflow-wrap: break-word; hyphens: auto; font-weight: 700; line-height: 1.05; letter-spacing: -.05em; margin-bottom: 32px; }
.legal-page h2 { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin: 36px 0 12px; }
.legal-page p { margin: 14px 0; max-width: 720px; font-size: 16px; color: var(--soft); }
.legal-page a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.legal-note { padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--pale); }

/* Окно cookie из стартовой темы BIO-CMS получает цвета темы. */
:root { --cookie-ink: var(--ink); --cookie-border: var(--line); --cookie-accent: var(--ink); --cookie-radius: 4px; }

@media (max-width: 1100px) {
  .nav .menu-list { gap: 28px; }
  .contact { gap: 56px; }
  .case-meta { grid-template-columns: 1fr auto; }
  .case-meta > .label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav, .header-bar > .pill { display: none; }
  .mobile-nav { display: block; }
  .brand { font-size: 21px; gap: 9px; }
  .brand-symbol { width: 28px; height: 28px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; padding: 72px 0 32px; }
  .section-head > p { font-size: 15px; }
  .work-grid { grid-template-columns: 1fr; gap: 48px; }
  .case-frame { padding: 18px; }
  .case-frame::before, .case-frame::after { width: 14px; height: 14px; }
  .case-frame::before { top: 7px; left: 7px; }
  .case-frame::after { right: 7px; bottom: 7px; }
  .case-meta { margin-top: 16px; padding-top: 16px; gap: 6px 16px; }
  .case-meta h3 { font-size: 22px; }
  .contact { grid-template-columns: 1fr; gap: 24px; padding-top: 88px; padding-bottom: 96px; }
  .project-form { grid-template-columns: 1fr; }
  .field input, .field textarea { font-size: 18px; }
  .form-send { flex-direction: column; align-items: stretch; margin-top: 32px; }
  .form-send .button { width: 100%; }
  .site-footer { padding-top: 48px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-identity { grid-column: 1 / -1; }
  .footer-wordmark { margin: 40px 0 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .legal-page { padding-top: 48px; padding-bottom: 80px; }
}
