: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;
}

button {
  font: inherit;
}

/* Header shell — fixed at the top of the viewport so it genuinely overlays
   whatever sits at the top of the page (never `sticky`, which would still
   occupy its own flow space and leave nothing for the transparent state to
   visibly sit over). Transparent/white-text at page top; solid/black-text
   once `.is-scrolled` is toggled by script.js. Every visual difference
   between the two states is a plain CSS `transition`, never a per-frame JS
   style update. */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.header.is-scrolled {
  background: #ffffff;
  border-bottom-color: #e5e5e5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1rem;
  transition: padding 200ms ease;
}

.header.is-scrolled .header__inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.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: #ffffff;
  transition: color 200ms ease;
}

.header.is-scrolled .header__wordmark {
  color: #000000;
}

/* Nav */

.header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: none;
  background: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: color 200ms ease;
}

.header.is-scrolled .header__link {
  color: #404040;
}

.header__link:hover {
  color: #ffffff;
}

.header.is-scrolled .header__link:hover {
  color: #000000;
}

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

.header__chevron {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 150ms ease;
}

.header__dropdown {
  position: relative;
}

.header__link--product[aria-expanded="true"] .header__chevron {
  transform: rotate(180deg);
}

.header__dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  margin-top: 0.5rem;
  width: 14rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  padding: 0.375rem;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.24);
}

@media (prefers-reduced-motion: no-preference) {
  .header__dropdown-panel {
    animation: header10-panel-in 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: top left;
  }
}

@keyframes header10-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.header__dropdown-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
}

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

/* Actions */

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.header__cta:hover {
  transform: scale(1.03);
}

.header__cta:focus-visible {
  outline: 2px solid #000000;
  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: #ffffff;
  cursor: pointer;
  transition:
    color 200ms ease,
    background-color 150ms ease;
}

.header.is-scrolled .header__menu-btn {
  color: #171717;
}

.header__menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.header.is-scrolled .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;
}

/* Full-screen mobile drawer */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: no-preference) {
  .drawer__overlay {
    animation: header10-overlay-in 200ms ease both;
  }
}

@keyframes header10-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.drawer__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  display: flex;
  width: 100%;
  max-width: 20rem;
  flex-direction: column;
  background: #ffffff;
  box-shadow: -12px 0 32px -12px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: no-preference) {
  .drawer__panel {
    animation: header10-drawer-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes header10-drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 1.25rem;
}

.drawer__wordmark {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #000000;
}

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

.drawer__close:hover {
  background: rgba(0, 0, 0, 0.04);
}

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

.drawer__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  padding: 1rem 0.75rem;
}

.drawer__accordion-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: none;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #171717;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.drawer__accordion-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

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

.drawer__accordion-toggle[aria-expanded="true"] .header__chevron {
  transform: rotate(180deg);
}

.drawer__accordion-panel {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-left: 0.75rem;
  margin-top: 0.125rem;
}

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

.drawer__sublink:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
}

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

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

.drawer__link:hover {
  background: rgba(0, 0, 0, 0.04);
}

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

.drawer__footer {
  border-top: 1px solid #e5e5e5;
  padding: 1rem;
}

.drawer__cta {
  display: block;
  border-radius: 999px;
  background: var(--brand);
  color: #000000;
  padding: 0.625rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 150ms ease;
}

.drawer__cta:hover {
  transform: scale(1.02);
}

.drawer__cta:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* Demo-only scroll backdrop: gives this isolated preview real page height so
   the header's transparent-to-solid transition is actually observable. */

.backdrop {
  display: flex;
  height: 160vh;
  align-items: flex-start;
  justify-content: center;
  background: linear-gradient(to bottom, #171717, #404040);
  padding-top: 8rem;
}

.backdrop__inner {
  max-width: 36rem;
  padding: 0 1rem;
  text-align: center;
}

.backdrop__eyebrow {
  margin: 0;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #a3a3a3;
}

.backdrop__heading {
  margin: 1rem 0 0;
  font-size: 1.875rem;
  font-weight: 600;
  color: #e5e5e5;
}

/* Breakpoints */

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

  .header__cta {
    display: inline-flex;
  }

  .header__menu-btn {
    display: none;
  }

  .drawer {
    display: none !important;
  }
}

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

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

@media (min-width: 640px) {
  .backdrop__heading {
    font-size: 2.25rem;
  }
}
