/* Header + hero (Midnight Indigo design migration) — sticky nav with
 * scroll elevation, mobile menu, theme toggle, and the hero section
 * (copy + parallax meta chips + particle canvas). The real upload
 * workspace embedded in the hero is styled in workspace.css.
 */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-color: color-mix(in srgb, var(--brd) 72%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.navbar {
  min-height: 72px;
  /* Same width formula as .container (base.css) — width:100%+max-width
     alone diverges from it by a few px in the narrow 1240-1288px viewport
     band, since .container additionally subtracts a 48px margin budget
     via calc(). Matching the formula exactly keeps the navbar and every
     section's content edge-aligned at every viewport width, not just
     the common wide/narrow cases. */
  width: min(var(--container-content), calc(100% - var(--container-margin)));
  margin-inline: auto;
  /* No padding-inline, deliberately — the reference's .navbar has none
     (just width:var(--container);margin:auto), so the logo and the
     header-actions cluster sit exactly flush with the same edges every
     section's .container content does, not inset an extra 32px past
     them. */
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 800;
}

.logo__mark {
  /* Brand-kit icon migration: the mark's own SVG draws its complete
     background/border/gradient (see the inline SVG in index.html), so this
     carries no chip background of its own — only the reference's soft
     drop-shadow, which follows the icon's rounded silhouette rather than
     painting a box behind it. */
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--accent) 17%, transparent));
  transition: transform var(--transition-base), filter var(--transition-base);
}

.logo__mark svg {
  width: 100%;
  height: 100%;
}

.logo:hover .logo__mark {
  transform: translateY(-1px);
  filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--accent) 26%, transparent));
}

.logo__word {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 11px;
  color: var(--t2);
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition-base);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--accent-a);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent);
  background: var(--ok-a);
  color: var(--ok);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.local-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 12%, transparent);
}

.theme-toggle,
.menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surf-glass);
  border: 1px solid var(--brd);
  color: var(--t2);
  transition: var(--transition-base);
}

.theme-toggle:hover,
.menu-toggle:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--brd));
  transform: translateY(-1px);
}

.theme-toggle svg,
.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .theme-toggle__sun {
  display: none;
}
html[data-theme='light'] .theme-toggle .theme-toggle__moon {
  display: none;
}
html[data-theme='light'] .theme-toggle .theme-toggle__sun {
  display: block;
}

.menu-toggle {
  display: none;
}
.menu-toggle .menu-toggle__close {
  display: none;
}
.menu-toggle[aria-expanded='true'] .menu-toggle__open {
  display: none;
}
.menu-toggle[aria-expanded='true'] .menu-toggle__close {
  display: block;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 72px 0 0;
  z-index: var(--z-mobile-backdrop);
  background: rgba(2, 5, 12, 0.52);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.mobile-menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 82px;
  left: 14px;
  right: 14px;
  z-index: var(--z-mobile-menu);
  padding: 12px;
  border: 1px solid var(--brd);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surf) 94%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(135%);
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}
.mobile-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mobile-menu-links {
  display: grid;
  gap: 4px;
}

.mobile-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--t2);
  font-size: 0.9rem;
  font-weight: 650;
  transition: var(--transition-base);
}

.mobile-menu-links a::after {
  content: '›';
  color: var(--t4);
  font-size: 1.1rem;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--text);
  background: var(--accent-a);
}

.mobile-menu-local {
  margin-top: 8px;
  padding: 12px 13px;
  border-top: 1px solid var(--brd);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ok);
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .navbar {
    grid-template-columns: 1fr auto;
  }
  /* The "100% LOCAL CLEANING" badge's natural width (well over 150px) plus
     the two 40px icon buttons doesn't fit an `auto` grid track at narrow
     widths — without this it silently overflows the navbar's own bounds
     and pushes the menu button off-screen (found via live testing, not
     merely inferred: Playwright's own actionability check reported
     #menu-toggle "outside of the viewport" on a 390px page with zero
     document-level horizontal overflow, i.e. an overflowing grid child, not
     an overflowing page). The theme toggle stays visible on mobile per the
     responsive requirements; only the badge is dropped.
  */
  .local-badge {
    display: none;
  }
}

/* -- Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 52px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 50% 27%, rgba(111, 124, 255, 0.22), transparent 31%),
    radial-gradient(circle at 78% 25%, rgba(43, 215, 164, 0.07), transparent 25%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
}
html[data-theme='light'] .hero {
  background: radial-gradient(circle at 50% 25%, rgba(91, 103, 241, 0.18), transparent 31%),
    radial-gradient(circle at 78% 24%, rgba(14, 159, 117, 0.06), transparent 24%),
    linear-gradient(180deg, #f0f3fb, var(--bg));
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.27;
  background-image: linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 98%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 98%);
  pointer-events: none;
}
html[data-theme='light'] .hero-grid {
  opacity: 0.5;
  background-image: linear-gradient(rgba(65, 78, 115, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 78, 115, 0.07) 1px, transparent 1px);
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-a), transparent 64%);
  filter: blur(18px);
  pointer-events: none;
}

#hero-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  touch-action: none;
}

.hero-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.meta-chip {
  position: absolute;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--brd);
  background: color-mix(in srgb, var(--surf) 78%, transparent);
  color: var(--t2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}
.meta-chip.c1 {
  left: 6%;
  top: 34%;
}
.meta-chip.c2 {
  right: 7%;
  top: 32%;
}
.meta-chip.c3 {
  left: 12%;
  bottom: 16%;
}
.meta-chip.c4 {
  right: 11%;
  bottom: 13%;
}
.meta-chip.c5 {
  left: 4%;
  top: 65%;
}
.meta-chip.c6 {
  right: 4%;
  top: 62%;
}

.hero-content {
  position: relative;
  z-index: 4;
  /* Same width formula as .container/.navbar — see the comment on
     .navbar above. No padding-inline either, matching the reference's
     .hero-content{width:var(--container);margin-inline:auto;...} exactly. */
  width: min(var(--container-content), calc(100% - var(--container-margin)));
  margin-inline: auto;
  text-align: center;
}

.hero-copy {
  max-width: 900px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.85rem, 5.4vw, 5.1rem);
  line-height: 0.95;
  font-weight: 800;
}

.hero-copy .hero__subhead {
  display: block;
  margin-top: 22px;
  color: var(--text);
  font-weight: 740;
  font-size: 1rem;
}

.hero-copy p {
  max-width: 740px;
  margin: 8px auto 0;
  font-size: 0.98rem;
  color: var(--t2);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 28px;
}

@media (max-width: 1080px) {
  .hero {
    padding-top: 120px;
  }
}

@media (max-width: 620px) {
  .hero__title {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }
  .hero {
    padding: 108px 0 40px;
    min-height: auto;
  }
  .hero-copy p {
    font-size: 0.94rem;
  }
  .meta-chip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero-trail {
    display: none;
  }
}
