/* ==========================================================================
   Voix Foundation — Stylesheet
   Design tokens
   -- ink        #0B0C0E  primary dark / header / footer
   -- paper      #F6F3EC  warm background
   -- orange     #F04F1C  brand accent (from mark)
   -- orange-dk  #C43B10  accent hover/active
   -- blue       #12314F  focus-area / tech accent
   -- slate      #545B63  body copy on paper
   -- line       #E4DFD3  hairline rule on paper
   ========================================================================== */

:root {
  --ink: #0b0c0e;
  --ink-soft: #17191d;
  --paper: #f6f3ec;
  --paper-dim: #efeadd;
  --orange: #f04f1c;
  --orange-dark: #c43b10;
  --blue: #12314f;
  --slate: #545b63;
  --slate-light: #8a8f96;
  --line: #e4dfd3;
  --line-dark: #2a2d33;
  --white: #ffffff;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img, svg, video { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration: none; }

/* Any element that would otherwise force the viewport wider than the screen
   (long unbroken URLs/words pasted into admin-authored content, etc.) wraps instead */
.prose, .list-row p, .list-row h3 { overflow-wrap: break-word; word-break: break-word; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Responsive split-layout utilities ----------
   Used instead of inline grid-template-columns so every two-column
   page (contact, donate, membership, career-single, focus-area, etc.)
   properly collapses to a single column on mobile. */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.split-narrow-wide { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
.split-wide-narrow { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) {
  .split-2, .split-narrow-wide, .split-wide-narrow { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr; gap: 0; }
}

/* Grid/flex items default to min-width:auto, which stops them shrinking
   below their content's intrinsic size and is the #1 cause of silent
   horizontal overflow on mobile (text/images pushing past the viewport
   edge while html/body's overflow-x:hidden just clips it invisibly).
   Force every column of every grid layout on the site to be free to
   shrink to the track width instead. */
.split-2 > *, .split-narrow-wide > *, .split-wide-narrow > *,
.form-row-2 > *, .donate-band .inner > *, .newsletter .inner > *,
.footer-grid > *, .founder-split > *, .card-grid > *, .card-grid-2 > *,
.focus-grid > *, .team-grid > *, .stats-strip-inner > *, .nav-cols > * {
  min-width: 0;
}

@media (max-width: 700px) {
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .wrap { padding: 0 18px; }

  /* Justified text needs a fairly wide column to look right — on narrow
     phone widths it produces uneven "rivers" of whitespace between words
     and is a common source of readability complaints, so switch every
     justified paragraph (inline-styled or via .prose) to left-aligned. */
  .prose p, [style*="text-align:justify"], [style*="text-align: justify"] {
    text-align: left !important;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--orange);
  display: inline-block;
}

p { line-height: 1.65; color: var(--slate); margin: 0 0 1em; }

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 3px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }

/* Download button animation (publications.php) — progress-fill sweep + bouncing
   arrow while "downloading", then a checkmark confirmation. Purely a tactile
   confirmation layered on top of the real file download, which fires instantly. */
.dl-btn { position: relative; overflow: hidden; isolation: isolate; }
.dl-btn-bar {
  position: absolute; inset: 0; width: 0%;
  background: var(--orange); opacity: .16;
  transition: width 1.05s cubic-bezier(.4,0,.2,1);
  z-index: 0; pointer-events: none;
}
.dl-btn.is-downloading .dl-btn-bar { width: 100%; }
.dl-btn.is-done .dl-btn-bar { width: 100%; opacity: .22; transition: opacity .4s ease .3s; }
.dl-btn-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.dl-icon-check { display: none; }
.dl-btn.is-downloading .dl-icon-arrow { animation: dlBounce .65s ease-in-out infinite; }
.dl-btn.is-done .dl-icon-arrow { display: none; }
.dl-btn.is-done .dl-icon-check { display: inline-block; color: var(--orange); animation: dlPop .35s cubic-bezier(.34,1.56,.64,1); }
.dl-btn.is-done { border-color: var(--orange); color: var(--orange); }
@keyframes dlBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes dlPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* Alpine.js — hide [x-cloak] elements until Alpine has initialized, so
   loading-state text (e.g. "Sending…") never flashes on page load */
[x-cloak] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
  transition: background-color .25s ease, border-color .25s ease;
}
.site-header-transparent {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom-color: transparent;
}
.site-header-transparent.is-scrolled {
  position: fixed;
  background: var(--ink);
  border-bottom-color: var(--line-dark);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand-logo { height: 44px; width: auto; display: block; flex-shrink: 0; }
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-lockup .mark {
  font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: 0.14em;
  color: var(--white); line-height: 1; text-transform: uppercase;
  /* Reset Bootstrap's .mark utility (yellow highlight background + padding,
     meant for <mark>-style text highlighting) — this span is the brand wordmark, not a highlight */
  background: none; padding: 0;
}
.brand-lockup .descriptor {
  font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--white);
  padding-top: 0; max-width: none;
}
.site-header .brand-lockup .mark,
.site-header .brand-lockup .descriptor { color: var(--white); }
.site-footer .brand-lockup .mark,
.site-footer .brand-lockup .descriptor { color: var(--white); }

.main-nav { display: none; }
.main-nav > ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.85); font-size: 14.5px; font-weight: 500;
  padding: 28px 14px; transition: color .15s ease;
}
.nav-link:hover, .main-nav li.active > .nav-link { color: var(--white); }
.nav-link .chev { font-size: 10px; opacity: .7; transition: transform .2s ease; }
.main-nav li:hover .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  min-width: 300px;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease;
}
.main-nav li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 11px 14px; border-radius: 3px; color: var(--ink);
  font-size: 14.5px; font-weight: 500;
}
.dropdown a:hover { background: var(--paper-dim); color: var(--orange-dark); }
.dropdown .code { font-family: var(--font-mono); font-size: 11px; color: var(--orange); margin-right: 6px; }

