/* Shared header/footer chrome — matches main Next.js site */

:root {
  --background: 0 0% 98%;
  --foreground: 222 47% 11%;
  --surface: 0 0% 100%;
  --muted: 215 22% 34%;
  --border: 214 32% 91%;
  --primary: 337 91% 51%;
  --primary-foreground: 0 0% 100%;
  --accent: 196 100% 50%;
  --mf-max: 1200px;
}

.dark {
  --background: 0 0% 15%;
  --foreground: 0 0% 90%;
  --surface: 0 0% 18%;
  --muted: 0 0% 70%;
  --border: 224 34% 30%;
  --primary: 337 91% 51%;
  --primary-foreground: 0 0% 100%;
  --accent: 196 100% 50%;
}

.mf-chrome-container {
  width: min(100% - 2rem, var(--mf-max));
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .mf-chrome-container {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .mf-chrome-container {
    padding-inline: 2rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.mf-chrome-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(16px);
  transition: background-color 200ms ease, border-color 200ms ease;
}

.mf-chrome-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
}

.mf-chrome-brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.mf-chrome-logo {
  display: block;
  width: 72px;
  height: auto;
  flex-shrink: 0;
  color: hsl(var(--foreground));
  user-select: none;
}

.mf-chrome-brand__text {
  display: none;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}

@media (min-width: 1024px) {
  .mf-chrome-brand__text {
    display: flex;
  }
}

.mf-chrome-brand__line1 {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: hsl(var(--foreground) / 0.9);
  white-space: nowrap;
}

.mf-chrome-brand__line2 {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 500;
  color: hsl(var(--muted) / 0.8);
  white-space: nowrap;
}

.mf-chrome-nav {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 0;
}

@media (min-width: 1024px) {
  .mf-chrome-nav {
    display: flex;
  }
}

.mf-chrome-nav__link {
  padding: 0.5rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted));
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

@media (min-width: 1280px) {
  .mf-chrome-nav__link {
    padding-inline: 0.625rem;
  }
}

.mf-chrome-nav__link:hover,
.mf-chrome-nav__link.is-active {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
}

.mf-chrome-more {
  position: relative;
  flex-shrink: 0;
}

.mf-chrome-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: hsl(var(--muted));
}

.mf-chrome-more__btn:hover,
.mf-chrome-more__btn.is-open {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
}

.mf-chrome-more__chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 150ms ease;
}

.mf-chrome-more__btn.is-open .mf-chrome-more__chevron {
  transform: rotate(180deg);
}

.mf-chrome-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 200px;
  padding: 0.25rem 0;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--background));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.mf-chrome-more__menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background-color 150ms ease;
}

.mf-chrome-more__menu a:hover {
  background: hsl(var(--surface));
}

.mf-chrome-header__actions {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .mf-chrome-header__actions {
    display: flex;
  }
}

.mf-chrome-header__mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .mf-chrome-header__mobile {
    display: none;
  }
}

.mf-chrome-theme {
  display: inline-flex;
  padding: 2px;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background: hsl(var(--surface));
}

.mf-chrome-theme__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: hsl(var(--muted));
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.mf-chrome-theme__btn:hover {
  color: hsl(var(--foreground));
}

.mf-chrome-theme__btn.is-active {
  background: hsl(var(--accent));
  color: #fff;
}

.mf-chrome-theme__btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

.mf-chrome-phone {
  display: inline-flex;
  max-width: 11rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--surface));
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms ease;
}

@media (min-width: 1280px) {
  .mf-chrome-phone {
    max-width: none;
    padding-inline: 1rem;
  }
}

.mf-chrome-phone:hover {
  border-color: hsl(var(--accent) / 0.4);
}

.mf-chrome-phone svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: hsl(var(--accent));
}

.mf-chrome-btn {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, filter 150ms ease;
}

.mf-chrome-btn--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 8px 24px hsl(337 91% 51% / 0.22);
}

.mf-chrome-btn--primary:hover {
  background: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
}

.mf-chrome-menu-toggle {
  display: flex;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: hsl(var(--muted));
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.mf-chrome-menu-toggle:hover {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
}

.mf-chrome-menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mf-chrome-menu-toggle .icon-close {
  display: none;
}

.mf-chrome-menu-toggle.is-open .icon-menu {
  display: none;
}

.mf-chrome-menu-toggle.is-open .icon-close {
  display: block;
}

/* Mobile menu */
.mf-chrome-mobile-nav {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}

.mf-chrome-mobile-nav__inner {
  display: grid;
  gap: 1.25rem;
  padding-block: 1.5rem;
}

.mf-chrome-mobile-nav__links {
  display: grid;
  gap: 0.25rem;
}

.mf-chrome-mobile-nav__links a {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground) / 0.8);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.mf-chrome-mobile-nav__links a:hover {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
}

.mf-chrome-mobile-nav__extra {
  display: grid;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem;
  color: hsl(var(--muted));
}

.mf-chrome-mobile-nav__extra strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.mf-chrome-mobile-nav__extra a {
  color: hsl(var(--muted));
  text-decoration: none;
  transition: color 150ms ease;
}

.mf-chrome-mobile-nav__extra a:hover {
  color: hsl(var(--foreground));
}

.mf-chrome-mobile-nav__cta {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.mf-chrome-mobile-nav__cta .mf-chrome-phone {
  display: inline-flex;
  max-width: none;
  width: 100%;
  min-height: 3rem;
  justify-content: center;
  border-radius: 0.75rem;
}

.mf-chrome-mobile-nav__cta .mf-chrome-btn {
  width: 100%;
}

/* Footer */
.mf-chrome-footer {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  padding: 3rem 0 6rem;
  transition: background-color 200ms ease, border-color 200ms ease;
}

@media (min-width: 768px) {
  .mf-chrome-footer {
    padding-bottom: 3rem;
  }
}

.mf-chrome-footer__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .mf-chrome-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}

.mf-chrome-footer__brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.mf-chrome-footer__desc {
  margin: 0.75rem 0 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: hsl(var(--muted));
}

.mf-chrome-footer__contacts {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.mf-chrome-footer__contacts a {
  color: inherit;
  text-decoration: none;
}

.mf-chrome-footer__contacts a:first-child {
  font-weight: 600;
}

.mf-chrome-footer__contacts .muted {
  color: hsl(var(--muted));
}

.mf-chrome-footer__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.mf-chrome-footer__links {
  display: grid;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted));
}

.mf-chrome-footer__links a {
  color: hsl(var(--muted));
  text-decoration: none;
  transition: color 150ms ease;
}

.mf-chrome-footer__links a:hover {
  color: hsl(var(--foreground));
}

.mf-chrome-footer details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: hsl(var(--accent));
  transition: color 150ms ease;
}

.mf-chrome-footer details summary::-webkit-details-marker {
  display: none;
}

.mf-chrome-footer details summary:hover {
  color: hsl(var(--accent) / 0.8);
}

.mf-chrome-footer details[open] summary .show-closed {
  display: none;
}

.mf-chrome-footer details:not([open]) summary .show-open {
  display: none;
}

.mf-chrome-footer details .mf-chrome-footer__links {
  margin-top: 0.5rem;
}
