/* Axiom Research design system — vanilla CSS port for Cube41ERP's public
   pages (homepage, login, request-access, forgot/reset password). Ported
   from the original React/JSX component set; no custom webfont binaries are
   shipped, so --font-display/--font-mono fall back to system faces that
   share the same proportions (sans-serif / monospace) at the same sizes,
   weights and tracking as the source tokens. */

:root {
  /* colors */
  --ax-black: #0c0c0d;
  --ax-paper: #f2f2f2;
  --ax-white: #ffffff;
  --ax-signal: #da840a;
  --ax-trail: #ffdc78;
  --ax-yellow: #f5e100;
  --ax-alert: #ff3c2b;
  --ax-confirm: #2bff9c;

  --ax-op-quiet: 0.4;
  --ax-op-label: 0.6;
  --ax-op-body: 0.8;

  /* type */
  --font-display: "Funnel Display", Arial, Helvetica, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* geometry */
  --radius: 0px;
  --radius-pill: 10px;
  --hairline: 1px;

  /* motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 240ms;
}

* { box-sizing: border-box; }

.ax-root {
  margin: 0;
  background: var(--ax-black);
  color: var(--ax-white);
  font-family: var(--font-display);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.ax-root a { color: inherit; text-decoration: none; }

/* ---------- attractor canvas background ---------- */
.ax-attractor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.85;
}

/* ---------- typography ---------- */
.ax-display {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: none; /* sentence case */
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0;
}
.ax-display.ax-hero {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.79;
  letter-spacing: -0.03em;
}

.ax-mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ax-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  opacity: var(--ax-op-label);
}
.ax-body {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  line-height: 1.7;
  opacity: var(--ax-op-body);
}
.ax-quiet { opacity: var(--ax-op-quiet); }

/* negation-then-position content pattern */
.ax-negation p { margin: 0 0 0.4em; opacity: var(--ax-op-quiet); }
.ax-negation p.ax-position { opacity: var(--ax-op-body); color: var(--ax-white); }

/* ---------- layout ---------- */
.ax-shell { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }
.ax-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .ax-container { padding: 0 20px; } }

.ax-section { padding: 96px 0; }
@media (max-width: 640px) { .ax-section { padding: 56px 0; } }

.ax-hairline { border: none; border-top: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet)); margin: 0; }
.ax-hairline-v { border-left: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet)); }

/* decorative bullet/scroll bars (from bullet.svg / scroll.svg) */
.ax-bullet { display: inline-block; width: 5px; height: 70px; background: linear-gradient(180deg, #F3BB49, #B1762C); }
.ax-scroll { display: inline-block; width: 1px; height: 24px; background: linear-gradient(180deg, #F3BB49, rgba(243,187,73,0.1)); }

/* ---------- header / nav ---------- */
.ax-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  position: relative;
  z-index: 2;
}
.ax-logo { display: flex; align-items: center; gap: 10px; }
.ax-logo img { height: 28px; width: auto; display: block; }
.ax-logo-word { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.14em; }

.ax-navstack { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.ax-navstack a {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  opacity: var(--ax-op-label);
  transition: opacity var(--dur) var(--ease);
}
.ax-navstack a:hover, .ax-navstack a.active { opacity: 1; }

/* ---------- footer ---------- */
.ax-footer {
  margin-top: auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  opacity: var(--ax-op-label);
}

/* ---------- SectionLabel ---------- */
.ax-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  opacity: var(--ax-op-label);
  margin-bottom: 20px;
}
.ax-section-label::before {
  content: "";
  width: 20px;
  height: var(--hairline);
  background: var(--ax-signal);
}

/* ---------- EmailField ---------- */
.ax-field { margin-bottom: 20px; }
.ax-field label {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  opacity: var(--ax-op-label);
  margin-bottom: 8px;
}
.ax-input {
  width: 100%;
  height: 30px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.10);
  border: var(--hairline) solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--ax-white);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  outline: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ax-input::placeholder { color: rgba(255,255,255,0.35); text-transform: none; font-family: var(--font-mono); }
.ax-input:hover { background: rgba(255, 255, 255, 0.20); }
.ax-input:focus {
  background: rgba(255, 255, 255, 0.20);
  border-color: var(--ax-yellow);
  box-shadow: 0 0 0 1px var(--ax-yellow);
}
.ax-input.ax-input-error { border-color: var(--ax-alert); }

/* ---------- RequestAccessButton (the one button pattern) ---------- */
.ax-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ax-white);
}
.ax-btn .ax-arrow {
  width: 20px;
  height: 20px;
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.ax-btn:hover .ax-arrow, .ax-btn:focus-visible .ax-arrow { transform: translateX(6px); }
.ax-btn:disabled { opacity: var(--ax-op-quiet); cursor: not-allowed; }
.ax-btn:disabled .ax-arrow { transform: none; }
.ax-btn:focus-visible { outline: 1px solid var(--ax-yellow); outline-offset: 4px; }

/* ---------- StatusNote ---------- */
.ax-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 12px 0;
  border-top: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet));
  margin-top: 16px;
}
.ax-status img, .ax-status svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.ax-status.ax-status-ok { color: var(--ax-confirm); }
.ax-status.ax-status-error { color: var(--ax-alert); }
.ax-status.ax-status-info { opacity: var(--ax-op-body); }

/* ---------- auth card (login / signup / forgot / reset) ---------- */
.ax-auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.ax-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  background: rgba(12, 12, 13, 0.72);
  border: var(--hairline) solid rgba(255, 255, 255, 0.18);
}
.ax-card h1.ax-display { font-size: 1.9rem; margin-bottom: 8px; }
.ax-card .ax-lede { margin-bottom: 28px; }
.ax-card form { margin-top: 8px; }
.ax-card .ax-btn { margin-top: 8px; }
.ax-card-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ax-card-foot a { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.08em; opacity: var(--ax-op-label); }
.ax-card-foot a:hover { opacity: 1; }

/* ---------- homepage hero/sections ---------- */
.ax-hero-section { padding: 72px 0 96px; }
.ax-hero-section .ax-lede { max-width: 560px; margin-top: 24px; }
.ax-cta-row { margin-top: 40px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

.ax-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 860px) { .ax-grid-3 { grid-template-columns: 1fr; } }
.ax-grid-3 > div { padding: 32px; border-left: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet)); }
.ax-grid-3 > div:first-child { border-left: none; }
@media (max-width: 860px) {
  .ax-grid-3 > div { border-left: none; border-top: var(--hairline) solid rgba(255,255,255,var(--ax-op-quiet)); }
  .ax-grid-3 > div:first-child { border-top: none; }
}

/* ---------- FieldClock / TelemetryReadout (small mono readouts) ---------- */
.ax-telemetry { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.08em; opacity: var(--ax-op-quiet); }

::selection { background: var(--ax-yellow); color: var(--ax-black); }
