/* Design tokens — see _System_Core/004_Landing_Design_System.md */
:root {
  --background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f8fbf8 45%,
    #f1f8f3 75%,
    #eaf6ed 100%
  );
  --surface: #ffffff;
  --foreground: #252525;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --primary: #030213;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --accent: #e9ebef;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;

  --color-text: var(--foreground);
  --color-text-muted: var(--muted-foreground);
  --color-white: var(--surface);
  --color-border: var(--border);
  --color-check: var(--primary);

  --max-width: 1200px;
  --hero-scene-height: 400px;
  --hero-hub-size: 280px;
  --hero-float-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --hero-connector-opacity: 0.15;
  --header-height: 64px;
  --font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--color-text);
  line-height: 1.5;
  background: var(--background);
  background-attachment: fixed;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: var(--header-height);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  color: var(--primary);
}

.nav__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius);
}

.nav__brand-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: lowercase;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .nav__menu {
    margin-left: auto;
  }
}

@media (max-width: 767px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav__actions {
    margin-left: auto;
  }
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--foreground);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--foreground);
  outline: none;
}

.nav__link--active {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav__item--dropdown {
  position: relative;
}

.nav__dropdown-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.nav__dropdown-link {
  display: block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav__dropdown-link:hover,
.nav__dropdown-link:focus-visible {
  background: var(--accent);
  color: var(--foreground);
  outline: none;
}

@media (min-width: 768px) {
  .nav__item--dropdown:hover .nav__dropdown,
  .nav__item--dropdown:focus-within .nav__dropdown,
  .nav__item--dropdown.is-open .nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__item--dropdown:hover .nav__dropdown-chevron,
  .nav__item--dropdown:focus-within .nav__dropdown-chevron,
  .nav__item--dropdown.is-open .nav__dropdown-chevron {
    transform: rotate(180deg);
  }
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: 3rem 1.5rem 5rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero__intro {
  width: 100%;
  max-width: 42rem;
}

.hero__headline {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.hero__headline-accent {
  background: linear-gradient(to right, var(--primary), rgba(3, 2, 19, 0.6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__text {
  margin: 0 auto 1.5rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  line-height: 1.5;
}

.hero__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  justify-items: center;
  max-width: 36rem;
  margin: 0 auto;
}

.hero__feature {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
  max-width: 18rem;
  color: var(--foreground);
}

.hero__feature::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

@media (min-width: 640px) {
  .hero__features {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    max-width: 32rem;
  }
}

/* Hub-and-spoke scene */
.hero__scene {
  position: relative;
  width: 100%;
  max-width: 56rem;
}

.hero__scene-inner {
  position: relative;
  width: 100%;
  height: var(--hero-scene-height);
  perspective: 1000px;
}

.hero__connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--primary);
  opacity: var(--hero-connector-opacity);
}

.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.2;
  animation: hero-particle-pulse 3s ease-in-out infinite;
}

.hero__particle:nth-child(even) {
  background: var(--muted-foreground);
}

.hero__particle:nth-child(1) { left: 8%; top: 12%; animation-delay: 0s; }
.hero__particle:nth-child(2) { left: 22%; top: 8%; animation-delay: 0.4s; }
.hero__particle:nth-child(3) { left: 78%; top: 15%; animation-delay: 0.8s; }
.hero__particle:nth-child(4) { left: 92%; top: 35%; animation-delay: 1.2s; }
.hero__particle:nth-child(5) { left: 85%; top: 72%; animation-delay: 0.2s; }
.hero__particle:nth-child(6) { left: 65%; top: 88%; animation-delay: 0.6s; }
.hero__particle:nth-child(7) { left: 35%; top: 92%; animation-delay: 1s; }
.hero__particle:nth-child(8) { left: 12%; top: 78%; animation-delay: 1.4s; }
.hero__particle:nth-child(9) { left: 5%; top: 45%; animation-delay: 0.3s; }
.hero__particle:nth-child(10) { left: 48%; top: 5%; animation-delay: 0.7s; }
.hero__particle:nth-child(11) { left: 55%; top: 95%; animation-delay: 1.1s; }
.hero__particle:nth-child(12) { left: 95%; top: 55%; animation-delay: 1.5s; }

@keyframes hero-particle-pulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.4); }
}

.hero__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: var(--hero-hub-size);
  height: calc(var(--hero-hub-size) * 0.85);
  z-index: 10;
}

.hero__hub-product {
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
}

.hero__hub-product--center {
  position: relative;
  z-index: 3;
  width: 46%;
  max-height: 100%;
}

.hero__hub-product--left {
  position: absolute;
  left: -2%;
  bottom: 0;
  z-index: 2;
  width: 38%;
  max-height: 88%;
  transform: rotate(-6deg);
}

.hero__hub-product--right {
  position: absolute;
  right: -2%;
  bottom: 0;
  z-index: 2;
  width: 38%;
  max-height: 88%;
  transform: rotate(6deg);
}

.hero__float {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 7rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--hero-float-shadow);
  text-align: left;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero__float-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  background: var(--secondary);
  border-radius: 999px;
}

.hero__float-badge--primary {
  color: var(--primary-foreground);
  background: var(--primary);
}

.hero__float-badge--accent {
  color: var(--foreground);
  background: var(--accent);
}

.hero__float-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

.hero__float--pos-1 { top: 6%; left: 8%; }
.hero__float--pos-2 { top: 18%; right: 6%; }
.hero__float--pos-3 { bottom: 10%; left: 4%; }
.hero__float--pos-4 { bottom: 12%; right: 8%; }
.hero__float--pos-5 { top: 8%; right: 20%; }
.hero__float--pos-6 { bottom: 16%; left: 18%; }
.hero__float--pos-7 { top: 26%; left: 24%; }
.hero__float--pos-8 { top: 4%; right: 28%; }

.hero__float-fallback {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__float-fallback li {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  :root {
    --hero-scene-height: 500px;
    --hero-hub-size: 340px;
  }
}

@media (max-width: 767px) {
  .hero__scene-inner {
    height: auto;
    min-height: 280px;
    padding-bottom: 0.5rem;
  }

  .hero__connectors,
  .hero__particles,
  .hero__float {
    display: none;
  }

  .hero__hub {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 300px;
    height: 220px;
    margin: 0 auto;
  }

  .hero__float-fallback {
    display: grid;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero__float--hide-mobile {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__particle {
    animation: none;
  }

  .hero__float {
    will-change: auto;
  }
}

/* About section */
.about {
  padding: 5rem 1.5rem;
  background: color-mix(in srgb, var(--muted) 50%, transparent);
  scroll-margin-top: var(--header-height);
}

.about__inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.about__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--foreground);
}

.about__text {
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.about__values {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  max-width: 32rem;
  margin: 0 auto;
}

.about__value {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--foreground);
}

.about__value::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .nav__menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__item {
    width: 100%;
  }

  .nav__link {
    width: 100%;
    padding: 0.875rem 1.5rem;
    justify-content: space-between;
  }

  .nav__dropdown {
    position: static;
    transform: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--secondary);
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: max-height 0.25s ease;
  }

  .nav__item--dropdown.is-open .nav__dropdown {
    max-height: 240px;
  }

  .nav__item--dropdown.is-open .nav__dropdown-chevron {
    transform: rotate(180deg);
  }

  .nav__dropdown-link {
    padding-left: 2rem;
  }

  .nav--menu-open .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav--menu-open .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav--menu-open .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
