

.topbar,
.footer {
  --green-dark: #184d2a;
  --ink: #192018;
  width: 100%;
}

.topbar a,
.footer a {
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(42, 38, 30, 0.14);
  background:
    radial-gradient(
      circle at 14% 0%,
      rgba(214, 167, 58, 0.16),
      transparent 18rem
    ),
    linear-gradient(
      180deg,
      rgba(255, 251, 242, 0.96),
      rgba(248, 242, 230, 0.94)
    );
  box-shadow: 0 12px 34px rgba(36, 28, 18, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img,
.footer-brand img {
  width: 46px;
  height: 46px;
}

.brand span,
.footer-brand span {
  font-size: 22px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 3vw, 28px);
  color: #39372f;
  font-size: 15px;
  font-weight: 700;
}

.nav-links a:not(.header-cta) {
  padding: 10px 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: max-content;
  max-width: 100%;
  padding: 10px clamp(16px, 1.6vw, 24px);
  border-radius: 8px;
  color: #fff;
  background: var(--green-dark);
  box-shadow: 0 12px 24px rgba(24, 77, 42, 0.2);
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  text-wrap: balance;
}

.header-cta span {
  min-width: 0;
  overflow-wrap: break-word;
}

.nav-links .header-cta-primary {
  width: max-content;
  max-width: none;
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav-links .header-cta-primary span {
  white-space: inherit;
}

.header-cta:hover,
.header-cta:focus-visible {
  background: var(--ink);
}

.header-cta-support {
  background: #244f31;
}

.header-cta-store {
  gap: 9px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #202820;
  box-shadow: 0 12px 24px rgba(25, 32, 24, 0.2);
}

.header-cta-store:hover,
.header-cta-store:focus-visible {
  color: #fff;
  background: var(--green-dark);
}

.header-cta-store img {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
}

.header-store-link {
  justify-self: center;
  margin-inline: clamp(12px, 2vw, 32px);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.language-switch,
.menu-toggle {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(42, 38, 30, 0.16);
  border-radius: 8px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.64);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.language-switch {
  gap: 5px;
  padding: 7px 10px;
}

.language-switch-icon {
  font-size: 17px;
  line-height: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.menu-toggle > span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle[aria-expanded="true"] > span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] > span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] > span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.footer {
  position: relative;
  z-index: 2;
}

.footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  padding: 28px clamp(18px, 4vw, 56px);
  color: #fff;
  background: #6f746d;
  font-size: 15px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  background: transparent;
}

.footer-links {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(220px, 1.8fr);
  column-gap: clamp(20px, 2vw, 36px);
  font-weight: 700;
  line-height: 1.4;
}

.footer-link-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-settings-link {
  width: fit-content;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-settings-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.footer address {
  color: #fff;
  font-style: normal;
  line-height: 1.5;
  text-align: right;
  font-size: 15px;
}

@media (max-width: 1080px) {
  .topbar {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 1080px) {

  .header-store-link {
    justify-self: center;
    margin-inline: 0;
  }
}

@media (max-width: 1080px) {

  .header-tools {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 1080px) {

  .nav-links {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
  }
}

@media (max-width: 1200px) {

  .footer {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 1200px) {

  .footer address {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: sticky;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }
}

@media (max-width: 820px) {

  .header-tools {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 820px) {

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 2px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(42, 38, 30, 0.12);
  }
}

@media (max-width: 820px) {

  .nav-links.is-open {
    display: grid;
  }
}

@media (max-width: 820px) {

  .nav-links a:not(.header-cta) {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 4px;
  }
}

@media (max-width: 820px) {

  .nav-links .header-cta-primary {
    display: none;
  }
}

@media (max-width: 820px) {

  .header-store-link {
    min-width: 44px;
    padding-inline: 9px;
  }
}

@media (max-width: 820px) {

  .header-store-link span {
    display: none;
  }
}

@media (max-width: 820px) {

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 820px) {

  .footer {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 820px) {

  .footer address {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .brand span {
    font-size: 19px;
  }
}

@media (max-width: 520px) {

  .footer {
    gap: 22px;
  }
}

@media (max-width: 520px) {

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }
}

@media (max-width: 620px) {
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .footer-link-column:last-child { grid-column: 1 / -1; }
  .footer-link-column a, .footer-settings-link { min-height: 32px; display: flex; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle > span { transition: none; }
}
