/* ==========================================================================
   Higher Neuron Software — site styles
   ========================================================================== */

:root {
  /* Brand */
  --navy: #0b3a57;
  --navy-deep: #072a40;
  --green: #2a7a4b;
  --green-bright: #3fa86a;

  /* Theme (light) */
  --bg: #f6f8f7;
  --bg-alt: #edf2f0;
  --surface: #ffffff;
  --text: #0f1c24;
  --text-muted: #4f5f69;
  --border: #dde5e2;
  --accent: var(--green);
  --accent-contrast: #ffffff;
  --link: var(--navy);
  --shadow: 0 1px 2px rgb(15 28 36 / 0.04), 0 8px 24px rgb(15 28 36 / 0.06);
  --shadow-lg: 0 2px 4px rgb(15 28 36 / 0.04), 0 24px 48px rgb(11 58 87 / 0.12);
  --grid-line: rgb(11 58 87 / 0.06);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);

  /* Layout */
  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  --radius-lg: 22px;
  --section-space: clamp(4rem, 10vw, 7.5rem);
}

/* ---------- Base ---------- */

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

html {
  color-scheme: light only;
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keep anchored sections clear of the sticky header */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.975rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 6px 18px rgb(42 122 75 / 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgb(42 122 75 / 0.34);
}

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

.btn-ghost:hover {
  border-color: var(--text-muted);
}

.btn svg {
  width: 1em;
  height: 1em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.075rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--border);
}

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

.nav-links {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.nav .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

/* Faint circuit-board grid behind the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.hero h1 .accent {
  color: var(--accent);
}

.lede {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: clamp(1.075rem, 1.6vw, 1.225rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
  aspect-ratio: 1;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 65%);
  filter: blur(8px);
}

.hero-card {
  width: 100%;
  height: 100%;
  padding: 12%;
  border-radius: 32px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-space);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-flush-top {
  padding-top: 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

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

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.card-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Product feature ---------- */

.product {
  --ev-green: #4a7c63;
  --ev-navy: #2c3654;
  --ev-tint: #fcf5f6;

  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.product-body {
  padding: clamp(1.75rem, 5vw, 3.5rem);
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  color: var(--ev-navy);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.product-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ev-green);
  color: #ffffff;
}

.product-icon svg {
  width: 26px;
  height: 26px;
}

.product-category {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ev-green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-tagline {
  color: var(--ev-navy);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

.product-tagline span {
  color: var(--ev-green);
}

.product-body p {
  color: var(--text-muted);
}

.btn-product {
  margin-top: 0.75rem;
  background: var(--ev-navy);
  color: #ffffff;
  box-shadow: 0 6px 18px rgb(44 54 84 / 0.25);
}

.product-visual {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 3rem);
  background:
    radial-gradient(circle at 70% 20%, rgb(74 124 99 / 0.14), transparent 55%),
    var(--ev-tint);
}

.checklist {
  width: min(100%, 320px);
  padding: 1.25rem 1.25rem 0.5rem;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgb(44 54 84 / 0.04), 0 18px 40px rgb(44 54 84 / 0.12);
}

.checklist-title {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ev-navy);
  font-family: var(--font-display);
  font-weight: 700;
}

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

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid #f1e8ea;
  color: var(--ev-navy);
  font-size: 0.95rem;
  font-weight: 500;
}

.check {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ev-green);
}

.check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #ffffff;
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

.cta > * {
  position: relative;
}

.cta p {
  max-width: 34rem;
  margin-inline: auto;
  color: rgb(255 255 255 / 0.78);
  font-size: 1.125rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta .btn-primary {
  background: var(--green-bright);
  color: #04120a;
}

.btn-on-dark {
  border-color: rgb(255 255 255 / 0.3);
  color: #ffffff;
}

.btn-on-dark:hover {
  border-color: #ffffff;
}

.cta .cta-email {
  margin: 1rem auto 0;
  color: rgb(255 255 255 / 0.65);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.site-footer .brand {
  font-size: 0.95rem;
}

.site-footer .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-footer p {
  margin: 0;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-link:hover {
  border-color: var(--text-muted);
  color: var(--navy);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* ---------- 404 ---------- */

.error-page {
  display: grid;
  place-items: center;
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}

.error-code {
  display: block;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-page .lede {
  margin-inline: auto;
}

.error-page .hero-actions {
  justify-content: center;
}

.error-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 2rem;
  padding: 10px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    width: min(60%, 260px);
  }

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

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .brand-name {
    font-size: 0.975rem;
  }
}

@media (max-width: 440px) {
  /* Header CTA is repeated in the page body, so drop it where space is tight */
  .nav .btn {
    display: none;
  }

  .cta {
    padding-inline: 1.25rem;
    border-radius: 20px;
  }
}

/* Touch screens: skip hover lift so tapped elements don't stay raised */
@media (hover: none) {
  .btn:hover,
  .card:hover {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
