/* ─────────────────────────────────────────────
   F3 Finance — language switcher (dropdown)
   Compact trigger that expands into a small,
   animated menu. Discreet by default.
   ───────────────────────────────────────────── */

/* ─── Storage notice (cookie pill) — discrete, sits over the nav centre ─── */
.f3-cookie{
  position:fixed;
  left:0; right:0; top:14px;       /* hovers near the top, over the nav */
  z-index:300;                     /* above nav (z-100) */
  display:flex; justify-content:center;
  pointer-events:none;
  opacity:0;
  transform:translateY(-10px);
  transition:opacity 0.55s cubic-bezier(0.19,1,0.22,1),
             transform 0.55s cubic-bezier(0.19,1,0.22,1);
}
.f3-cookie.is-in{ opacity:1; transform:translateY(0); }
.f3-cookie.is-out{ opacity:0; transform:translateY(-10px); }
.f3-cookie-inner{
  pointer-events:auto;
  display:flex; align-items:center; gap:14px;
  max-width:460px;
  padding:8px 8px 8px 16px;
  background:rgba(14,23,56,0.82);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  border:1px solid rgba(192,203,228,0.14);
  border-radius:999px;             /* full pill */
  box-shadow:0 12px 32px rgba(0,0,0,0.35);
  font-family:'DM Sans',sans-serif;
}
.f3-cookie-text{
  flex:1; min-width:0;
  margin:0;
  font-size:11px;
  line-height:1.4;
  color:var(--ts);
  font-weight:300;
}
.f3-cookie-btn{
  flex-shrink:0;
  font-family:'DM Sans',sans-serif;
  font-size:10px; font-weight:600;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--ts);
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(192,203,228,0.18);
  border-radius:999px;
  padding:7px 14px;
  cursor:pointer;
  transition:color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.f3-cookie-btn:hover{
  color:var(--tp);
  background:rgba(255,255,255,0.12);
  border-color:rgba(192,203,228,0.35);
}
@media(max-width:560px){
  .f3-cookie{ left:8px; right:8px; top:10px; }
  .f3-cookie-inner{ gap:10px; padding:6px 6px 6px 12px; max-width:none; }
  .f3-cookie-text{ font-size:10.5px; }
  .f3-cookie-btn{ padding:6px 12px; }
}
@media(prefers-reduced-motion:reduce){
  .f3-cookie{ transition:opacity 0.2s ease; transform:none !important; }
}



.lang-switch{
  position:relative;
  /* No explicit margin — the parent .nav-links uses flex `gap`, so spacing
     stays uniform between every nav item (About · Strategies · Contact · 🌐 · Login). */
  font-family:'DM Sans',sans-serif;
  --ls-bg:rgba(34,85,232,0.05);
  --ls-bg-hover:rgba(34,85,232,0.12);
  --ls-border:rgba(75,123,245,0.20);
  --ls-border-hover:rgba(122,170,248,0.45);
}

/* Trigger button */
.lang-switch-trigger{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;
  background:var(--ls-bg);
  border:1px solid var(--ls-border);
  border-radius:7px;
  color:var(--ts);
  font-size:11px;font-weight:600;letter-spacing:0.08em;
  cursor:pointer;
  transition:color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
  outline:none;
  position:relative;
  z-index:2;
  line-height:1;
}
.lang-switch-trigger:hover,
.lang-switch.open .lang-switch-trigger{
  color:var(--tp);
  background:var(--ls-bg-hover);
  border-color:var(--ls-border-hover);
  box-shadow:0 0 18px rgba(75,123,245,0.18);
}
.lang-switch-trigger:focus-visible{
  box-shadow:0 0 0 2px rgba(122,170,248,0.4);
}

/* Globe icon — gentle pulse on hover */
.lang-switch-trigger .ls-globe{
  width:11px;height:11px;
  stroke:currentColor;stroke-width:1.4;fill:none;
  opacity:0.7;
  transition:opacity 0.25s ease, transform 0.5s var(--spring, cubic-bezier(0.16,1,0.3,1));
}
.lang-switch-trigger:hover .ls-globe,
.lang-switch.open .ls-globe{
  opacity:1;
  transform:rotate(20deg);
}

/* Current language label */
.lang-switch-trigger .ls-current{
  display:inline-block;
  min-width:18px;
  text-align:center;
}