.header-cta { display: flex; align-items: center; gap: 22px; }
.donate-pill {
  background: transparent; color: var(--white); font-weight: 700; font-size: 13.5px;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 13px 30px; border-radius: 30px; transition: background .15s ease, color .15s ease, border-color .15s ease;
  border: 1.5px solid rgba(255,255,255,.75);
}
.donate-pill:hover { background: var(--white); color: var(--ink); }

.burger { display: flex; align-items: center; justify-content: center; position: relative; width: 44px; height: 44px; margin: -9px; background: none; border: 0; color: var(--white); font-size: 24px; cursor: pointer; line-height: 1; }
.burger-icon-open, .burger-icon-close {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  transition: opacity .15s ease, transform .15s ease;
}
.burger-icon-close { opacity: 0; transform: translate(-50%,-50%) rotate(-90deg); }

@media (max-width: 980px) {
  .header-cta .donate-pill span.long { display: none; }
}
@media (max-width: 420px) {
  .header-inner { height: 66px; }
  .brand-logo { height: 34px; }
  .brand-lockup .mark { font-size: 19px; letter-spacing: .1em; }
  .brand-lockup .descriptor { font-size: 10px; letter-spacing: .22em; }
  .header-cta { gap: 12px; }
  .donate-pill { padding: 9px 16px; font-size: 12px; }
  .nav-panel { top: 66px; }
}

/* ---------- Nav open state: header switches to light mode (ECCHR-style) ---------- */
body.nav-open .site-header {
  background: var(--white);
  border-bottom-color: var(--line);
}
body.nav-open .site-header-transparent {
  position: fixed;
}
body.nav-open .site-header .brand-lockup .mark,
body.nav-open .site-header .brand-lockup .descriptor { color: var(--ink); }
body.nav-open .site-header .donate-pill {
  color: var(--ink); border-color: var(--ink);
}
body.nav-open .site-header .donate-pill:hover { background: var(--ink); color: var(--white); }
body.nav-open .site-header .burger { color: var(--ink); }
body.nav-open .burger-icon-open { opacity: 0; transform: translate(-50%,-50%) rotate(90deg); }
body.nav-open .burger-icon-close { opacity: 1; transform: translate(-50%,-50%) rotate(0); }
body.nav-open { overflow: hidden; }

