/* ============================================================
   RoutineLab — feuille de style
   A "kid" of RacontR: same family (slate-indigo lineage, masthead
   type duo, the rail, flat radii, one-voice colour), evolved more
   electric + dimensional. Dark hero/CTA world ↔ light editorial body.
   ============================================================ */

:root {
  /* — One voice: electric indigo (RacontR slate-indigo, evolved) — */
  --indigo:        #4b57e0;
  --indigo-bright: #7e8bff;   /* glow / hover on dark */
  --indigo-deep:   #3a44b8;   /* pressed */
  --indigo-soft:   #c9cdf4;   /* accent on dark, muted */

  /* — Light world (RacontR lineage) — */
  --paper:    #ECECEA;
  --paper-2:  #E4E5EC;
  --surface:  #FFFFFF;
  --ink:      #161726;        /* indigo-tinted ink (the kid) */
  --ink-soft: #2B2D44;
  --muted:    #565872;        /* AA on paper */
  --line:     #C9CAD8;
  --line-soft: rgba(86, 88, 114, 0.22);

  /* — Dark world (hero · CTA · footer · panel) — */
  --dark:     #0C0D1A;
  --dark-2:   #12132A;
  --dark-3:   #181a38;
  --dark-ink: #F4F5FC;
  --dark-muted: #9FA4C6;      /* AA on --dark */
  --dark-line: rgba(255, 255, 255, 0.12);
  --dark-line-2: rgba(255, 255, 255, 0.07);

  /* — Type — */
  --font-display: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-thin:    'Montserrat', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --fs-display: clamp(2.5rem, 5vw + 1rem, 5.5rem);
  --fs-h2:      clamp(1.7rem, 2.4vw + 1rem, 2.9rem);
  --fs-h3:      clamp(1.2rem, 0.8vw + 1rem, 1.5rem);
  --fs-lead:    clamp(1.05rem, 0.6vw + 0.95rem, 1.3rem);
  --fs-body:    1.0625rem;
  --fs-small:   0.875rem;
  --fs-kicker:  0.76rem;

  /* — Spacing — */
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  /* — Layout — */
  --width-max:  1240px;
  --width-text: 60ch;
  --gutter:     clamp(1.25rem, 4vw, 3rem);

  /* — Radii (flat, a hair softer than the parent) — */
  --r-sm:   4px;
  --r-md:   7px;
  --r-lg:   10px;
  --r-pill: 999px;

  /* — Shadows (restrained) — */
  --shadow-sm: 0 2px 10px rgba(22, 23, 38, 0.05);
  --shadow-md: 0 10px 30px rgba(22, 23, 38, 0.08);
  --glow:      0 0 0 1px rgba(126, 139, 255, 0.4), 0 12px 40px rgba(75, 87, 224, 0.35);

  /* — Motion — */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 280ms var(--ease);
  --t-slow: 520ms var(--ease);

  /* — Z-index scale — */
  --z-canvas: 0;
  --z-base: 1;
  --z-nav: 50;
  --z-menu: 60;
  --z-skip: 200;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 { line-height: 1.1; text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }

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

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.hero :focus-visible, .cta-section :focus-visible, .site-footer :focus-visible,
.panel :focus-visible { outline-color: var(--indigo-bright); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.skip-link {
  position: fixed; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: var(--z-skip);
  background: var(--indigo); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-size: var(--fs-small); font-weight: 600;
  transition: transform var(--t-base);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ============================================================
   TYPE UTILITIES
   ============================================================ */
.h2 { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: -0.02em; }
.measure { max-width: 22ch; }
.measure-sm { max-width: 50ch; }

.display-thin {
  display: block;
  font-family: var(--font-thin);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.8rem, 0.6vw + 0.7rem, 1rem);
  color: var(--indigo-soft);
  margin-bottom: var(--space-md);
}
.display-bold {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 1.0;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 54ch;
}
.lead--dim { color: var(--muted); }
.lead--ondark { color: var(--dark-muted); max-width: 56ch; }

.kicker {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  font-weight: 500;
  margin-bottom: var(--space-md);
}
.kicker::before { content: ""; width: 1.6rem; height: 1px; background: var(--indigo); }
.kicker--mono { letter-spacing: 0.06em; }
.kicker--ondark { color: var(--indigo-soft); }
.kicker--ondark::before { background: var(--indigo-soft); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%; max-width: var(--width-max);
  margin-inline: auto; padding-inline: var(--gutter);
}
.container--narrow { max-width: 800px; }

.section { padding-block: var(--section-y); }
.section--paper2 { background: var(--paper-2); }

.section-head { margin-bottom: var(--space-xl); }
.section-head--center { text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head--split {
  display: grid; grid-template-columns: 1fr; gap: var(--space-md);
  align-items: end;
}
.section-head .lead { margin-top: var(--space-md); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.cluster--center { justify-content: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.8rem 1.4rem; border-radius: var(--r-pill);
  border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--t-fast), background var(--t-base), color var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn--sm { padding: 0.55rem 1rem; font-size: var(--fs-small); }

.btn--primary { background: var(--indigo); color: #fff; box-shadow: 0 8px 24px rgba(75, 87, 224, 0.32); }
.btn--primary:hover { background: var(--indigo-deep); box-shadow: 0 12px 32px rgba(75, 87, 224, 0.42); }

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }

.btn--ghost-d { background: rgba(255,255,255,0.04); color: var(--dark-ink); border-color: var(--dark-line); }
.btn--ghost-d:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* ============================================================
   NAV
   ============================================================ */
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  letter-spacing: -0.02em; color: var(--dark-ink);
}
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(150deg, var(--indigo-bright), var(--indigo));
  box-shadow: 0 0 0 1px rgba(126,139,255,0.5), 0 6px 18px rgba(75,87,224,0.5);
  position: relative; flex-shrink: 0;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.9);
}
.brand__sup {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo-soft); align-self: flex-start; margin-top: 0.15rem;
}

