/*
  MON CHERI GROUP - BALANCE LAYER 2026-11
  Loaded after theme-light.css. Brings depth back to the light theme:
  dark cinematic sections alternate with warm ivory ones, the photos and video
  show in full colour, and ambient gold light moves slowly in the background.
  Also fixes text that ran past its box on small screens.
*/

:root {
  --night:  #0E1422;   /* deep section background */
  --night2: #141C2E;
  --ivory:  #F6F1E7;   /* warm light section background */
  --ivory2: #EFE7D8;
  --glow:   rgba(212,175,95,0.16);
}

/* ─── Dark islands: the original dark palette, scoped ─────────────────── */
.hero, .marquee-strip, .divisions, .code-sec, .statement-sec, .dv-hero, .dv-cta, .ec-facts {
  --ob:  var(--night);
  --ob2: var(--night2);
  --ob3: #1B2438;
  --w:   #F3ECDD;
  --w80: rgba(243,236,221,0.93);
  --w55: rgba(243,236,221,0.86);
  --w30: rgba(243,236,221,0.72);
  --w12: rgba(243,236,221,0.20);
  --w06: rgba(243,236,221,0.10);
  --ch:  #D4AF5F;
  --ch2: #E6C77E;
  --ch3: #B8913F;
  color: var(--w);
}

/* Paper grain a little stronger so the surfaces feel tactile */
.grain { opacity: 0.032 !important; }

/* ─── Ambient light: slow drifting gold glow on the dark sections ─────── */
@keyframes mcGlowDrift {
  0%   { transform: translate3d(-6%, -4%, 0) scale(1); opacity: 0.75; }
  50%  { transform: translate3d(5%, 3%, 0) scale(1.12); opacity: 1; }
  100% { transform: translate3d(-6%, -4%, 0) scale(1); opacity: 0.75; }
}
@keyframes mcSheen { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }

.code-sec, .statement-sec, .divisions, .dv-cta { position: relative; overflow: hidden; isolation: isolate; }
.code-sec::after, .statement-sec::after, .divisions::after, .dv-cta::after {
  content: '' !important; display: block !important;
  position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 34% at 28% 30%, var(--glow) 0%, transparent 70%),
    radial-gradient(ellipse 32% 30% at 74% 72%, rgba(120,150,210,0.10) 0%, transparent 70%) !important;
  opacity: 1 !important;
  animation: mcGlowDrift 22s ease-in-out infinite;
}

