/* ==========================================================================
   layout.css — fixed header + navigation, contact footer
   ========================================================================== */

main { padding-top: var(--header-height); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1209px;
  min-height: var(--header-height);
  margin-inline: auto;
  padding: 20px var(--gutter);
}

.site-header__logo { display: block; flex: 0 0 auto; }
.site-header__logo img { width: 89px; height: 60px; }

.primary-nav ul { display: flex; list-style: none; }
.primary-nav li { padding: 0 11px; }
.primary-nav li:last-child { padding-right: 0; }

.primary-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #000;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

/* Active / hover treatment: short orange lines top-right and bottom-left. */
.primary-nav a::before,
.primary-nav a::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--orange-nav);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.primary-nav a::before { top: 0; right: 0; width: 50%; transform-origin: right; }
.primary-nav a::after { bottom: 0; left: 0; right: 40%; transform-origin: left; }

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.is-current { color: var(--orange-nav); font-weight: 700; text-decoration: none; }

.primary-nav a:hover::before, .primary-nav a:hover::after,
.primary-nav a:focus-visible::before, .primary-nav a:focus-visible::after,
.primary-nav a.is-current::before, .primary-nav a.is-current::after { transform: scaleX(1); }

/* Reserve the bold width so links don't shift when they become current. */
.primary-nav a::after { }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--green);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle__bars { top: 21px; }
.nav-toggle__bars::before { content: ""; left: 0; top: -7px; }
.nav-toggle__bars::after { content: ""; left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .site-header__inner { padding: 14px var(--gutter); }
  .site-header__logo img { width: 80px; height: 54px; }
  .nav-toggle { display: block; }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .primary-nav.is-open { max-height: 480px; }
  .primary-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .primary-nav li { padding: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 14px 0; font-size: 15px; }
  .primary-nav a::before, .primary-nav a::after { display: none; }
}

/* ---- Footer / contact ---------------------------------------------------- */
.site-footer { position: relative; margin-top: 54px; }

/* Green band behind the two white cards, with a white wave (footer-curl.png) carving its top edge. */
.site-footer::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 350px;
  background: var(--green);
  z-index: 0;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 238px;
  height: 112px;
  background: url("../media/2024/05/footer-curl.png") no-repeat center / 100% 100%;
  z-index: 1;
}

.contact { position: relative; z-index: 2; }

.contact__inner {
  display: flex;
  gap: 60px;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.contact__info,
.contact__form {
  background: var(--white);
  border-top: 7px solid var(--orange);
  border-bottom: 7px solid var(--orange);
}

.contact__info {
  flex: 0 0 calc(40% - 24px);
  padding: 80px 61px 50px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.contact__form { flex: 1 1 auto; padding: 50px; }

.contact__title { font-size: 32px; line-height: 1.3; margin: 0 0 10px; }
.contact__title--hq { margin-top: 70px; }
.contact__address { margin: 0 0 1em; }
.contact__phone a { color: inherit; }

.team-avatars {
  display: flex;
  list-style: none;
  padding: 0 0 0 6px;
  margin: 0 0 18px;
}
.team-avatars li { margin: 0 -6px; }
.team-avatars img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
}

.site-footer__bar {
  position: relative;
  z-index: 2;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 16px var(--gutter);
}
.site-footer__bar p {
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  font-family: var(--font-ui);
  font-size: 14px;
  text-align: center;
  color: var(--white);
}

/* ---- Contact form -------------------------------------------------------- */
.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field--full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; }

.contact-form input:not([type="hidden"]),
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.contact-form input:not([type="hidden"]) { height: 46px; padding: 7px 24px; }
.contact-form textarea { height: 200px; padding: 16px 24px; resize: vertical; }
.contact-form ::placeholder { color: #999; opacity: 1; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(148, 201, 61, 0.25); }
.contact-form .input-validation-error { border-color: #d64545 !important; }

.field__error { display: block; min-height: 0; padding: 4px 24px 0; font-size: 12px; color: #d64545; }
.field__error:empty { display: none; }

.contact-form__status { margin-bottom: 20px; }
.contact-form__status:empty { display: none; }
.contact-form__message {
  margin: 0 0 14px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.contact-form__message.is-success { background: #eef7dc; color: #3d6b00; }
.contact-form__message.is-error { background: #fdecec; color: #a12727; }

.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.contact-form .btn--submit { margin-top: 20px; }
.contact-form__legal { margin: 14px 0 0; font-size: 11px; line-height: 1.5; color: #999; text-align: center; }
.contact-form__legal a { color: inherit; text-decoration: underline; }

@media (max-width: 980px) {
  .site-footer { margin-top: 40px; }
  .contact__inner { flex-direction: column; gap: 24px; }
  .contact__info { flex-basis: auto; padding: 40px 28px 32px; }
  .contact__form { padding: 30px 24px; }
  .contact__title--hq { margin-top: 40px; }
  .site-footer::after { height: 300px; }
  .site-footer::before { bottom: 220px; height: 80px; }
}

@media (max-width: 600px) {
  .contact-form__grid { grid-template-columns: 1fr; }
}
