:root {
  --bg: #07080a;
  --bg-elevated: #101217;
  --text: #f4f5ef;
  --muted: rgba(244, 245, 239, 0.68);
  --faint: rgba(244, 245, 239, 0.38);
  --accent: #e94f37;
  --accent-deep: #c43a26;
  --line: rgba(244, 245, 239, 0.12);
  --ok: #4cc38a;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: min(1120px, 92vw);
  --pad-x: clamp(1.25rem, 3vw, 3rem);
  --section-y: clamp(4rem, 8vw, 7.5rem);
  --text-base: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem);
  --hero-title: clamp(1.65rem, 1.2rem + 1.4vw, 2.65rem);
  --hero-brand: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding: 1rem 0;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(7, 8, 10, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
}

.hero-brand img {
  width: clamp(88px, 8vw, 140px);
  height: clamp(88px, 8vw, 140px);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 12px 32px rgba(233, 79, 55, 0.4));
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  cursor: pointer;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: clamp(0.8rem, 0.7rem + 0.35vw, 1rem) clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.92rem, 0.86rem + 0.2vw, 1.05rem);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(244, 245, 239, 0.28);
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.86rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(6.5rem, 10vh, 8rem) 0 clamp(3rem, 6vh, 5rem);
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(233, 79, 55, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(76, 195, 138, 0.08), transparent 55%),
    linear-gradient(180deg, #0c0e12 0%, var(--bg) 100%);
}

.hero-wafer {
  position: absolute;
  right: max(-6%, calc(50% - 48rem));
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.1), transparent 42%),
    radial-gradient(circle at 50% 50%, #1a1e24 0%, #0d1014 62%, #08090c 100%);
  box-shadow:
    0 0 0 1px rgba(244, 245, 239, 0.08),
    0 40px 120px rgba(0, 0, 0, 0.55),
    inset 0 0 80px rgba(233, 79, 55, 0.08);
  animation: wafer-drift 18s var(--ease) infinite alternate;
}

.hero-wafer::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  border: 1px solid rgba(244, 245, 239, 0.1);
  background-image:
    linear-gradient(rgba(233, 79, 55, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 79, 55, 0.35) 1px, transparent 1px);
  background-size: 14% 14%;
  background-position: center;
  mask-image: radial-gradient(circle, #000 55%, transparent 78%);
  opacity: 0.55;
  animation: grid-pulse 6s ease-in-out infinite;
}

@keyframes wafer-drift {
  from {
    transform: translateY(-50%) translate3d(0, 0, 0) rotate(-2deg);
  }
  to {
    transform: translateY(-50%) translate3d(-2%, 2.5%, 0) rotate(3deg);
  }
}

@keyframes grid-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: min(40rem, 52vw);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.5vw, 1.5rem);
  margin-bottom: clamp(1.25rem, 2.5vh, 2rem);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.hero-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--hero-brand);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.hero-brand-mark {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(0.72rem, 0.65rem + 0.2vw, 0.88rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-body);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--hero-title);
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 18ch;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.25s forwards;
}

.hero-lede {
  margin: 0 0 1.85rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  max-width: 34rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.4s forwards;
}

.hero .cta-row {
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.55s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 20ch;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
}

.section-head {
  margin-bottom: 2.75rem;
}

.split {
  display: grid;
  gap: 2.5rem 3.5rem;
  grid-template-columns: 1fr 1.15fr;
  align-items: start;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.feature-list li {
  padding-left: 1.15rem;
  border-left: 2px solid var(--accent);
}

.feature-list h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.feature-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Pilot —— */
.pilot-panel {
  margin-top: 2rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.pilot-panel h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.pilot-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pilot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: var(--ok);
  font-size: 0.86rem;
  font-weight: 600;
}

.pilot-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(76, 195, 138, 0.2);
}

/* —— Download —— */
#download .section-title {
  max-width: none;
}

.download-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.download-grid--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 44rem;
}

.download-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem 1.4rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  transition: border-color 0.25s ease, transform 0.3s var(--ease);
}

.download-item:hover {
  border-color: rgba(233, 79, 55, 0.45);
  transform: translateY(-3px);
}

.download-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.download-item p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.92rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.version-note {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--faint);
}

/* —— Steps —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.steps h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Contact —— */
.contact-block {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
}

.contact-block a.mail {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-block a.mail:hover {
  border-bottom-color: var(--accent);
}

/* —— Footer —— */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer strong {
  color: var(--muted);
  font-weight: 600;
}

/* —— Mobile —— */
@media (max-width: 900px) {
  .split,
  .pilot-panel,
  .download-grid,
  .download-grid--two,
  .contact-block {
    grid-template-columns: 1fr;
  }

  .hero-content {
    max-width: 36rem;
  }

  .hero-wafer {
    right: -28%;
    top: 42%;
    opacity: 0.5;
    width: min(88vw, 480px);
  }

  .hero {
    align-items: center;
    padding-top: 6.5rem;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 1.25rem;
    left: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-wafer {
    right: -40%;
    top: 18%;
    transform: translateY(0);
    animation: none;
    opacity: 0.35;
  }
}

@media (min-width: 1280px) {
  :root {
    --max: min(1240px, 88vw);
  }

  .hero-content {
    max-width: min(44rem, 48%);
  }

  .hero-wafer {
    width: min(46vw, 700px);
    right: max(-4%, calc(50% - 42rem));
  }
}

@media (min-width: 1600px) {
  :root {
    --max: min(1360px, 82vw);
    --hero-brand: clamp(3.5rem, 2rem + 2.2vw, 5.25rem);
    --hero-title: clamp(2.1rem, 1.4rem + 1.1vw, 3rem);
  }

  .hero-content {
    max-width: min(48rem, 46%);
  }

  .hero-wafer {
    width: min(42vw, 780px);
  }
}

@media (min-width: 2000px) {
  :root {
    --max: min(1480px, 72vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .hero-brand,
  .hero h1,
  .hero-lede,
  .hero .cta-row {
    opacity: 1;
    transform: none;
  }

  .hero-wafer {
    transform: translateY(-50%);
  }
}