.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); min-height: 70px;
  z-index: var(--z-nav);
}
.nav-disclosure { position: relative; }
.nav-disclosure > summary {
  list-style: none; display: inline-flex; align-items: center;
  font-size: var(--fs-small); font-weight: 600; font-family: var(--font-display);
  color: var(--dark-ink);
  padding: 0.7rem 1.05rem; border: 1px solid var(--dark-line);
  border-radius: var(--r-pill); background: rgba(255,255,255,0.04);
}
.nav-disclosure > summary::-webkit-details-marker { display: none; }
.nav-disclosure > summary .x { display: none; }
.nav-disclosure[open] > summary .burger { display: none; }
.nav-disclosure[open] > summary .x { display: inline; }

.nav-menu {
  display: flex; align-items: center; gap: clamp(0.5rem, 1.6vw, 1.9rem);
  font-family: var(--font-display); font-weight: 500; font-size: 0.92rem;
}
.nav-link {
  position: relative; color: var(--dark-muted);
  padding: 0.35rem 0.1rem; transition: color var(--t-fast);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1.5px;
  background: var(--indigo-bright); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base);
}
.nav-link:hover { color: var(--dark-ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-menu .btn--primary { color: #fff; }

/* ============================================================
   HERO (dark · 3D network)
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 8%, #1a1d44 0%, transparent 55%),
    radial-gradient(90% 80% at 12% 100%, #161a40 0%, transparent 60%),
    var(--dark);
  color: var(--dark-ink);
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-canvas); opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(80% 50% at 25% 42%, rgba(12,13,26,0.78) 0%, transparent 70%),
    linear-gradient(180deg, rgba(12,13,26,0.25) 0%, transparent 22%, transparent 72%, var(--dark) 100%);
}
.hero__inner { position: relative; z-index: var(--z-base); }

.hero__grid {
  display: grid; grid-template-columns: 1fr;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(4rem, 10vw, 7rem);
}

/* the rail — family signature, evolved with a glowing node */
.rail { display: none; }
@media (min-width: 880px) {
  .hero__grid {
    grid-template-columns: clamp(70px, 12%, 150px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
  }
  .rail {
    display: flex; flex-direction: column; justify-content: space-between;
    align-items: flex-start; gap: var(--space-lg);
    border-right: 1.5px dotted var(--dark-line);
    padding-right: var(--space-md); min-height: 340px;
  }
  .rail__node {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--indigo-bright);
    box-shadow: 0 0 0 5px rgba(126,139,255,0.16), 0 0 22px var(--indigo-bright);
    animation: railpulse 3s ease-in-out infinite;
  }
  .rail__label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--dark-muted); margin: var(--space-md) 0;
  }
  .rail__status {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--indigo-soft); writing-mode: vertical-rl; transform: rotate(180deg);
  }
  .rail__status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--indigo-bright); box-shadow: 0 0 8px var(--indigo-bright); }
}
@keyframes railpulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

.hero__content { max-width: 760px; }
.hero__title { margin: 0 0 var(--space-lg); }
.hero .lead { color: #D3D6EC; }
.hero .cluster { margin-top: var(--space-xl); }

.hero__trust {
  display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--dark-line-2); padding-top: var(--space-md);
}
.hero__trust li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-small); color: var(--dark-muted);
}
.hero__trust svg { width: 1.05em; height: 1.05em; color: var(--indigo-bright); flex-shrink: 0; }
.hero__trust--center { justify-content: center; border: 0; }

/* ============================================================
   PROBLÈME — editorial 4-up (no slop cards)
   ============================================================ */
.constat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg);
}
.constat { border-top: 2px solid var(--ink); padding-top: var(--space-md); }
.constat__num {
  font-family: var(--font-mono); font-size: var(--fs-small);
  color: var(--indigo); font-weight: 500;
}
.constat h3 { font-family: var(--font-display); font-size: 1.15rem; margin: var(--space-xs) 0 0.4rem; color: var(--ink); }
.constat p { color: var(--muted); font-size: 0.96rem; }

/* ============================================================
   CAPABILITIES — bordered index grid (flat, hairlines)
   ============================================================ */
.capabilities {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface);
}
.capabilities li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: var(--space-md) var(--space-md);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  color: var(--ink); transition: background var(--t-base), color var(--t-fast);
}
.capabilities li:hover { background: var(--paper-2); }
.cap__ico {
  display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: var(--r-sm); background: rgba(75,87,224,0.09); color: var(--indigo);
}
.cap__ico svg { width: 18px; height: 18px; }

/* ============================================================
   EXEMPLES — flat editorial cards (real affordance)
   ============================================================ */
.ex-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--space-md);
}
.ex {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--space-lg);
  border-top: 3px solid var(--indigo);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.ex:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ex__ico {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: var(--r-md); background: rgba(75,87,224,0.1); color: var(--indigo);
  margin-bottom: var(--space-md);
}
.ex__ico svg { width: 22px; height: 22px; }
.ex h3 { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--ink); margin-bottom: 0.5rem; }
.ex p { color: var(--muted); font-size: 0.95rem; }
.ex__stack {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--indigo-deep);
  margin-top: var(--space-md); padding-top: var(--space-sm);
  border-top: 1px solid var(--line-soft);
}
.ex__gain {
  display: flex; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: var(--space-sm);
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
}
.ex__gain svg { width: 1em; height: 1em; color: var(--indigo); flex-shrink: 0; }

/* ============================================================
   MÉTHODE — flat timeline
   ============================================================ */
.method {
  position: relative; max-width: 760px; margin-inline: auto;
  display: flex; flex-direction: column; gap: var(--space-md);
}
.method::before {
  content: ""; position: absolute; left: 27px; top: 16px; bottom: 16px; width: 2px;
  background: linear-gradient(180deg, var(--indigo), var(--line));
}
.method__step { display: flex; gap: var(--space-md); align-items: stretch; position: relative; }
.method__num {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--r-md);
  background: var(--indigo); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  box-shadow: 0 0 0 5px var(--paper-2), 0 8px 22px rgba(75,87,224,0.3);
  position: relative; z-index: 2;
}
.section:not(.section--paper2) .method__num { box-shadow: 0 0 0 5px var(--paper), 0 8px 22px rgba(75,87,224,0.3); }
.method__body {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--space-md) var(--space-lg);
}
.method__body h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin-bottom: 0.35rem; }
.method__body p { color: var(--muted); font-size: 0.96rem; }

