/* ============================================
   Klarrro — Business Plan Minisite (investir)
   Premium Bloomberg × Luxury Brand Edition
   ============================================ */

/* --- 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;
}

:root {
  --bg: #09090E;
  --bg2: #0E0E18;
  --bg3: #121221;
  --surface: #16162C;
  --surface2: #1D1D38;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);
  --border3: rgba(255,255,255,0.18);
  --accent: #E0527A;
  --accent-dark: #BF3B63;
  --accent-light: #EE7A97;
  --accent-glow: rgba(224,82,122,0.16);
  --gold: #F8BF45;
  --gold-light: #FCCF70;
  --gold-dark: #b8822a;
  --purple: #A78BFA;
  --teal: #2DD4BF;
  --green: #34D399;
  --blue: #60A5FA;
  --orange: #FB923C;
  --success: #34D399;
  --success-bg: rgba(52,211,153,0.10);
  --warning: #F8BF45;
  --warning-bg: rgba(248,191,69,0.10);
  --danger: #F87171;
  --info: #60A5FA;
  --text: #EDE9F6;
  --text-secondary: #ABA3C2;
  --muted: #8A839E;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 99px;
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --fs-xs: 0.694rem;
  --fs-sm: 0.778rem;
  --fs-base: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.35rem;
  --fs-2xl: 1.62rem;
  --shadow: 0 4px 16px rgba(0,0,0,0.50);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.65);
  --shadow-glow-rose: 0 0 40px rgba(224,82,122,0.12), 0 0 80px rgba(224,82,122,0.06);
  --shadow-glow-gold: 0 0 40px rgba(248,191,69,0.12), 0 0 80px rgba(248,191,69,0.06);
  --t: 180ms cubic-bezier(0.4,0,0.2,1);
  --t-fast: 100ms cubic-bezier(0.4,0,0.2,1);
  --t-slow: 350ms cubic-bezier(0.4,0,0.2,1);
  --t-lift: 400ms cubic-bezier(0.16,1,0.3,1);
}

body {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(224,82,122,0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(248,191,69,0.04), transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Grain Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(224,82,122,0.25);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(224,82,122,0.4);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(224,82,122,0.25) transparent;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #EDE9F6;
  line-height: 1.25;
}

h1 { font-size: 1.62rem; }
h2 { font-size: 1.35rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }
h4 { font-size: 1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: #ABA3C2; }

strong { color: #EDE9F6; font-weight: 700; }

a { color: #E0527A; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-light); text-decoration: underline; }

/* --- Section Entrance Animations --- */
@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bp-section,
.bp-header,
.bp-closing,
.bp-footer {
  animation: section-enter 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.bp-section:nth-child(1) { animation-delay: 0s; }
.bp-section:nth-child(2) { animation-delay: 0.08s; }
.bp-section:nth-child(3) { animation-delay: 0.16s; }
.bp-section:nth-child(4) { animation-delay: 0.24s; }
.bp-section:nth-child(5) { animation-delay: 0.32s; }
.bp-section:nth-child(6) { animation-delay: 0.40s; }
.bp-section:nth-child(7) { animation-delay: 0.48s; }
.bp-section:nth-child(8) { animation-delay: 0.56s; }
.bp-section:nth-child(9) { animation-delay: 0.64s; }
.bp-section:nth-child(10) { animation-delay: 0.72s; }
.bp-section:nth-child(11) { animation-delay: 0.80s; }
.bp-section:nth-child(12) { animation-delay: 0.88s; }
.bp-section:nth-child(13) { animation-delay: 0.96s; }
.bp-section:nth-child(14) { animation-delay: 1.04s; }
.bp-section:nth-child(15) { animation-delay: 1.12s; }

/* --- Gate Screen --- */
#invite-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(224,82,122,0.08), transparent 70%);
}

#invite-gate .brand {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-shadow: 0 0 60px rgba(224,82,122,0.2);
}

.gate-message {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 1rem;
  color: #8A839E;
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
}

/* --- Brand / Logo --- */
.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2rem;
  color: #EDE9F6;
  letter-spacing: -0.5px;
}

.logo-rrr i {
  font-style: normal;
  display: inline-block;
  animation: rrr-shake 2.8s ease-in-out infinite;
}

