:root {
  --brand: #39ff14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #171717;
}

a {
  text-decoration: none;
  color: inherit;
}

.header {
  position: relative;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
}

/* Announcement bar — a real grid-template-rows track (1fr / 0fr) so the
   dismiss collapse animates to an intrinsic height with no measured pixel
   value. */

.header__announcement-track {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 250ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .header__announcement-track {
    transition: none;
  }
}

.header__announcement-track.is-dismissed {
  grid-template-rows: 0fr;
}

.header__announcement-clip {
  overflow: hidden;
}

.header__announcement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #000000;
  color: #ffffff;
  padding: 0.5rem 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .header__announcement {
    animation: header02-bar-reveal 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes header02-bar-reveal {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__announcement-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0;
}

.header__announcement-label {
  display: none;
}

.header__announcement-link {
  margin-left: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--brand);
}

.header__announcement-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.header__announcement-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

.header__announcement-arrow {
  width: 0.75rem;
  height: 0.75rem;
}

.header__announcement-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.header__announcement-dismiss svg {
  width: 0.875rem;
  height: 0.875rem;
}

.header__announcement-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.header__announcement-dismiss:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Main nav row */

.header__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: 4rem;
  padding: 0 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .header__inner {
    animation: header02-nav-settle 250ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
  }
}

@keyframes header02-nav-settle {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  grid-column-start: 1;
  justify-self: start;
}

.header__mark {
  height: 1.625rem;
  width: auto;
  display: block;
}

.header__wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #000000;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  grid-column-start: 2;
  justify-self: center;
}

.header__link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #404040;
  transition: color 150ms ease;
}

.header__link:hover {
  color: #000000;
}

.header__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* `grid-column-start: 3` is required, not decorative: CSS Grid
   auto-placement skips `display:none` items entirely (`.header__nav` above
   isn't a grid item below the `min-width: 1024px` breakpoint), so without
   an explicit column this element would auto-place into column 2 instead
   of 3 — landing near the middle of the row instead of flush right. */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  grid-column-start: 3;
  justify-self: end;
}

.header__cta {
  display: none;
  align-items: center;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.header__cta:hover {
  background: #262626;
}

.header__cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: #171717;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.header__menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header__menu-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.icon-menu,
.icon-close {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-close {
  display: none;
}

.header__menu-btn.is-open .icon-menu {
  display: none;
}

.header__menu-btn.is-open .icon-close {
  display: block;
}

/* Mobile panel */

.header__mobile-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 20;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: no-preference) {
  .header__mobile-panel {
    animation: header02-panel 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes header02-panel {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__mobile-nav {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}

.header__mobile-link {
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #404040;
  transition: background-color 150ms ease;
}

.header__mobile-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header__mobile-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.header__mobile-cta {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.header__mobile-cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Breakpoints */

@media (min-width: 1024px) {
  .header__nav {
    display: flex;
  }

  .header__menu-btn {
    display: none;
  }

  .header__mobile-panel {
    display: none !important;
  }
}

@media (min-width: 640px) {
  .header__announcement,
  .header__inner,
  .header__mobile-nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .header__announcement-text {
    font-size: 0.875rem;
  }

  .header__announcement-label {
    display: inline;
  }

  /* Shown from `sm:` rather than gated behind the `lg:` nav breakpoint —
     between 640–1023px the nav links are still collapsed into the
     hamburger, so without this the main row would be just the logo and the
     menu button with a large dead gap between them. */
  .header__cta {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .header__announcement,
  .header__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
