/* ==========================================================================
   MEXEO — INSTAGRAM CREATIVE STUDIO
   Canvas Art Direction & Modular Design System (1080px Native Resolution)
   Inspired by the craft standards of Linear, Stripe, Apple, Adobe & Pentagram
   Strictly anchored in MEXEO's official brand identity (https://mexeo.re/)
   ========================================================================== */

:root {
  /* Official MEXEO Brand Palette (Extracted from mexeo.re & logo.png) */
  --mx-crimson: #B20000;
  --mx-red-signal: #DC3545;
  --mx-spark: #FFCD00;
  --mx-obsidian: #080A10;
  --mx-carbon: #0E111B;
  --mx-slate-dark: #1C2035;
  --mx-deep-blue: #00166B;
  --mx-cobalt: #124D82;
  --mx-pearl: #F1F3FA;
  --mx-paper: #FFFFFF;
  --mx-muted: #555B6E;
}

.mx-canvas {
  position: relative;
  width: 1080px;
  height: 1350px;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--canvas-font, 'Plus Jakarta Sans', 'Inter', sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  user-select: none;

  /* Dynamic Accent Defaults (overridable per template) */
  --accent: #B20000;
  --accent-bright: #E52535;
  --accent-soft: rgba(178, 0, 0, 0.16);
  --accent-glow: rgba(220, 53, 69, 0.28);
  --accent-secondary: #124D82;
  --fmt-scale: 1;
}

.mx-canvas *,
.mx-canvas *::before,
.mx-canvas *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   1. INSTAGRAM MANDATORY FORMATS (Section 5)
   ========================================================================== */

/* Format A & C: Publication 4:5 & Carrousel (1080 × 1350 px) */
.mx-canvas.fmt-post-4-5,
.mx-canvas.fmt-carousel {
  width: 1080px;
  height: 1350px;
  padding: 72px 76px;
  --fmt-scale: 1;
}

/* Format B: Publication Carrée 1:1 (1080 × 1080 px) */
.mx-canvas.fmt-post-1-1 {
  width: 1080px;
  height: 1080px;
  padding: 58px 68px;
  --fmt-scale: 0.86;
}

/* Format D: Story Instagram 9:16 (1080 × 1920 px)
   Respects top Instagram Story header (220px) & bottom reply/sticker zone (270px) */
.mx-canvas.fmt-story {
  width: 1080px;
  height: 1920px;
  padding: 228px 78px 276px 78px;
  --fmt-scale: 1.05;
}

/* Format E: Couverture de Reel 9:16 (1080 × 1920 px)
   Central composition engineered to stay 100% legible inside the 1:1 (y:420..1500)
   and 4:5 (y:285..1635) Instagram profile grid crop! */
.mx-canvas.fmt-reel-cover {
  width: 1080px;
  height: 1920px;
  padding: 446px 78px 446px 78px;
  --fmt-scale: 0.90;
}

/* ==========================================================================
   2. SIX MODULAR VISUAL STYLES (Section 7: Styles A -> F)
   ========================================================================== */

/* STYLE A : DARK PREMIUM */
.mx-canvas.style-a {
  background-color: #080A10;
  color: #F8FAFC;
  --fg-primary: #FFFFFF;
  --fg-secondary: rgba(241, 243, 250, 0.72);
  --fg-muted: rgba(241, 243, 250, 0.46);
  --surface-card: linear-gradient(165deg, rgba(28, 33, 54, 0.78) 0%, rgba(13, 16, 26, 0.92) 100%);
  --surface-elevated: rgba(255, 255, 255, 0.055);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --grid-line: rgba(255, 255, 255, 0.038);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-fg: #F1F3FA;
  --cta-bg: #FFFFFF;
  --cta-fg: #080A10;
  --is-light: 0;
}

/* STYLE B : LIGHT EDITORIAL */
.mx-canvas.style-b {
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F3FA 100%);
  color: #090B12;
  --fg-primary: #090B12;
  --fg-secondary: #3C4257;
  --fg-muted: #697089;
  --surface-card: linear-gradient(180deg, #FFFFFF 0%, #F8F9FD 100%);
  --surface-elevated: rgba(9, 11, 18, 0.035);
  --border-subtle: rgba(9, 11, 18, 0.10);
  --border-strong: rgba(9, 11, 18, 0.22);
  --grid-line: rgba(9, 11, 18, 0.045);
  --badge-bg: rgba(9, 11, 18, 0.05);
  --badge-fg: #090B12;
  --cta-bg: #090B12;
  --cta-fg: #FFFFFF;
  --is-light: 1;
}