.logo-rrr i:nth-child(1) { animation-delay: 0s; }
.logo-rrr i:nth-child(2) { animation-delay: 0.12s; }
.logo-rrr i:nth-child(3) { animation-delay: 0.24s; }

@keyframes rrr-shake {
  0%, 100% { transform: translateY(0); }
  20% { transform: translateY(-3px); }
  40% { transform: translateY(0); }
}

/* --- Content Wrapper --- */
#invite-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* --- Section --- */
.bp-section {
  margin-bottom: 3.5rem;
  position: relative;
}

.bp-section > h2 {
  position: relative;
  padding-bottom: 0.75rem;
}

.bp-section > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #E0527A, #BF3B63);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(224,82,122,0.3);
}

/* --- Header Section --- */
.bp-header {
  text-align: center;
  margin-bottom: 3.5rem;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

.bp-header::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(224,82,122,0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.bp-header .brand {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 80px rgba(224,82,122,0.15);
}

.bp-header h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #EDE9F6 0%, #ABA3C2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bp-header .bp-date {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.875rem;
  color: #8A839E;
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
}

.bp-badge-confidential {
  display: inline-block;
  background: rgba(224,82,122,0.10);
  color: #EE7A97;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.694rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: 0.4rem 1.25rem;
  border-radius: 99px;
  border: 1px solid rgba(224,82,122,0.20);
  box-shadow: 0 0 20px rgba(224,82,122,0.08);
  animation: confidential-pulse 4s ease-in-out infinite;
}

@keyframes confidential-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(224,82,122,0.08); }
  50% { box-shadow: 0 0 30px rgba(224,82,122,0.15); }
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(22,22,44,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.3),
    0 1px 2px rgba(0,0,0,0.2);
  transition:
    transform var(--t-lift),
    box-shadow var(--t-slow),
    border-color var(--t-slow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 32px rgba(0,0,0,0.4),
    0 0 0 1px rgba(224,82,122,0.08);
  border-color: rgba(255,255,255,0.10);
}

.glass-card h4 {
  color: #E0527A;
  font-family: 'Playfair Display', serif;
}

.glass-card p:last-child {
  margin-bottom: 0;
}

/* --- KPI / Stats numbers ambient glow --- */
.glass-card div[style*="font-size:2rem"],
.glass-card div[style*="font-size: 2rem"] {
  position: relative;
  text-shadow: 0 0 30px currentColor;
  filter: drop-shadow(0 0 8px currentColor);
}

/* --- Tables --- */
.bp-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(22,22,44,0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.25);
  position: relative;
}

.bp-table-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  z-index: 1;
}

.bp-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.bp-table-wrap thead th {
  background: rgba(22,22,44,0.85);
  font-weight: 700;
  font-size: 0.694rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8A839E;
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.bp-table-wrap tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #ABA3C2;
  transition: background var(--t-fast), border-color var(--t-fast);
}

/* Right-align numeric columns (2nd col onward) */
.bp-table-wrap tbody td:not(:first-child),
.bp-table-wrap thead th:not(:first-child) {
  text-align: right;
}

/* Alternating row shading */
.bp-table-wrap tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}

/* Row hover */
.bp-table-wrap tbody tr {
  transition: all var(--t-fast);
  position: relative;
}

.bp-table-wrap tbody tr:hover td {
  background: rgba(224,82,122,0.04);
}

.bp-table-wrap tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.bp-table-wrap tbody tr:last-child td {
  border-bottom: none;
}

/* Totals row */
.bp-table-wrap tbody tr.row-total td {
  font-weight: 700;
  color: #EDE9F6;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(248,191,69,0.05);
  position: relative;
}

.bp-table-wrap tbody tr.row-total td:first-child {
  box-shadow: inset 3px 0 0 var(--gold);
}

/* Gold accent summary table */
.bp-table-wrap.gold-accent {
  border-color: rgba(248,191,69,0.15);
  background: rgba(248,191,69,0.03);
  box-shadow:
    inset 0 1px 0 rgba(248,191,69,0.08),
    0 4px 24px rgba(0,0,0,0.25),
    0 0 40px rgba(248,191,69,0.05);
}

.bp-table-wrap.gold-accent thead th {
  color: #F8BF45;
  letter-spacing: 2px;
}