/* ============================================================
   OFFRES — flat tiers (featured inverts to dark)
   ============================================================ */
.tiers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md);
  align-items: stretch;
}
.tier {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--space-lg);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tier__name { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); margin-bottom: var(--space-sm); }
.tier__price {
  font-family: var(--font-display); font-weight: 800; font-size: 2rem;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1.1;
}
.tier__price span { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-top: 0.2rem; }
.tier__desc { color: var(--muted); font-size: 0.92rem; margin: var(--space-md) 0 var(--space-md); }
.tier__list { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.tier__list li {
  position: relative; padding-left: 1.4rem; font-size: 0.92rem; color: var(--ink-soft);
}
.tier__list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px;
  border-left: 1.5px solid var(--indigo); border-bottom: 1.5px solid var(--indigo);
  transform: rotate(-45deg);
}
.tier .btn { margin-top: var(--space-lg); width: 100%; }

.tier--featured {
  background: var(--dark); border-color: var(--dark);
  color: var(--dark-ink); box-shadow: var(--glow);
  position: relative; overflow: hidden;
}
.tier--featured .tier__name,
.tier--featured .tier__price { color: var(--dark-ink); }
.tier--featured .tier__price span { color: var(--dark-muted); }
.tier--featured .tier__desc { color: var(--dark-muted); }
.tier--featured .tier__list li { color: #D7DBF2; }
.tier--featured .tier__list li::before { border-color: var(--indigo-bright); }
.tier__badge {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--indigo-soft);
  padding: 0.3rem 0.6rem; border: 1px solid var(--dark-line);
  border-radius: var(--r-pill); margin-bottom: var(--space-md);
}

/* ============================================================
   POURQUOI — text + dark product panel
   ============================================================ */
.why {
  display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: center;
}
.why__list { display: flex; flex-direction: column; gap: 0.85rem; margin-top: var(--space-lg); }
.why__list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 1rem; color: var(--ink-soft); }
.why__list svg { width: 1.15em; height: 1.15em; color: var(--indigo); flex-shrink: 0; margin-top: 0.15rem; }

.panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 80% 0%, #1a1d44 0%, transparent 55%),
    var(--dark);
  border: 1px solid var(--dark-line); border-radius: var(--r-lg);
  padding: var(--space-lg); color: var(--dark-ink);
  box-shadow: 0 24px 60px rgba(12,13,26,0.3);
}
.panel__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); }
.panel__title { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.panel__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--indigo-bright); box-shadow: 0 0 10px var(--indigo-bright); }
.panel__id { font-family: var(--font-mono); font-size: 0.7rem; color: var(--indigo-soft); }
.panel__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xs); }
.metric {
  background: rgba(255,255,255,0.03); border: 1px solid var(--dark-line-2);
  border-radius: var(--r-md); padding: var(--space-md);
}
.metric__val { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; letter-spacing: -0.02em; }
.metric:nth-child(1) .metric__val { color: var(--indigo-bright); }
.metric__lbl { display: block; font-size: 0.8rem; color: var(--dark-muted); margin-top: 0.2rem; }
.panel__log {
  margin-top: var(--space-sm); padding: var(--space-md);
  background: rgba(255,255,255,0.02); border: 1px solid var(--dark-line-2); border-radius: var(--r-md);
}
.panel__logtitle { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-muted); margin-bottom: var(--space-sm); }
.panel__log ul { display: flex; flex-direction: column; gap: 0.55rem; }
.panel__log li { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.8rem; color: #CDD2EC; }
.panel__log time { margin-left: auto; color: var(--dark-muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot--ok { background: var(--indigo-bright); box-shadow: 0 0 8px var(--indigo-bright); }
.dot--run { background: var(--indigo-soft); animation: railpulse 1.4s infinite; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  padding-block: var(--space-md);
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq__ico { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq__ico::before, .faq__ico::after {
  content: ""; position: absolute; background: var(--indigo); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq__ico::before { width: 16px; height: 2px; }
.faq__ico::after { width: 2px; height: 16px; transition: transform var(--t-base); }
.faq details[open] .faq__ico::after { transform: translate(-50%, -50%) scaleY(0); }
.faq p { color: var(--muted); padding-bottom: var(--space-md); max-width: 68ch; }

/* ============================================================
   CTA (dark)
   ============================================================ */
.cta-section {
  position: relative; overflow: hidden; text-align: center;
  padding-block: clamp(5rem, 11vw, 9rem);
  background:
    radial-gradient(110% 80% at 50% 0%, #1a1d44 0%, transparent 55%),
    var(--dark);
  color: var(--dark-ink);
}
.cta__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: var(--z-canvas); opacity: 0; transition: opacity 1.2s ease; }
.cta__canvas.is-ready { opacity: 0.7; }
/* scrim: keeps CTA copy ≥4.5:1 over the animated network */
.cta__veil {
  position: absolute; inset: 0; z-index: var(--z-canvas); pointer-events: none;
  background: radial-gradient(58% 52% at 50% 46%, rgba(12,13,26,0.9) 0%, rgba(12,13,26,0.55) 50%, transparent 78%);
}
.cta__inner { position: relative; z-index: var(--z-base); display: flex; flex-direction: column; align-items: center; }
.cta__inner .kicker { justify-content: center; }
.cta__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw + 1rem, 4rem); letter-spacing: -0.025em; line-height: 1.05; }
.cta-section .lead { margin: var(--space-md) auto 0; }
.cta-section .cluster { margin-top: var(--space-xl); }

/* ============================================================
   FOOTER (dark)
   ============================================================ */
.site-footer { background: var(--dark); color: var(--dark-ink); padding-block: var(--space-2xl) var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: var(--space-xl) var(--space-lg); }
.footer-brand .brand { color: var(--dark-ink); }
.footer-positioning { color: var(--dark-muted); max-width: 32ch; margin-top: var(--space-md); font-size: 0.95rem; }
.footer-lineage { margin-top: var(--space-md); font-size: 0.9rem; color: var(--dark-muted); }
.footer-lineage a { color: var(--indigo-soft); border-bottom: 1px solid rgba(201,205,244,0.4); }
.footer-lineage a:hover { color: #fff; }
.footer-col h3 {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dark-muted); margin-bottom: var(--space-md); font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-col a { display: inline-block; width: fit-content; padding-block: 0.35rem; color: var(--dark-ink); opacity: 0.82; transition: opacity var(--t-fast), color var(--t-fast); }
.footer-col a:hover { opacity: 1; color: var(--indigo-soft); }
.footer-mono { font-family: var(--font-mono); font-size: 0.85rem; }
.footer-mono a { color: var(--indigo-soft); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm);
  margin-top: var(--space-2xl); padding-top: var(--space-md);
  border-top: 1px solid var(--dark-line-2); font-size: var(--fs-small); color: var(--dark-muted);
}

/* ============================================================
   REVEAL (enhances an already-visible default)
   ============================================================ */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--t-slow), transform var(--t-slow); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .constat-grid { grid-template-columns: repeat(2, 1fr); }
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 880px) {
  .section-head--split { grid-template-columns: 1.1fr 0.9fr; }
  .why { grid-template-columns: 1.05fr 0.95fr; }
}

@media (max-width: 880px) {
  /* mobile nav: ul becomes a dropdown panel (sibling of details) */
  .nav-menu {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--dark-2); border: 1px solid var(--dark-line);
    border-radius: var(--r-md); padding: var(--space-2xs);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: none; z-index: var(--z-menu);
  }
  .nav-disclosure[open] ~ .nav-menu { display: flex; }
  .nav-menu .nav-link { padding: 0.8rem 0.75rem; border-radius: var(--r-sm); color: var(--dark-ink); }
  .nav-menu .nav-link::after { display: none; }
  .nav-menu .nav-link:hover { background: rgba(255,255,255,0.06); }
  .nav-menu .btn { margin-top: var(--space-2xs); }
}
@media (min-width: 881px) {
  .nav-disclosure { display: none; }
  .nav-menu { display: flex !important; }
}

@media (max-width: 720px) {
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: 1fr; }
  .tier--featured { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .constat-grid { grid-template-columns: 1fr; }
  .capabilities { grid-template-columns: 1fr; }
  .panel__metrics { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .method__num { width: 48px; height: 48px; font-size: 1.1rem; }
  .method::before { left: 23px; }
}

/* ============================================================
   ELEMENTOR-SPECIFIC OVERRIDES — make Elementor's chrome
   transparent so our design CSS controls the look. The
   container classes (.hero, .section, .cta-section, etc.)
   are placed on Elementor's containers so our rules apply.
   ============================================================ */

/* Elementor's default container resets — let our design classes win */
.elementor-section, .elementor-container, .elementor .e-con {
  width: 100%;
}

/* Make sure Elementor's "boxed" containers don't constrain our full-width sections */
body .elementor .e-con.rl-fullbleed,
body .elementor .e-con.hero,
body .elementor .e-con.cta-section,
body .elementor .e-con.section {
  max-width: 100% !important;
  padding-inline: 0 !important;
}

/* Elementor heading reset — our type system controls everything */
.elementor-widget-heading .elementor-heading-title { margin: 0; line-height: inherit; }

/* Elementor button: kill default styles where our .btn class is applied */
.elementor-button-wrapper { display: inline-block; }
.elementor-button-wrapper > .btn { text-decoration: none; }

/* Elementor toggle widget styled as FAQ */
.faq .elementor-toggle .elementor-toggle-item { border: 0; border-bottom: 1px solid var(--line); }
.faq .elementor-toggle .elementor-tab-title {
  background: transparent !important;
  border: 0 !important;
  padding: var(--space-md) 0 !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink) !important;
}
.faq .elementor-toggle .elementor-tab-title .elementor-toggle-icon { color: var(--indigo); }
.faq .elementor-toggle .elementor-tab-content {
  border: 0 !important;
  padding: 0 0 var(--space-md) !important;
  color: var(--muted);
  max-width: 68ch;
}

/* Elementor icon list cleanup for hero trust pills + footer */
.elementor-icon-list-item a { color: inherit; }

/* Elementor sticky header room (XPRO header is fixed/transparent over hero) */
body { padding-top: 0; }

/* ===== Popup modal (lightweight, no Elementor Pro needed) ===== */
#rl-popup {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(12,13,26,0.78);
  display: none; align-items: center; justify-content: center;
  padding: var(--space-md);
  animation: rl-fade 0.25s ease;
}
#rl-popup.is-open { display: flex; }
#rl-popup .rl-popup__inner {
  position: relative;
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(12,13,26,0.5);
  max-height: 90vh; overflow: auto;
}
#rl-popup .rl-popup__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink);
  transition: background var(--t-fast);
  z-index: 2;
}
#rl-popup .rl-popup__close:hover { background: var(--paper-2); }
@keyframes rl-fade { from { opacity: 0; } to { opacity: 1; } }
body.rl-popup-open { overflow: hidden; }

/* ===== Mega menu (XPRO nav-menu enhancement) ===== */
.rl-mega {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  color: var(--dark-ink);
  padding: var(--space-lg);
}


/* ============================================================
   XPRO HEADER — sticky transparent dark bar over hero
   ============================================================ */