/* STYLE C : CREATIVE GRADIENT */
.mx-canvas.style-c {
  background:
    radial-gradient(110% 85% at 92% 10%, var(--accent-glow) 0%, transparent 58%),
    radial-gradient(95% 80% at 8% 92%, rgba(18, 77, 130, 0.48) 0%, transparent 62%),
    radial-gradient(75% 65% at 55% 48%, rgba(0, 22, 107, 0.42) 0%, transparent 70%),
    linear-gradient(145deg, #070911 0%, #10162B 52%, #190B16 100%);
  color: #FFFFFF;
  --fg-primary: #FFFFFF;
  --fg-secondary: rgba(241, 245, 255, 0.80);
  --fg-muted: rgba(241, 245, 255, 0.52);
  --surface-card: linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, rgba(16, 21, 38, 0.78) 100%);
  --surface-elevated: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.28);
  --grid-line: rgba(255, 255, 255, 0.04);
  --badge-bg: rgba(255, 255, 255, 0.10);
  --badge-fg: #FFFFFF;
  --cta-bg: #FFFFFF;
  --cta-fg: #080A10;
  --is-light: 0;
}

/* STYLE D : DIGITAL PRODUCT */
.mx-canvas.style-d {
  background:
    radial-gradient(85% 60% at 50% 72%, rgba(18, 77, 130, 0.25) 0%, transparent 68%),
    radial-gradient(60% 45% at 82% 18%, var(--accent-soft) 0%, transparent 65%),
    linear-gradient(180deg, #0A0D16 0%, #121728 100%);
  color: #F8FAFC;
  --fg-primary: #FFFFFF;
  --fg-secondary: rgba(226, 232, 245, 0.76);
  --fg-muted: rgba(203, 213, 225, 0.48);
  --surface-card: linear-gradient(180deg, rgba(24, 30, 49, 0.92) 0%, rgba(13, 17, 29, 0.96) 100%);
  --surface-elevated: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.22);
  --grid-line: rgba(255, 255, 255, 0.05);
  --badge-bg: rgba(18, 77, 130, 0.24);
  --badge-fg: #E2EEFF;
  --cta-bg: var(--accent-bright);
  --cta-fg: #FFFFFF;
  --is-light: 0;
}

/* STYLE E : TYPOGRAPHIC IMPACT */
.mx-canvas.style-e {
  background:
    radial-gradient(90% 65% at 100% 0%, var(--accent-glow) 0%, transparent 55%),
    linear-gradient(165deg, #06070B 0%, #0E1018 65%, #1A080C 100%);
  color: #FFFFFF;
  --fg-primary: #FFFFFF;
  --fg-secondary: rgba(241, 243, 250, 0.78);
  --fg-muted: rgba(241, 243, 250, 0.48);
  --surface-card: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
  --surface-elevated: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.28);
  --grid-line: rgba(255, 255, 255, 0.035);
  --badge-bg: var(--accent);
  --badge-fg: #FFFFFF;
  --cta-bg: #FFFFFF;
  --cta-fg: #07080C;
  --is-light: 0;
}