.bp-table-wrap.gold-accent tbody tr.row-total td {
  color: #F8BF45;
  font-size: 1rem;
  background: rgba(248,191,69,0.08);
  text-shadow: 0 0 20px rgba(248,191,69,0.3);
  box-shadow: inset 0 1px 0 rgba(248,191,69,0.15);
}

.bp-table-wrap.gold-accent tbody tr.row-total td:first-child {
  box-shadow: inset 3px 0 0 var(--gold), inset 0 1px 0 rgba(248,191,69,0.15);
}

/* --- Horizontal Evolution Tables (A1-A3 slider) --- */
.bp-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
}

.bp-section > div[style*="overflow-x"] {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  background: rgba(22,22,44,0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  scrollbar-width: thin;
  scrollbar-color: rgba(224,82,122,0.3) transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.25);
  position: relative;
}

.bp-section > div[style*="overflow-x"]::-webkit-scrollbar {
  height: 6px;
}

.bp-section > div[style*="overflow-x"]::-webkit-scrollbar-track {
  background: rgba(22,22,44,0.5);
  border-radius: 0 0 14px 14px;
}

.bp-section > div[style*="overflow-x"]::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 99px;
}

.bp-section > div[style*="overflow-x"]::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.bp-section > div[style*="overflow-x"] table thead th {
  background: rgba(22,22,44,0.92);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding: 0.875rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
  transition: color var(--t-fast);
}

/* Column group header colors for A1/A2/A3 */
.bp-section > div[style*="overflow-x"] table thead th[colspan] {
  font-size: var(--fs-sm);
  letter-spacing: 2px;
  padding: 0.6rem 1rem;
}

/* Rose group (A1) */
.bp-section > div[style*="overflow-x"] table thead th[style*="E0527A"],
.bp-section > div[style*="overflow-x"] table thead th[style*="e0527a"] {
  color: var(--accent) !important;
  background: rgba(224,82,122,0.06) !important;
  border-bottom-color: rgba(224,82,122,0.2) !important;
}

/* Gold group (A2) */
.bp-section > div[style*="overflow-x"] table thead th[style*="F8BF45"],
.bp-section > div[style*="overflow-x"] table thead th[style*="f8bf45"] {
  color: var(--gold) !important;
  background: rgba(248,191,69,0.06) !important;
  border-bottom-color: rgba(248,191,69,0.2) !important;
}

/* Purple group (A3) */
.bp-section > div[style*="overflow-x"] table thead th[style*="A78BFA"],
.bp-section > div[style*="overflow-x"] table thead th[style*="a78bfa"] {
  color: var(--purple) !important;
  background: rgba(167,139,250,0.06) !important;
  border-bottom-color: rgba(167,139,250,0.2) !important;
}

.bp-section > div[style*="overflow-x"] table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  transition: background var(--t-fast);
}

.bp-section > div[style*="overflow-x"] table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}

.bp-section > div[style*="overflow-x"] table tbody tr:hover td {
  background: rgba(224,82,122,0.04);
}

.bp-section > div[style*="overflow-x"] table tbody tr:last-child td {
  border-bottom: none;
}

/* Sticky first column with visual separation */
.bp-section > div[style*="overflow-x"] table tbody td[style*="sticky"] {
  background: rgba(22,22,44,0.95) !important;
  text-align: left;
  color: var(--text);
  border-right: 1px solid var(--border2);
  min-width: 100px;
  font-weight: 500;
  box-shadow: 4px 0 12px rgba(0,0,0,0.3);
}

.bp-section > div[style*="overflow-x"] table tbody tr:nth-child(even) td[style*="sticky"] {
  background: rgba(24,24,48,0.95) !important;
}

.bp-section > div[style*="overflow-x"] table thead th[style*="sticky"] {
  background: rgba(22,22,44,0.98) !important;
  border-right: 1px solid var(--border2);
  text-align: left;
  box-shadow: 4px 0 12px rgba(0,0,0,0.3);
}

/* Scroll hint */
.bp-section > div[style*="overflow-x"]::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(to right, transparent, rgba(9,9,14,0.6));
  pointer-events: none;
  border-radius: 0 14px 14px 0;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.3s ease;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) translateX(0); }
  50% { opacity: 0.8; transform: translateY(-50%) translateX(4px); }
}