/* Chevron */
.lang-switch-trigger .ls-chev{
  width:9px;height:9px;
  stroke:currentColor;stroke-width:1.6;fill:none;
  stroke-linecap:round;stroke-linejoin:round;
  margin-left:1px;
  transition:transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.lang-switch.open .ls-chev{ transform:rotate(180deg); }

/* Dropdown menu */
.lang-switch-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  min-width:118px;
  padding:5px;
  background:rgba(22,32,74,0.92);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  border:1px solid rgba(75,123,245,0.22);
  border-radius:9px;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.45),
    0 0 0 1px rgba(122,170,248,0.08),
    0 0 24px rgba(75,123,245,0.20);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform-origin:top right;
  transform:translateY(-6px) scale(0.94);
  transition:
    opacity 0.28s cubic-bezier(0.16,1,0.3,1),
    transform 0.32s cubic-bezier(0.16,1,0.3,1),
    visibility 0s linear 0.32s;
  z-index:3;
}
.lang-switch.open .lang-switch-menu{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
  transition:
    opacity 0.28s cubic-bezier(0.16,1,0.3,1),
    transform 0.32s cubic-bezier(0.16,1,0.3,1),
    visibility 0s linear 0s;
}

/* Menu items */
.lang-switch-menu button{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  width:100%;
  padding:9px 12px;
  background:transparent;
  border:none;
  border-radius:6px;
  color:var(--ts);
  font-family:inherit;
  font-size:12px;font-weight:500;
  letter-spacing:0.04em;
  cursor:pointer;
  text-align:left;
  transition:color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  opacity:0;
  transform:translateX(-6px);
}
.lang-switch.open .lang-switch-menu button{
  opacity:1;
  transform:translateX(0);
}
/* Stagger entry */
.lang-switch.open .lang-switch-menu button:nth-child(1){ transition-delay:0.06s; }
.lang-switch.open .lang-switch-menu button:nth-child(2){ transition-delay:0.10s; }
.lang-switch.open .lang-switch-menu button:nth-child(3){ transition-delay:0.14s; }

.lang-switch-menu button .ls-code{
  font-weight:600;letter-spacing:0.08em;
  color:var(--tm);
  min-width:20px;
}
.lang-switch-menu button .ls-name{
  flex:1;
  font-weight:400;
  color:var(--ts);
}
.lang-switch-menu button:hover{
  background:rgba(75,123,245,0.14);
  color:var(--tp);
}
.lang-switch-menu button:hover .ls-code{ color:var(--accent4); }
.lang-switch-menu button:hover .ls-name{ color:var(--tp); }

/* Active row */
.lang-switch-menu button.active{
  background:rgba(75,123,245,0.16);
  color:var(--tp);
}
.lang-switch-menu button.active .ls-code{ color:var(--accent4); }
.lang-switch-menu button.active .ls-name{ color:var(--tp); }
/* Active indicator dot */
.lang-switch-menu button.active::after{
  content:'';
  width:5px;height:5px;border-radius:50%;
  background:var(--accent4);
  box-shadow:0 0 8px rgba(122,170,248,0.7);
  margin-left:4px;
  animation:lsDot 2.4s ease-in-out infinite;
}
@keyframes lsDot{
  0%,100%{opacity:0.85; transform:scale(1);}
  50%{opacity:1; transform:scale(1.18);}
}

/* ─── Mobile menu variant — slightly larger, same animation pattern ─── */
.lang-switch-m{
  position:relative;
  font-family:'DM Sans',sans-serif;
}
.lang-switch-m .lang-switch-trigger{
  font-size:13px;
  padding:10px 14px 10px 16px;
  border-radius:9px;
}
.lang-switch-m .lang-switch-trigger .ls-globe{ width:13px;height:13px; }
.lang-switch-m .lang-switch-trigger .ls-chev{ width:11px;height:11px; }
.lang-switch-m .lang-switch-menu{
  min-width:170px;
  padding:6px;
  left:50%;
  right:auto;
  transform:translate(-50%,-6px) scale(0.94);
  transform-origin:top center;
}
.lang-switch-m.open .lang-switch-menu{
  transform:translate(-50%,0) scale(1);
}
.lang-switch-m .lang-switch-menu button{
  font-size:14px;
  padding:11px 14px;
}

@media(max-width:768px){
  /* Desktop switcher hidden alongside the desktop nav */
  .nav-links .lang-switch{ display:none; }
}

/* ─────────────────────────────────────────────
   Language-specific layout guards
   French and Dutch run 15-30% longer than English
   in nearly every phrase. These rules ease the
   strain on the most layout-sensitive elements
   without changing the English appearance.
   ───────────────────────────────────────────── */

/* Headlines benefit from balanced wrapping in any language */
.hero-line1, .hero-line2,
.page-hero h1, .hero h1,
.s-title,
h2 { text-wrap: balance; }

