:root {
  font-size: 16px;

  --color-primary: #E21C23;
  --color-secondary: #F5C400;
  --color-background: #FFFDF7;
  --color-surface: #FFF3D6;
  --color-surface-dark: #F9B932;
  --color-text-primary: #2B2B2B;
  --color-text-secondary: #6B6B6B;
  --color-text-on-dark: #FFFFFF;
  --border-radius: 6px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;

  font-family: Arial, sans-serif;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
  line-height: 1.5;

  color: var(--color-text-primary);
  background: var(--color-background);
}

header,
footer {
  padding: clamp(0.3125rem, 2vw, 2rem);
}

.container {
  margin: clamp(0.3125rem, 2vw, 2rem);
  padding-bottom: 10px;
}

.container h2 {
  padding: clamp(1rem, 2vw, 2rem);
}

header {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

#primary-navigation {
  position: absolute;
  top: 100%;
  left: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;

  background-color: var(--color-background);
  opacity: 0;

  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateY(-20px);

  pointer-events: none;
}

#primary-navigation a {
  width: 100%;
}

#primary-navigation:target {
  opacity: 1;

  transform: translate(0);

  pointer-events: auto;
}

.close-menu {
  display: none;
}

#primary-navigation:target ~ .menu-toggle .burger-menu {
  display: none;
}

#primary-navigation:target ~ .menu-toggle .close-menu {
  display: flex;
}

header a,
header button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  margin: 3px;
  padding: 3px;

  text-decoration: none;

  color: var(--color-text-primary);
}

header a:hover {
  text-decoration: underline;

  color: var(--color-primary);
}

header .logo {
  width: auto;
  height: 60px;
}

.phone {
  font-size: clamp(0.75rem, 0.65rem + 0.5vw, 1.125rem);
}

.btn,
button {
  padding: 10px;

  color: var(--color-text-on-dark);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--border-radius);

  transition: background-color 0.2s ease, color 0.2s ease, outline-color 0.2s ease;
}

.btn:hover,
button:hover {
  color: var(--color-text-primary);
  background-color: var(--color-secondary);

  cursor: pointer;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

footer {
  margin-top: auto;

  color: var(--color-text-on-dark);
  background-color: var(--color-surface-dark);
}

footer address a {
  text-decoration: none;

  color: var(--color-text-on-dark);
}

footer p {
  margin-top: 1.5rem;
  padding-top: 1rem;

  text-align: center;

  border-top: 1px solid var(--color-text-on-dark);
}

.modal {
  margin: auto;
  padding: 0;
  overflow: visible;

  background: transparent;
  border: none;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.modal-form {
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90vw;
  max-width: 500px;
  max-height: 90vh;
  padding: 0 2rem 2rem 2rem;
  overflow-y: auto;

  background: var(--color-background);
  border-radius: var(--border-radius);
}

.modal-form input:not([type="checkbox"]),
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 10px;

  background: var(--color-surface);
  border: none;
  border-radius: var(--border-radius);

  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form textarea {
  min-height: 200px;
  resize: vertical;
}

.modal-form button {
  align-self: center;
}

.close-btn {
  position: absolute;
  top: 0;
  right: 0;

  margin-top: 5px;
  margin-right: 10px;
  margin-left: auto;

  font-size: 28px;
  line-height: 1;

  color: var(--color-text-secondary);
  border: none;
}

.close-btn,
.close-btn:hover {
  background: none;
  border: none;
  outline: none;
}

h1,
h2,
h3 {
  text-align: center;
}

h1 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
}

h2 {
  font-size: clamp(1.375rem, 2vw + 1rem, 2rem);
}

h3 {
  font-size: clamp(1.125rem, 1.5vw + 1rem, 1.5rem);
}

a {
  text-decoration: underline;

  color: var(--color-primary);
}

.visually-hidden,
.honeypot {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;

  white-space: nowrap;

  border: 0;
  clip: rect(0, 0, 0, 0);
}

@media (min-width: 1024px) {
  body {
    display: flex;
    flex-direction: column;
  }

  header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  #primary-navigation {
    position: static;
    top: auto;
    left: auto;

    display: flex;
    flex-direction: row;
    width: auto;

    opacity: 1;

    transform: none;

    pointer-events: auto;
  }

  #primary-navigation a {
    width: auto;
  }

  header .logo {
    height: 100px;
  }

  header a {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .container {
    padding-bottom: 50px;
  }
}
