/* ============================================
   MAMORA - Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette - deep midnight */
  --bg-0: #07090d;
  --bg-1: #0b0e14;
  --bg-2: #11151e;
  --bg-3: #181d29;
  --bg-4: #222838;

  /* Borders & lines */
  --line-1: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.16);

  /* Text */
  --text-1: #f4f5f7;
  --text-2: #b6bcc8;
  --text-3: #7a8294;
  --text-4: #4d5566;

  /* Brand - amber/gold (customs, trade, gravitas) */
  --amber: #f5b544;
  --amber-bright: #ffc857;
  --amber-deep: #c98a1a;
  --amber-glow: rgba(245, 181, 68, 0.16);

  /* Accent - electric cyan (data, tech) */
  --cyan: #4fd1c5;
  --cyan-bright: #6ee7d7;
  --cyan-deep: #0d9488;
  --cyan-glow: rgba(79, 209, 197, 0.18);

  /* Semantic */
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;

  /* Type */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1240px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-1);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle global grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* Atmospheric background glows */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(800px 600px at 80% -10%, rgba(245, 181, 68, 0.06), transparent 60%),
    radial-gradient(900px 700px at 10% 110%, rgba(79, 209, 197, 0.05), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================
   Typography
   ============================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--amber);
  opacity: 0.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-1);
}

.h-display {
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.h-display .serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--amber-bright);
  letter-spacing: -0.02em;
}

.h-1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 500; }
.h-1 .serif { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--amber-bright); }
.h-2 { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 500; }
.h-3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.25; font-weight: 600; }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  font-weight: 400;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--line-1);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 19px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  position: relative;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  flex: 1;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  font-weight: 450;
}
.nav-links a:hover { color: var(--text-1); background: var(--line-1); }
.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #1a1206;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--amber-bright);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px -10px var(--amber-glow), 0 0 0 1px rgba(245, 181, 68, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--line-3);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--line-3);
}
.btn-text {
  background: transparent;
  color: var(--text-2);
  padding: 11px 14px;
}
.btn-text:hover { color: var(--text-1); }
.btn-lg { padding: 14px 26px; font-size: 15px; }

.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================
   Cards
   ============================================ */

.card {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--line-3);
}
.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  margin-bottom: 20px;
  color: var(--amber-bright);
}

/* ============================================
   Tags & pills
   ============================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.tag-amber { color: var(--amber); border-color: rgba(245, 181, 68, 0.2); background: rgba(245, 181, 68, 0.04); }
.tag-amber .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.tag-cyan { color: var(--cyan); border-color: rgba(79, 209, 197, 0.2); background: rgba(79, 209, 197, 0.04); }

/* ============================================
   Hero specifics
   ============================================ */

.hero {
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-1) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black, transparent 80%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(245, 181, 68, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Section helpers
   ============================================ */

.section {
  padding: 100px 0;
  position: relative;
}
.section-sm { padding: 60px 0; }
.section-lg { padding: 140px 0; }

.section-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 64px;
  max-width: 760px;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-2), transparent);
  margin: 0;
}

/* ============================================
   Logos strip
   ============================================ */

.logos {
  padding: 56px 0;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
}
.logos-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 32px;
}
.logos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 32px;
}
.logo-item {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  letter-spacing: -0.02em;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  font-style: italic;
}
.logo-item:hover { opacity: 1; color: var(--text-1); }

@media (max-width: 768px) {
  .logos-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
}

/* ============================================
   Feature grid
   ============================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }

/* ============================================
   CTA banner
   ============================================ */

.cta-banner {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--amber-glow), transparent 60%);
  pointer-events: none;
}
.cta-banner-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
@media (max-width: 768px) {
  .cta-banner { padding: 44px 28px; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--line-1);
  padding: 72px 0 32px;
  background: var(--bg-0);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 14px;
  max-width: 280px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid var(--line-1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-4);
  font-family: var(--font-mono);
}
.footer-bottom-right { display: flex; gap: 24px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; }
}

/* ============================================
   Forms
   ============================================ */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form-input, .form-select, .form-textarea {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text-1);
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--bg-2);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ============================================
   UI MOCKUP COMPONENTS - shared style
   ============================================ */

.app-mock {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 40px 100px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--line-1) inset;
}
.app-mock-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-1);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-mock-dots { display: flex; gap: 6px; }
.app-mock-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-4); }
.app-mock-url {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-1);
  border-radius: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line-1);
  max-width: 320px;
  margin: 0 auto;
}
.app-mock-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 540px;
}
.app-mock-side {
  background: var(--bg-1);
  border-right: 1px solid var(--line-1);
  padding: 20px 14px;
}
.app-mock-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 20px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 18px;
}
.app-mock-logo-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.app-mock-nav { display: flex; flex-direction: column; gap: 2px; }
.app-mock-nav-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 14px 8px 6px;
}
.app-mock-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 450;
}
.app-mock-nav-item.active {
  background: var(--bg-3);
  color: var(--text-1);
  font-weight: 500;
}
.app-mock-nav-item .badge {
  margin-left: auto;
  background: var(--amber);
  color: #1a1206;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
}
.app-mock-main {
  background: var(--bg-0);
  padding: 24px 28px;
  overflow: hidden;
}
.app-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-1);
}
.app-mock-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.app-mock-subtitle {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.mock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 100px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--text-2);
}

.mock-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.mock-kpi {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  padding: 14px 16px;
}
.mock-kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.mock-kpi-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-1);
}
.mock-kpi-change {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mock-kpi-change.up { color: var(--green); }
.mock-kpi-change.down { color: var(--red); }

/* Mock table */
.mock-table {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  overflow: hidden;
}
.mock-table-head {
  display: grid;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-2);
}
.mock-table-row {
  display: grid;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-1);
  font-size: 13px;
  align-items: center;
}
.mock-table-row:last-child { border-bottom: none; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.status-pill.ok { color: var(--green); background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.2); }
.status-pill.pending { color: var(--amber); background: rgba(245, 181, 68, 0.08); border: 1px solid rgba(245, 181, 68, 0.2); }
.status-pill.processing { color: var(--cyan); background: rgba(79, 209, 197, 0.08); border: 1px solid rgba(79, 209, 197, 0.2); }
.status-pill.error { color: var(--red); background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.2); }
.status-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Brand mark logo */
.brand-mark svg { width: 100%; height: 100%; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.fade-up.d-1 { animation-delay: 0.06s; }
.fade-up.d-2 { animation-delay: 0.12s; }
.fade-up.d-3 { animation-delay: 0.18s; }
.fade-up.d-4 { animation-delay: 0.24s; }
.fade-up.d-5 { animation-delay: 0.30s; }
.fade-up.d-6 { animation-delay: 0.36s; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse { animation: pulse-dot 2s ease-in-out infinite; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-inner { padding: 14px 20px; }
  .container { padding: 0 20px; }
  .section { padding: 70px 0; }
  .hero { padding: 50px 0 80px; }
  .app-mock-body { grid-template-columns: 1fr; }
  .app-mock-side { display: none; }
  .mock-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