/* STYLE F : CASE STUDY */
.mx-canvas.style-f {
  background:
    radial-gradient(90% 55% at 50% 100%, rgba(28, 32, 53, 0.95) 0%, transparent 75%),
    linear-gradient(180deg, #0D101A 0%, #151A2C 100%);
  color: #FFFFFF;
  --fg-primary: #FFFFFF;
  --fg-secondary: rgba(235, 239, 250, 0.76);
  --fg-muted: rgba(235, 239, 250, 0.48);
  --surface-card: linear-gradient(180deg, rgba(28, 34, 56, 0.88) 0%, rgba(15, 18, 30, 0.95) 100%);
  --surface-elevated: rgba(255, 255, 255, 0.065);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --grid-line: rgba(255, 255, 255, 0.036);
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-fg: #FFFFFF;
  --cta-bg: #FFFFFF;
  --cta-fg: #090B12;
  --is-light: 0;
}

/* ==========================================================================
   3. ARCHITECTURAL ATMOSPHERE, GRIDS & MICRO-DETAILS
   ========================================================================== */

.mx-bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mx-arch-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 108px 108px;
  mask-image: radial-gradient(ellipse 88% 82% at 50% 45%, #000 35%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 45%, #000 35%, transparent 95%);
}

.mx-canvas.style-d .mx-arch-grid {
  background-image: radial-gradient(var(--border-subtle) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
}

.mx-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.65;
}

.mx-ambient-orb.orb-1 {
  width: 620px;
  height: 620px;
  top: -190px;
  right: -150px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.mx-ambient-orb.orb-2 {
  width: 560px;
  height: 560px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(18, 77, 130, 0.28) 0%, transparent 72%);
}

.mx-canvas.style-b .mx-ambient-orb.orb-1 {
  opacity: 0.35;
  background: radial-gradient(circle, rgba(178, 0, 0, 0.11) 0%, transparent 70%);
}

.mx-canvas.style-b .mx-ambient-orb.orb-2 {
  opacity: 0.35;
  background: radial-gradient(circle, rgba(18, 77, 130, 0.10) 0%, transparent 70%);
}

/* Corner Editorial Crosshairs (+) */
.mx-crosshair {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0.32;
  pointer-events: none;
}
.mx-crosshair::before,
.mx-crosshair::after {
  content: '';
  position: absolute;
  background: var(--fg-primary);
}
.mx-crosshair::before { top: 8px; left: 0; width: 18px; height: 1.5px; }
.mx-crosshair::after  { top: 0; left: 8px; width: 1.5px; height: 18px; }
.mx-crosshair.ch-tl { top: 36px; left: 36px; }
.mx-crosshair.ch-tr { top: 36px; right: 36px; }
.mx-crosshair.ch-bl { bottom: 36px; left: 36px; }
.mx-crosshair.ch-br { bottom: 36px; right: 36px; }

/* Reel Cover Top & Bottom Atmospheric Bleed Guides (visible subtly as design rails) */
.mx-reel-bleed-rail {
  position: absolute;
  left: 78px;
  right: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0.55;
  pointer-events: none;
}
.mx-reel-bleed-rail.rail-top { top: 160px; }
.mx-reel-bleed-rail.rail-bottom { bottom: 160px; }

/* Giant Watermark Glyph for Style E / Editorial Depth */
.mx-watermark-glyph {
  position: absolute;
  right: -24px;
  bottom: 90px;
  font-size: 360px;
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--fg-primary);
  opacity: 0.032;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   4. HEADER BAR & UNTOUCHED OFFICIAL MEXEO LOGO CAPSULE (Section 4)
   ========================================================================== */

.mx-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  flex-shrink: 0;
}

/* Official Logo Container:
   Never alters, stretches, or recolors logo.png!
   On dark styles, places logo.png inside a crisp white architectural capsule
   so the black mechanical gear, black X-stripes, and black tagline remain 100% legible. */
.mx-logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.mx-canvas.style-b .mx-logo-plate {
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  box-shadow: none;
}

.mx-logo-plate img {
  display: block;
  height: calc(44px * var(--fmt-scale));
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.mx-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mx-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--border-subtle);
  color: var(--badge-fg);
  font-size: calc(17px * var(--fmt-scale));
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.mx-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-bright);
}

.mx-slide-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  color: var(--fg-primary);
}

/* ==========================================================================
   5. EDITORIAL COPY & MONUMENTAL TYPOGRAPHY (Section 8 & 9)
   ========================================================================== */

.mx-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(34px * var(--fmt-scale));
  width: 100%;
  min-height: 0;
  margin: calc(20px * var(--fmt-scale)) 0;
}

.mx-body.layout-top-heavy {
  justify-content: space-between;
}

.mx-copy-block {
  display: flex;
  flex-direction: column;
  gap: calc(18px * var(--fmt-scale));
  max-width: 928px;
}

.mx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: calc(18px * var(--fmt-scale));
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.mx-canvas.style-b .mx-eyebrow {
  color: var(--accent);
}

.mx-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
}

.mx-headline {
  margin: 0;
  font-size: calc(var(--title-size, 68px) * var(--fmt-scale));
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.036em;
  color: var(--fg-primary);
  text-wrap: balance;
}

.mx-canvas.style-e .mx-headline {
  font-size: calc(var(--title-size, 80px) * var(--fmt-scale));
  line-height: 1.01;
  letter-spacing: -0.042em;
}

.mx-headline .mx-hl-accent {
  color: var(--accent-bright);
}

.mx-canvas.style-b .mx-headline .mx-hl-accent {
  color: var(--accent);
}