.xpro-theme-builder-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(12,13,26,0.85) 0%, rgba(12,13,26,0.5) 70%, rgba(12,13,26,0) 100%);
  backdrop-filter: blur(0px);
  transition: background 280ms ease, backdrop-filter 280ms ease;
}
.xpro-theme-builder-header.xtb-scrolled {
  background: rgba(12,13,26,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--dark-line-2);
}
.xpro-theme-builder-header .rl-header,
.rl-header { padding-block: 14px; }

/* push the page below the fixed header height — Elementor canvas wrapper */
body:not(.elementor-editor-active) .elementor-section-wrap > .elementor:first-child,
.site-content { padding-top: 0; }

/* Mega menu */
.nav-menu .has-mega { position: relative; }
.nav-menu .has-mega > .rl-mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: min(720px, 92vw);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s linear 220ms;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-lg);
}
.nav-menu .has-mega:hover > .rl-mega,
.nav-menu .has-mega:focus-within > .rl-mega {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.rl-mega__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);
}
.rl-mega__item {
  display: grid; grid-template-columns: 32px 1fr; row-gap: 4px; column-gap: 12px;
  padding: 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.02); border: 1px solid var(--dark-line-2);
  color: var(--dark-ink); transition: background var(--t-fast), border-color var(--t-fast);
}
.rl-mega__item:hover { background: rgba(255,255,255,0.05); border-color: var(--dark-line); }
.rl-mega__ico {
  grid-row: 1 / 3; align-self: start;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-sm); background: rgba(75,87,224,0.16); color: var(--indigo-bright);
  font-size: 16px;
}
.rl-mega__title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--dark-ink); }
.rl-mega__desc  { font-size: 0.82rem; color: var(--dark-muted); }
.rl-mega__video {
  background: rgba(255,255,255,0.02); border: 1px solid var(--dark-line-2);
  border-radius: var(--r-md); overflow: hidden; position: relative; aspect-ratio: 4/3;
  display: grid; place-items: center;
  background-image: radial-gradient(100% 80% at 50% 30%, rgba(126,139,255,0.18), transparent 60%);
}
.rl-mega__video video { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.rl-mega__video-label {
  position: absolute; bottom: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--indigo-soft);
}

/* mobile mega: convert to stacked list */
@media (max-width: 880px) {
  .nav-menu .has-mega > .rl-mega {
    position: static; transform: none; width: auto; opacity: 1; visibility: visible;
    pointer-events: auto; grid-template-columns: 1fr; padding: var(--space-md) 0 0;
    background: transparent; border: 0; box-shadow: none;
  }
  .rl-mega__grid { grid-template-columns: 1fr; }
  .rl-mega__video { display: none; }
}

/* XPRO footer wrapper — ensure it sits flush */
#xpro-theme-builder-footer { background: var(--dark); }

/* hide Astra cruft just in case */
.ast-page-builder-template .entry-header,
.ast-page-builder-template .ast-archive-description,
.ast-page-builder-template .entry-content > .entry-meta,
#primary { padding: 0 !important; }
.ast-page-builder-template .site-content > .ast-container { padding: 0; max-width: 100%; }

/* WPForms styling — match the design */
.wpforms-container .wpforms-form input[type="text"],
.wpforms-container .wpforms-form input[type="email"],
.wpforms-container .wpforms-form textarea {
  font-family: var(--font-body) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-sm) !important;
  padding: 0.7rem 0.9rem !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.wpforms-container .wpforms-form input:focus,
.wpforms-container .wpforms-form textarea:focus {
  border-color: var(--indigo) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(75,87,224,0.15) !important;
}
.wpforms-container .wpforms-form label { font-family: var(--font-body); font-weight: 500; color: var(--ink); }
.wpforms-container .wpforms-form button[type="submit"],
.wpforms-container .wpforms-form input[type="submit"] {
  font-family: var(--font-display) !important; font-weight: 600 !important;
  background: var(--indigo) !important; color: #fff !important;
  border: 0 !important; border-radius: var(--r-pill) !important;
  padding: 0.9rem 1.5rem !important;
  box-shadow: 0 8px 24px rgba(75,87,224,0.32) !important;
  cursor: pointer; transition: transform var(--t-fast), background var(--t-base);
}
.wpforms-container .wpforms-form button[type="submit"]:hover,
.wpforms-container .wpforms-form input[type="submit"]:hover {
  background: var(--indigo-deep) !important;
  transform: translateY(-2px);
}


/* Mega menu placeholder anim (replaces empty video) */
.rl-mega__video-anim {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 45%, rgba(126,139,255,0.18), transparent 70%);
}
.rl-mega__pulse {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(123,139,255,0.6); box-shadow: 0 0 24px rgba(123,139,255,0.6);
  animation: rlMegaPulse 2.4s ease-out infinite;
}
.rl-mega__pulse--2 { animation-delay: 0.8s; }
.rl-mega__pulse--3 { animation-delay: 1.6s; }
@keyframes rlMegaPulse {
  0%   { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rl-mega__pulse { animation: none; opacity: 0.6; }
}

/* ============================================================
   NEWS GRID & CARDS — used on home (.rl-news-grid) + archive
   ============================================================ */
.rl-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.rl-news-archive .rl-news-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.rl-news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  position: relative;
}
.rl-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(12, 13, 26, 0.08);
  border-color: rgba(75, 87, 224, 0.3);
}

.rl-news-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--indigo-deep) 0%, var(--indigo) 60%, var(--indigo-bright) 100%);
  position: relative;
}
.rl-news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}
.rl-news-card:hover .rl-news-card__media img {
  transform: scale(1.04);
}
.rl-news-card__media--placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rl-news-card__media--placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 30% 30%, rgba(255, 255, 255, 0.18), transparent 70%),
              radial-gradient(40% 40% at 80% 70%, rgba(154, 166, 255, 0.25), transparent 70%);
}
.rl-news-card__media--placeholder span { position: relative; z-index: 1; }

.rl-news-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-lg);
  flex: 1;
}

.rl-news-card__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rl-news-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}
.rl-news-card__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--t-base);
}
.rl-news-card__title a:hover { background-size: 100% 1px; }