/* ---------- Nav panel (top-docked mega menu, ECCHR-style) ---------- */
.nav-panel {
  position: fixed; top: 78px; left: 0; right: 0; z-index: 199;
  background: var(--white); color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(0,0,0,.18);
  max-height: calc(100vh - 78px);
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-14px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.nav-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-panel-inner { padding: 44px 24px 32px; }
.nav-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.nav-col h4 {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .08em; color: var(--slate-light); margin: 0 0 14px;
}
.nav-col-link { display: block; text-decoration: none; }
.nav-col-link h4 { transition: color .15s ease; }
.nav-col-link:hover h4 { color: var(--orange-dark); }
.nav-col ul { list-style: none; margin: 0; padding: 0; }
.nav-col li + li { margin-top: 2px; }
.nav-col a {
  display: block; padding: 6px 0; font-size: 17px; font-weight: 600; color: var(--ink);
  transition: color .15s ease;
}
.nav-col a:hover { color: var(--orange-dark); }
.nav-panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
}
.nav-search { display: flex; align-items: center; gap: 8px; background: var(--paper-dim); border-radius: 30px; padding: 10px 8px 10px 18px; flex: 0 1 320px; }
.nav-search input { flex: 1; border: 0; background: none; font-family: var(--font-body); font-size: 16px; color: var(--ink); outline: none; }
.nav-search input::placeholder { color: var(--slate-light); }
.nav-search button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--ink); color: var(--white); cursor: pointer; font-size: 14px; }
@media (max-width: 900px) {
  .nav-cols { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .nav-panel-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .nav-cols { grid-template-columns: 1fr; }
  .nav-panel { top: 78px; }
}

/* ---------- Hero (full-bleed background, ECCHR-style) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background-color: var(--ink);
}
.hero-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  overflow: hidden;
}
.hero-bg-video {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}
.hero-bg::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(180deg, rgba(11,12,14,.15) 0%, rgba(74,20,10,.28) 45%, rgba(11,12,14,.55) 100%),
    linear-gradient(100deg, rgba(74,20,10,.35) 0%, rgba(11,12,14,.05) 55%, rgba(74,20,10,.2) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 0 80px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  color: var(--white);
  max-width: 980px;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-lead { color: rgba(255,255,255,.82); font-size: 17px; max-width: 50ch; margin: 22px auto 30px; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.hero .stats-strip {
  position: relative; z-index: 1;
  flex: 0 0 auto;
}
@media (max-width: 700px) {
  .hero-inner { min-height: 92vh; min-height: 92dvh; padding: 120px 0 60px; }
}

/* ---------- Section basics ---------- */
.section { padding: 92px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3vw, 38px); max-width: 620px; }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark p { color: rgba(255,255,255,.68); }
.section-dark .section-head h2 { color: var(--white); }

