/* Frame: top bar, header, navigation, footer. */
.topbar { background: var(--deep); color: var(--muted); font-size: .8125rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--topbar-h); }
.topbar__contact { display: flex; gap: 22px; }
.topbar__contact a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; transition: color .2s; }
.topbar__contact a:hover { color: var(--text); }
.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); transition: color .2s; }
.social a:hover { color: var(--accent); }
.social .icon { width: 16px; height: 16px; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); box-shadow: 0 1px 0 rgba(255, 255, 255, .05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.logo { display: inline-flex; flex-direction: column; color: var(--text); text-decoration: none; line-height: 1; }
.logo__img { display: block; height: 52px; width: auto; background: none; }
@media (max-width: 640px) { .site-header .logo__img { height: 42px; } }
.logo__word { font: 600 clamp(1.5rem, 1.1rem + 1.2vw, 2.05rem)/1 var(--font-heading); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.logo__tag { margin-top: 7px; font: 400 .66rem/1 var(--font-heading); letter-spacing: .5em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.menu { display: flex; gap: clamp(16px, 2.4vw, 50px); list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu > li > a { position: relative; display: block; padding: 40px 0; color: color-mix(in srgb, var(--text) 84%, var(--bg)); font: 400 1.25rem/1 var(--font-body); text-decoration: none; white-space: nowrap; transition: color .2s; }
.menu > li > a::after { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.menu > li > a:hover, .menu > li.is-active > a { color: var(--text); }
.menu > li:hover > a::after, .menu > li.is-active > a::after { transform: scaleX(1); }
.sub-menu {
  position: absolute; top: 100%; left: -22px; min-width: 260px; margin: 0; padding: 10px 0; list-style: none;
  background: var(--surface); border-top: 3px solid var(--accent); box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.menu > li:last-child .sub-menu { left: auto; right: 0; }
.menu > li:hover > .sub-menu, .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 10px 22px; color: color-mix(in srgb, var(--text) 84%, var(--bg)); font-size: 1rem; line-height: 1.4; text-decoration: none; transition: color .2s, background-color .2s; }
.sub-menu a:hover { color: var(--accent); background: rgba(255, 255, 255, .03); }
.sub-toggle, .nav-toggle { display: none; }

@media (max-width: 1180px) {
  :root { --header-h: 78px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
    background: none; border: 1px solid var(--line); color: var(--text); cursor: pointer;
    font: 500 .8125rem/1 var(--font-heading); letter-spacing: .12em; text-transform: uppercase;
  }
  .nav-toggle .icon { width: 20px; height: 20px; }
  .nav-toggle__close, .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
  .site-nav { position: absolute; inset: 100% 0 auto; display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0, 0, 0, .45); }
  .site-nav.is-open { display: block; }
  .menu { flex-direction: column; gap: 0; padding: 6px var(--gutter) 28px; }
  .menu > li { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
  .menu > li > a { padding: 17px 0; font-size: 1.125rem; }
  .menu > li > a::after { display: none; }
  .menu > li.is-active > a { color: var(--accent); }
  .sub-toggle { display: grid; place-items: center; width: 52px; background: none; border: 0; color: var(--text); cursor: pointer; }
  .sub-toggle .icon { transition: transform .2s; }
  .sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .sub-menu { grid-column: 1 / -1; position: static; display: none; min-width: 0; padding: 0 0 12px 14px; border: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; }
  .sub-menu.is-open { display: block; }
  .no-js .site-nav { position: static; display: block; box-shadow: none; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .sub-menu { display: block; }
  .no-js .nav-toggle { display: none; }
}
@media (max-width: 640px) {
  .topbar__contact span { display: none; }
  .topbar__contact a { width: 32px; height: 32px; justify-content: center; }
  .topbar__contact { gap: 4px; }
}

/* Footer */
.footer-main { background: var(--surface); padding-block: 44px 56px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-bottom: 28px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.footer-brand address { color: var(--muted); font-size: .95rem; line-height: 1.7; text-align: end; }
.footer-brand address a { color: var(--muted); text-decoration: none; }
.footer-brand address a:hover, .footer-links a:hover { color: var(--accent); }
.logo--footer .logo__word { font-size: 1.6rem; }
.logo--footer .logo__img { height: 60px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.footer-links li + li::before { content: "|"; margin-inline: 12px; color: var(--accent); }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .2s; }
.footer-bottom { background: var(--deep); padding-block: 16px; color: var(--muted); font-size: .8125rem; }
.footer-bottom p span { margin-inline: 10px; color: var(--accent); }
@media (max-width: 700px) {
  .footer-brand address { text-align: start; }
}