/* --- Hypothesis Labels --- */
.bp-hypothesis-label {
  display: inline-block;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-weight: 700;
  font-size: 0.778rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  transition: box-shadow var(--t);
}

.bp-hypothesis-label.prudent {
  background: rgba(96,165,250,0.10);
  color: #60A5FA;
  border: 1px solid rgba(96,165,250,0.18);
  box-shadow: 0 0 12px rgba(96,165,250,0.06);
}

.bp-hypothesis-label.optimist {
  background: rgba(52,211,153,0.10);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.18);
  box-shadow: 0 0 12px rgba(52,211,153,0.06);
}

/* --- Glass Card inner tables --- */
.glass-card table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
}

.glass-card table thead th {
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding: 0.75rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border2);
}

.glass-card table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  color: var(--text-secondary);
  transition: background var(--t-fast);
}

.glass-card table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}

.glass-card table tbody tr:hover td {
  background: rgba(224,82,122,0.04);
}

.glass-card table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Phase table inside glass card --- */
.glass-card table[style*="font-size"] thead th {
  font-size: inherit;
}

.glass-card table[style*="font-size"] tbody td {
  font-size: inherit;
}

/* --- Note Card --- */
.bp-note {
  background: rgba(248,191,69,0.04);
  border-left: 3px solid #F8BF45;
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #ABA3C2;
  box-shadow:
    inset 4px 0 16px -4px rgba(248,191,69,0.08),
    0 2px 8px rgba(0,0,0,0.15);
  transition: border-color var(--t), box-shadow var(--t);
}

.bp-note:hover {
  box-shadow:
    inset 4px 0 16px -4px rgba(248,191,69,0.12),
    0 2px 12px rgba(0,0,0,0.2);
}

.bp-note strong {
  color: #F8BF45;
}

/* --- Flow Diagram --- */
.bp-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.bp-flow-box {
  background: rgba(22,22,44,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 200px;
  flex: 1;
  max-width: 280px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.3);
  transition:
    transform var(--t-lift),
    box-shadow var(--t-slow),
    border-color var(--t-slow);
  position: relative;
  overflow: hidden;
}

.bp-flow-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.bp-flow-box:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(224,82,122,0.1);
  border-color: rgba(224,82,122,0.15);
}

.bp-flow-box h4 {
  color: #E0527A;
  margin-bottom: 0.5rem;
}

.bp-flow-box .amount {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #EDE9F6;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 20px rgba(237,233,246,0.1);
}

.bp-flow-box .detail {
  font-size: 0.778rem;
  color: #8A839E;
}

.bp-flow-arrow {
  font-size: 1.5rem;
  color: #E0527A;
  flex-shrink: 0;
  text-shadow: 0 0 12px rgba(224,82,122,0.3);
  animation: arrow-pulse 2.5s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Timeline --- */
.bp-timeline {
  position: relative;
  padding: 2rem 0 1rem;
}

.bp-timeline::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: 16px;
  width: 2px;
  height: calc(100% - 3rem);
  background: linear-gradient(to bottom, #E0527A, #F8BF45 50%, rgba(248,191,69,0.1));
  border-radius: 2px;
}

.bp-timeline-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateX(-8px);
  animation: timeline-item-enter 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}

.bp-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.bp-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.bp-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.bp-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.bp-timeline-item:nth-child(5) { animation-delay: 0.5s; }
.bp-timeline-item:nth-child(6) { animation-delay: 0.6s; }
.bp-timeline-item:nth-child(7) { animation-delay: 0.7s; }
.bp-timeline-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes timeline-item-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bp-timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #E0527A;
  border: 3px solid #0E0E18;
  box-shadow: 0 0 0 2px #E0527A, 0 0 16px rgba(224,82,122,0.4);
  animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px #E0527A, 0 0 16px rgba(224,82,122,0.3);
  }
  50% {
    box-shadow: 0 0 0 3px #E0527A, 0 0 24px rgba(224,82,122,0.5);
  }
}

.bp-timeline-item h4 {
  color: #EDE9F6;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-weight: 700;
  font-size: 0.875rem;
}

.bp-timeline-item .timeline-date {
  font-size: 0.778rem;
  color: #E0527A;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: 0.5px;
}