.rl-news-card__excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.rl-news-card__link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--indigo);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  transition: gap var(--t-fast), color var(--t-fast);
}
.rl-news-card__link::after {
  content: '→';
  transition: transform var(--t-fast);
}
.rl-news-card:hover .rl-news-card__link { gap: 10px; color: var(--indigo-deep); }

.rl-news-empty {
  text-align: center;
  padding: var(--space-xl) 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* Section variant on home: news section gets the paper2 background */
.section--news { /* falls back to .section padding */ }

/* Archive page: single article view */
.rl-news-single {
  max-width: 740px;
  margin: 0 auto;
  padding-block: var(--space-xl);
}
.rl-news-single__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: var(--space-sm);
}
.rl-news-single__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 var(--space-lg);
}
.rl-news-single__content { font-size: 1.05rem; line-height: 1.7; color: var(--ink); }
.rl-news-single__content p { margin: 0 0 1.2em; }
.rl-news-single__content h2 { font-family: var(--font-display); margin: 2em 0 .6em; font-size: 1.5rem; }
.rl-news-single__content h3 { font-family: var(--font-display); margin: 1.6em 0 .5em; font-size: 1.2rem; }
.rl-news-single__back {
  display: inline-block;
  margin-bottom: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
}
.rl-news-single__back:hover { color: var(--indigo); }

/* Responsive */
@media (max-width: 980px) {
  .rl-news-grid { grid-template-columns: repeat(2, 1fr); }
  .rl-news-archive .rl-news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .rl-news-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DARK-MODE TEXT OVERRIDES (Elementor wrapper-aware)
   Forces the design's dark-luminous text colors inside hero
   and CTA sections, beating Elementor's default text color.
   ============================================================ */
.rl-hero,
.rl-hero .elementor-widget-container,
.rl-hero .elementor-widget-text-editor,
.rl-hero .elementor-widget-heading,
.rl-hero p,
.rl-hero h1,
.rl-hero h2,
.rl-hero h3,
.rl-hero .elementor-heading-title {
  color: var(--dark-ink);
}
.rl-hero .hero__title .display-thin { color: var(--dark-muted); }
.rl-hero .hero__title .display-bold { color: var(--dark-ink); }
.rl-hero .lead { color: var(--dark-muted); }
.rl-hero .hero__trust { color: var(--dark-muted); }
.rl-hero .hero__trust li { color: var(--dark-muted); }
.rl-hero .hero__trust svg { stroke: var(--indigo-soft); }
.rl-hero .kicker { color: var(--indigo-soft); }
.rl-hero .rail__label,
.rl-hero .rail__status { color: var(--dark-muted); }

/* Same treatment for the closing CTA dark section */
.rl-cta-section,
.rl-cta-section .elementor-widget-container,
.rl-cta-section .elementor-widget-text-editor,
.rl-cta-section .elementor-widget-heading,
.rl-cta-section p,
.rl-cta-section h1,
.rl-cta-section h2,
.rl-cta-section h3,
.rl-cta-section .elementor-heading-title {
  color: var(--dark-ink);
}
.rl-cta-section .lead,
.rl-cta-section .lead--ondark { color: var(--dark-muted); }
.rl-cta-section .kicker,
.rl-cta-section .kicker--ondark { color: var(--indigo-soft); }
.rl-cta-section .hero__trust li { color: var(--dark-muted); }
.rl-cta-section .hero__trust svg { stroke: var(--indigo-soft); }

/* The mega menu, footer columns and header itself also dark-luminous */
.xpro-theme-builder-header,
.xpro-theme-builder-header .elementor-widget-container,
.xpro-theme-builder-header .elementor-widget-text-editor,
.xpro-theme-builder-header p {
  color: var(--dark-ink);
}
.xpro-theme-builder-header a.nav-link { color: var(--dark-ink); }
.xpro-theme-builder-header a.nav-link:hover { color: var(--indigo-soft); }
.xpro-theme-builder-header .brand { color: var(--dark-ink); }
.xpro-theme-builder-header .brand__sup { color: var(--dark-muted); }
.xpro-theme-builder-header .rl-mega { color: var(--dark-ink); }
.xpro-theme-builder-header .rl-mega,
.xpro-theme-builder-header .rl-mega__item {
  background-color: rgba(12, 13, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: var(--space-md);
  border-radius: var(--r-md);
  border: 1px solid var(--dark-line);
}

#xpro-theme-builder-footer,
#xpro-theme-builder-footer .elementor-widget-container,
#xpro-theme-builder-footer .elementor-widget-text-editor,
#xpro-theme-builder-footer p,
#xpro-theme-builder-footer h1,
#xpro-theme-builder-footer h2,
#xpro-theme-builder-footer h3 {
  color: var(--dark-ink);
}
#xpro-theme-builder-footer .footer-col h3 { color: var(--dark-ink); font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 var(--space-sm); }
#xpro-theme-builder-footer .footer-col ul { list-style: none; padding: 0; margin: 0; }
#xpro-theme-builder-footer .footer-col li { margin-bottom: 8px; }
#xpro-theme-builder-footer .footer-col a { color: var(--dark-muted); text-decoration: none; font-size: 0.92rem; }
#xpro-theme-builder-footer .footer-col a:hover { color: var(--dark-ink); }
#xpro-theme-builder-footer .footer-bottom { color: var(--dark-muted); }
#xpro-theme-builder-footer .footer-positioning { color: var(--dark-muted); font-size: 0.95rem; line-height: 1.5; }
#xpro-theme-builder-footer .footer-lineage { color: var(--dark-muted); font-size: 0.85rem; margin-top: var(--space-sm); }
#xpro-theme-builder-footer .footer-lineage a { color: var(--indigo-soft); }

/* ============================================================
   ELEMENTOR-AWARE LAYOUT FIXES
   Elementor wraps each widget in extra <div>s; reset their
   default padding/margin so the design's grids are tight.
   ============================================================ */
.rl-hero .elementor-widget,
.section .elementor-widget,
.section--paper2 .elementor-widget,
.rl-cta-section .elementor-widget {
  margin-bottom: 0;
}
.rl-hero .elementor-widget-text-editor > .elementor-widget-container,
.section .elementor-widget-text-editor > .elementor-widget-container,
.rl-cta-section .elementor-widget-text-editor > .elementor-widget-container {
  padding: 0;
}
.rl-hero .elementor-heading-title,
.section .elementor-heading-title,
.rl-cta-section .elementor-heading-title {
  margin: 0;
  line-height: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
}

/* Re-establish the original constat-grid layout (.constat-grid uses CSS grid) */
.section .elementor-element.constat-grid > .e-con-inner,
.section .constat-grid > .e-con-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  width: 100%;
  max-width: 100%;
  padding: 0;
}
@media (max-width: 880px) {
  .section .elementor-element.constat-grid > .e-con-inner,
  .section .constat-grid > .e-con-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .section .elementor-element.constat-grid > .e-con-inner,
  .section .constat-grid > .e-con-inner {
    grid-template-columns: 1fr;
  }
}

