/* Ax402 marketing — louder, futuristic, merchant-first */

:root {
  --brand: #05080a;
  --ink: #e8f4f0;
  --muted: #8aa39a;
  --accent: #00e5b0;
  --accent-dim: #00b88c;
  --accent-ink: #031410;
  --panel: #0c1214;
  --panel-2: #121a1d;
  --line: rgba(0, 229, 176, 0.18);
  --warn: #7dffc8;
  --max: 48rem;
  --wide: 72rem;
  --font-display: "Syne", "Arial Black", Impact, sans-serif;
  --font-body: "Courier Prime", "Courier New", Courier, monospace;
  --font-ui: "Syne", "Avenir Next", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background: var(--brand);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 1rem;
  z-index: 100;
  font-family: var(--font-ui);
  font-weight: 700;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* ——— Header ——— */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.75rem);
  color: var(--ink);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: inherit;
  text-decoration: none;
  text-transform: none;
}

.wordmark:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.6rem);
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.nav a {
  color: inherit;
  text-decoration: none;
  opacity: 0.72;
}

.nav a:hover,
.nav a[aria-current="page"] {
  opacity: 1;
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.05rem;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
  opacity: 1 !important;
  text-transform: uppercase;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
  background: #fff;
  color: var(--accent-ink) !important;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: clamp(5.5rem, 12vh, 7rem) clamp(1.25rem, 4vw, 2.75rem) clamp(2.75rem, 7vh, 4.5rem);
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(90% 70% at 88% 8%, rgba(0, 229, 176, 0.22), transparent 55%),
    radial-gradient(70% 60% at 8% 95%, rgba(0, 120, 160, 0.18), transparent 50%),
    linear-gradient(160deg, #05080a 0%, #0a1412 45%, #071018 100%);
}

.hero-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 176, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 176, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 88%);
  animation: grid-drift 22s linear infinite;
}

.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
  pointer-events: none;
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.brand-hero {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 10.5rem);
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: #fff;
  text-transform: none;
}

.hero-headline {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 5.5vw, 3.35rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--accent);
  max-width: 18ch;
}

.hero-support {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 38rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.55rem;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  background: #fff;
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.link-quiet {
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 244, 240, 0.35);
  font-family: var(--font-body);
}

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

/* ——— Sections ——— */

.section {
  padding: clamp(3.75rem, 9vh, 6rem) clamp(1.25rem, 4vw, 2.75rem);
  background: var(--brand);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-transform: uppercase;
  color: #fff;
}

.section p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--ink);
  max-width: 40rem;
}

.stack {
  display: grid;
  gap: 0;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.stack li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.stack strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.stack span {
  color: var(--muted);
  display: block;
  max-width: 40rem;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.api-host {
  font-family: var(--font-body);
  color: var(--accent);
  letter-spacing: -0.02em;
}

.band {
  background: linear-gradient(180deg, var(--panel) 0%, var(--brand) 100%);
}

.closing .hero-actions {
  margin-top: 1.75rem;
}

/* ——— Inner pages ——— */

.page-hero {
  position: relative;
  padding: clamp(6.5rem, 16vh, 9rem) clamp(1.25rem, 4vw, 2.75rem) 2.75rem;
  overflow: hidden;
}

.page-hero .hero-plane {
  opacity: 1;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
}

.page-hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-transform: uppercase;
  color: #fff;
}

.page-hero p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.steps li {
  position: relative;
  padding-left: 3.5rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.steps strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #fff;
}

.steps span {
  color: var(--muted);
}

.roles {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.75rem;
  font-size: 0.98rem;
}

.roles th,
.roles td {
  text-align: left;
  vertical-align: top;
  padding: 1rem 0.85rem 1rem 0;
  border-bottom: 1px solid var(--line);
}

.roles th {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.roles td {
  color: var(--muted);
}

.flow {
  margin: 1.75rem 0 0;
  padding: 1.15rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--panel-2);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--warn);
}

.code {
  margin: 1.75rem 0 0;
  padding: 1.2rem 1.25rem;
  background: #020405;
  color: var(--warn);
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-x: auto;
}

.code .cmt {
  color: #4f7468;
}

.doc-links {
  display: grid;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-links a {
  font-weight: 400;
  font-size: 1.05rem;
}

.footnote {
  margin-top: 1.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ——— Footer ——— */

.site-footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem) 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  background: #020405;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ——— Motion ——— */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero-inner.reveal {
  transition-duration: 0.95s;
}

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

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

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-plane::before,
  .btn {
    animation: none;
    transition: none;
  }
}

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

  .hero-actions .btn {
    width: 100%;
  }

  .brand-hero {
    font-size: clamp(4.25rem, 22vw, 6rem);
  }
}