.bp-timeline-item p {
  font-size: 0.875rem;
  color: #8A839E;
  margin-bottom: 0;
}

/* --- Org Chart --- */
.bp-org {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.bp-org-card {
  background: rgba(22,22,44,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem 2rem;
  text-align: center;
  width: 100%;
  max-width: 400px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.3);
  transition:
    transform var(--t-lift),
    box-shadow var(--t-slow),
    border-color var(--t-slow);
}

.bp-org-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 32px rgba(0,0,0,0.4);
}

.bp-org-card.founder {
  border-color: rgba(224,82,122,0.25);
  background: rgba(224,82,122,0.05);
  box-shadow:
    inset 0 1px 0 rgba(224,82,122,0.1),
    0 4px 24px rgba(0,0,0,0.3),
    0 0 40px rgba(224,82,122,0.08),
    0 0 80px rgba(224,82,122,0.04);
}

.bp-org-card.founder:hover {
  box-shadow:
    inset 0 1px 0 rgba(224,82,122,0.15),
    0 8px 32px rgba(0,0,0,0.4),
    0 0 50px rgba(224,82,122,0.12),
    0 0 100px rgba(224,82,122,0.06);
}

.bp-org-card h4 {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-weight: 700;
  color: #EDE9F6;
  margin-bottom: 0.25rem;
}

.bp-org-card .org-role {
  font-size: 0.778rem;
  color: #E0527A;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.bp-org-card .org-desc {
  font-size: 0.778rem;
  color: #8A839E;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.bp-org-connector {
  width: 2px;
  height: 24px;
  background: rgba(224,82,122,0.2);
  position: relative;
  overflow: hidden;
}

.bp-org-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(224,82,122,0.5), rgba(224,82,122,0.1));
  animation: connector-flow 2s linear infinite;
}

@keyframes connector-flow {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.bp-org-row {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 600px;
  justify-content: center;
  flex-wrap: wrap;
}

.bp-org-row .bp-org-card {
  flex: 1;
  min-width: 200px;
}

/* --- Risk Cards --- */
.bp-risks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.bp-risk-card {
  background: rgba(22,22,44,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem;
  transition:
    transform var(--t-lift),
    box-shadow var(--t-slow),
    border-color var(--t-slow);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 16px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}

/* Color-coded left border based on impact */
.bp-risk-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 14px 0 0 14px;
  opacity: 0.6;
  transition: opacity var(--t);
}

.bp-risk-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 32px rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.12);
}

.bp-risk-card:hover::before {
  opacity: 1;
}

/* Mitigation always visible */
.bp-risk-card .mitigation {
  font-size: 0.778rem;
  color: #8A839E;
  margin-bottom: 0;
  margin-top: 0.75rem;
}

.bp-risk-card h4 {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-weight: 700;
  font-size: 0.875rem;
  color: #EDE9F6;
  margin-bottom: 0.75rem;
}

.bp-risk-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bp-risk-badge {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.694rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

.bp-risk-badge.prob-low {
  background: rgba(52,211,153,0.10);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.18);
}

.bp-risk-badge.prob-med {
  background: rgba(248,191,69,0.10);
  color: #F8BF45;
  border: 1px solid rgba(248,191,69,0.18);
}

.bp-risk-badge.prob-high {
  background: rgba(248,113,113,0.10);
  color: #F87171;
  border: 1px solid rgba(248,113,113,0.18);
}

.bp-risk-badge.impact-low {
  background: rgba(52,211,153,0.08);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.18);
}

/* Green left border for low impact */
.bp-risk-card:has(.impact-low)::before {
  background: #34D399;
}

.bp-risk-badge.impact-med {
  background: rgba(251,146,60,0.10);
  color: #FB923C;
  border: 1px solid rgba(251,146,60,0.18);
}

/* Orange left border for medium impact */
.bp-risk-card:has(.impact-med)::before {
  background: #FB923C;
}

.bp-risk-badge.impact-high {
  background: rgba(248,113,113,0.10);
  color: #F87171;
  border: 1px solid rgba(248,113,113,0.18);
}

/* Red left border for high impact */
.bp-risk-card:has(.impact-high)::before {
  background: #F87171;
}