/* The ex-grid (examples) does the same trick */
.section .elementor-element.ex-grid > .e-con-inner,
.section .ex-grid > .e-con-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  width: 100%;
  max-width: 100%;
  padding: 0;
}
@media (max-width: 980px) { .section .ex-grid > .e-con-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .section .ex-grid > .e-con-inner { grid-template-columns: 1fr; } }

/* Hero grid — the rail + content side by side */
.rl-hero .elementor-element.hero__grid > .e-con-inner,
.rl-hero .hero__grid > .e-con-inner {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--space-xl);
  width: 100%;
  max-width: 100%;
  padding: 0;
  align-items: center;
  min-height: 80vh;
}
@media (max-width: 880px) {
  .rl-hero .hero__grid > .e-con-inner { grid-template-columns: 1fr; min-height: 70vh; }
}

/* Push the page body down below the fixed header */
.rl-hero { padding-top: 80px; }


/* ============================================================
   WP ADMIN BAR offset — don't hide the fixed header behind it
   ============================================================ */
body.admin-bar .xpro-theme-builder-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .xpro-theme-builder-header {
    top: 46px;
  }
}
body.admin-bar .rl-popup {
  padding-top: 32px;
}

/* ============================================================
   ENTRANCE ANIMATIONS — editorial, subtle, expo-out easing
   ============================================================ */

:root {
  --rl-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --rl-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --rl-rise: 22px;
  --rl-rise-sm: 14px;
}

/* Base reveal: fade + rise. Triggered by .is-in via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translate3d(0, var(--rl-rise), 0);
  transition: opacity 720ms var(--rl-ease-out),
              transform 720ms var(--rl-ease-out);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Variant: smaller rise for inline / list items */
.reveal--sm {
  transform: translate3d(0, var(--rl-rise-sm), 0);
}

/* Variant: lateral slide (used on rail aside) */
.reveal--left {
  transform: translate3d(-12px, 0, 0);
}
.reveal--left.is-in { transform: translate3d(0, 0, 0); }

/* Hero load animation — plays once on page load, independent of scroll */
.rl-hero .hero-rise {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 820ms var(--rl-ease-out),
              transform 820ms var(--rl-ease-out);
  will-change: opacity, transform;
}
.rl-hero.hero-ready .hero-rise {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Header initial drop — slides from above on first paint */
.xpro-theme-builder-header {
  transform: translate3d(0, -100%, 0);
  transition: transform 720ms var(--rl-ease-out) 150ms,
              background 280ms ease,
              backdrop-filter 280ms ease;
}
.xpro-theme-builder-header.rl-header-loaded {
  transform: translate3d(0, 0, 0);
}
body.admin-bar .xpro-theme-builder-header.rl-header-loaded {
  transform: translate3d(0, 0, 0);
}

/* 3D canvas slow fade-in once WebGL ready */
.hero__canvas,
.cta__canvas {
  opacity: 0;
  transition: opacity 1400ms ease;
}
.hero__canvas.is-ready,
.cta__canvas.is-ready {
  opacity: 1;
}

/* Mega menu items — quick stagger on hover-open */
.nav-menu .has-mega:hover > .rl-mega .rl-mega__item,
.nav-menu .has-mega:focus-within > .rl-mega .rl-mega__item {
  animation: rlMegaIn 380ms var(--rl-ease-out) both;
}
.nav-menu .has-mega:hover > .rl-mega .rl-mega__item:nth-child(2),
.nav-menu .has-mega:focus-within > .rl-mega .rl-mega__item:nth-child(2) { animation-delay: 60ms; }
.nav-menu .has-mega:hover > .rl-mega .rl-mega__item:nth-child(3),
.nav-menu .has-mega:focus-within > .rl-mega .rl-mega__item:nth-child(3) { animation-delay: 120ms; }
.nav-menu .has-mega:hover > .rl-mega .rl-mega__item:nth-child(4),
.nav-menu .has-mega:focus-within > .rl-mega .rl-mega__item:nth-child(4) { animation-delay: 180ms; }
@keyframes rlMegaIn {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* News card hover — subtle lift already there, add image zoom timing tweak */
.rl-news-card,
.ex,
.tier {
  transition: transform 380ms var(--rl-ease-out),
              border-color 380ms var(--rl-ease-out),
              box-shadow 380ms var(--rl-ease-out);
}

/* FAQ toggle items — a quiet fade-in via the same .reveal mechanism */
.faq .elementor-toggle-item.reveal {
  transform: translate3d(0, 12px, 0);
}

/* RESPECT REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--sm,
  .reveal--left,
  .rl-hero .hero-rise,
  .xpro-theme-builder-header,
  .xpro-theme-builder-header.rl-header-loaded {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .hero__canvas, .cta__canvas { opacity: 1 !important; transition: none !important; }
  .nav-menu .has-mega:hover > .rl-mega .rl-mega__item { animation: none !important; }
}

/* ============================================================
   PRICING — hidden for now, kept in Elementor data for later
   To re-enable: remove this rule (or change to "display: block").
   ============================================================ */
#offres,
.section[id="offres"],
.elementor-element[data-id] > .e-con-inner > #offres {
  display: none !important;
}

/* ============================================================
   NEWSLETTER section — inline email + submit, calm & editorial
   ============================================================ */
.rl-newsletter {
  max-width: 620px;
  margin: 0 auto;
}
.rl-newsletter .wpforms-container {
  margin-top: var(--space-lg);
}
/* Collapse WPForms stacking so the two fields can sit inline */
.rl-newsletter .wpforms-form .wpforms-field-row,
.rl-newsletter .wpforms-form .wpforms-field-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rl-newsletter .wpforms-form .wpforms-field {
  padding: 0 !important;
  margin: 0 !important;
}
.rl-newsletter .wpforms-form .wpforms-field input[type="text"],
.rl-newsletter .wpforms-form .wpforms-field input[type="email"] {
  width: 100%;
}
.rl-newsletter .wpforms-form .wpforms-submit-container {
  margin-top: 12px !important;
}
.rl-newsletter .wpforms-form .wpforms-submit {
  width: 100%;
}
@media (min-width: 620px) {
  /* Side-by-side on desktop: name + email on one row, button underneath */
  .rl-newsletter .wpforms-form .wpforms-field-container {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .rl-newsletter .wpforms-form .wpforms-field-name,
  .rl-newsletter .wpforms-form .wpforms-field-email {
    flex: 1 1 240px;
  }
  .rl-newsletter .wpforms-form .wpforms-submit {
    width: auto;
    min-width: 180px;
  }
}
.rl-newsletter__note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-md);
}


