/* ---------------------------------------------------------------
   NexusRetail landing page
   Design direction: "warehouse ledger" — manifest paper + amber
   signage + depot-green status, in both a daytime-dock (light)
   and night-shift (dark) mode.
   --------------------------------------------------------------- */

:root {
  --bg: #EEF0EA;
  --surface: #FFFFFF;
  --surface-2: #E4E7DF;
  --ink: #14181D;
  --muted: #5B6470;
  --border: #D8DBD1;
  --accent: #C8862A;
  --accent-ink: #4A2F0C;
  --accent-2: #3F7D5A;
  --accent-2-bg: #E4EEE7;
  --shadow: 0 1px 2px rgba(20, 24, 29, 0.04), 0 8px 24px rgba(20, 24, 29, 0.06);
  --radius: 14px;

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html[data-theme="dark"] {
  --bg: #12161C;
  --surface: #1B212A;
  --surface-2: #232A34;
  --ink: #EDEFEA;
  --muted: #8A93A0;
  --border: #2C3541;
  --accent: #E2A64A;
  --accent-ink: #2A1A05;
  --accent-2: #57A97C;
  --accent-2-bg: rgba(87, 169, 124, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

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

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--muted);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.icon { width: 18px; height: 18px; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
html[data-theme="dark"] .btn-primary { background: var(--accent); color: var(--accent-ink); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); }

.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
  border-radius: 11px;
}

.hero {
  padding: 88px 0 64px;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.manifest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.manifest-card::before {
  content: "";
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: var(--accent-2);
  border-radius: 2px;
}

.manifest-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tag {
  font-size: 12.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}
.tag-mono { font-family: var(--font-mono); font-weight: 500; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
}
.status-matched {
  background: var(--accent-2-bg);
  color: var(--accent-2);
}
.status-matched svg { width: 12px; height: 12px; }

.manifest-supplier {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
}
.manifest-note {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 20px;
}

.manifest-rows {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manifest-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--muted);
}
.manifest-row .mono { color: var(--ink); font-size: 13px; }
.status-ok { color: var(--accent-2) !important; }

.manifest-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 28px;
  overflow: hidden;
}

.manifest-strip-label {
  flex-shrink: 0;
  padding-left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-bg);
}

.ticker-viewport {
  overflow: hidden;
  flex: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  width: max-content;
  animation: ticker 34s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-item strong { color: var(--ink); font-weight: 500; }
.ticker-item.ok { color: var(--accent-2); }
.ticker-item.flag { color: var(--accent); }

.modules { padding: 96px 0; }

h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  margin-bottom: 44px;
  max-width: 26ch;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.module-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 10px;
}

.module-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.module-card p:last-child {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.architecture {
  padding: 0 0 96px;
}

.architecture-sub {
  color: var(--muted);
  margin: -28px 0 28px;
  font-size: 15px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.infra-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.cta-band {
  background: var(--ink);
  color: var(--bg);
  padding: 72px 0;
}
html[data-theme="dark"] .cta-band {
  background: var(--surface-2);
  color: var(--ink);
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cta-inner h2 { color: inherit; max-width: none; margin-bottom: 0; }
.cta-inner p { color: color-mix(in srgb, var(--bg) 70%, transparent); margin: 0 0 8px; font-size: 15.5px; }
html[data-theme="dark"] .cta-inner p { color: var(--muted); }

.cta-band .btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-footer { font-size: 15px; }

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links a:hover { color: var(--ink); }

.footer-note {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nav-links { display: none; }
  .module-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
}

@media (max-width: 520px) {
  .nav-inner, .section-inner, .hero-inner, .footer-inner { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 30px; }
  .btn-lg { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
}
