:root {
  --page-bg: #111111;
  --header-bg: #111111;
  --nav-bg: #1a1a1a;
  --logo-grey: #717171;
  --nav-grey: #777777;
  --accent: #c09a58;
  --dropdown-bg: #373737;
  --dropdown-rule: #d6d6d6;
  --field-bg: #171717;
  --field-border: #3b3b3b;
  --field-focus: #8c7041;
  --shell-width: 1260px;
  --content-width: 940px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
  color: var(--logo-grey);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

.site-header {
  background: var(--header-bg);
}

.header-inner,
.nav-inner,
.footer-inner {
  width: min(var(--shell-width), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 142px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-block;
  width: min(420px, 60vw);
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.main-nav {
  background: var(--nav-bg);
}

.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--nav-grey);
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 23px;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-inner > .nav-link:first-child {
  padding-left: 0;
  padding-right: 23px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--accent);
}

.dropdown {
  position: relative;
  display: flex;
}

.dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 20;
  min-width: 255px;
  display: none;
  background: var(--dropdown-bg);
  border-left: 5px solid var(--dropdown-rule);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 14px 18px;
  color: #909090;
  text-decoration: none;
  line-height: 1.35;
}

.dropdown-menu a + a {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.035);
}

.page-main {
  flex: 1;
  width: 100%;
  padding: 68px 20px 48px;
}

.home-content,
.about-content,
.contact-content {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
}

.intro,
.about-copy,
.contact-intro {
  color: var(--logo-grey);
  font-size: 18px;
  line-height: 1.8;
}

.intro,
.contact-intro {
  margin: 0;
}

.about-copy p {
  margin: 0 0 24px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.home-image,
.about-image {
  display: block;
  width: min(900px, 100%);
  height: auto;
  margin: 52px auto 0;
}

.contact-content {
  max-width: 760px;
}

.contact-intro {
  margin-bottom: 34px;
}

.contact-form {
  width: 100%;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: #858585;
  font-size: 16px;
  line-height: 1.4;
}

.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 3px;
  background: var(--field-bg);
  color: #b1b1b1;
  font: inherit;
  font-size: 17px;
  line-height: 1.5;
  padding: 12px 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

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

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--field-focus);
  box-shadow: 0 0 0 2px rgba(192, 154, 88, 0.12);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #555555;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.submit-button {
  appearance: none;
  border: 1px solid #765f38;
  border-radius: 3px;
  background: #211c15;
  color: var(--accent);
  padding: 11px 24px;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: #2a2319;
  border-color: var(--accent);
  color: #d2ae6d;
}

.form-status {
  margin: 28px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: #171717;
  color: #8e8e8e;
  font-size: 16px;
  line-height: 1.55;
}

.form-status.error {
  border-left-color: #8f5f5f;
}

.site-footer {
  background: var(--nav-bg);
  border-top: 1px solid #171717;
}

.footer-inner {
  padding: 18px 0 20px;
  color: var(--logo-grey);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.01em;
}

.footer-built {
  color: var(--accent);
}

.footer-company,
.footer-copy {
  color: var(--logo-grey);
}

.footer-built,
.footer-company {
  margin-right: 4px;
}

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

@media (min-width: 761px) and (max-height: 850px) {
  .header-inner {
    min-height: 122px;
  }

  .page-main {
    padding-top: 42px;
    padding-bottom: 34px;
  }

  .home-image,
  .about-image {
    width: min(800px, 100%);
    margin-top: 36px;
  }

  .about-copy p {
    margin-bottom: 18px;
  }

  .contact-intro {
    margin-bottom: 26px;
  }

  .form-field {
    margin-bottom: 18px;
  }

  .form-field textarea {
    min-height: 150px;
  }

  .footer-inner {
    padding-top: 12px;
    padding-bottom: 14px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    min-height: 122px;
  }

  .brand {
    width: min(420px, 80vw);
  }

  .nav-inner {
    width: 100%;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-link,
  .nav-inner > .nav-link:first-child {
    min-height: 56px;
    padding: 0 14px;
    font-size: 16px;
  }

  .page-main {
    padding: 54px 20px 48px;
  }

  .intro,
  .about-copy,
  .contact-intro {
    font-size: 16px;
    line-height: 1.7;
  }

  .about-copy p {
    margin-bottom: 22px;
  }

  .home-image,
  .about-image {
    margin-top: 44px;
    width: 100%;
  }

  .dropdown-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    min-width: 0;
  }

  .contact-intro {
    margin-bottom: 28px;
  }

  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }

  .form-field textarea {
    min-height: 170px;
  }

  .footer-inner {
    width: calc(100% - 32px);
    font-size: 12px;
  }
}
