/* 01 — Header and first view */
:root {
  --header-height: 100px;
}
html {
  scroll-padding-top: calc(var(--header-height) + 20px);
}
.hero {
  padding-top: var(--header-height);
  position: relative;
  isolation: isolate;
  min-height: 620px;
  background: var(--forest-deep);
  color: var(--white);
  overflow: hidden;
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(12, 30, 23, 0.92) 0%,
    rgba(12, 30, 23, 0.76) 28%,
    rgba(12, 30, 23, 0.21) 59%,
    rgba(12, 30, 23, 0.04) 100%
  );
}
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  margin: 0;
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  color: var(--white);
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 24px;
}
.header.is-scrolled,
.header:has(.header__nav.is-open) {
  background: rgba(17, 37, 30, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 3px 18px #091b1720;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  flex-shrink: 0;
  line-height: 1.3;
}
.brand > span {
  font-size: 25px;
  letter-spacing: 0.045em;
  font-weight: 600;
}
.brand small {
  font-size: 13px;
  margin-top: 5px;
  letter-spacing: 0.06em;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  line-height: 1.6;
}
.header__nav > button:not(.button),
.header__nav > a {
  background: none;
  padding: 5px 0;
}
.header__nav > a:hover,
.header__nav > button:not(.button):hover {
  color: var(--sage-light);
}
.hero__content {
  padding-top: 116px;
  padding-bottom: 95px;
}
.hero h1 {
  font-size: clamp(36px, 4.2vw, 59px);
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 18px #0a1d1740;
}
.hero__content > p {
  font-size: 17px;
  margin: 20px 0 35px;
  font-weight: 500;
}
.menu-toggle {
  display: none;
}
@media (min-width: 1600px) {
  .hero {
    min-height: 700px;
  }
  .hero__content {
    padding-top: 145px;
  }
}
@media (max-width: 1100px) {
  .header__nav {
    gap: 14px;
    font-size: 11px;
  }
  .brand > span {
    font-size: 21px;
  }
  .header__nav .button {
    font-size: 11px;
    padding-inline: 12px;
  }
  .header {
    gap: 20px;
  }
  .hero {
    min-height: 570px;
  }
}
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    z-index: 12;
    background: transparent;
    color: var(--white);
    padding: 12px;
  }
  .menu-toggle__label {
    /* Keep the button name available to screen readers. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .menu-toggle__lines {
    display: block;
    width: 21px;
    height: 12px;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
  }
  .header__nav {
    display: none;
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    padding: 25px var(--gutter);
    background: var(--forest-deep);
    box-shadow: 0 10px 25px #0003;
    align-items: stretch;
    gap: 14px;
    font-size: 15px;
  }
  .header__nav.is-open {
    display: flex;
    flex-direction: column;
  }
  .header__nav .button {
    font-size: 14px;
    align-self: flex-start;
  }
  .header__nav > button:not(.button) {
    text-align: left;
  }
  .hero__content {
    padding-top: 105px;
  }
  .hero__content > p {
    max-width: 440px;
    font-size: 15px;
  }
  .hero h1 {
    font-size: 42px;
  }
}

/* Fixed contact: JS applies a small, finite scroll lag, never a looping float. */
.floating-contact {
  --bubble-fill: #4e6d5c;
  --bubble-outline: #b5c7b7;
  /* One continuous silhouette: rounded body and right-facing tail. */
  --bubble-shape: polygon(
    14% 0%, 80.5% 0%,
    84.1% 1%, 87.5% 3.9%, 90.4% 8.5%, 92.6% 14.5%,
    94% 21.5%, 94.5% 29%,
    94.5% 60.7%, 94% 68.2%, 92.6% 75.2%, 90.4% 81.2%,
    92.2% 84%, 95.2% 89.5%, 97.2% 94.5%,
    96.8% 95%, 93.5% 94%, 87.5% 90.8%, 82% 89.7%,
    14% 89.7%, 10.4% 88.7%, 7% 85.8%, 4.1% 81.2%,
    1.9% 75.2%, 0.5% 68.2%, 0% 60.7%,
    0% 29%, 0.5% 21.5%, 1.9% 14.5%, 4.1% 8.5%,
    7% 3.9%, 10.4% 1%
  );
  isolation: isolate;
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 228px;
  min-height: 104px;
  padding: 24px 22px;
  border: 0;
  border-radius: 34px;
  background: transparent;
  color: var(--white);
  box-shadow: none;
  filter: drop-shadow(0 6px 12px #081d1833);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}
/* Draw the whole body and tail together to avoid seams at the root. */
.floating-contact::before,
.floating-contact::after {
  content: "";
  position: absolute;
  pointer-events: none;
  clip-path: var(--bubble-shape);
  z-index: -1;
}
.floating-contact::before {
  inset: 0 -12px -12px 0;
  background: var(--bubble-outline);
}
.floating-contact::after {
  inset: 1px -11px -11px 1px;
  background: var(--bubble-fill);
}
.floating-contact > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.floating-contact > span:first-child::before {
  content: "";
  display: block;
  flex: 0 0 25px;
  width: 25px;
  height: 22px;
  background: url("../images/contact-chat-icon.png") center / contain no-repeat;
}
.floating-contact:hover { --bubble-fill: #3e5d4c; }
.footer.footer { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) {
  .floating-contact {
    right: max(22px, env(safe-area-inset-right));
    bottom: calc(26px + env(safe-area-inset-bottom));
    min-width: 204px;
    min-height: 90px;
    padding: 20px 17px;
    border-radius: 30px;
    gap: 10px;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-contact { transform: none !important; }
}
@media (max-width: 600px) {
  .hero {
    min-height: 700px;
  }
  .header {
    padding-block: 20px;
  }
  .brand > span {
    font-size: 20px;
  }
  .brand small {
    font-size: 11px;
  }
  .hero__photo {
    object-position: 67% top;
    height: 440px;
  }
  .hero::after {
    background: linear-gradient(
      0deg,
      var(--forest-deep) 4%,
      rgba(17, 37, 30, 0.96) 27%,
      rgba(17, 37, 30, 0.14) 68%,
      rgba(17, 37, 30, 0.22) 100%
    );
  }
  .hero__content {
    padding-top: 310px;
    padding-bottom: 44px;
  }
  .hero h1 {
    font-size: clamp(29px, 7.8vw, 40px);
    letter-spacing: 0.04em;
    line-height: 1.65;
  }
  .hero__content > p {
    font-size: 14px;
    line-height: 1.9;
    margin: 17px 0 26px;
  }
  .hero__content .button {
    width: 100%;
    max-width: 360px;
  }
}
