/* ==========================================================================
   ENTERPRISE ERP & POS PORTAL (erp.test) - STRICT DESIGN.md SYSTEM
   Institutional & Editorial Quiet Aesthetic | All classes prefixed "frnt-"
   Strictly NO inline CSS | Strictly weight 400 on display | Single Blue #0052ff
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap");

/* --- Tokens (DESIGN.md section: Colors, Typography, Spacing, Shapes) --- */
:root {
  /* Colors -> Brand & Accent */
  --frnt-colors-primary: #0052ff;
  --frnt-colors-primary-active: #003ecc;
  --frnt-colors-primary-disabled: #a8b8cc;

  /* Colors -> Surface */
  --frnt-colors-canvas: #ffffff;
  --frnt-colors-surface-soft: #f7f7f7;
  --frnt-colors-surface-strong: #eef0f3;
  --frnt-colors-surface-dark: #0a0b0d;
  --frnt-colors-surface-dark-elevated: #16181c;

  /* Colors -> Hairlines */
  --frnt-colors-hairline: #dee1e6;
  --frnt-colors-hairline-soft: #eef0f3;
  --frnt-colors-hairline-dark: rgba(255, 255, 255, 0.08);

  /* Colors -> Text */
  --frnt-colors-ink: #0a0b0d;
  --frnt-colors-body: #5b616e;
  --frnt-colors-body-strong: #0a0b0d;
  --frnt-colors-muted: #7c828a;
  --frnt-colors-muted-soft: #a8acb3;
  --frnt-colors-on-primary: #ffffff;
  --frnt-colors-on-dark: #ffffff;
  --frnt-colors-on-dark-soft: #a8acb3;

  /* Spacing */
  --frnt-spacing-xxs: 4px;
  --frnt-spacing-xs: 8px;
  --frnt-spacing-sm: 12px;
  --frnt-spacing-base: 16px;
  --frnt-spacing-md: 20px;
  --frnt-spacing-lg: 24px;
  --frnt-spacing-xl: 32px;
  --frnt-spacing-xxl: 48px;
  --frnt-spacing-section: 96px;

  /* Border Radius Scale */
  --frnt-rounded-xs: 4px;
  --frnt-rounded-sm: 8px;
  --frnt-rounded-md: 12px;
  --frnt-rounded-lg: 16px;
  --frnt-rounded-xl: 24px;
  --frnt-rounded-pill: 100px;
  --frnt-rounded-full: 9999px;

  /* Interactive Cursor Variables for Pure CSS Gradient Blinds */
  --blinds-x: 50%;
  --blinds-y: 35%;
}

/* --- Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    "Inter",
    -apple-system,
    system-ui,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--frnt-colors-surface-dark);
  color: var(--frnt-colors-on-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow-x: hidden;
}

/* --- Layer 1: Favicon Watermark (Illuminated by Cursor Flashlight) --- */
.frnt-favicon-watermark-base,
.frnt-favicon-watermark-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background-image: url("favicon.ico");
  background-position: 80% 45%;
  background-repeat: no-repeat;
  background-size: 800px;
}

.frnt-favicon-watermark-base {
  opacity: 0.15; /* Increased from 0.08 to make the blur clearly visible */
  filter: blur(12px);
}

.frnt-favicon-watermark-spotlight {
  opacity: 1;
  filter: blur(0);

  /* Interactive Flashlight Mask Effect */
  -webkit-mask-image: radial-gradient(
    600px circle at var(--blinds-x) var(--blinds-y),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 80%
  );
  mask-image: radial-gradient(
    600px circle at var(--blinds-x) var(--blinds-y),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 80%
  );
}

/* --- Layout Grid & Container --- */
.frnt-portal-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--frnt-spacing-xl);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* --- Component: top-nav-on-dark (Height 64px) --- */
.frnt-top-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--frnt-colors-hairline-dark);
}

.frnt-brand-wordmark {
  display: flex;
  align-items: center;
  gap: var(--frnt-spacing-xs);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--frnt-colors-on-dark);
  text-decoration: none;
}

.frnt-brand-accent-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--frnt-rounded-full);
  background-color: var(--frnt-colors-primary);
}

.frnt-nav-meta {
  display: flex;
  align-items: center;
  gap: var(--frnt-spacing-base);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--frnt-colors-on-dark-soft);
}

/* --- Component: hero-band-dark (96px rhythm, Weight 400 Display, Negative Tracking) --- */
.frnt-hero-band {
  padding: var(--frnt-spacing-section) 0 var(--frnt-spacing-xxl) 0;
  max-width: 780px;
}

