:root {
  --ink: #0a1628;
  --ink-soft: #1a2a3f;
  --mist: #eef2f6;
  --paper: #f7f9fb;
  --line: #c5d0dc;
  --muted: #5a6b7d;
  --accent: #1a7a6d;
  --accent-hover: #146359;
  --accent-soft: #d4ebe7;
  --warn-bg: #fff8eb;
  --warn-border: #e8d4a8;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space: clamp(1.25rem, 3vw, 2rem);
  --max: 68rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

/* —— Top nav —— */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: 1.25rem 0;
}

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

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.nav-brand:hover {
  color: #fff;
  opacity: 0.9;
}

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

.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #fff !important;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 7rem 0 4.5rem;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(26, 122, 109, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(40, 80, 120, 0.4), transparent 50%),
    linear-gradient(165deg, #071018 0%, #0a1628 42%, #122536 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(197, 208, 220, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 208, 220, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 95%);
  animation: grid-drift 40s linear infinite;
  pointer-events: none;
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

.hero-visual {
  position: absolute;
  right: max(2%, calc(50% - 28rem));
  top: 18%;
  width: min(42vw, 28rem);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.9;
}

.hero-ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: spin-slow 48s linear infinite;
}

.hero-ring::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-ring-2 {
  inset: 26%;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 36s;
}

.hero-core {
  position: absolute;
  inset: 38%;
  border: 1px solid rgba(26, 122, 109, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(26, 122, 109, 0.35), transparent 65%);
}

.hero-byte {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.12);
  user-select: none;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  animation: rise 0.9s var(--ease) both;
}

.hero-lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.75rem;
  animation: rise 0.9s var(--ease) 0.1s both;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 2rem;
  max-width: 30rem;
  animation: rise 0.9s var(--ease) 0.18s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  animation: rise 0.9s var(--ease) 0.26s both;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-ghost {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-muted {
  background: var(--mist);
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 28rem;
}

.section-lead {
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* Products — list, not card grid in hero sense; interaction containers OK */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.product:hover {
  background: rgba(26, 122, 109, 0.04);
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.product-desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
}

.product-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.product-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform 0.25s var(--ease), color 0.2s;
}

.product:hover .product-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
  margin-top: 0.5rem;
}

.approach-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.approach-item p {
  color: var(--muted);
  font-size: 1rem;
}

.approach-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

/* Inner pages */
.page-hero {
  padding: 7rem 0 3rem;
  background:
    linear-gradient(165deg, #071018 0%, #0a1628 55%, #122536 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-hero .hero-grid {
  opacity: 0.7;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.page-hero .meta {
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.page-body {
  padding: 3rem 0 5rem;
}

.page-body .prose {
  max-width: 42rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.65rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.prose ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.prose .note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  font-size: 0.98rem;
  margin: 1.25rem 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.card-link {
  display: block;
  padding: 1.15rem 1.25rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}

.card-link:hover {
  border-color: var(--accent);
}

.card-link strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.card-link span {
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-box {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  margin: 0.5rem 0 2rem;
  max-width: 32rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.contact-hint {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 1.15rem;
}

.faq dt {
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 1.25rem;
}

.faq dd {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-bottom: 0.45rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.88rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Inner page header nav on dark */
.page-hero .site-header {
  position: absolute;
}

/* Light header for content-only pages that don't use dark hero */
.site-header-light {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.site-header-light .nav-brand {
  color: var(--ink);
}

.site-header-light .site-nav a {
  color: var(--muted);
}

.site-header-light .site-nav a:hover,
.site-header-light .site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header-light .nav-cta {
  border-color: var(--line);
  color: var(--ink) !important;
}

.site-header-light .nav-cta:hover {
  background: var(--mist);
}

.site-header-light .nav-toggle {
  border-color: var(--line);
  color: var(--ink);
}

/* Mobile */
@media (max-width: 800px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--space);
    right: var(--space);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-soft);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.5rem;
  }

  .site-header-light .site-nav {
    background: #fff;
    border-color: var(--line);
  }

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

  .site-nav a {
    padding: 0.75rem 0.85rem;
  }

  .hero {
    align-items: flex-end;
    padding-top: 6rem;
    padding-bottom: 3.5rem;
  }

  .hero-visual {
    width: 55vw;
    top: 12%;
    right: -5%;
    opacity: 0.55;
  }

  .product {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .product-meta {
    order: -1;
  }

  .approach-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

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