/* ==========================================================================
   APP Laurent — Design System NOIR/OR
   Premium B2B • Strasbourg Audit Design
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand — Noir/Or */
  --bg:       #0F1118;
  --bg-card:  #1A1B22;
  --bg-card2: #22232C;
  --bg-section: #12121A;

  --navy:    #E8E4DC;
  --navy-80: #D5D0C8;
  --navy-60: #B8B3AB;
  --navy-40: #9A958D;
  --navy-20: #7C776F;
  --slate:   rgba(201,168,76,0.15);
  --light:   #1A1B22;
  --white:   #0F1118;

  --gold:       #C9A84C;
  --gold-lt:    #D4B76A;
  --gold-dk:    #A8893F;
  --gold-bg:    rgba(201,168,76,0.1);
  --gold-border:rgba(201,168,76,0.15);

  /* Legacy indigo aliases mapped to gold */
  --indigo:     #C9A84C;
  --indigo-dk:  #A8893F;
  --indigo-lt:  #D4B76A;
  --indigo-bg:  rgba(201,168,76,0.1);

  --green:      #2ECC71;
  --green-dk:   #27AE60;
  --green-lt:   #3DDB83;
  --green-bg:   rgba(46,204,113,0.1);

  --amber:      #F59E0B;
  --amber-dk:   #D97706;
  --amber-bg:   rgba(245,158,11,0.1);

  --red:        #E74C3C;
  --red-dk:     #C0392B;
  --red-bg:     rgba(231,76,60,0.1);

  --blue:       #4A90D9;
  --blue-bg:    rgba(74,144,217,0.1);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
  --shadow:     0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.3);
  --shadow-md:  0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.3);
  --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.5), 0 8px 10px -6px rgba(0,0,0,.4);
  --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.6);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: .2s;

  /* Border helper */
  --border: rgba(201,168,76,0.15);
  --text: #E8E4DC;
  --text-muted: #7C776F;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: #E8E4DC;
  background: #0F1118;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--gold-lt); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: #E8E4DC; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { color: #B8B3AB; }

.text-gradient {
  background: linear-gradient(135deg, #C9A84C, #D4B76A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: .75rem;
  padding: .25rem .75rem;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-full);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #0F1118;
  box-shadow: 0 4px 14px rgba(201,168,76,.35);
}
.btn-primary:hover {
  background: var(--gold-lt);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,.45);
  color: #0F1118;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold-border);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-lt);
  background: var(--gold-bg);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: #0F1118;
}

.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46,204,113,.35);
}
.btn-success:hover {
  background: var(--green-dk);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: .4rem 1rem;
  font-size: .8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15,17,24,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  padding: .75rem 0;
  transition: all .3s var(--ease);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  background: rgba(15,17,24,.96);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #E8E4DC;
  letter-spacing: -.03em;
}

.nav-brand svg rect:first-child {
  fill: var(--gold) !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: #B8B3AB;
  transition: color var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #E8E4DC;
  border-radius: 2px;
  transition: all .3s var(--ease);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(15,17,24,.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(201,168,76,0.15);
    transform: translateY(-110%);
    transition: transform .3s var(--ease);
  }
  .nav-links.open {
    transform: translateY(0);
  }
}

/* ---------- Cards ---------- */
.card {
  background: #1A1B22;
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all .3s var(--ease);
}

.card:hover {
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 8px 30px rgba(201,168,76,0.08);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold);
}

.card h4 {
  margin-bottom: .5rem;
  color: #E8E4DC;
}

.card p {
  font-size: .9rem;
  line-height: 1.5;
  color: #B8B3AB;
}

/* ---------- Hero ---------- */
.hero {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: #E8E4DC;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 2rem;
  color: #B8B3AB;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,168,76,0.15);
}

.stat-item {
  text-align: left;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -.03em;
}

.stat-label {
  font-size: .8rem;
  color: #7C776F;
  font-weight: 500;
}

@media (max-width: 640px) {
  .stats-bar { gap: 1.5rem; flex-wrap: wrap; }
  .stat-value { font-size: 1.3rem; }
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 2rem 1.5rem;
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--gold);
  color: #0F1118;
  font-size: 1.1rem;
  font-weight: 700;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 3.5rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: rgba(201,168,76,0.2);
}

.step h4 { margin-bottom: .5rem; }

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Feature Grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- ROI Section ---------- */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.roi-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(46,204,113,0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(46,204,113,.15);
}

.roi-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.roi-text h4 {
  font-size: 1rem;
  margin-bottom: .25rem;
  color: var(--green-lt);
}

.roi-text p {
  font-size: .85rem;
  color: #B8B3AB;
}

@media (max-width: 640px) {
  .roi-grid { grid-template-columns: 1fr; }
}

/* ---------- Pricing ---------- */
.pricing-card {
  background: #1A1B22;
  border: 2px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(201,168,76,0.1);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #0F1118;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .4rem 1.5rem;
  border-radius: var(--radius-full);
}

.pricing-amount {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -.04em;
  line-height: 1;
}

.pricing-period {
  font-size: 1rem;
  color: #7C776F;
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 2rem 0;
}

.pricing-features li {
  padding: .6rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.08);
  font-size: .9rem;
  color: #B8B3AB;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(201,168,76,0.15);
  text-align: center;
  background: #0F1118;
}

.footer p {
  font-size: .82rem;
  color: #7C776F;
}

.footer a {
  color: var(--gold);
}

/* ---------- Global Overrides for Centering ---------- */
.app-wrap,
.guide-wrap,
.demo-container,
.dash,
.pipe-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- Inputs (global noir/or) ---------- */
input, select, textarea {
  background: #1A1B22 !important;
  color: #E8E4DC !important;
  border-color: rgba(201,168,76,0.15) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: #7C776F !important;
}
option {
  background: #1A1B22;
  color: #E8E4DC;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0F1118; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.4); }
