/* =========================================================
   VEN Foundation — Editorial Black & Gold System
   ========================================================= */

:root {
  /* Palette */
  --bg: #0A0A0A;
  --bg-2: #111111;
  --ink: #F5F1E8;
  --ink-dim: #B8B2A3;
  --ink-mute: #6E6859;
  --gold: #C9A961;          /* antique gold (default) */
  --gold-deep: #8B7340;
  --gold-soft: #E2CB8E;
  --hairline: #2A2620;
  --hairline-strong: #3A342A;

  /* Type */
  --f-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --f-italic: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --pad-x: clamp(24px, 6vw, 96px);
  --col-max: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: var(--bg); }

/* ---------- Layout ---------- */

.shell {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 0;
}
.rule.gold {
  background: linear-gradient(90deg, transparent, var(--gold-deep) 20%, var(--gold) 50%, var(--gold-deep) 80%, transparent);
  height: 1px;
}

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

.display-xl {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(48px, 7.8vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display-l {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.display-m {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.italic { font-family: var(--f-italic); font-style: italic; font-weight: 400; }

/* Brand lockup: "VEN Foundation" — always gold, Foundation always italic */
.brand-name {
  color: var(--gold);
  font-weight: inherit;
}
.brand-em {
  font-family: var(--f-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-dim);
  font-weight: 300;
  max-width: 56ch;
  text-wrap: pretty;
}

.body-l {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-dim);
  font-weight: 300;
}

.micro {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.gold-text { color: var(--gold); }
.ink-dim { color: var(--ink-dim); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 200ms ease;
}
.brand:hover { opacity: 0.85; }
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
/* Legacy text marks kept for accessibility (hidden from view) */
.brand-mark, .brand-sub {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 200ms ease;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

/* ---------- Language Switcher ---------- */

.lang-switch {
  position: relative;
  margin-left: 32px;
  padding-left: 32px;
  border-left: 1px solid var(--hairline);
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: all 200ms ease;
  border-radius: 2px;
}
.lang-trigger:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.lang-globe {
  display: inline-flex;
  color: var(--gold);
}
.lang-current { font-weight: 500; }
.lang-caret {
  width: 0; height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
  opacity: 0.6;
  transition: transform 200ms ease;
}
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: #0E0D0A;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 100;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}
.lang-menu::before {
  content: "";
  position: absolute;
  top: -1px; right: 24px;
  width: 8px; height: 8px;
  background: #0E0D0A;
  border-top: 1px solid var(--hairline-strong);
  border-left: 1px solid var(--hairline-strong);
  transform: translateY(-50%) rotate(45deg);
}
.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--f-body);
  color: var(--ink-dim);
  text-align: left;
  transition: all 180ms ease;
  border-radius: 1px;
}
.lang-option:hover {
  background: rgba(201, 169, 97, 0.06);
  color: var(--ink);
}
.lang-option.active {
  color: var(--gold);
  background: rgba(201, 169, 97, 0.04);
}
.lang-option .lang-short {
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--gold);
  min-width: 22px;
}
.lang-option .lang-label {
  font-family: var(--f-display);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}
.lang-option.active .lang-label { color: var(--gold); }

/* Language switcher: hidden in inline nav on mobile, shown in mobile drawer instead */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all 240ms ease;
  font-family: var(--f-body);
}
.btn:hover {
  background: var(--gold);
  color: var(--bg);
}
.btn .arrow {
  width: 18px; height: 1px;
  background: currentColor;
  position: relative;
  transition: width 240ms ease;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .arrow { width: 28px; }

.btn.solid {
  background: var(--gold);
  color: var(--bg);
}
.btn.solid:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}
.btn.ghost {
  border-color: var(--hairline-strong);
  color: var(--ink-dim);
}
.btn.ghost:hover {
  border-color: var(--gold);
  background: transparent;
  color: var(--gold);
}

/* ---------- Placeholder Imagery ---------- */

.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(201, 169, 97, 0.06) 0,
      rgba(201, 169, 97, 0.06) 1px,
      transparent 1px,
      transparent 14px
    ),
    linear-gradient(180deg, #15130E 0%, #0E0C08 100%);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--hairline);
  pointer-events: none;
}
.placeholder-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
  padding: 16px 24px;
  background: rgba(10,10,10,0.5);
  border: 1px solid var(--hairline-strong);
  z-index: 2;
  max-width: 80%;
  line-height: 1.8;
}
.placeholder-corner {
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--gold-deep);
  z-index: 1;
}
.placeholder-corner.tl { top: 12px; left: 12px; border-top: 1px solid; border-left: 1px solid; }
.placeholder-corner.tr { top: 12px; right: 12px; border-top: 1px solid; border-right: 1px solid; }
.placeholder-corner.bl { bottom: 12px; left: 12px; border-bottom: 1px solid; border-left: 1px solid; }
.placeholder-corner.br { bottom: 12px; right: 12px; border-bottom: 1px solid; border-right: 1px solid; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 120px;
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.footer-brand .display-m { margin-bottom: 16px; }
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 12px;
  font-weight: 300;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

/* ============================================================
   MOBILE NAVIGATION — hamburger + drawer
   ============================================================ */

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 200ms ease;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover, .nav-toggle:focus-visible { border-color: var(--gold); }
.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.nav-toggle-lines span {
  display: block;
  height: 1.5px;
  background: var(--gold);
  transition: transform 240ms ease, opacity 240ms ease;
  transform-origin: center;
}
body.nav-open .nav-toggle-lines span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.nav-open .nav-toggle-lines span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle-lines span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Drawer overlay for mobile menu */
.mobile-menu {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 49;
  padding: 100px 32px 40px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 300ms ease, transform 300ms ease, visibility 300ms;
  pointer-events: none;
  visibility: hidden;
}
body.nav-open .mobile-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu a {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 200ms ease, padding-left 240ms ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu a:hover, .mobile-menu a.active {
  color: var(--gold);
  padding-left: 12px;
}
.mobile-menu a.donate-link {
  color: var(--gold);
  margin-top: 24px;
  border-bottom: 0;
  padding: 18px 24px;
  border: 1px solid var(--gold);
  font-family: var(--f-body);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  justify-content: center;
  min-height: 56px;
}
.mobile-menu a.donate-link:hover {
  background: var(--gold);
  color: var(--bg);
  padding-left: 24px;
}
.mobile-menu-lang {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.mobile-menu-lang-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.mobile-menu-lang-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mobile-menu-lang-options button {
  padding: 14px 8px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-dim);
  font-family: var(--f-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  min-height: 44px;
}
.mobile-menu-lang-options button.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.06);
}
.mobile-menu-lang-options button:hover { border-color: var(--gold-deep); }

/* ============================================================
   MOBILE BREAKPOINTS
   ============================================================ */

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

  /* Hide desktop nav, show hamburger */
  .nav-links > a, .nav-links > .lang-switch {
    display: none;
  }
  .nav-toggle { display: inline-flex; }

  /* When drawer open, prevent body scroll */
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer { padding: 48px 0 32px; }

  /* Improve tap targets */
  .btn { padding: 18px 24px; min-height: 48px; }

  /* Ensure text is comfortable */
  html { font-size: 15px; }
  .lede { font-size: 16px; }
  .body-l { font-size: 16px; }

  /* Larger form controls */
  input, select, textarea { font-size: 16px; }
  /* iOS auto-zooms on focus if font-size < 16px */

  /* Nav padding tighter */
  .nav-inner { padding: 16px 0; }
  .brand-logo { height: 30px; }
}

@media (max-width: 400px) {
  .mobile-menu a { font-size: 26px; padding: 16px 0; }
  .mobile-menu { padding: 90px 24px 32px; }
}

/* ---------- Decorative Ornaments ---------- */

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold);
}
.ornament::before, .ornament::after {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.ornament-diamond {
  width: 6px; height: 6px;
  background: currentColor;
  transform: rotate(45deg);
}
