/* Common contact header and the expanded gallery on the home page. */
.site-header-contact-first .header-contact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "brand hours contacts messengers callback";
  align-items: center;
  justify-content: normal;
  column-gap: clamp(16px, 2.5vw, 38px);
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  height: auto;
  min-height: 82px;
  padding-block: 10px;
}

.site-header-contact-first .wordmark {
  grid-area: brand;
  gap: 10px;
  font-size: 15px;
  letter-spacing: .035em;
}

.site-header-contact-first .wordmark img {
  width: 46px;
  height: 46px;
}

.site-header-contact-first .header-hours {
  grid-area: hours;
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.36;
}

.site-header-contact-first .header-call {
  grid-area: contacts;
  justify-items: start;
  margin: 0;
  gap: 3px;
}

.site-header-contact-first .header-phone {
  font-size: 21px;
  line-height: 1.14;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.site-header-contact-first .header-email {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 530;
}

.site-header-contact-first :is(.header-phone, .header-email):hover {
  color: var(--red);
}

.site-header-contact-first .header-messengers {
  grid-area: messengers;
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-header-contact-first .header-messengers .social-link,
#mobile-menu .drawer-actions .social-link {
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.site-header-contact-first .header-messengers .social-link:hover,
#mobile-menu .drawer-actions .social-link:hover {
  background: var(--sand);
  border-color: #bfb7ac;
}

.site-header-contact-first .header-messengers .social-link img,
#mobile-menu .drawer-actions .social-link img {
  width: 26px;
  height: 26px;
}

.site-header-contact-first .header-callback {
  grid-area: callback;
  justify-self: end;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 15px;
  white-space: nowrap;
}

.site-header-contact-first .menu-trigger {
  grid-area: menu;
  width: 46px;
  height: 46px;
  justify-self: end;
  border-radius: 9px;
}

.site-header-contact-first .header-menu-bar {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-header-contact-first .desktop-nav {
  justify-content: space-between;
  gap: 14px;
  height: 50px;
}

.site-header-contact-first .nav-root {
  gap: 8px;
  font-size: clamp(15px, 1.16vw, 17px);
  font-weight: 500;
}

.site-header-contact-first .mega {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  max-height: calc(100dvh - 145px);
}

.site-header-contact-first .mega-links a {
  min-height: 40px;
  font-size: 14px;
}

.site-header-contact-first .mega-family {
  grid-template-columns: 1fr 44px;
}

.site-header-contact-first .mega-family button {
  width: 44px;
  height: 44px;
}

body:has(.site-header-contact-first) main section[id] {
  scroll-margin-top: 146px;
}

.home-project-extras > .work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 22px);
  align-items: start;
}

.home-project-extras > .work-grid > figure {
  grid-area: auto;
  margin: 0;
}

.home-project-extras > .work-grid > figure > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 37%;
  border-radius: 9px;
}

.home-project-extras > .work-grid figcaption {
  padding-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 1220px) {
  .site-header-contact-first .header-contact-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
    grid-template-areas: "brand hours contacts messengers callback menu";
    column-gap: clamp(10px, 1.45vw, 20px);
  }

  .site-header-contact-first .header-menu-bar {
    display: none;
  }

  body:has(.site-header-contact-first) main section[id] {
    scroll-margin-top: 96px;
  }
}

@media (max-width: 980px) {
  .site-header-contact-first .header-contact-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto auto;
    grid-template-areas:
      "brand hours messengers menu"
      "contacts contacts callback callback";
    row-gap: 8px;
  }

  body:has(.site-header-contact-first) main section[id] {
    scroll-margin-top: 136px;
  }
}

@media (max-width: 720px) {
  .home-project-extras > .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header-contact-first .header-contact-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand messengers menu"
      "contacts callback callback"
      "hours hours hours";
    gap: 6px 8px;
    padding-block: 8px;
  }

  .site-header-contact-first .wordmark {
    gap: 7px;
    font-size: 12px;
  }

  .site-header-contact-first .wordmark img {
    width: 36px;
    height: 36px;
  }

  .site-header-contact-first .header-phone {
    font-size: clamp(14px, 4.3vw, 18px);
  }

  .site-header-contact-first .header-email {
    font-size: 12px;
  }

  .site-header-contact-first .header-callback {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .site-header-contact-first .header-hours {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 9px;
    font-size: 12px;
  }

  body:has(.site-header-contact-first) main section[id] {
    scroll-margin-top: 156px;
  }
}

