:root {
  --bg: #000000;
  --accent: #afe9c6;
  --accent-soft: #afe9c6;
  --text: #f3f3f0;
  --border: rgba(255, 255, 255, 0.08);
  --radius-lg: 20px;
  --radius-md: 12px;
  --font: 'Jost', system-ui, -apple-system, sans-serif;
  --reveal-duration: 0.7s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  padding: 0 5%;
  width: 100%;
}

h1, h2, h3, h4 { margin: 0; font-weight: 300; }
p { margin: 0; }

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

.center { text-align: center; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img { height: 88px; width: auto; display: block; }
.logo-img.small { height: 48px; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.site-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 17px 34px;
  border-radius: 999px;
  font-weight: 400;
  font-size: 1.2rem;
  font-family: var(--font);
  cursor: pointer;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-primary:hover {
  background: var(--accent);
  color: #000000;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg);
  overflow: hidden;
}
.hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
  max-width: 1150px;
  line-height: 1.2;
}
.hero-sub {
  margin-top: 24px;
  max-width: 820px;
  color: var(--text);
  font-size: 1.4rem;
}
.hero .btn { margin-top: 32px; }

/* Sections */
.section { padding: 64px 0; }

.section h2, .section h3 { font-size: 3rem; color: var(--text); }

.section-sub {
  color: var(--text);
  margin-top: 16px;
  font-size: 1.6rem;
}

/* Numbers */
.section-numbers {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 0;
}
.numbers-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 64px;
  width: 100%;
}
.numbers-inner > * { min-width: 0; }

.stats {
  display: flex;
  flex-direction: column;
  gap: 76px;
  min-width: 0;
  margin-left: 40px;
}
.stat {
  border-left: 2px solid var(--accent);
  padding-left: 28px;
  min-width: 0;
}
.stat-number {
  display: block;
  font-size: 5.6rem;
  font-weight: 400;
  color: var(--accent);
}
.stat-label { color: var(--text); font-size: 1.4rem; }

/* ArrayFlux */
.section-arrayflux {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}
.product-name {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 18px;
  color: var(--text);
}

.device-showcase {
  position: relative;
  display: flex;
  justify-content: center;
}
.device-showcase::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 34px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 72%);
  filter: blur(4px);
  z-index: 0;
}
.device-image {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  z-index: 1;
}

.device-link {
  position: relative;
  height: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  transition: filter 0.35s ease;
}
.device-link::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  height: 50%;
  width: 1px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.device-link::after {
  content: '';
  grid-column: 1 / -1;
  align-self: center;
  height: 1px;
  margin: 0 calc((100% - 3 * 24px) / 8);
  background: var(--accent);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.section-arrayflux:has(.feature-trigger:hover) .device-link::before,
.section-arrayflux:has(.feature-trigger:hover) .device-link::after {
  background: var(--text);
  box-shadow: 0 0 10px 1px var(--accent);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 18px;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 18px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.feature-card:hover::before {
  background: var(--text);
  box-shadow: 0 0 8px 1px var(--accent);
}
.feature-trigger {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.feature-thumb-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0d120e;
}
.feature-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  display: block;
  object-fit: cover;
}
.feature-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.feature-trigger:hover .feature-thumb-overlay,
.feature-trigger:focus-visible .feature-thumb-overlay {
  opacity: 0;
}
.feature-label {
  font-size: 1.5rem;
  color: var(--accent);
  text-align: center;
  transition: color 0.2s ease;
}
.feature-trigger:hover .feature-label,
.feature-trigger:focus-visible .feature-label {
  color: var(--text);
}
.toggle-content {
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toggle-content[hidden] { display: none; }
.toggle-content p { margin: 0; }

/* Consumables */
.section-consumables {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}
.consumables {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 28px;
}
.consumables > * { min-width: 0; }
.consumables-media {
  width: 100%;
  max-width: 320px;
  justify-self: end;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  object-fit: cover;
  order: 2;
}
.consumables-copy h3 { font-size: 3rem; }
.consumables-copy p { color: var(--text); font-size: 1.6rem; margin-top: 16px; }

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.15rem;
  background: var(--bg);
}
th, td {
  text-align: left;
  padding: 14px 20px;
  font-weight: 400;
}
thead th {
  background: var(--accent);
  color: #000000;
  font-size: 1.05rem;
  font-weight: 600;
}
tbody td {
  color: var(--accent);
}
tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(175, 233, 198, 0.25);
}