/* ---------- Cards: News/Cases ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 660px) { .card-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .card-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transform-style: preserve-3d; transform: perspective(1000px) rotateX(0) rotateY(0) translateZ(0);
  transition: transform .35s cubic-bezier(.22,.9,.34,1), box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
.news-card:hover {
  box-shadow: 0 26px 54px -18px rgba(11,12,14,.28), 0 6px 16px rgba(11,12,14,.08);
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-6px) translateZ(0);
  border-color: rgba(240,79,28,.35);
}
.news-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--paper-dim); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .thumb img { transform: scale(1.08); }
.news-card .body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.news-card .cat { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); margin-bottom: 10px; }
.news-card h3 { font-size: 19px; margin-bottom: 10px; }
.news-card p { font-size: 14.5px; flex: 1; }
.news-card .meta { font-size: 12.5px; color: var(--slate-light); margin-top: 14px; font-family: var(--font-mono); }

/* ---------- Focus Areas grid ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 980px) { .focus-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .focus-grid { grid-template-columns: 1fr; } }
.focus-tile {
  background: var(--white); padding: 30px 26px; min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  transition: background .25s ease, transform .3s cubic-bezier(.22,.9,.34,1), box-shadow .3s ease;
}
.focus-tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(240,79,28,.10), transparent 60%);
  transition: opacity .3s ease;
}
.focus-tile:hover {
  background: var(--paper-dim);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -20px rgba(11,12,14,.3);
}
.focus-tile:hover::before { opacity: 1; }
.focus-tile .code { font-family: var(--font-mono); font-size: 11px; color: var(--orange); letter-spacing: .06em; }
.focus-tile h3 { font-size: 18px; margin: 10px 0 8px; }
.focus-tile p { font-size: 13.8px; margin: 0; }
.focus-tile .go { margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--ink); transition: transform .25s ease, color .25s ease; display: inline-block; }
.focus-tile:hover .go { color: var(--orange-dark); transform: translateX(4px); }

/* ---------- Donate band ---------- */
.donate-band { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.donate-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(240,79,28,.28), transparent 70%);
  animation: floatGlow 9s ease-in-out infinite;
}
.donate-band::before {
  content: ""; position: absolute; left: -100px; bottom: -120px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(18,49,79,.55), transparent 70%);
  animation: floatGlow 11s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 22px) scale(1.08); }
}
.donate-band .inner { position: relative; padding: 78px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.donate-band h2 { color: var(--white); font-size: clamp(26px,3vw,36px); margin-bottom: 14px; }
.donate-band .stat { font-family: var(--font-mono); font-size: 13px; color: var(--orange); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
@media (max-width: 820px) { .donate-band .inner { grid-template-columns: 1fr; } }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.newsletter .inner { padding: 60px 0; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.newsletter h2 { font-size: 26px; margin-bottom: 8px; }
.nform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nform .full { grid-column: 1 / -1; }
.nform label { font-size: 12.5px; color: var(--slate); display: block; margin-bottom: 6px; font-weight: 600;}
@media (max-width: 820px) { .newsletter .inner { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--white);
  border-radius: 3px; padding: 12px 14px; font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--orange); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
@media (max-width: 700px) {
  /* 16px prevents iOS Safari from auto-zooming the page when a field is focused */
  .field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
    font-size: 16px;
  }
}
.checkbox-field { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 70px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--line-dark); }
.footer-grid h4 { color: var(--white); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: var(--orange); }
.footer-brand .brand-word { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,.55); font-size: 14px; max-width: 34ch; margin-top: 14px; }
.social-row { display: flex; gap: 12px; margin-top: 20px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: var(--white); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.social-row a:hover { background: var(--orange); border-color: var(--orange); color: var(--white); transform: translateY(-2px); }
.nav-panel .social-row { margin-top: 0; }
.nav-panel .social-row a { background: var(--ink); border-color: var(--ink); color: var(--white); }
.nav-panel .social-row a:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Breadcrumb / page header ---------- */
.page-head { background: var(--ink); color: var(--white); padding: 64px 0 54px; }
.page-head .eyebrow { color: var(--orange); }
.page-head h1 { color: var(--white); font-size: clamp(30px, 4vw, 46px); margin-top: 14px; }
.page-head p { color: rgba(255,255,255,.68); max-width: 62ch; margin-top: 16px; font-size: 16.5px; }
.crumb { font-size: 13px; color: rgba(255,255,255,.5); }
.crumb a:hover { color: var(--orange); }

/* ---------- Content typography (article bodies) ---------- */
.prose h2 { font-size: 26px; margin: 40px 0 14px; }
.prose h3 { font-size: 20px; margin: 30px 0 12px; }
.prose p { font-size: 16.5px; color: var(--ink); opacity: .86; margin-bottom: 18px; text-align: justify; }
.prose ul, .prose ol { color: var(--ink); opacity: .86; font-size: 16px; line-height: 1.7; padding-left: 22px; margin-bottom: 18px;}
.prose li { margin-bottom: 8px; }
.prose a { color: var(--orange-dark); text-decoration: underline; }
.prose blockquote {
  border-left: 3px solid var(--orange); margin: 28px 0; padding: 4px 0 4px 22px;
  font-family: var(--font-display); font-size: 21px; font-style: italic; color: var(--ink);
}

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 800px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { transition: transform .3s cubic-bezier(.22,.9,.34,1); }
.team-card:hover { transform: translateY(-6px); }
.team-card .photo { aspect-ratio: 4/5; background: var(--paper-dim); border-radius: 10px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 4px 14px rgba(11,12,14,.08); transition: box-shadow .3s ease; }
.team-card:hover .photo { box-shadow: 0 24px 46px -16px rgba(11,12,14,.32); }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.team-card:hover .photo img { transform: scale(1.07); }
.team-card .photo.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 46px; color: var(--slate-light); }
.team-card h3 { font-size: 19px; }
.team-card .role { color: var(--orange-dark); font-size: 13.5px; font-weight: 600; margin: 4px 0 10px; }
.team-card p { font-size: 14px; }