@media (max-width: 420px) {
  .home-project-extras > .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-optional {
  font-size: .875em;
  font-weight: 400;
  color: var(--muted);
}

.lead-phone-error {
  color: var(--red-dark);
  font-size: .875rem;
  font-weight: 500;
  margin-block: 4px 0;
}

.request-form .form-result[data-state="error"] {
  color: var(--red-dark);
}

.request-form .form-result[data-state="success"] {
  color: #185234;
  font-weight: 600;
}

.request-form input[aria-invalid="true"] {
  border-color: var(--red);
}

.cookie-banner a,
#cookie-dialog .dialog-note a {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.legal-document-body {
  padding-block: clamp(26px, 5vw, 62px);
}

.legal-document-body article,
.legal-document-body .document-note,
.legal-document-body .legal-document-links {
  max-width: 780px;
}

.legal-document-body p { line-height: 1.6; }
.legal-revision { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.document-note { background: var(--sand); border-radius: 12px; padding: 17px 20px; margin-bottom: 26px; }
.document-note p { margin-top: .4em; }
.legal-document-body .interior-legal-block { padding-block: 15px 18px; }
.legal-document-body .interior-legal-block p + p { margin-top: .7em; }
.legal-document-links { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 26px; }
.legal-document-body a { text-decoration: underline; text-underline-offset: .2em; color: var(--red-dark); }
.cookie-data-table { width: 100%; margin-block: 14px; border-collapse: collapse; font-size: .9rem; }
.cookie-data-table th, .cookie-data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.cookie-data-table thead { background: var(--sand); }
.legal-document-body code { overflow-wrap: anywhere; }


.request-form input[type="tel"][name="phone"] {
  width: min(100%, 11.5rem);
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}

.callback-field {
  grid-template-columns: minmax(0, 11.5rem) max-content;
  justify-content: start;
}

@media (max-width: 400px) {
  .callback-field {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    justify-items: start;
  }

  .callback-field .callback-submit {
    justify-self: start;
  }
}


.site-header-contact-first .mega-family a,
.drawer-nav a,
.drawer-nav summary {
  font-weight: 500;
}

.site-header-contact-first .nav-root[aria-current="page"],
.drawer-nav a[aria-current="page"] {
  color: var(--red-dark);
}

.callback-panel[open] {
  z-index: 13;
}

body:has(#callback-dialog[open]):not(:has(dialog[open]:not(#callback-dialog))) {
  overflow: visible;
}

.cookie-options input {
  flex: none;
}

.cookie-banner > .text-button {
  min-height: 36px;
}

.site-footer .footer-main { row-gap: clamp(23px, 3.5vw, 42px); }

.site-footer .footer-main > div {
  position: relative;
  isolation: isolate;
  padding-top: 22px;
  --footer-light-delay: 0s;
}

.site-footer .footer-main > div:nth-child(2) { --footer-light-delay: -1.8s; }
.site-footer .footer-main > div:nth-child(3) { --footer-light-delay: -3.2s; }
.site-footer .footer-main > div:nth-child(4) { --footer-light-delay: -4.6s; }

.site-footer .footer-main > div::before,
.site-footer .footer-main > div::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  animation: chudo-footer-spot 7s ease-in-out var(--footer-light-delay) infinite;
}

.site-footer .footer-main > div::before {
  top: 1px;
  inset-inline-start: 0;
  width: min(148px, 100%);
  height: 103px;
  background: radial-gradient(ellipse 93px 76px at 22px 0, rgb(255 207 146 / 20%), rgb(255 197 126 / 7%) 55%, transparent 88%);
}

.site-footer .footer-main > div::after {
  top: 0;
  inset-inline-start: 15px;
  width: 14px;
  height: 4px;
  border-radius: 50%;
  background: #fff2d8;
  box-shadow: 0 1px 8px rgb(255 215 156 / 76%), 0 2px 14px rgb(255 194 114 / 36%);
}

.site-footer .footer-bottom {
  position: relative;
  border-top-color: transparent;
}

.site-footer .footer-bottom::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 206 149 / 28%), #e9c291 24%, #ffedcf 54%, #e0b47f 83%, rgb(255 206 149 / 28%));
  box-shadow: 0 0 7px rgb(255 200 127 / 47%);
  pointer-events: none;
}

@keyframes chudo-footer-spot {
  0%, 100% { opacity: .98; }
  49% { opacity: .68; }
  66% { opacity: .89; }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-main > div::before,
  .site-footer .footer-main > div::after { animation: none; }
}