/* ─── Home hero: the video in full colour, ivory type on a night veil ─── */
.hero { background: var(--night); }
.hero-right { background: var(--night) !important; }
.hero-bg-img, .hero-video { filter: brightness(0.86) saturate(1.02) contrast(1.04) !important; }
.hero-bg-ov {
  background:
    radial-gradient(ellipse 58% 62% at 50% 46%, rgba(14,20,34,0.72) 0%, rgba(14,20,34,0.46) 52%, rgba(14,20,34,0.10) 100%),
    linear-gradient(180deg, rgba(14,20,34,0.55) 0%, rgba(14,20,34,0) 24%, rgba(14,20,34,0) 66%, rgba(14,20,34,0.92) 100%) !important;
}
.hero-h1, .hero-left h1 { color: #F6F0E2 !important; }
.hero-h1 .gold { color: #E1BE72 !important; }
.hero-h1 .dim { color: rgba(246,240,226,0.52) !important; }
.hero-eyebrow { color: #E1BE72 !important; }
.hero-sub { color: rgba(246,240,226,0.90) !important; }
.hero-h1, .hero-sub, .hero-eyebrow { text-shadow: 0 2px 30px rgba(8,12,22,0.65) !important; }
.hero-stats { background: rgba(14,20,34,0.52) !important; border-top-color: rgba(212,175,95,0.28) !important; }
.hs-val { color: #E1BE72 !important; }
.hs-lbl { color: rgba(246,240,226,0.78) !important; }
.hero-scroll, .hero-scroll span { color: rgba(246,240,226,0.7) !important; }
.hero .btn-outline { color: #F6F0E2 !important; border-color: rgba(246,240,226,0.55) !important; background: rgba(14,20,34,0.25) !important; }
.hero .btn-outline:hover { background: rgba(246,240,226,0.12) !important; border-color: #F6F0E2 !important; }
@media (max-width: 960px) {
  .hero-bg-ov { background: linear-gradient(180deg, rgba(14,20,34,0.62) 0%, rgba(14,20,34,0.58) 55%, rgba(14,20,34,0.9) 100%) !important; }
}

/* Marquee: a night band with gold type */
.marquee-strip { background: var(--night2) !important; border-color: rgba(212,175,95,0.18) !important; }
.mq-item { color: rgba(243,236,221,0.82) !important; opacity: 1 !important; }
.mq-sep { color: #D4AF5F !important; }

/* Divisions on night, photos at full strength */
.divisions { background: var(--night) !important; padding: 10px !important; }
.dc-bg { filter: brightness(0.98) saturate(1.05) !important; }
.dc:hover .dc-bg { filter: brightness(1.06) saturate(1.1) !important; }

/* ─── Light sections: warm ivory with visible depth ──────────────────── */
.manifesto-sec, .values-sec, .contact-sec, .dv-about, .dv-process, .ec-plans {
  background:
    radial-gradient(ellipse 60% 55% at 85% 15%, rgba(212,175,95,0.14) 0%, transparent 62%),
    radial-gradient(ellipse 55% 50% at 10% 90%, rgba(22,35,59,0.07) 0%, transparent 62%),
    var(--ivory) !important;
}
.about-sec, .about-txt-col, .dv-svc, .quote-sec {
  background:
    radial-gradient(ellipse 55% 60% at 15% 20%, rgba(212,175,95,0.13) 0%, transparent 60%),
    repeating-linear-gradient(135deg, rgba(22,35,59,0.022) 0 1px, transparent 1px 7px),
    var(--ivory2) !important;
}
.mf-ghost, .dv-hero-ghost { color: rgba(160,122,50,0.16) !important; }
.quote-inner::before, .q-mark, .quote-sec::before { color: rgba(160,122,50,0.20) !important; }
.ci-roman { color: rgba(212,175,95,0.30) !important; }
.val-n { color: rgba(160,122,50,0.55) !important; }
.lux-div { background: transparent !important; }

/* ─── The Code section on night ──────────────────────────────────────── */
.code-sec { background: var(--night) !important; }
.code-sec h2, .code-sec .eyebrow { color: #F3ECDD !important; }
.code-sec .eyebrow { color: #E1BE72 !important; }
.ci { background: rgba(255,255,255,0.035) !important; border: 1px solid rgba(212,175,95,0.18) !important; }
.ci:hover { background: rgba(212,175,95,0.07) !important; }
.ci-title { color: #E1BE72 !important; }
.ci-txt { color: rgba(243,236,221,0.80) !important; }

/* ─── Statement on night, with the skyline faintly behind ─────────────── */
.statement-sec {
  background:
    linear-gradient(180deg, rgba(14,20,34,0.86), rgba(14,20,34,0.94)),
    url('images/media/mc-skyline.webp') center/cover no-repeat,
    var(--night) !important;
}
.st-main { color: #F6F0E2 !important; }
.st-sub { color: #E1BE72 !important; }
.st-sym { color: #D4AF5F !important; opacity: 0.8 !important; }

/* Skyline band: full colour, a light veil only at the seams */
.cinema-band-img { filter: brightness(0.95) saturate(1.05) !important; }
.cinema-band-ov { background: linear-gradient(180deg, rgba(14,20,34,0.35) 0%, rgba(14,20,34,0) 30%, rgba(14,20,34,0) 70%, rgba(14,20,34,0.35) 100%) !important; }

/* ─── Division pages: night hero with the photo clearly visible ──────── */
.dv-hero-bg { filter: brightness(0.82) saturate(1.02) !important; }
.dv-hero-ov {
  background: linear-gradient(270deg, rgba(14,20,34,0.88) 0%, rgba(14,20,34,0.62) 45%, rgba(14,20,34,0.18) 100%) !important;
}
html[dir="ltr"] .dv-hero-ov { background: linear-gradient(90deg, rgba(14,20,34,0.88) 0%, rgba(14,20,34,0.62) 45%, rgba(14,20,34,0.18) 100%) !important; }
@media (max-width: 640px) { .dv-hero-ov { background: rgba(14,20,34,0.72) !important; } }
.dv-hero-title { color: #F6F0E2 !important; }
.dv-hero-sub, .dv-hero p { color: rgba(246,240,226,0.88) !important; }
.dv-hero .eyebrow, .dv-hero .dv-hero-eyebrow { color: #E1BE72 !important; }
.dv-hero .btn-outline { color: #F6F0E2 !important; border-color: rgba(246,240,226,0.55) !important; background: rgba(14,20,34,0.25) !important; }
.dv-hero h1, .dv-hero h2 { text-shadow: 0 2px 28px rgba(8,12,22,0.6); }

.dv-cta { background: var(--night) !important; }
.dv-cta-h { color: #F6F0E2 !important; }
.dv-cta-sub { color: rgba(243,236,221,0.82) !important; }
.dv-cta .eyebrow { color: #E1BE72 !important; }
.dv-cta .btn-outline { color: #F6F0E2 !important; border-color: rgba(246,240,226,0.5) !important; background: transparent !important; }

/* ─── Text that ran past its box ─────────────────────────────────────── */
/* Frame tag (e.g. "REAL ESTATE · MON CHERI GROUP"): wrap instead of spilling */
.dv-frame { max-width: 100%; box-sizing: border-box; }
.dv-frame-tag { white-space: normal !important; overflow-wrap: anywhere; line-height: 1.8; }
/* Italic serif words (KPIs, frame stats) lean past their box; give them room and let them shrink */
.kpi-val { padding-inline: 0.12em; overflow: visible; overflow-wrap: anywhere; }
.dv-frame-stat, .about-kpis > div { min-width: 0; }
@media (max-width: 640px) {
  .dv-frame { padding: 44px 22px !important; }
  .dv-frame-tag { letter-spacing: 0.18em !important; font-size: 0.6rem !important; }
  .dv-frame-stat .kpi-val { font-size: 1.25rem !important; }
  .about-kpis { flex-wrap: wrap; row-gap: 22px; }
  .about-kpis > div { flex: 1 1 40%; padding-left: 12px !important; padding-right: 12px !important; }
  .about-kpis .kpi-val { font-size: 1.35rem !important; }
  .kpi-lbl, .hs-lbl, .eyebrow, .hero-eyebrow, .st-sub, .q-author { white-space: normal !important; letter-spacing: 0.16em !important; }
}
/* Course facts: long language list wraps cleanly */
.ec-fact { min-width: 0; }
.ec-fact-l { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 420px) { .ec-facts-inner { grid-template-columns: 1fr 1fr; column-gap: 14px; } .ec-fact { padding-inline-start: 12px; } }

/* Buttons never push past the screen edge */
.btn-gold, .btn-outline { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .code-sec::after, .statement-sec::after, .divisions::after, .dv-cta::after { animation: none !important; }
}
html.acc-stop-anim .code-sec::after, html.acc-stop-anim .statement-sec::after,
html.acc-stop-anim .divisions::after, html.acc-stop-anim .dv-cta::after { animation: none !important; }

/* Page base and the thin dividers between sections share the ivory tone */
html, body { background: var(--ivory) !important; }
.lux-div, .nov-div { background: var(--ivory) !important; }

/* ─── Contrast (WCAG AA) ─────────────────────────────────────────────── */
:root { --gold-t: #775719; }
.footer .ft-logo-sub, .footer h4 { color: #C9A85E !important; opacity: 1 !important; }
.footer .ft-tagline, .footer .ft-site { color: rgba(240,232,216,0.78) !important; opacity: 1 !important; }
.kpi-lbl, .dv-frame-note, .dv-frame p, .dv-frame-stat span { color: #4F596B !important; opacity: 1 !important; }
.step-n, .pt-n { color: #775719 !important; }
.dv-about .eyebrow, .dv-svc .eyebrow, .dv-process .eyebrow { color: #775719 !important; }
.dv-svc a, .dv-process a, .dv-about a { color: #775719; }
.manifesto-sec, .values-sec, .contact-sec, .about-sec, .dv-about, .dv-svc, .dv-process, .ec-plans, .quote-sec, .lp, main > section:not(.hero):not(.divisions):not(.code-sec):not(.statement-sec):not(.dv-hero):not(.dv-cta):not(.ec-facts):not(.marquee-strip) { --ch: #8A6526; }
/* Small caps labels were 7px; make them readable */
.kpi-lbl { font-size: 0.62rem !important; letter-spacing: 0.3em !important; }
.acc-page a { color: var(--gold-t) !important; }
/* Legal pages at 320px: the "back to site" button fits next to the logo */
@media (max-width: 380px) {
  .nav-r .btn-outline { padding: 8px 12px !important; letter-spacing: 0.08em !important; white-space: nowrap; }
  .nav-brand-name { letter-spacing: 0.12em !important; font-size: 0.72rem !important; }
}

/* ─── Course page FAQ ────────────────────────────────────────────────── */
.ec-faq { background: var(--ivory); padding: 110px 64px; }
.ec-faq-inner { max-width: 880px; margin: 0 auto; }
.ec-faq-h { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 6px 0 40px; color: var(--ink); }
.ec-faq-list { border-top: 1px solid var(--hair); }
.ec-faq-item { border-bottom: 1px solid var(--hair); }
.ec-faq-item summary {
  cursor: pointer; list-style: none; padding: 22px 0; font-size: 1.05rem; color: var(--ink);
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
}
.ec-faq-item summary::-webkit-details-marker { display: none; }
.ec-faq-item summary::after { content: '+'; color: var(--gold-t); font-size: 1.4rem; line-height: 1; transition: transform .25s; flex-shrink: 0; }
.ec-faq-item[open] summary::after { transform: rotate(45deg); }
.ec-faq-item summary:focus-visible { outline: 2px solid var(--gold-t); outline-offset: 4px; }
.ec-faq-item p { color: var(--slate); line-height: 1.9; padding: 0 0 24px; max-width: 72ch; }
@media (max-width: 640px) { .ec-faq { padding: 80px 22px; } }

/* ─── Round 2 (2026-11-03): readability + smoother hero ──────────────── */
/* "The Mon Cheri Code" cards: the body text was dark grey on the night
   background, because `.code-sec p` (light-theme rule, higher specificity)
   beat `.ci-txt`. White text, readable in Hebrew and English. */
.code-sec .ci-txt, .code-sec p.ci-txt { color: #FFFFFF !important; opacity: 1 !important; }
/* The video and its poster now carry the colour grade inside the file, so
   the browser no longer re-filters every video frame. */
.hero-bg-img, .hero-video { filter: none !important; }
/* The still image under the video no longer zooms forever behind it. */
.hero-right .hero-bg-img { animation: none !important; will-change: auto !important; }
/* No live blur over the playing video (expensive on every frame); a slightly
   deeper veil keeps the numbers just as readable. */
.hero-stats { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(14,20,34,0.62) !important; }
/* Phones: the lighter 800px versions of the section photos. */
@media (max-width: 760px) {
  .dc-bg[style*="mc-economic.webp"]    { background-image: url('images/media/mc-economic-sm.webp') !important; }
  .dc-bg[style*="mc-realestate.webp"]  { background-image: url('images/media/mc-realestate-sm.webp') !important; }
  .dc-bg[style*="mc-tech.webp"]        { background-image: url('images/media/mc-tech-sm.webp') !important; }
  .dc-bg[style*="mc-women.webp"]       { background-image: url('images/media/mc-women-sm.webp') !important; }
  .cinema-band-img[style*="mc-skyline.webp"] { background-image: url('images/media/mc-skyline-sm.webp') !important; }
  .statement-sec {
    background:
      linear-gradient(180deg, rgba(14,20,34,0.86), rgba(14,20,34,0.94)),
      url('images/media/mc-skyline-sm.webp') center/cover no-repeat,
      var(--night) !important;
  }
  .about-img-col {
    background:
      url('images/logo_transparent-800.webp') center center / 480px auto no-repeat,
      url('images/media/mc-about-sm.webp') center/cover no-repeat !important;
  }
}
/* A shorter fade for the opening logo screen. */
.preloader.exit { animation-duration: 0.6s !important; }
