/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(248, 252, 255, 0.92) 100%
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.14);
  backdrop-filter: saturate(1.35) blur(12px);
  -webkit-backdrop-filter: saturate(1.35) blur(12px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09), 0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(26, 115, 232, 0), rgba(26, 115, 232, 0.5), rgba(16, 209, 100, 0.45), rgba(26, 115, 232, 0));
  pointer-events: none;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 28px);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-text--after-logo {
  justify-content: center;
}

.brand-text--after-logo .brand-tagline {
  line-height: 1.45;
  white-space: normal;
  letter-spacing: 0.015em;
}

@media (max-width: 420px) {
  .brand {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .brand-text--after-logo {
    flex-basis: 100%;
  }

  .brand-text--after-logo .brand-tagline {
    white-space: normal;
  }
}

.brand-logo-img,
.footer-logo-img {
  width: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 58px;
  max-width: min(400px, 70vw);
  filter: none;
  transition: transform 0.28s var(--ease), filter 0.28s var(--ease);
}

.brand:hover .brand-logo-img {
  transform: translateY(-1px) scale(1.01);
  filter: none;
}

.footer-logo-img {
  height: 48px;
  max-width: min(300px, 68vw);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green-dark);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .brand-tagline {
    font-size: 0.6875rem;
    white-space: normal;
  }
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-desktop a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-nav);
  white-space: nowrap;
  transition: color 0.22s var(--ease), opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.nav-desktop a:hover {
  color: var(--green-dark);
  transform: translateY(-1px);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10d164 0%, #00c853 35%, #1a73e8 100%);
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.25);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.nav-desktop a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #21dd73 0%, #00c853 38%, #00aa47 100%);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.38);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
  box-shadow:
    0 12px 26px rgba(0, 200, 83, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.38) inset,
    0 -2px 0 rgba(0, 0, 0, 0.09) inset;
}

.btn-line:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.02);
  box-shadow:
    0 16px 30px rgba(0, 200, 83, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 0 rgba(0, 0, 0, 0.1) inset;
}

.btn-line:active {
  transform: translateY(0) scale(0.985);
}

.btn-line svg {
  flex-shrink: 0;
}

.floating-line-cta {
  display: none;
}

.floating-line-cta.is-hidden {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-nav);
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.88));
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: background 0.22s, border-color 0.22s, transform 0.22s;
}

.nav-toggle:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95));
  border-color: rgba(15, 23, 42, 0.28);
  transform: translateY(-1px);
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle .bar + .bar {
  margin-top: 6px;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0 24px 20px;
}

.nav-mobile.is-open:not([hidden]) {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-nav);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.nav-mobile a:last-of-type {
  border-bottom: none;
}

.nav-mobile .btn-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 20px;
  font-size: 1rem;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    max-width: calc(100% - 56px);
  }

  .brand-text--after-logo {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
  }

  .brand-text--after-logo .brand-tagline {
    font-size: clamp(0.6rem, 2.3vw, 0.72rem);
    line-height: 1.35;
    transform: translateY(-1.35em);
  }

  .nav-desktop {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .btn-line {
    display: none;
  }

  .floating-line-cta {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: linear-gradient(135deg, #21dd73 0%, #00c853 38%, #00aa47 100%);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow:
      0 14px 28px rgba(0, 200, 83, 0.4),
      0 2px 0 rgba(255, 255, 255, 0.4) inset,
      0 -2px 0 rgba(0, 0, 0, 0.1) inset;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  }

  body {
    padding-bottom: 84px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
  }

  :root {
    --header-h: 76px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .brand-logo-img {
    height: 48px;
    max-width: min(260px, 48vw);
  }

  .footer-logo-img {
    height: 42px;
    max-width: min(260px, 72vw);
  }

  .brand-name {
    font-size: 1.125rem;
  }
}

@media (min-width: 901px) {
  .nav-mobile {
    display: none !important;
  }
}