/* Long compound words (especially in NL) wrap nicely instead of overflowing */
.principle-title, .ch-title, .s-title, .stat-label,
.ch-tag, .s-tag, .principle-tag,
.hero-line1, .hero-line2 {
  overflow-wrap: break-word;
  word-break: normal;
}

/* For FR and NL — slightly smaller hero headlines at upper sizes,
   so phrases like "Esprit Familial." / "Familie Eerst." don't push the
   container at very large viewports. */
:root[lang="fr"] .hero-line1,
:root[lang="fr"] .hero-line2,
:root[lang="nl"] .hero-line1,
:root[lang="nl"] .hero-line2{
  font-size: clamp(44px, 7.4vw, 96px);
}

/* Strategy page big titles — flex-wrap already handles multi-word splits,
   but reduce the top end for non-English to keep them on one line. */
:root[lang="fr"] .s-title,
:root[lang="nl"] .s-title{
  font-size: clamp(44px, 6.4vw, 86px);
}

/* Strategies-page hero h1 — keep balanced for FR/NL */
:root[lang="fr"] .hero h1,
:root[lang="nl"] .hero h1{
  font-size: clamp(42px, 6vw, 86px);
}

/* About-page hero h1 — same treatment */
:root[lang="fr"] .page-hero h1,
:root[lang="nl"] .page-hero h1{
  font-size: clamp(38px, 5.2vw, 72px);
}

/* Stat labels — let them wrap to a second line gracefully if needed */
.stat-label{ line-height:1.3; }

/* Principle titles — allow taller min-height for the wrap so 2-line FR/NL
   titles don't collide with the body copy below */
:root[lang="fr"] .principle-title-wrap,
:root[lang="nl"] .principle-title-wrap{
  min-height: 2.8em;
}

/* Submit button: French "Envoyer le message" is wider — let it breathe */
:root[lang="fr"] .btn-submit,
:root[lang="nl"] .btn-submit{
  padding-left: 28px;
  padding-right: 28px;
}

/* ─── Slide-in reveal clip fix ───
   The big strategy titles use `overflow:hidden` on each word wrap (to mask the
   slide-up animation) plus `letter-spacing:-0.035em` (tight tracking). With
   negative tracking, the last glyph's natural side-bearing extends past the
   calculated box width and gets clipped — most visible on words ending in 's'
   (e.g. "Fonds" in FR/NL, "Privés", "Equities"). Give each inner span a tiny
   right pad so the tail of the last letter sits inside the clip. */
.s-title .word > span{
  padding-right: 0.06em;
}
/* Same treatment for the index-page chapter titles which use the same
   overflow:hidden + negative tracking pattern */
.ch-content .ch-title{
  padding-right: 0.06em;
}

/* Holdings trigger — French and Dutch labels are noticeably longer than English.
   Tighten the tracking and step the font size down a touch so the label group
   doesn't crowd the count/chevron on the right edge. */
:root[lang="fr"] .holdings-trigger,
:root[lang="nl"] .holdings-trigger{
  font-size: 11px;
  letter-spacing: 0.18em;
}
:root[lang="fr"] .holdings-trigger:hover,
:root[lang="nl"] .holdings-trigger:hover{
  letter-spacing: 0.21em;
}
/* The hover "peek" hint is short in EN ("Click to reveal") but verbose in FR/NL.
   Keep it minimal there so the right-side meta group stays compact. */
:root[lang="fr"] .ht-peek,
:root[lang="nl"] .ht-peek{
  font-size: 9px;
  letter-spacing: 0.14em;
}
/* On narrow viewports the peek would still crowd — hide it for non-English on small screens */
@media(max-width:900px){
  :root[lang="fr"] .ht-peek,
  :root[lang="nl"] .ht-peek{ display: none; }
}

/* ─────────────────────────────────────────────
   "Read more" link fix.
   The existing rule `.ch-link span { width:24px; height:1px; ... }`
   styles every <span> inside the chapter link — including the one
   that now wraps the translatable "Read more" text. That width:24px
   forced the text to break to two lines ("READ" / "MORE").
   This rule restores normal inline flow for the text span, leaving
   the decorative empty span (the little line beside the label) alone.
   ───────────────────────────────────────────── */
.ch-content .ch-link span[data-i18n]{
  display:inline;
  width:auto;
  height:auto;
  background:none;
  white-space:nowrap;
}
/* Also keep the link itself on one line, regardless of container width */
.ch-content .ch-link{ white-space:nowrap; }