/* Application grid */
.section-application {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.application-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 64px;
}
.application-card {
  display: flex;
  align-items: center;
  gap: 28px;
}
.application-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.application-pill {
  flex: 1;
  padding: 26px 34px;
  border: 2px solid var(--accent);
  border-radius: 25px;
  background: var(--accent);
  color: #000000;
  font-size: 1.7rem;
  font-weight: 300;
  margin: 0;
}

/* Sources */
.section-sources {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}
.sources h3 { margin-bottom: 28px; }
.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row;
  column-gap: 40px;
  row-gap: 12px;
}
.sources-list li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 108px;
}
.sources-list li:nth-child(odd) { justify-content: flex-end; }
.sources-list li:nth-child(even) { justify-content: flex-start; padding-left: 41px; }
.source-divider {
  display: none;
}
.sources-list li:nth-child(even) .source-divider {
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 64px;
  background: var(--accent);
}
.sources-list a {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.sources-list li:nth-child(odd) a { justify-content: flex-end; text-align: right; }
.sources-list li:nth-child(even) a { justify-content: flex-start; text-align: left; }
.sources-list a span {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 300;
  transition: color 0.2s ease;
}
.sources-list a:hover {
  background: var(--accent);
}
.sources-list a:hover span {
  color: #000000;
}

.fade-exit {
  transition: opacity 0.5s ease;
}
.fade-exit.is-faded { opacity: 0; }

/* Contact */
.section-contact {
  background: var(--accent-soft);
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 0 0;
}
.section-contact h2 { color: #000000; }
.contact-inner { padding-top: 4px; }
.contact-form {
  max-width: 640px;
  margin: 20px auto 0;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}
.form-field input,
.form-field textarea {
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .btn-primary { align-self: flex-start; }
.form-status { color: var(--text); font-size: 1rem; min-height: 1.2em; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--reveal-duration) ease-out, transform var(--reveal-duration) ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Footer */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.copyright { color: var(--text); font-size: 1rem; }

/* Responsive */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers-inner { grid-template-columns: 1fr; }
  .stats { margin-left: 0; }
  .device-link { display: none; }
  .feature-card { padding-top: 0; }
  .feature-card::before { display: none; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 24px;
  }
  .site-nav li { padding: 12px 0; border-bottom: 1px solid var(--border); }

  .logo-img { height: 56px; }
  .btn { font-size: 1.05rem; padding: 14px 26px; }

  .section { padding: 48px 0; }
  .section h2, .section h3 { font-size: 2.1rem; }
  .section-sub { font-size: 1.15rem; }

  /* Numbers */
  .numbers-inner { grid-template-columns: 1fr; gap: 40px; }
  .numbers-intro h2 { font-size: 1.9rem; }
  .stats { gap: 32px; margin-left: 0; }
  .stat-number { font-size: 3.2rem; }
  .stat-label { font-size: 1.05rem; }

  /* ArrayFlux */
  .product-name { font-size: 2.1rem; }
  .device-image { max-width: 220px; }
  .feature-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-label { font-size: 1.3rem; }

  /* Consumables */
  .consumables { grid-template-columns: 1fr; gap: 28px; }
  .consumables-media { order: 0; max-width: 100%; }
  .consumables-copy h3 { font-size: 1.9rem; }
  .consumables-copy p { font-size: 1.15rem; }
  table { font-size: 0.95rem; }
  th, td { padding: 12px 16px; }

  /* Application */
  .application-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .application-card { gap: 18px; }
  .application-icon { width: 48px; height: 48px; }
  .application-pill { font-size: 1.2rem; padding: 18px 22px; }

  /* Sources */
  .sources-list { grid-template-columns: 1fr; row-gap: 4px; }
  .sources-list li { min-height: 88px; }
  .sources-list li:nth-child(odd) { justify-content: flex-start; }
  .sources-list li:nth-child(odd) a { justify-content: flex-start; text-align: left; }
  .sources-list li:nth-child(even) { padding-left: 41px; }
  .sources-list a span { font-size: 1.15rem; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .contact-form .btn-primary { align-self: stretch; text-align: center; }
}

/* Short viewports (rotated/landscape phones): the absolutely-positioned header
   can overlap vertically-centered hero content unless both shrink. */
@media (max-height: 500px) {
  .logo-img { height: 44px; }
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .hero h1 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); }
  .hero-sub { font-size: 1rem; margin-top: 10px; }
  .hero .btn { margin-top: 14px; padding: 10px 22px; font-size: 1rem; }

  .section-numbers,
  .section-arrayflux,
  .section-consumables,
  .section-application,
  .section-sources,
  .section-contact {
    min-height: 0;
  }
}
