:root {
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #0e1a2b;
  --navy: #003a70;
  --navy-2: #002a55;
  --navy-3: #e4ecf5;
  --muted: #5c6675;
  --dim: #98a0ac;
  --line: #e6e2d8;
  --line-2: #d8d3c6;
  --accent: #c74a2a;
  --accent-2: #a63c1f;
  --gold: #c69a3b;
  --sky: #cfe3ee;
  --ochre: #e8d4a4;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); }
h1, h2, h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.topbar {
  background: var(--navy);
  color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: inline-flex; align-items: center; color: white; text-decoration: none; }
.brand .name {
  font-family: 'Playfair Display', serif;
  font-weight: 800; font-size: 22px; letter-spacing: 0.06em;
  line-height: 1;
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase;
}
.brand .brand-mark { height: 30px; width: auto; display: block; }
.brand .name .dot { display: none; }
.brand .tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: #b6c6d9; display: block; margin-top: 3px;
}
nav.top-nav { display: flex; gap: 2px; align-items: center; flex: 1; justify-content: center; }
.menu-wrap { display: none; }
nav.top-nav a {
  color: white; text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 3px;
  transition: background 120ms;
}
nav.top-nav a:hover { background: var(--navy-2); }
nav.top-nav a.active { background: var(--navy-2); }

/* Menu button + dropdown */
.menu-wrap { position: relative; }
.menu-btn {
  background: rgba(255,255,255,0.10);
  color: white; border: 1px solid rgba(255,255,255,0.22);
  padding: 8px 16px; border-radius: 3px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 120ms, border-color 120ms;
}
.menu-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); }
.menu-btn .chev { font-size: 10px; opacity: 0.85; transition: transform 150ms; }
.menu-btn.open .chev { transform: rotate(180deg); }
.menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: white; color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.25);
  padding: 6px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 150ms, transform 150ms, visibility 150ms;
  z-index: 100;
}
.menu-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-dropdown a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  color: var(--ink); text-decoration: none;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  transition: background 100ms;
}
.menu-dropdown a:hover { background: var(--navy-3); }
.menu-dropdown a.active { background: var(--navy-3); color: var(--navy); font-weight: 700; }
.menu-dropdown a .hint {
  color: var(--dim); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}
.menu-dropdown .sep {
  height: 1px; background: var(--line); margin: 6px 0;
}