/* --- City Vision --- */
.bp-cities {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.bp-city {
  text-align: center;
  position: relative;
  padding: 0 1.25rem;
}

.bp-city::after {
  content: '';
  position: absolute;
  top: 12px;
  right: -2px;
  width: 28px;
  height: 2px;
  background: rgba(224,82,122,0.2);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(224,82,122,0.3) 0,
    rgba(224,82,122,0.3) 4px,
    transparent 4px,
    transparent 8px
  );
}

.bp-city:last-child::after {
  display: none;
}

.bp-city-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(224,82,122,0.10);
  border: 2px solid rgba(224,82,122,0.25);
  margin: 0 auto 0.5rem;
  transition: all var(--t-slow);
}

.bp-city.active .bp-city-dot {
  background: #E0527A;
  border-color: #E0527A;
  box-shadow: 0 0 16px rgba(224,82,122,0.4), 0 0 32px rgba(224,82,122,0.15);
  animation: city-pulse 2.5s ease-in-out infinite;
}

@keyframes city-pulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(224,82,122,0.4), 0 0 32px rgba(224,82,122,0.15);
  }
  50% {
    box-shadow: 0 0 20px rgba(224,82,122,0.5), 0 0 48px rgba(224,82,122,0.2), 0 0 0 6px rgba(224,82,122,0.1);
  }
}

.bp-city-name {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.694rem;
  font-weight: 600;
  color: #8A839E;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color var(--t);
}

.bp-city.active .bp-city-name {
  color: #E0527A;
}

/* --- Closing Quote --- */
.bp-closing {
  text-align: center;
  margin-top: 2.5rem;
  padding: 2.5rem 2rem;
  background: rgba(22,22,44,0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}

.bp-closing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,82,122,0.15), transparent);
}

.bp-closing::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(224,82,122,0.06), transparent 70%);
  pointer-events: none;
}

.bp-closing p {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #EDE9F6;
  font-style: italic;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* --- Footer --- */
.bp-footer {
  text-align: center;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 3rem;
}

.bp-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(224,82,122,0.08);
  color: #E0527A;
  border: 1px solid rgba(224,82,122,0.20);
  border-radius: 99px;
  padding: 0.6rem 1.5rem;
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 0 16px rgba(224,82,122,0.06);
}

.bp-print-btn:hover {
  background: rgba(224,82,122,0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(224,82,122,0.15);
  border-color: rgba(224,82,122,0.35);
}

.bp-footer-copy {
  font-size: 0.694rem;
  color: #8A839E;
  margin-top: 1.25rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* --- Subtitle / Subheading --- */
.bp-subtitle {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.875rem;
  color: #8A839E;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* --- Section label --- */
.bp-section-label {
  font-family: 'DM Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  font-size: 0.694rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8A839E;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
  position: relative;
  padding-left: 12px;
}

.bp-section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  #invite-content {
    padding: 2rem 1rem 3rem;
  }

  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.125rem; }

  .bp-header .brand {
    font-size: 2rem;
  }

  .bp-risks {
    grid-template-columns: 1fr;
  }

  .bp-flow {
    flex-direction: column;
  }

  .bp-flow-arrow {
    transform: rotate(90deg);
  }

  .bp-flow-box {
    max-width: 100%;
  }

  .bp-org-row {
    flex-direction: column;
    align-items: center;
  }

  .bp-cities {
    gap: 0.25rem;
  }

  .bp-city {
    padding: 0 0.75rem;
  }

  .bp-city::after {
    width: 16px;
  }

  .bp-table-wrap table {
    font-size: 0.778rem;
  }

  .bp-table-wrap thead th,
  .bp-table-wrap tbody td {
    padding: 0.6rem 0.65rem;
  }

  /* Slider tables on mobile */
  .bp-section > div[style*="overflow-x"] table {
    font-size: var(--fs-sm);
  }

  .bp-section > div[style*="overflow-x"] table thead th,
  .bp-section > div[style*="overflow-x"] table tbody td {
    padding: 0.5rem 0.6rem;
  }

  .glass-card table {
    font-size: var(--fs-sm);
  }

  /* Risk card mitigation always visible on mobile (no hover) */
  .bp-risk-card .mitigation {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
  }
}

