/* Standalone additions shared by the restored legacy pages (Home/Old,
   About, Contact, Fortis Research). Deliberately does NOT include
   files/base.css: base.css resets margins, box-sizing, and list styling
   globally, which would visually break the original Weebly/main_style.css
   layout. These rules are self-contained so they can't leak resets into
   the legacy markup. */

:root {
  --ink: #1e1c19;
  --muted: #6b6560;
  --paper: #ffffff;
  --line: rgba(30, 28, 25, 0.12);
  --accent: #8d5024;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- EN/LV content toggling (Fortis Research only) ---------- */
[data-lang="lv"] { display: none !important; }
html[data-site-lang="lv"] [data-lang="en"] { display: none !important; }
html[data-site-lang="lv"] [data-lang="lv"] { display: revert !important; }

/* Bold Montserrat (loaded via editmysite CDN) mis-shapes Latvian macron
   diacritics (ā/ē/ī/ū) in headings, same issue as Fraunces earlier -
   regular weight is unaffected. Fall back to Arial for headings whenever
   Latvian is active. */
html[data-site-lang="lv"] #wsite-content h2,
html[data-site-lang="lv"] #wsite-content h2 font {
  font-family: Arial, Helvetica, sans-serif !important;
}

/* ---------- floating language toggle (Fortis Research only) ---------- */
.lang-toggle--floating {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(30, 28, 25, 0.1);
  font-family: var(--sans);
}
.lang-toggle--floating button {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 160ms ease, background 160ms ease;
}
.lang-toggle--floating button:hover { color: var(--ink); }
.lang-toggle--floating button.is-active {
  color: var(--paper);
  background: var(--ink);
}

/* ---------- entrance animation ---------- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.main-wrap .wsite-section-wrap {
  animation: reveal-up 640ms cubic-bezier(0.16, 0.8, 0.3, 1) both;
}
.main-wrap .wsite-section-wrap:nth-of-type(1) { animation-delay: 60ms; }
.main-wrap .wsite-section-wrap:nth-of-type(2) { animation-delay: 150ms; }
.main-wrap .wsite-section-wrap:nth-of-type(3) { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .main-wrap .wsite-section-wrap { animation: none; }
}

/* ---------- floating version switcher (mirrors files/base.css) ---------- */
.switcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(30, 28, 25, 0.1);
  font-family: var(--sans);
}
.switcher__label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px;
  white-space: nowrap;
}
.switcher a {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.switcher a:hover { color: var(--ink); }
.switcher a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 640px) {
  .switcher { left: 14px; right: 14px; justify-content: center; flex-wrap: wrap; }
  .switcher__label { display: none; }
  .lang-toggle--floating { top: 12px; right: 12px; }
}