.top-right { display: flex; align-items: center; gap: 14px; }
.lang-box {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 3px;
  overflow: hidden;
  background: transparent;
}
.lang-box .lang {
  background: transparent; color: rgba(255,255,255,0.72);
  border: 0; padding: 6px 9px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; cursor: pointer;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: background 120ms, color 120ms;
}
.lang-box .lang:last-child { border-right: 0; }
.lang-box .lang:hover { color: white; background: rgba(255,255,255,0.08); }
.lang-box .lang.active { color: white; background: rgba(255,255,255,0.16); }
.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 44px 22px 32px;
}
.page-head .inner { max-width: 1160px; margin: 0 auto; }
.page-head .kicker {
  color: var(--accent);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.page-head h1, .page-head .ph-title {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 700;
  margin: 0 0 10px;
}
.page-head p.lede {
  color: var(--muted);
  font-size: 15px; line-height: 1.6;
  max-width: 640px;
  margin: 0;
}
main.page {
  padding: 32px 22px 60px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

/* Mobile hamburger — a bottom strip that mirrors the top nav on small screens */
.mobile-nav-bar {
  display: none;
  position: sticky; bottom: 0; z-index: 15;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-nav-bar::-webkit-scrollbar { display: none; }
.mobile-nav-bar .strip {
  display: inline-flex; gap: 6px; padding: 0 6px;
}
.mobile-nav-bar a {
  color: rgba(255,255,255,0.78); text-decoration: none;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 3px;
  white-space: nowrap;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.mobile-nav-bar a.active {
  color: white;
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}

@media (max-width: 900px) {
  nav.top-nav { display: none; }
  .menu-wrap { display: block; position: relative; }
}
@media (max-width: 720px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .menu-btn { padding: 7px 12px; font-size: 12px; }
  .menu-dropdown { min-width: 200px; }
  .brand .brand-mark { height: 26px; }
  .brand .name { font-size: 18px; gap: 8px; }
  .brand .tag { font-size: 9px; letter-spacing: 0.22em; }
  .lang-box .lang { padding: 5px 7px; font-size: 10px; }

  .page-head { padding: 28px 16px 22px; }
  .page-head h1, .page-head .ph-title { font-size: 26px; }
  .page-head p.lede { font-size: 14px; }
  main.page { padding: 22px 16px 90px; }

  .mobile-nav-bar { display: block; }
}


/* cartas-v3: unified trilingual nav */
/* kill legacy top-nav and dropdown, always */
.top-nav, .menu-wrap, .menu-btn, .menu-dropdown, .lang-box { display: none !important; }
.top-right { display: none !important; }

/* topbar: brand left, flag switcher right */
.topbar { padding: 12px 22px; gap: 14px; }
.lang-switch { display: inline-flex; gap: 6px; align-items: center; }
.lang-switch .flag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.10);
  color: white; border: 1px solid rgba(255,255,255,0.22);
  padding: 6px 10px; border-radius: 4px;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; cursor: pointer;
  transition: background 120ms, border-color 120ms;
  min-height: 34px;
}
.lang-switch .flag:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.lang-switch .flag.active { background: rgba(255,255,255,0.20); border-color: rgba(255,255,255,0.5); }
.lang-switch .flag-emoji { font-size: 18px; line-height: 1; }
.lang-switch .flag-code { font-size: 11px; opacity: 0.9; }

/* site-nav: full nav strip, always visible, sticky at bottom on mobile, integrated below topbar on desktop */
.site-nav {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 8px 10px;
  position: sticky; top: 60px; z-index: 15;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav .strip {
  display: flex; gap: 6px; padding: 0 4px; max-width: 1160px; margin: 0 auto;
  justify-content: center; flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 3px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  transition: background 120ms, border-color 120ms;
}
.site-nav a:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.site-nav a.active { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.30); color: white; }

/* hide legacy mobile-nav-bar (bottom sticky) — replaced by site-nav */
.mobile-nav-bar { display: none !important; }

/* mobile tuning */
@media (max-width: 720px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand .name { font-size: 16px; letter-spacing: 0.04em; }
  .brand .brand-mark { height: 22px; }
  .lang-switch .flag { padding: 5px 8px; min-height: 30px; }
  .lang-switch .flag-emoji { font-size: 16px; }
  .lang-switch .flag-code { font-size: 10px; }
  .site-nav { top: 52px; padding: 6px 8px; overflow-x: auto; }
  .site-nav .strip { justify-content: flex-start; flex-wrap: nowrap; }
  .site-nav a { padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
  .brand .name { font-size: 14px; letter-spacing: 0.03em; }
  .lang-switch .flag { padding: 4px 6px; gap: 4px; }
  .lang-switch .flag-code { display: none; }
  .lang-switch .flag-emoji { font-size: 18px; }
}

/* rtl support when hebrew is active */
html[lang="he"] { direction: rtl; }
html[lang="he"] .site-nav .strip { flex-direction: row-reverse; }
html[lang="he"] .topbar { flex-direction: row-reverse; }

/* i18n banner (letters/pages that show only PT body) */
.i18n-banner {
  max-width: 1120px; margin: 0 auto;
  padding: 10px 22px; background: #fff7e6; border-bottom: 1px solid #f0d998;
  color: #6b4a00; font-size: 13px; line-height: 1.5; text-align: center;
  display: none;
}
html[lang="en"] .i18n-banner, html[lang="he"] .i18n-banner { display: block; }
