/* River Business family of sites — one motion system for four sites.
   Built from the River homepage approved by Daniel on Dec 1, 2026.
   Palette and fonts from the Nov 30 four-site plan. */

:root {
  --ink: #0F1B2D;
  --ink-deep: #0A1422;
  --navy: #12355B;
  --amber: #F2A33A;
  --amber-soft: #F7B95E;
  --sand: #F5F1EA;
  --sand-deep: #ECE6DB;
  --palm: #1F6B4A;
  --white: #FFFFFF;
  --mist: rgba(245, 241, 234, 0.74);
  --mist-faint: rgba(245, 241, 234, 0.16);
  --ink-soft: rgba(15, 27, 45, 0.72);
  --lead: var(--navy);          /* each site sets its own lead color */
  --deep: var(--navy);          /* the site's dark section color */
  --accent: var(--amber);       /* the river line and main buttons */
  --accent-ink: var(--ink);
  --gutter: clamp(20px, 5vw, 72px);
  --section-pad: clamp(96px, 12vw, 180px);
  --radius-media: 18px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* The brand palette is fixed: pages look the same in light and dark settings. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #0F1B2D; --sand: #F5F1EA; }
}
:root[data-theme="dark"] { --ink: #0F1B2D; --sand: #F5F1EA; }

/* Site leads */
[data-site="pfe"] { --lead: #1F6B4A; --deep: #163F2E; }
[data-site="ffe"] { --lead: #F2A33A; --deep: #12355B; }
[data-site="lv"]  { --lead: #0F1B2D; --deep: #0F1B2D; }
[data-site="djm"] { --lead: #2B3138; --deep: #1E2329; }
[data-site="avidan"] { --lead: #1D4F91; --deep: #0E2A47; }
/* Only River draws the river line; the other kits hide its anchor points. */
[data-kit]:not([data-kit="river"]) .river-node { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Section themes ---------- */
.t-ink   { --bg: var(--ink);  --fg: var(--sand); --fg-soft: var(--mist); --line: rgba(245,241,234,.2); background: var(--ink); color: var(--sand); }
.t-deep  { --bg: var(--deep); --fg: var(--sand); --fg-soft: var(--mist); --line: rgba(245,241,234,.22); background: var(--deep); color: var(--sand); }
.t-navy  { --bg: var(--navy); --fg: var(--sand); --fg-soft: var(--mist); --line: rgba(245,241,234,.22); background: var(--navy); color: var(--sand); }
.t-sand  { --bg: var(--sand); --fg: var(--ink);  --fg-soft: var(--ink-soft); --line: rgba(15,27,45,.16); background: var(--sand); color: var(--ink); }
.t-white { --bg: #fff;        --fg: var(--ink);  --fg-soft: var(--ink-soft); --line: rgba(15,27,45,.14); background: #fff; color: var(--ink); }
.t-amber { --bg: var(--amber); --fg: var(--ink); --fg-soft: rgba(15,27,45,.78); --line: rgba(15,27,45,.22); background: var(--amber); color: var(--ink); }
.sec { position: relative; padding: var(--section-pad) var(--gutter); }
.sec.tight { padding-top: calc(var(--section-pad) * .55); padding-bottom: calc(var(--section-pad) * .55); }
.sec > * { position: relative; z-index: 2; }
.sec > .river-node { z-index: 3; }
.wrap { max-width: 1320px; }

/* ---------- Type ---------- */
.display, .section-head h2, .people-copy h2, .h-big {
  font-family: var(--display); font-stretch: 116%; font-weight: 800; letter-spacing: -0.022em;
}
.display { font-size: clamp(2.45rem, 6.1vw, 6.3rem); line-height: 0.95; margin-bottom: 0.42em; }
.display.is-mid { font-size: clamp(2.3rem, 5.2vw, 5.4rem); }
.display .line { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.display .line > span { display: inline-block; }
.section-head { position: relative; z-index: 2; max-width: 820px; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head h2, .people-copy h2, .h-big { font-size: clamp(2.05rem, 4.5vw, 4rem); line-height: 1; margin-bottom: 0.42em; }
.section-head p { font-size: 1.12rem; max-width: 56ch; color: var(--fg-soft, inherit); }
.section-head p + p { margin-top: 0.8em; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 52ch; color: var(--fg-soft); }
h3.h-mid { font: 800 clamp(1.5rem, 2.4vw, 2.2rem)/1.05 var(--display); font-stretch: 110%; letter-spacing: -0.015em; margin-bottom: 0.45em; }

/* ---------- Buttons and small parts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s; position: relative;
  border: 0; cursor: pointer;
}
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: var(--amber-soft); }
.btn-ghost { border: 1px solid rgba(245, 241, 234, 0.38); color: var(--sand); background: transparent; }
.btn-ghost:hover { border-color: var(--sand); background: rgba(245, 241, 234, 0.08); }
.t-sand .btn-ghost, .t-white .btn-ghost, .t-amber .btn-ghost { border-color: rgba(15,27,45,.35); color: var(--ink); }
.t-sand .btn-ghost:hover, .t-white .btn-ghost:hover, .t-amber .btn-ghost:hover { border-color: var(--ink); background: rgba(15,27,45,.05); }
.t-amber .btn-amber { background: var(--ink); color: var(--sand); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.text-link {
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 6px; transition: color .2s, text-underline-offset .2s;
}
.text-link:hover { color: var(--amber); text-underline-offset: 9px; }
.t-sand .text-link:hover, .t-white .text-link:hover { color: var(--lead); }
[data-site="ffe"] .t-sand .text-link:hover, [data-site="ffe"] .t-white .text-link:hover { color: #B86E0E; }
.t-amber .text-link:hover { color: var(--navy); }
.media-tag {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font: 500 0.75rem/1 var(--body); letter-spacing: 0.01em;
  padding: 6px 9px; border-radius: 5px;
  background: rgba(15, 27, 45, 0.62); color: var(--sand);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border-radius: 999px;
  border: 1px solid rgba(245, 241, 234, 0.35); background: rgba(15, 27, 45, 0.38); color: var(--sand);
  font: 500 0.85rem/1 var(--body); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .2s;
}
.chip:hover { border-color: var(--sand); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; }
.sound-toggle[aria-pressed="true"] { border-color: var(--amber); }
.sound-toggle[aria-pressed="true"] .bars i { animation: bar 0.9s ease-in-out infinite; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -0.3s; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -0.55s; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes bar { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.risk { font-size: 0.92rem; color: var(--fg-soft, var(--mist)); max-width: 60ch; margin-top: 18px; }
.note {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; max-width: 72ch;
  font-size: 0.98rem; color: var(--fg-soft);
}
.note + .note { margin-top: 16px; }

/* ---------- Brand mark ---------- */
.mark { display: block; width: 44px; height: 44px; flex: none; }
.mark-tile { fill: var(--lead); }
.mark .floors rect { fill: #fff; }
.mark .flow { fill: none; stroke: var(--amber); stroke-width: 5.6; stroke-linecap: round; stroke-linejoin: round; }
[data-site="ffe"] .mark .floors rect { fill: var(--ink); }
[data-site="ffe"] .mark .flow { stroke: var(--ink); }
[data-site="lv"] .mark-tile { stroke: rgba(245,241,234,.22); stroke-width: 1.5; }
[data-site="lv"] .mark .floors rect { fill: var(--sand); }

/* ---------- Preloader (site homes) ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 120; display: none; place-items: center;
  background: var(--ink); color: var(--sand); text-align: center;
}
.intro .preloader { display: grid; }
.preloader .mark { width: 92px; height: 92px; margin: 0 auto; }
.preloader .mark .flow { stroke-dasharray: 1; stroke-dashoffset: 1; }
.preloader-name, .preloader-year { overflow: hidden; }
.preloader-name span, .preloader-year span { display: inline-block; }
.preloader-name { font: 800 1.55rem/1.2 var(--display); font-stretch: 118%; margin-top: 20px; }
.preloader-year { color: var(--mist); font-size: 0.95rem; margin-top: 2px; }

/* ---------- Program bar and header ---------- */
.program-bar {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 60; height: 34px;
  background: var(--ink-deep); color: var(--mist); transition: transform .45s var(--ease-out);
}
.program-bar ul {
  list-style: none; margin: 0; padding: 0 var(--gutter); height: 100%;
  display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none;
}
.program-bar ul::-webkit-scrollbar { display: none; }
.program-bar a { font-size: 0.8rem; text-decoration: none; white-space: nowrap; padding: 6px 0; }
.program-bar a:hover { color: var(--sand); }
.program-bar a[aria-current="true"] { color: var(--sand); box-shadow: inset 0 -2px 0 var(--amber); }
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 61;
  height: env(safe-area-inset-top, 0px); background: var(--ink-deep);
}
.site-header {
  position: fixed; top: calc(34px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 60;
  height: 76px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--sand);
  transition: transform .45s var(--ease-out), background-color .35s, box-shadow .35s;
}
.is-scrolled .program-bar { transform: translateY(-100%); }
.is-scrolled .site-header {
  transform: translateY(-34px); background: rgba(15, 27, 45, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--mist-faint);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sand); min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 1.15rem/1 var(--display); font-stretch: 108%; letter-spacing: -0.01em; white-space: nowrap; }
.brand-line { font: 500 0.69rem/1.25 var(--body); letter-spacing: 0.03em; color: var(--mist); margin-top: 4px; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 26px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.main-nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; position: relative; padding: 6px 0; white-space: nowrap; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease-out);
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.header-cta { min-height: 44px; padding: 0 20px; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid rgba(245, 241, 234, 0.35); border-radius: 999px;
  cursor: pointer; color: var(--sand); position: relative; z-index: 2;
}
.menu-toggle:hover { border-color: var(--sand); }
.menu-icon { display: grid; gap: 5px; width: 18px; }
.menu-icon i { display: block; height: 2px; background: currentColor; border-radius: 1px; transition: transform .3s; }
.menu-open .menu-icon i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-icon i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Full menu ---------- */
.mega {
  position: fixed; inset: 0; z-index: 58; background: var(--ink); color: var(--sand);
  display: grid; grid-template-columns: 1.4fr 0.9fr; overflow-y: auto;
  padding: calc(130px + env(safe-area-inset-top, 0px)) var(--gutter) 48px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .7s cubic-bezier(.7,0,.2,1), visibility 0s .7s;
}
.menu-open .mega { clip-path: inset(0 0 0% 0); visibility: visible; transition: clip-path .7s cubic-bezier(.7,0,.2,1); }
.menu-open .site-header { transform: none; top: env(safe-area-inset-top, 0px); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .program-bar { transform: translateY(-100%); }
.mega-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px 48px; align-content: start; }
.mega-group h2 { font: 500 0.85rem/1 var(--body); color: var(--mist); margin-bottom: 18px; letter-spacing: 0.02em; }
.mega-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mega-group a {
  font: 800 clamp(1.25rem, 1.9vw, 1.7rem)/1.15 var(--display); font-stretch: 108%; letter-spacing: -0.01em;
  text-decoration: none; display: inline-block; transition: color .25s, transform .4s var(--ease-out);
}
.mega-group a:hover, .mega-group a:focus-visible { color: var(--amber); transform: translateX(6px); }
.mega-group a[aria-current="page"] { color: var(--amber); }
.mega-side { position: relative; border-radius: var(--radius-media); overflow: hidden; min-height: 320px; background: var(--navy); align-self: stretch; }
.mega-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .6s, transform 1.2s var(--ease-out); }
.mega-side img.is-on { opacity: 0.85; transform: scale(1); }
.mega-side .mega-contact { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; background: linear-gradient(180deg, transparent, rgba(15,27,45,.92)); display: grid; gap: 4px; }
.mega-side .mega-contact a { color: var(--sand); }
.mega-foot { grid-column: 1 / -1; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--mist-faint); display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--mist); font-size: 0.92rem; }
.mega-foot a { color: var(--sand); }

/* ---------- Home hero: the film window ---------- */
.hero { position: relative; height: 170vh; background: var(--ink); }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--sand); }
.hero-media {
  position: absolute; inset: 0; overflow: hidden; background: var(--navy) var(--poster, none) center / cover no-repeat;
  clip-path: inset(0 0 0 0 round 0px);
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,27,45,.62) 0%, rgba(15,27,45,.08) 30%, rgba(15,27,45,.18) 55%, rgba(15,27,45,.9) 100%),
    linear-gradient(90deg, rgba(15,27,45,.55) 0%, rgba(15,27,45,0) 60%),
    rgba(15,27,45,var(--shade, 0));
}
[data-site="ffe"] .hero-shade, [data-site="pfe"] .hero-shade { --shade: .34; }
.phero .hero-shade { --shade: .16; }
[data-site="ffe"] .phero .hero-shade { --shade: .34; }
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(96px, 13vh, 150px); max-width: 1120px; }
.hero-sub { max-width: 46ch; font-size: clamp(1.02rem, 1.25vw, 1.2rem); color: var(--mist); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.hero-controls { position: absolute; right: var(--gutter); bottom: 30px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.hero-controls .media-tag { position: static; }
.scroll-cue { position: absolute; left: var(--gutter); bottom: 30px; width: 2px; height: 46px; background: var(--mist-faint); overflow: hidden; border-radius: 1px; }
.scroll-cue i { position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--amber); animation: cue 2.2s var(--ease-out) infinite; }
@keyframes cue { to { top: 100%; } }
.hero-note {
  position: absolute; left: 0; right: 0; bottom: 4.5vh; text-align: center;
  font: 700 clamp(1rem, 1.6vw, 1.35rem)/1.3 var(--display); font-stretch: 108%;
  color: var(--sand); opacity: 0; visibility: hidden;
}
.hero .risk { color: var(--mist); font-size: 0.86rem; margin-top: 16px; }

/* ---------- Inner page hero ---------- */
.phero { position: relative; height: 150vh; background: var(--ink); }
.phero .hero-copy { max-width: 1060px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.88rem; color: var(--mist); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--sand); text-decoration: underline; text-underline-offset: 4px; }
.crumbs i { width: 14px; height: 1px; background: currentColor; opacity: .6; }
.phero .media-tag { top: auto; left: auto; right: var(--gutter); bottom: 30px; }
.phero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Text-only hero for articles and legal pages */
.thero { position: relative; background: var(--ink); color: var(--sand); padding: calc(190px + env(safe-area-inset-top, 0px)) var(--gutter) clamp(64px, 8vw, 110px); overflow: hidden; }
.thero .display { font-size: clamp(2.2rem, 5vw, 4.8rem); max-width: 20ch; }
.thero .lede { color: var(--mist); }
.thero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; color: var(--mist); font-size: 0.92rem; }
.thero-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-right: 9px; vertical-align: middle; }
.thero-wave { position: absolute; right: -4vw; bottom: 8%; width: min(720px, 70vw); opacity: .5; pointer-events: none; }
.thero-wave path { fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