.mx-canvas.style-a .mx-headline .mx-hl-accent,
.mx-canvas.style-c .mx-headline .mx-hl-accent {
  background: linear-gradient(125deg, #FFFFFF 0%, #FF6B78 45%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mx-subtitle {
  margin: 0;
  font-size: calc(25px * var(--fmt-scale));
  font-weight: 400;
  line-height: 1.44;
  letter-spacing: -0.01em;
  color: var(--fg-secondary);
  max-width: 840px;
}

/* ==========================================================================
   6. DOMINANT GRAPHIC MODULES & REALISTIC UI MOCKUPS
   ========================================================================== */

.mx-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- MODULE 1: macOS / Pro Browser Window Showcase --- */
.mx-browser-wrap {
  position: relative;
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(180deg, #161B2E 0%, #0C0F1A 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.mx-canvas.style-b .mx-browser-wrap {
  background: #FFFFFF;
  border: 1px solid rgba(9, 11, 18, 0.12);
  box-shadow:
    0 28px 64px rgba(12, 18, 38, 0.14),
    0 4px 16px rgba(12, 18, 38, 0.06);
}

.mx-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mx-canvas.style-b .mx-browser-bar {
  background: #F5F7FC;
  border-bottom: 1px solid rgba(9, 11, 18, 0.08);
}

.mx-dots {
  display: flex;
  gap: 8px;
}
.mx-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mx-dots span:nth-child(1) { background: #FF5F57; }
.mx-dots span:nth-child(2) { background: #FEBC2E; }
.mx-dots span:nth-child(3) { background: #28C840; }

.mx-url-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 22px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.mx-canvas.style-b .mx-url-pill {
  background: #FFFFFF;
  border: 1px solid rgba(9, 11, 18, 0.10);
  color: #1C2035;
}

.mx-browser-screen {
  position: relative;
  padding: calc(28px * var(--fmt-scale));
  min-height: calc(330px * var(--fmt-scale));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(80% 90% at 85% 15%, rgba(178, 0, 0, 0.20) 0%, transparent 60%),
    radial-gradient(70% 80% at 15% 90%, rgba(18, 77, 130, 0.24) 0%, transparent 65%),
    #0D101B;
  color: #FFFFFF;
}

.mx-browser-custom-img {
  width: 100%;
  height: calc(340px * var(--fmt-scale));
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Floating Telemetry Badges */
.mx-float-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: calc(18px * var(--fmt-scale));
}

.mx-metric-chip {
  flex: 1;
  min-width: 180px;
  padding: calc(16px * var(--fmt-scale)) calc(20px * var(--fmt-scale));
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.mx-metric-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: calc(28px * var(--fmt-scale));
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1;
}

.mx-metric-lbl {
  font-size: calc(16px * var(--fmt-scale));
  color: var(--fg-secondary);
  line-height: 1.25;
}

/* --- MODULE 2: Custom Business SaaS Dashboard --- */
.mx-saas-frame {
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(175deg, #14192B 0%, #0B0E18 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.42);
  padding: calc(24px * var(--fmt-scale));
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  color: #FFFFFF;
}

.mx-saas-sidebar {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mx-saas-nav-item {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mx-saas-nav-item.active {
  background: linear-gradient(90deg, rgba(178, 0, 0, 0.32), rgba(178, 0, 0, 0.08));
  border: 1px solid rgba(220, 53, 69, 0.45);
  color: #FFFFFF;
  font-weight: 600;
}

.mx-saas-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mx-saas-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mx-saas-kpi {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}

/* --- MODULE 3: Bento Grid Architecture --- */
.mx-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(18px * var(--fmt-scale));
  width: 100%;
}

.mx-bento-card {
  position: relative;
  padding: calc(26px * var(--fmt-scale));
  border-radius: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(12px * var(--fmt-scale));
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
}

.mx-bento-card.featured {
  border-color: var(--accent-bright);
  box-shadow: 0 16px 40px var(--accent-soft);
}

.mx-bento-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: calc(16px * var(--fmt-scale));
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.08em;
}
.mx-canvas.style-b .mx-bento-num { color: var(--accent); }

.mx-bento-title {
  font-size: calc(24px * var(--fmt-scale));
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mx-bento-desc {
  font-size: calc(18px * var(--fmt-scale));
  color: var(--fg-secondary);
  line-height: 1.4;
}

/* --- MODULE 4: Pentagram Editorial Numbered Pillars --- */
.mx-editorial-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-top: 1.5px solid var(--border-strong);
}

.mx-editorial-row {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: calc(22px * var(--fmt-scale)) 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.mx-ed-idx {
  font-family: 'JetBrains Mono', monospace;
  font-size: calc(20px * var(--fmt-scale));
  font-weight: 600;
  color: var(--accent-bright);
}
.mx-canvas.style-b .mx-ed-idx { color: var(--accent); }

.mx-ed-main strong {
  display: block;
  font-size: calc(25px * var(--fmt-scale));
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.mx-ed-main span {
  display: block;
  font-size: calc(19px * var(--fmt-scale));
  color: var(--fg-secondary);
  line-height: 1.35;
}

.mx-ed-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
}

/* --- MODULE 5: Avant / Après Architectural Split --- */
.mx-split-compare {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  width: 100%;
  align-items: stretch;
}

.mx-compare-pane {
  border-radius: 22px;
  padding: calc(26px * var(--fmt-scale));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.mx-compare-pane.pane-before {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-strong);
  opacity: 0.84;
}
.mx-canvas.style-b .mx-compare-pane.pane-before {
  background: rgba(9, 11, 18, 0.035);
}

.mx-compare-pane.pane-after {
  background: linear-gradient(165deg, rgba(28, 35, 60, 0.96) 0%, rgba(15, 18, 32, 0.98) 100%);
  border: 1.5px solid var(--accent-bright);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35), 0 0 36px var(--accent-soft);
  color: #FFFFFF;
}

/* --- MODULE 6: Smartphone Titanium + Desktop Sync --- */
.mx-mobile-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
}

.mx-phone-frame {
  width: calc(300px * var(--fmt-scale));
  border-radius: 40px;
  padding: 12px;
  background: linear-gradient(145deg, #3A4158 0%, #151824 50%, #2B3145 100%);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, 0.50),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.mx-phone-screen {
  border-radius: 30px;
  background: linear-gradient(180deg, #101526 0%, #090C15 100%);
  padding: 18px 18px 22px 18px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(430px * var(--fmt-scale));
  position: relative;
  overflow: hidden;
}

.mx-dynamic-island {
  width: 82px;
  height: 20px;
  border-radius: 99px;
  background: #000000;
  margin: 0 auto 6px auto;
}

/* --- MODULE 7: Case Study Client Showcase --- */
.mx-client-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.mx-client-id {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mx-client-avatar {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: #FFFFFF;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   7. FOOTER SIGNATURE, CTA & LEGAL COMPLIANCE NOTE
   ========================================================================== */

.mx-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  flex-shrink: 0;
}

.mx-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: calc(22px * var(--fmt-scale));
  border-top: 1px solid var(--border-subtle);
}

.mx-brand-sig {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mx-sig-quote {
  font-size: calc(19px * var(--fmt-scale));
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.mx-sig-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: calc(15px * var(--fmt-scale));
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

.mx-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: calc(16px * var(--fmt-scale)) calc(28px * var(--fmt-scale));
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-size: calc(19px * var(--fmt-scale));
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.mx-legal-note {
  font-size: 15px;
  line-height: 1.35;
  color: var(--fg-muted);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border-left: 3px solid var(--accent-bright);
}

/* Carousel Progress Thread Bar */
.mx-carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 100%);
  z-index: 5;
}

/* ==========================================================================
   8. SAFE ZONE OVERLAY GUIDES (Toggled in Studio, Excluded in PNG Export)
   ========================================================================== */

.mx-safezone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.mx-sz-margin {
  position: absolute;
  border: 2px dashed rgba(0, 229, 255, 0.65);
}

.mx-sz-label {
  position: absolute;
  top: 8px;
  left: 12px;
  background: rgba(0, 229, 255, 0.9);
  color: #041018;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
}

.mx-sz-danger-zone {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 70, 90, 0.16),
    rgba(255, 70, 90, 0.16) 12px,
    rgba(255, 70, 90, 0.06) 12px,
    rgba(255, 70, 90, 0.06) 24px
  );
  border-bottom: 2px dashed rgba(255, 90, 110, 0.75);
  border-top: 2px dashed rgba(255, 90, 110, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #FF8A98;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mx-sz-reel-grid-crop {
  position: absolute;
  left: 0;
  right: 0;
  top: 420px;
  height: 1080px;
  border-top: 3px solid #22D3EE;
  border-bottom: 3px solid #22D3EE;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
}
