.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f7f6f3;
  color: var(--color-text);
}

.topbar {
  max-height: 46px;
  overflow: hidden;
  background: #0b0c0e;
  border-bottom: 1px solid rgba(198, 146, 46, 0.28);
  color: #d7dbe0;
  font-size: 0.82rem;
  transition: max-height 0.35s var(--ease), opacity 0.35s var(--ease);
}

.masthead.is-scrolled .topbar {
  max-height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.topbar__inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar a {
  color: var(--color-white);
  text-decoration: none;
}

.topbar a:hover {
  color: var(--color-gold-light);
}

.topbar__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar__label {
  color: var(--color-gold-light);
  font-weight: 600;
}

.header {
  background: #f7f6f3;
  border-bottom: 1px solid #e4e1da;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.masthead.is-scrolled .header {
  background: #ffffff;
  border-bottom-color: #e1e3e5;
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.08);
}

.header__inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.logo img {
  width: 196px;
  height: auto;
  transition: width 0.35s var(--ease);
}

.masthead.is-scrolled .logo img {
  width: 168px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav a,
.nav__drop > button {
  color: #202328;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 6px;
}

.nav__list > li > a,
.nav__drop > button {
  font-size: 0.94rem;
  font-weight: 600;
}

.nav a[aria-current="page"] {
  color: #8a6418;
}

.nav__drop {
  position: relative;
}

.nav__drop > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__drop > button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  padding: 8px;
  list-style: none;
  background: #1c1f23;
  border: 1px solid rgba(198, 146, 46, 0.28);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.nav__drop:hover .dropdown,
.nav__drop:focus-within .dropdown,
.nav__drop.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #f4f6f8;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: rgba(198, 146, 46, 0.12);
}

.dropdown small {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: transparent;
  color: white;
  position: relative;
  z-index: 60;
  cursor: pointer;
}

.nav-toggle {
  border-color: #d5d1c8;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #17191c;
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.35);
  background: #121417;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before,
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  top: 0;
  background: #ffffff;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--gold {
  background: var(--color-gold);
  color: var(--color-header);
}

.btn--gold:hover { background: var(--color-gold-light); }

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover { border-color: var(--color-gold-light); color: var(--color-gold-light); }

.btn--line {
  background: transparent;
  color: var(--color-text);
  border-color: #c8ccd0;
}

.btn--line:hover { border-color: var(--color-gold); color: #8a6418; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer {
  background: var(--color-header);
  color: #d5d9de;
  padding-top: 72px;
}

.footer a { text-decoration: none; }
.footer a:hover { color: var(--color-gold-light); }

.footer__grid {
  display: grid;
  gap: 36px;
  padding-bottom: 48px;
}

.footer__logo {
  width: 200px;
  height: auto;
  margin-bottom: 16px;
  padding: 8px 10px 4px;
  background: #f7f6f3;
  border-radius: 10px;
}

.footer p { max-width: 36ch; }

.footer__label {
  margin-bottom: 14px;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer ul { list-style: none; display: grid; gap: 8px; }

.footer address {
  font-style: normal;
  display: grid;
  gap: 8px;
}

.footer__fine {
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.footer__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9aa2aa;
  font-size: 0.88rem;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-header);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.to-top[hidden] { display: none; }

.form {
  display: grid;
  gap: 16px;
}

.form__grid {
  display: grid;
  gap: 16px;
}

.field { display: grid; gap: 6px; }

.field label,
.form legend {
  font-weight: 600;
  font-size: 0.92rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd3d6;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-text);
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-gold);
  outline: 2px solid rgba(198, 146, 46, 0.35);
  outline-offset: 1px;
}

.error {
  color: var(--color-danger);
  font-size: 0.84rem;
  min-height: 1.1em;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--color-danger);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form-status {
  display: none;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  min-height: 0;
}

.form-status:not(:empty) {
  display: block;
  margin-top: 4px;
  padding: 14px 16px;
  background: #e8f5ee;
  color: #14573a;
}

.form-status.is-error:not(:empty) {
  background: #f8ecea;
  color: #6d2c26;
}

.form-status.is-pending:not(:empty) {
  background: #f4f1ea;
  color: #4a463c;
}

.extra-fields {
  display: none;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fafaf8;
}

.extra-fields.is-visible { display: grid; }

@media (min-width: 720px) {
  .form__grid,
  .extra-fields { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1.4fr 0.8fr 0.9fr 1.1fr; }
}

@media (max-width: 979px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav a,
  .nav__drop > button { color: #eceff2; }

  .nav a[aria-current="page"] { color: var(--color-gold-light); }

  .topbar__place { display: none; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(420px, 100%);
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 104px 24px 32px;
    background: #121417;
    transform: translateX(104%);
    transition: transform 0.55s var(--ease);
    overflow: auto;
    z-index: 45;
  }

  .nav-toggle {
    z-index: 70;
  }

  .nav.is-open { transform: none; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .dropdown {
    position: static;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    margin: 4px 0 8px 12px;
  }

  .nav__drop.is-open .dropdown { display: block; }

  body.nav-open { overflow: hidden; }

  .nav .btn {
    width: 100%;
    margin-top: 18px;
    justify-content: center;
    min-height: 52px;
    border: 2px solid #f0d089;
    box-shadow:
      0 0 0 4px rgba(224, 182, 91, 0.16),
      0 12px 28px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.92rem;
    font-weight: 800;
  }

  .nav .btn--gold {
    background: linear-gradient(180deg, #d4a84a 0%, var(--color-gold) 100%);
    color: #17191c;
  }

  .nav .btn--gold:hover,
  .nav .btn--gold:focus-visible {
    background: linear-gradient(180deg, #e6c36a 0%, var(--color-gold-light) 100%);
    border-color: #fff1c8;
    box-shadow:
      0 0 0 4px rgba(240, 208, 137, 0.28),
      0 14px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
  }

  .nav .btn--gold:active {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .container { width: min(var(--container-width), calc(100% - 28px)); }
  .topbar { font-size: 0.74rem; }
  .topbar__inner {
    justify-content: center;
    min-height: 40px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .topbar__inner > p:first-child,
  .topbar__place { display: none; }
  .topbar__links {
    gap: 12px;
    justify-content: center;
    flex-wrap: nowrap;
  }
  .topbar__links a:last-child { display: none; }
  .logo img,
  .masthead.is-scrolled .logo img { width: 128px; }
  .hero .btn,
  .page-hero .btn { width: 100%; }
}
