/*
Theme Name: Основа уюта
Description: Региональный сайт окон, остекления и услуг для дома.
Version: 0.2.10
Requires PHP: 7.4
Text Domain: osnova-uyuta
*/
:root {
  --navy: #243648;
  --blue: #7e99a5;
  --brass: #b99563;
  --linen: #f1f0ed;
  --white: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body { margin: 0; color: var(--navy); background: var(--white); font: 1rem/1.6 system-ui, sans-serif; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { width: min(94%, 87.5rem); margin-inline: auto; }
.site-header { position: sticky; z-index: 60; top: 0; background: var(--white); border-bottom: 1px solid var(--linen); }
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 .3rem 1.2rem #24364815; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; }
.mobile-menu-toggle { display: none; }
.brand { display: inline-flex; flex-shrink: 0; width: min(14.5rem, 100%); }
.brand img { display: block; width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem clamp(1rem, 1.65vw, 1.8rem); }
.site-nav a, .site-nav summary { text-decoration: none; font-weight: 500; }
.site-nav > ul > li > a, .site-nav > ul > li > details > summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 1.065rem;
  white-space: nowrap;
}
.site-nav a:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.65rem, 1vw, 1rem); }
.phone { white-space: nowrap; }
.osnova-icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; vertical-align: -.15em; }
.header-contact { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; font-weight: 400; text-decoration: none; white-space: nowrap; }
.header-contact:hover { color: #36566e; }
.header-max img { width: 1.15em; height: 1.15em; object-fit: contain; }
.header-quote {
  padding: .35rem .65rem;
  border: 1px solid var(--navy);
  border-radius: .45rem;
  background: #f4f8fa;
}
.header-quote:hover { background: #e5edf0; }
.header-disclosure, .site-nav .menu-item-has-children { position: relative; }
.header-disclosure > summary { cursor: pointer; list-style: none; }
.header-disclosure > summary::-webkit-details-marker { display: none; }
.site-nav .header-disclosure > summary::after {
  content: "";
  width: .42em;
  height: .42em;
  margin: -.2em 0 0 .55em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.site-nav .header-disclosure[open] > summary::after { transform: rotate(225deg); margin-top: .2em; }
.header-submenu, .site-nav ul.sub-menu {
  position: absolute;
  z-index: 20;
  top: 100%;
  inset-inline-start: 0;
  width: max-content;
  min-width: 13rem;
  max-width: min(18rem, 90vw);
  padding: .4rem;
  border: 1px solid #dedfdf;
  border-radius: .55rem;
  background: var(--white);
  box-shadow: 0 .5rem 1.5rem #24364820;
}
.site-nav ul.header-submenu, .site-nav ul.sub-menu { padding: 0; overflow: hidden; }
.site-nav ul.sub-menu { display: none; }
.site-nav li:hover > ul.sub-menu, .site-nav li:focus-within > ul.sub-menu { display: block; }
.site-nav :is(.header-submenu, .sub-menu) a {
  display: block;
  padding: .7rem 1rem;
  border-radius: 0;
}
.site-nav :is(.header-submenu, .sub-menu) a:hover { background: #f4f8fa; }
.header-max[aria-disabled="true"] { cursor: default; }
.header-max[aria-disabled="true"]:hover { color: inherit; }
.region-switcher { position: relative; flex: none; }
.region-switcher summary { display: flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding-inline: .55rem; font-weight: 500; cursor: pointer; list-style: none; }
.region-switcher summary::-webkit-details-marker { display: none; }
.region-switcher summary img { flex: none; width: 1.15rem; height: 1.15rem; }
.region-switcher summary::after { content: ""; flex: none; width: .38rem; height: .38rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.12rem) rotate(45deg); }
.region-switcher[open] summary::after { transform: translateY(.08rem) rotate(225deg); }
.region-switcher ul { position: absolute; inset: 100% 0 auto auto; z-index: 30; min-width: 10rem; margin: 0; padding: .3rem; list-style: none; border: 1px solid #dedfdf; border-radius: .55rem; background: var(--white); box-shadow: 0 .5rem 1.5rem #24364820; }
.region-switcher a { display: block; padding: .45rem .65rem; border-radius: .3rem; text-decoration: none; white-space: nowrap; }
.region-switcher a:hover, .region-switcher a[aria-current] { background: #e5edf0; }
.cta.floating-quote {
  position: fixed;
  z-index: 40;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  gap: .6rem;
  padding: .35rem .95rem .35rem .35rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(245, 250, 252, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--navy);
  box-shadow: 0 .4rem 1.45rem #2436482e, 0 0 0 1px #24364816;
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.25;
}
.floating-quote .osnova-icon { width: 2.25rem; height: 2.25rem; padding: .53rem; background: var(--navy); color: var(--white); border-radius: 50%; }
.floating-quote.cta:hover, .floating-quote.cta:focus-visible { background: #fff; }
.cta { display: inline-block; padding: .75rem 1.2rem; border-radius: .35rem; background: var(--navy); color: var(--white); font-weight: 700; text-decoration: none; }
.cta-icon { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.cta:hover { background: #334e64; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.hero { background: var(--linen); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-block: clamp(3rem, 8vw, 7rem); align-items: center; }
.hero-inner:has(.hero-image) { grid-template-columns: 1fr 1fr; }
.hero-image { width: 100%; border-radius: .6rem; object-fit: cover; aspect-ratio: 4 / 3; }
.eyebrow { font-weight: 700; margin: 0 0 1rem; border-left: .25rem solid var(--brass); padding-left: .75rem; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 5vw, 4.25rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); }
.hero-copy { max-width: 39rem; }
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
.service-card { display: block; padding: 1.25rem; background: var(--linen); border-radius: .5rem; text-decoration: none; }
.service-card:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.service-card h3 { margin-top: 0; }
.service-card p { margin-bottom: 0; }
.page-copy { max-width: 52rem; }
.site-footer { background: var(--navy); color: #fff; padding-block: clamp(2rem, 5vw, 3.75rem) 4.65rem; }
.footer-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.1fr; gap: 2rem clamp(1rem, 3vw, 3rem); }
.footer-row > * { min-width: 0; }
.footer-brand a {
  display: inline-flex;
  width: min(100%, 15rem);
  padding: .4rem .65rem;
  border-radius: .55rem;
  background: #fff;
}
.footer-brand img { display: block; width: 100%; object-fit: contain; }
.footer-brand p { max-width: 28ch; margin: .8rem 0 0; color: #dae4ed; }
.site-footer h2 { margin: 0 0 .85rem; font-size: 1.1rem; }
.footer-links ul, .footer-contact address { display: grid; gap: .45rem; margin: 0; padding: 0; }
.footer-links ul { list-style: none; }
.footer-contact address { font-style: normal; }
.site-footer a { text-decoration: none; text-underline-offset: .2em; overflow-wrap: anywhere; }
.site-footer a:hover { text-decoration: underline; }
.footer-phone { font-weight: 650; }
.footer-quote { margin-top: .9rem; padding: .45rem .7rem; border: 1px solid #aabcc9; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-top: 1.75rem;
  padding-top: .95rem;
  border-top: 1px solid #ffffff35;
  color: #dae4ed;
  font-size: .875rem;
}
@media (max-width: 58rem) {
  .footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 32rem) {
  .footer-brand, .footer-contact { grid-column: 1 / -1; }
}
.skip-link { position: absolute; inset: .5rem auto auto .5rem; transform: translateY(-200%); z-index: 100; }
.skip-link:focus { transform: none; }
.osnova-quote-form label { display: block; font-weight: 600; }
.osnova-quote-form input:not([type="checkbox"]):not([type="submit"]),
.osnova-quote-form select, .osnova-quote-form textarea {
  width: 100%;
  margin-top: .3rem;
  padding: .55rem .7rem;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--blue);
  border-radius: .3rem;
  font: inherit;
}
.osnova-quote-form textarea { min-height: 4rem; resize: vertical; }
.osnova-quote-form .wpcf7-list-item { margin-left: 0; }
.osnova-quote-form .wpcf7-acceptance label { font-size: .9rem; font-weight: 400; }
.osnova-quote-form input[type="submit"] { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.osnova-quote-form input[type="submit"]:disabled { opacity: .55; cursor: default; }
@media (width > 77rem) {
  .site-nav > ul, .header-actions { flex-wrap: nowrap; }
}
@media (77rem < width <= 86rem) {
  .header-row { width: 97%; gap: .65rem; }
  .header-row .brand { width: 11rem; }
  .site-nav > ul { column-gap: 1.05rem; }
  .header-actions { gap: .6rem; }
}
@media (max-width: 77rem) {
  .header-row { flex-wrap: wrap; padding-block: .65rem; gap: .5rem 1rem; }
  .site-nav { order: 1; width: 100%; }
}
@media (width > 40rem) {
  .site-header.is-scrolled .header-row { min-height: 3.65rem; padding-block: .25rem; }
  .site-header.is-scrolled .brand { width: 10rem; }
}
@media (601px <= width <= 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}
@media (max-width: 40rem) {
  html { scroll-padding-top: 4rem; }
  .hero-inner:has(.hero-image) { grid-template-columns: 1fr; }
  .header-row { min-height: 3.85rem; gap: .25rem; }
  .header-row .brand { width: clamp(7.75rem, 39vw, 10rem); }
  .header-actions { gap: .15rem; flex-wrap: nowrap; }
  .header-actions .header-contact { width: 2.75rem; min-height: 2.75rem; justify-content: center; font-size: 1.15rem; }
  .header-actions .header-contact > span, .header-actions .header-quote { display: none; }
  .region-switcher summary { width: 2.75rem; justify-content: center; gap: .3rem; padding: 0; }
  .region-switcher summary img { width: 1.45rem; height: 1.45rem; }
  .region-switcher summary span { display: none; }
  .floating-quote { font-size: .9rem; }
  .header-max[aria-disabled="true"] { opacity: .5; }
  .mobile-menu-toggle:not([hidden]) {
    display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem;
    margin-inline-start: auto; border: 0; border-radius: .45rem; background: #f4f8fa; color: var(--navy); cursor: pointer;
  }
  .mobile-menu-toggle span { width: 1.25rem; height: 2px; background: currentColor; box-shadow: 0 -.36rem currentColor, 0 .36rem currentColor; }
  .mobile-menu-toggle[aria-expanded="true"] span { box-shadow: none; transform: rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] span::after { content: ""; display: block; width: 100%; height: 100%; background: currentColor; transform: rotate(90deg); }
  .mobile-menu-toggle:not([hidden])[aria-expanded="false"] + .site-nav { display: none; }
  .header-row .site-nav { order: 1; max-height: 65dvh; overflow-y: auto; padding: .4rem .2rem .35rem; border-top: 1px solid var(--linen); }
  .site-nav > ul { display: grid; gap: 0; }
  .site-nav > ul > li > a, .site-nav > ul > li > details > summary { min-height: 2.75rem; padding-inline: .5rem; }
  .site-nav ul.header-submenu, .site-nav ul.sub-menu { position: static; width: 100%; max-width: none; box-shadow: none; }
  .site-nav ul.sub-menu { display: block; }
}
@media (max-width: 22rem) {
  .header-row .brand { width: 7.25rem; }
  .header-actions { gap: 0; }
}