/* ---------- Founder split ---------- */
.founder-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.founder-split img { border-radius: 6px; }
@media (max-width: 860px) { .founder-split { grid-template-columns: 1fr; } }

/* ---------- Founder 3D photo card ---------- */
.founder-photo-frame {
  position: relative;
  perspective: 1400px;
}
.founder-photo-frame::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), transparent 55%, var(--blue) 130%);
  opacity: .55;
  filter: blur(2px);
  z-index: 0;
  transition: opacity .3s ease;
}
.founder-photo-frame:hover::before { opacity: .85; }
.founder-tilt {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: rotateX(var(--tiltY, 0deg)) rotateY(var(--tiltX, 0deg)) translateZ(0);
  transition: transform .25s cubic-bezier(.22,.9,.34,1), box-shadow .25s ease;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.12);
  background: var(--ink);
}
.founder-tilt:hover { box-shadow: 0 34px 80px -14px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.16); }
.founder-tilt img {
  display: block; width: 100%; height: auto;
  transform: translateZ(20px) scale(1.02);
  transition: transform .35s ease, filter .35s ease;
}
.founder-tilt:hover img { transform: translateZ(34px) scale(1.06); }
.founder-badge {
  position: absolute; top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11,12,14,.72); backdrop-filter: blur(6px);
  color: var(--white); font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  padding: 7px 12px 7px 10px; border-radius: 30px;
  border: 1px solid rgba(255,255,255,.18);
  transform: translateZ(46px);
  z-index: 2;
}
.founder-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(240,79,28,.25); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: .1s; }
.reveal-delay-2.is-visible { transition-delay: .2s; }

/* ---------- Founder quote card ---------- */
.founder-quote {
  position: relative;
  margin: 30px 0 4px;
  padding: 26px 28px 24px 58px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.16);
  font-family: var(--font-display); font-size: 21px; font-style: italic; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}