.frnt-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--frnt-spacing-xxs) var(--frnt-spacing-sm);
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--frnt-rounded-pill);
  color: var(--frnt-colors-on-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--frnt-spacing-lg);
}

.frnt-display-heading {
  font-size: 64px;
  font-weight: 400; /* Strictly 400 per DESIGN.md */
  line-height: 1.05;
  letter-spacing: -2px; /* Tighter tracking for display-xl */
  color: #ffffff;
  margin-bottom: var(--frnt-spacing-lg);
}

.frnt-hero-subhead {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: #b2b8c2;
  max-width: 640px;
}

/* --- Component: product-ui-card-dark in 2-up Desktop Grid --- */
.frnt-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--frnt-spacing-lg); /* 24px between cards per DESIGN.md */
  margin-bottom: var(--frnt-spacing-section);
}

@media (max-width: 900px) {
  .frnt-card-grid {
    grid-template-columns: 1fr;
  }
  .frnt-display-heading {
    font-size: 44px;
    letter-spacing: -1px;
  }
  .frnt-hero-band {
    padding: var(--frnt-spacing-xxl) 0 var(--frnt-spacing-xl) 0;
  }
}

.frnt-product-card {
  background-color: rgba(22, 24, 28, 0.4); /* Translucent dark glass */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08); /* Fine glass edge */
  border-radius: var(--frnt-rounded-xl); /* 24px rounded per DESIGN.md */
  padding: var(--frnt-spacing-xl); /* 32px padding per DESIGN.md */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transform: translateY(0);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.frnt-product-card:hover {
  background-color: rgba(22, 24, 28, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 82, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.4); /* Premium blue glow */
}

/* Card Header & Circular Icon Plate */
.frnt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--frnt-spacing-lg);
}

.frnt-asset-icon-circular {
  width: 40px;
  height: 40px;
  border-radius: var(--frnt-rounded-full);
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--frnt-colors-on-dark);
}

.frnt-card-category {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--frnt-colors-on-dark-soft);
}

/* Card Body Typography */
.frnt-card-body {
  margin-bottom: var(--frnt-spacing-xl);
}

.frnt-card-title {
  font-size: 18px; /* typography.title-md per DESIGN.md */
  font-weight: 600;
  line-height: 1.33;
  color: var(--frnt-colors-on-dark);
  margin-bottom: var(--frnt-spacing-xs);
}

.frnt-card-description {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--frnt-colors-on-dark-soft);
}

/* Module Feature Tags (Quiet & Minimal) */
.frnt-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--frnt-spacing-xs);
  margin-top: var(--frnt-spacing-base);
}

.frnt-feature-tag {
  font-size: 12px;
  font-weight: 500;
  color: #b2b8c2;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--frnt-spacing-xxs) 10px;
  border-radius: var(--frnt-rounded-xs); /* 4px per DESIGN.md */
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.frnt-feature-tag:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* --- Component: button-primary (Coinbase Blue Pill #0052ff, 100px radius, 44px height) --- */
.frnt-button-primary {
  background-color: var(--frnt-colors-primary);
  color: var(--frnt-colors-on-primary);
  font-size: 16px; /* typography.button */
  font-weight: 600;
  line-height: 1.15;
  height: 44px;
  padding: 12px 20px;
  border-radius: var(--frnt-rounded-pill); /* 100px rounded per DESIGN.md */
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: background-color 0.15s ease;
}

.frnt-product-card:hover .frnt-button-primary {
  background-color: var(--frnt-colors-primary-active);
}

/* --- Component: button-outline-on-dark (Transparent Pill, 1px White Border) --- */
.frnt-button-outline {
  background-color: transparent;
  color: var(--frnt-colors-on-dark);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--frnt-colors-on-dark);
  border-radius: var(--frnt-rounded-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: background-color 0.15s ease;
}

.frnt-product-card:hover .frnt-button-outline {
  background-color: rgba(255, 255, 255, 0.08);
}

.frnt-nav-favicon {
  width: 20px;
  height: 20px;
  border-radius: var(--frnt-rounded-xs);
  object-fit: contain;
}

/* --- Component: legal-band (Bottom strip, caption size, muted text) --- */
.frnt-legal-band {
  padding: var(--frnt-spacing-xl) 0;
  border-top: 1px solid var(--frnt-colors-hairline-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px; /* typography.caption */
  color: var(--frnt-colors-muted);
  margin-top: auto;
}

@media (max-width: 640px) {
  .frnt-legal-band {
    flex-direction: column;
    align-items: center;
    gap: var(--frnt-spacing-xs);
  }
}

.frnt-mono-number {
  font-family: "JetBrains Mono", monospace;
  color: var(--frnt-colors-on-dark-soft);
}
