/* ============================================
   MiGestion — Landing
   Tokens, base, utilities
   ============================================ */

:root {
  /* Brand */
  --brand-50:  #EAF4FB;
  --brand-100: #CFE5F3;
  --brand-200: #A4CFE7;
  --brand-300: #6FB1D6;
  --brand-400: #3994C9;
  --brand-500: #0A7ABF;   /* MiGestion blue */
  --brand-600: #086AA8;
  --brand-700: #065689;
  --brand-800: #054466;
  --brand-900: #03304B;

  /* Ink (neutral cool) */
  --ink-50:  #F7F9FC;
  --ink-100: #EEF2F8;
  --ink-200: #DEE5F0;
  --ink-300: #C2CDDD;
  --ink-400: #94A3BD;
  --ink-500: #647692;
  --ink-600: #475A77;
  --ink-700: #324560;
  --ink-800: #1C2D45;
  --ink-900: #0B1B30;
  --ink-950: #061222;

  /* Accents */
  --green:  #16A86A;
  --green-soft: #E4F6EC;
  --amber:  #D98E1F;
  --amber-soft: #FBEFD7;
  --red:    #D54545;
  --red-soft: #FBE6E6;

  /* Semantic — LIGHT */
  --bg:           #FFFFFF;
  --bg-elev:      #F7F9FC;
  --bg-alt:       #FAFBFD;
  --surface:      #FFFFFF;
  --surface-2:    #F4F7FB;
  --border:       rgba(11, 27, 48, 0.08);
  --border-strong:rgba(11, 27, 48, 0.14);
  --text:         #0B1B30;
  --text-soft:    #324560;
  --text-muted:   #647692;
  --text-faint:   #94A3BD;

  --grad-hero:    radial-gradient(1200px 600px at 80% -10%, rgba(10,122,191,0.10), transparent 60%),
                  radial-gradient(900px 500px at -10% 20%, rgba(10,122,191,0.06), transparent 60%);
  --grad-band:    linear-gradient(180deg, #FFFFFF 0%, #F4F7FB 100%);

  --shadow-xs: 0 1px 2px rgba(11,27,48,0.05);
  --shadow-sm: 0 2px 8px rgba(11,27,48,0.06), 0 1px 2px rgba(11,27,48,0.04);
  --shadow-md: 0 10px 32px -8px rgba(11,27,48,0.12), 0 4px 12px -4px rgba(11,27,48,0.06);
  --shadow-lg: 0 24px 64px -16px rgba(11,27,48,0.18), 0 8px 24px -8px rgba(11,27,48,0.08);
  --shadow-brand: 0 16px 48px -12px rgba(10,122,191,0.35);

  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;
  --r-5: 28px;
  --r-full: 999px;

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
}

[data-theme="dark"] {
  --bg:           #07101F;
  --bg-elev:      #0C1A2E;
  --bg-alt:       #0A1729;
  --surface:      #0F1E33;
  --surface-2:    #142745;
  --border:       rgba(255,255,255,0.07);
  --border-strong:rgba(255,255,255,0.14);
  --text:         #F1F5FA;
  --text-soft:    #C2CDDD;
  --text-muted:   #94A3BD;
  --text-faint:   #647692;

  --grad-hero:    radial-gradient(1200px 600px at 80% -10%, rgba(10,122,191,0.30), transparent 60%),
                  radial-gradient(900px 500px at -10% 20%, rgba(10,122,191,0.18), transparent 60%);
  --grad-band:    linear-gradient(180deg, #07101F 0%, #0C1A2E 100%);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 12px 36px -8px rgba(0,0,0,0.55), 0 4px 12px -4px rgba(0,0,0,0.4);
  --shadow-lg: 0 28px 64px -12px rgba(0,0,0,0.7);
  --shadow-brand: 0 16px 48px -12px rgba(10,122,191,0.6);

  --green-soft: rgba(22, 168, 106, 0.14);
  --amber-soft: rgba(217, 142, 31, 0.16);
  --red-soft:   rgba(213, 69, 69, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  transition: background 0.4s ease, color 0.4s ease;
}

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--brand-500); color: #fff; }

/* Layout container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 720px) {
  .container { padding: 0 18px; }
}

/* Section helpers */
.section {
  padding: 120px 0;
  position: relative;
}
@media (max-width: 900px) {
  .section { padding: 80px 0; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(10,122,191,0.15);
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 20px 0 18px;
  color: var(--text);
  text-wrap: balance;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--brand-500);
}

.section-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 660px;
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--brand-500);
  color: #fff;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
.btn-brand {
  background: var(--brand-500);
  color: #fff;
}
.btn-brand:hover {
  background: var(--brand-600);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-link {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.btn-link:hover { color: var(--brand-500); }

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

/* badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}
.badge .tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-full);
  background: var(--brand-500);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* reveal animation (set via observer adding .in) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* divider */
.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

/* utility */
.mono { font-family: var(--font-mono); }
.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* common card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-sm);
}

/* scrollbar (subtle) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

/* logo mark — real MiGestion isotype */
.logo-mark {
  display: inline-block;
  width: 28px; height: 28px;
  background: url('assets/logo-mark.png') center/contain no-repeat;
  flex-shrink: 0;
}

.logo-wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-wordmark span.app { color: var(--text-muted); font-weight: 500; }