/* ============================================================
   POPUP form — fix overflow, close button, overall sizing
   ============================================================ */

/* Overlay container */
#rl-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(12, 13, 26, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#rl-popup.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@media (min-height: 720px) {
  #rl-popup.is-open { align-items: center; }
}

/* Inner card — capped width, no overflow */
#rl-popup .rl-popup__inner {
  background: var(--paper);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  padding: 40px 36px 32px;
  position: relative;
  box-shadow: 0 32px 80px rgba(12, 13, 26, 0.4);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Close button — clean circle, no browser default */
#rl-popup .rl-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  box-shadow: none;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  font-family: var(--font-body);
  text-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
#rl-popup .rl-popup__close:hover,
#rl-popup .rl-popup__close:focus {
  background: var(--line);
  border-color: var(--ink);
  transform: scale(1.05);
  outline: 0;
}

/* Elementor containers inside popup — strip their padding so our 40px wins */
#rl-popup .elementor,
#rl-popup .elementor-element,
#rl-popup .elementor-widget,
#rl-popup .e-con-inner,
#rl-popup .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Vertical spacing between popup pieces */
#rl-popup .elementor-widget + .elementor-widget {
  margin-top: 12px !important;
}
#rl-popup .elementor-widget-text-editor:last-of-type {
  margin-top: 20px !important;
}

/* Typography — override oversize from inherited styles */
#rl-popup .kicker {
  margin-bottom: 8px;
}
#rl-popup h2,
#rl-popup .h2 {
  font-size: 1.5rem !important;
  line-height: 1.2;
  margin: 0 0 8px;
}
#rl-popup .lead,
#rl-popup p {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 4px;
}

/* WPForms container — lock width, kill the stray overflow */
#rl-popup .wpforms-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-top: 16px !important;
}
#rl-popup .wpforms-container * {
  box-sizing: border-box;
}
#rl-popup .wpforms-form,
#rl-popup .wpforms-field-container,
#rl-popup .wpforms-field,
#rl-popup .wpforms-field-row,
#rl-popup .wpforms-field-row-block {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}
#rl-popup .wpforms-field {
  margin-bottom: 14px !important;
}
#rl-popup .wpforms-field-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: block;
}

/* Form inputs — width + box-sizing */
#rl-popup .wpforms-form input[type="text"],
#rl-popup .wpforms-form input[type="email"],
#rl-popup .wpforms-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-sm) !important;
  padding: 10px 12px !important;
  background-image: none !important; /* kill browser email icons */
  box-shadow: none !important;
  margin: 0 !important;
}
#rl-popup .wpforms-form input[type="text"]:focus,
#rl-popup .wpforms-form input[type="email"]:focus,
#rl-popup .wpforms-form textarea:focus {
  border-color: var(--indigo) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(75, 87, 224, 0.15) !important;
}

/* Textarea — constrained resize */
#rl-popup .wpforms-form textarea {
  min-height: 90px;
  max-height: 160px;
  resize: vertical;
  overflow: auto;
}

/* Kill 1Password / LastPass / browser autofill icons inside the popup */
#rl-popup input::-ms-reveal,
#rl-popup input::-ms-clear,
#rl-popup input::-webkit-contacts-auto-fill-button,
#rl-popup input::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
}

/* Submit button — full width, pill, our indigo */
#rl-popup .wpforms-submit-container {
  margin-top: 18px !important;
}
#rl-popup .wpforms-submit {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  background: var(--indigo) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  padding: 12px 24px !important;
  box-shadow: 0 10px 24px rgba(75, 87, 224, 0.32) !important;
  cursor: pointer;
  width: auto;
  transition: transform var(--t-fast), background var(--t-base);
}
#rl-popup .wpforms-submit:hover {
  background: var(--indigo-deep) !important;
  transform: translateY(-2px);
}

/* Required asterisks */
#rl-popup .wpforms-required-label {
  color: var(--indigo);
  margin-left: 2px;
}

/* Mobile */
@media (max-width: 560px) {
  #rl-popup { padding: 12px; }
  #rl-popup .rl-popup__inner { padding: 32px 24px 24px; max-height: calc(100vh - 24px); }
  #rl-popup h2, #rl-popup .h2 { font-size: 1.35rem !important; }
}