.founder-quote:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -16px rgba(0,0,0,.22); }
.founder-quote::before {
  content: "\201C";
  position: absolute; left: 18px; top: 6px;
  font-family: var(--font-display); font-size: 54px; font-style: normal;
  color: var(--orange); opacity: .55; line-height: 1;
}
@media (max-width: 480px) {
  .founder-quote { padding: 22px 20px 20px 46px; font-size: 18px; }
  .founder-quote::before { left: 12px; font-size: 42px; }
}

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-strip-inner { display: grid; grid-template-columns: repeat(4,1fr); }
.stats-strip-inner div { padding: 30px 24px; border-left: 1px solid var(--line); transition: background .25s ease; }
.stats-strip-inner div:first-child { border-left: 0; }
.stats-strip-inner div:hover { background: rgba(240,79,28,.05); }
.stats-strip .num { font-family: var(--font-display); font-size: 34px; color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.stats-strip .lbl { font-size: 13px; color: var(--slate); margin-top: 4px; }
@media (max-width: 700px) { .stats-strip-inner { grid-template-columns: 1fr 1fr; } .stats-strip-inner div:nth-child(3){ border-left:0; } }

/* ---------- Job / publication list rows ---------- */
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row h3 { font-size: 19px; margin-bottom: 6px; }
.list-row .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag-pill { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: var(--paper-dim); border: 1px solid var(--line); padding: 4px 10px; border-radius: 20px; color: var(--slate); }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 4px; font-size: 14px; margin-bottom: 20px; }
.alert-success { background: #e7f5ea; color: #1c6b34; border: 1px solid #bfe6c9; }
.alert-error { background: #fdeae5; color: #a4300f; border: 1px solid #f6c3b3; }

/* ---------- Utility ---------- */
.tac { text-align: center; }
.mt-0 { margin-top: 0; }
.text-white { color: #fff; }
.swiper-pagination-bullet-active { background: var(--orange) !important; }

/* ---------- Glowing signature (footer credit, bottom-right) ---------- */
.dev-credit-link { color: #4a90d9; font-weight: 700; }
.dev-credit-link:hover { color: var(--orange); }
.footer-bottom-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.signature {
  --sig-ink: #e8e6df;   /* resting text color, tuned against the dark footer background */
  --sig-glow: #ffd27a;  /* glow / underline color */
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-family: 'Alex Brush', cursive;
  font-size: 26px;
  line-height: 1;
  color: var(--sig-ink);
  padding: 0.25rem 0.5rem 0.4rem;
  transform: rotate(-2deg);
  transition: color 0.4s ease, text-shadow 0.4s ease, transform 0.3s ease;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
}

.signature:hover,
.signature:focus-visible,
.signature:active {
  color: #fff8ec;
  transform: rotate(-2deg) scale(1.04);
  text-shadow:
    0 0 2px  var(--sig-glow),
    0 0 6px  var(--sig-glow),
    0 0 14px var(--sig-glow),
    0 0 28px rgba(255, 178, 60, 0.35);
}

.signature:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 210, 122, 0.5);
  border-radius: 4px;
}

.signature__underline {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  width: calc(100% - 12px);
  height: 8px;
  pointer-events: none;
}

.signature__underline path {
  fill: none;
  stroke: var(--sig-glow);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  opacity: 0;
  transition: stroke-dashoffset 0.6s ease, opacity 0.3s ease;
}

.signature:hover .signature__underline path,
.signature:focus-visible .signature__underline path,
.signature:active .signature__underline path {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* Mobile: keep it comfortably tappable and correctly positioned bottom-right
   within the footer's bottom row (which itself wraps under the copyright line
   on narrow screens via .footer-bottom's flex-wrap). */
@media (max-width: 560px) {
  .footer-bottom-right { width: 100%; justify-content: flex-end; }
  .signature { font-size: 24px; padding: 0.35rem 0.5rem 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .signature,
  .signature__underline path {
    transition: none;
  }
}

/* ---------- Floating actions: WhatsApp + back to top ---------- */
.float-actions {
  position: fixed; right: 22px; bottom: 22px; z-index: 250;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.float-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease, visibility .2s ease;
}
.float-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,.34); }
.float-whatsapp { background: #25d366; color: var(--white); }
.float-top {
  background: var(--ink); color: var(--white);
  border: 1px solid rgba(246,243,236,.18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
}
.float-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.float-top:hover { background: var(--orange); border-color: var(--orange); }

@media (max-width: 560px) {
  .float-actions { right: 14px; bottom: 14px; gap: 10px; }
  .float-btn { width: 46px; height: 46px; }
}

/* ---------- Mobile bottom tab bar ----------
   App-style quick nav shown only on phones. Keeps the 3 highest-intent
   actions one thumb-tap away and gives the mobile experience a clear
   "home base" the way a native app would. */
.mobile-tabbar {
  display: none;
}

@media (max-width: 760px) {
  body { padding-bottom: 74px; }

  .mobile-tabbar {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 240;
    height: 68px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -12px 30px rgba(0,0,0,.22);
    transition: transform .25s ease, opacity .2s ease;
  }
  body.nav-open .mobile-tabbar { transform: translateY(100%); opacity: 0; pointer-events: none; }

  .mobile-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; height: 68px; color: rgba(255,255,255,.6);
    font-family: var(--font-body); font-size: 11px; font-weight: 600;
    transition: color .15s ease;
  }
  .mobile-tab svg { width: 21px; height: 21px; }
  .mobile-tab.is-active { color: var(--white); }
  .mobile-tab.is-active svg { color: var(--orange); }
  .mobile-tab:active { color: var(--orange); }

  .mobile-tab-cta { position: relative; color: rgba(255,255,255,.85); }
  .mobile-tab-cta-circle {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-top: -18px;
    border-radius: 50%; background: var(--orange);
    border: 3px solid var(--ink);
    box-shadow: 0 8px 18px rgba(240,79,28,.5);
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .mobile-tab-cta-circle svg { width: 20px; height: 20px; color: var(--white); }
  .mobile-tab-cta:active .mobile-tab-cta-circle { transform: scale(.92); }

  /* Move the WhatsApp/back-to-top stack up so it clears the tab bar */
  .float-actions { bottom: 84px; }
}

@media (max-width: 420px) {
  body { padding-bottom: 68px; }
  .mobile-tabbar { height: 62px; }
  .mobile-tab { height: 62px; font-size: 10.3px; }
  .float-actions { bottom: 78px; }
}