/* --- Anti-fuite CSS --- */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* --- Print blocked --- */
@media print {
  body {
    display: none !important;
  }

  body::after {
    content: 'Document confidentiel — Impression non autorisee';
    display: block !important;
    font-size: 24pt;
    text-align: center;
    padding: 4rem;
    color: #E0527A;
  }

  body::before {
    display: none !important;
  }

  h1, h2, h3, h4, strong {
    color: #1a1a1a !important;
  }

  p, td, .mitigation, .bp-note, .org-desc, .detail,
  .bp-timeline-item p, .bp-subtitle, .bp-section-label {
    color: #333 !important;
  }

  .glass-card, .bp-table-wrap, .bp-flow-box, .bp-org-card,
  .bp-risk-card, .bp-closing {
    background: #f8f8f8 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: #ddd !important;
    box-shadow: none !important;
  }

  .bp-table-wrap thead th {
    background: #eee !important;
    color: #555 !important;
  }

  .bp-table-wrap tbody td {
    color: #333 !important;
    border-color: #e0e0e0 !important;
  }

  .bp-table-wrap tbody tr.row-total td {
    background: #f0f0f0 !important;
    color: #1a1a1a !important;
  }

  .bp-table-wrap.gold-accent {
    border-color: #c9a030 !important;
  }

  .bp-table-wrap.gold-accent thead th {
    color: #8a6b1a !important;
  }

  .bp-table-wrap.gold-accent tbody tr.row-total td {
    color: #8a6b1a !important;
  }

  .bp-badge-confidential {
    color: #E0527A !important;
    border-color: #E0527A !important;
    background: rgba(224,82,122,0.08) !important;
  }

  .bp-timeline::before {
    background: #ccc !important;
  }

  .bp-timeline-item::before {
    background: #E0527A !important;
    border-color: #fff !important;
    box-shadow: 0 0 0 2px #E0527A !important;
  }

  .timeline-date {
    color: #E0527A !important;
  }

  .bp-risk-badge {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .bp-city-dot {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .bp-city.active .bp-city-dot {
    background: #E0527A !important;
  }

  .bp-print-btn {
    display: none !important;
  }

  #invite-gate {
    display: none !important;
  }

  #invite-content {
    display: block !important;
  }

  .bp-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .bp-section > h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .bp-table-wrap {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .glass-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .bp-note {
    background: #fdf8e8 !important;
    border-color: #c9a030 !important;
    color: #333 !important;
  }

  .bp-note strong {
    color: #8a6b1a !important;
  }

  .bp-footer {
    border-color: #ddd !important;
  }

  .bp-footer-copy {
    color: #666 !important;
  }

  .bp-section > h2::after {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .bp-org-card.founder {
    border-color: #E0527A !important;
  }

  .org-role {
    color: #E0527A !important;
  }

  .glass-card h4 {
    color: #c0365e !important;
  }

  .bp-flow-arrow {
    color: #c0365e !important;
  }

  .bp-closing p {
    color: #1a1a1a !important;
  }

  /* Slider tables for print */
  .bp-section > div[style*="overflow-x"] {
    overflow: visible !important;
    background: #f8f8f8 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: #ddd !important;
  }

  .bp-section > div[style*="overflow-x"]::after {
    display: none !important;
  }

  .bp-section > div[style*="overflow-x"] table {
    min-width: 0 !important;
    font-size: 8pt;
  }

  .bp-section > div[style*="overflow-x"] table thead th {
    background: #eee !important;
    color: #555 !important;
    border-color: #ddd !important;
  }

  .bp-section > div[style*="overflow-x"] table tbody td {
    color: #333 !important;
    border-color: #e0e0e0 !important;
  }

  .bp-section > div[style*="overflow-x"] table tbody td[style*="sticky"] {
    background: #f0f0f0 !important;
    position: static !important;
  }

  .bp-section > div[style*="overflow-x"] table thead th[style*="sticky"] {
    background: #eee !important;
    position: static !important;
  }

  .glass-card table thead th {
    color: #555 !important;
    border-color: #ddd !important;
  }

  .glass-card table tbody td {
    color: #333 !important;
  }

  /* Kill all animations for print */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .bp-risk-card .mitigation {
    max-height: 200px !important;
    opacity: 1 !important;
    margin-top: 0.75rem !important;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bp-risk-card .mitigation {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
  }
}