:root {
  --primary: #f38502;
  --primary-2: #e26b1e;
  --contrast: #0f2540;
  --muted: #6b7280;
  --cream: #fff6ef;
  --card: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 8px 24px rgba(10,14,20,0.06);
  --shadow-lg: 0 20px 60px rgba(10,14,20,0.10);
  --glass: rgba(255,255,255,0.75);
  --container: 1140px;
  --ease: cubic-bezier(.2,.9,.2,1);
  --header-height-desktop: 94px;
  --header-height-mobile: 110px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--cream), #ffffff 40%);
  color: var(--contrast);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 94%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 0;
}

/* --------------------
   Header (fixed)
   -------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.92));
  border-bottom: 1px solid rgba(15,17,20,0.03);
  box-shadow: 0 6px 18px rgba(16,20,24,0.03);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), background .3s var(--ease);
  -webkit-backdrop-filter: blur(6px);
}

/* Scrolled header state (JS toggles .scrolled) */
.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(14,18,30,0.08);
  background: rgba(255, 255, 255, 0.94);
}
.site-header.scrolled .logo {
  width: 64px;
  height: 64px;
  transition: width .3s var(--ease), height .3s var(--ease);
}

.header-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

/* Brand */
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 4px solid rgba(255,250,246,0.95);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease);
  transform-origin: center;
  will-change: transform;
}
.logo:hover { transform: rotate(-6deg) scale(1.04); }

.brand-text h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.05;
}
.brand-text .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Nav layout */
.menu-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  display: none; /* shown on mobile via media query */
}
.nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
  /* Mobile-friendly default (hidden), but desktop override below ensures visibility */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  position: relative;
  z-index: 120;
}
.nav.show {
  display: flex;
  opacity: 1;
  transform: none;
}

/* Nav link style */
.nav a {
  text-decoration: none;
  color: var(--contrast);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 220ms var(--ease);
  position: relative;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

/* Gradient underline effect */
.nav a::after {
  content: '';
  position: absolute;
  left: 10%; right: 10%;
  bottom: 7px;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms var(--ease), opacity 180ms var(--ease);
  opacity: 0;
}
.nav a:hover { transform: translateY(-3px); color: var(--primary-2); }
.nav a:hover::after { transform: scaleX(1); opacity: 1; }

/* Active link: pill */
.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px rgba(226,100,40,0.10);
}
.nav a.active::after { opacity: 0; transform: scaleX(0); }

/* Desktop: ensure nav is visible and inline */
@media (min-width: 760px) {
  .nav {
    display: flex !important;
    opacity: 1 !important;
    transform: none !important;
    position: static;
    top: auto;
    right: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .menu-btn { display: none !important; }
}

/* ensure main content not hidden by the fixed header */
body > main { padding-top: var(--header-height-desktop); }
@media (max-width:760px) {
  body > main { padding-top: var(--header-height-mobile); }
}

/* --------------------
   Hero
   -------------------- */
.hero { padding: 36px 0 56px; }
.hero-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.hero-copy {
  flex: 1;
  min-width: 260px;
  max-width: 720px;
}
.hero-copy h2 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  color: var(--contrast);
  line-height: 1.04;
  letter-spacing: 0.2px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .7s .08s forwards;
}
.lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .7s .18s forwards;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .7s .28s forwards;
}
.hero-meta {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .7s .36s forwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn.primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 40px rgba(226,100,40,0.12);
}
.btn.primary:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.btn.outline {
  background: transparent;
  border: 2px solid rgba(243,133,2,0.12);
  color: var(--primary);
  font-weight: 800;
}

/* Hero image */
.hero-image {
  width: 420px;
  height: 320px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  border: 6px solid rgba(255,255,255,0.9);
  transform: translateY(-4px);
  transition: transform .6s var(--ease), box-shadow .35s var(--ease);
}
.hero-image:hover {
  box-shadow: 0 30px 80px rgba(10,14,20,0.12);
}

/* --------------------
   Sections & Cards
   -------------------- */
.section { padding: 34px 0; }
h3 {
  font-size: 1.35rem;
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  color: var(--contrast);
}
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 320ms var(--ease), box-shadow 220ms var(--ease);
  opacity: 0;
  transform: translateY(18px);
}
.card.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* Pillars layout */
.pillar-grid {
  display: block;
  gap: 16px;
}
.pillar-grid .card { margin-bottom: 12px; }
@media (min-width:760px) {
  .pillar-grid { display: flex; gap: 20px; align-items: stretch; }
  .pillar-grid .card {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}
.pillar-grid .card {
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), #fff);
  box-shadow: 0 12px 30px rgba(14,18,30,0.06);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: transform .36s var(--ease), box-shadow .36s var(--ease), opacity .36s var(--ease);
}
.pillar-grid .card:hover {
  transform: translateY(-8px) rotateX(0.6deg) scale(1.01);
  box-shadow: 0 18px 50px rgba(14,18,30,0.09);
}

/* --------------------
   Grid helpers
   -------------------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width:760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3,1fr); }
}

/* Contributors */
.contributors-list .contrib {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(15,17,20,0.04);
}
.more-list summary {
  cursor: pointer;
  font-weight: 700;
  margin-top: 10px;
}

/* Info tables and forms */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.info-table td {
  padding: 10px 8px;
  border-bottom: 1px dashed rgba(15,17,20,0.04);
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--contrast);
}
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(15,17,20,0.06);
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

/* Footer */
.site-footer {
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Reveal util */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: all 520ms var(--ease);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* Mobile-specific nav & layout */
@media (max-width:760px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: fixed;
    right: 12px;
    top: 86px;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    min-width: 220px;
    z-index: 140;
  }
  .nav.show { display: flex; opacity: 1; transform: none; }
  .hero-inner { flex-direction: column-reverse; gap: 18px; }
  .hero-image { width: 100%; height: 220px; transform: none; border-width: 5px; }
  .brand-text h1 { font-size: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Micro-interactions & accessibility */
.btn:focus { outline: 3px solid rgba(243,133,2,0.18); outline-offset: 3px; }
.nav a:focus { outline: 3px solid rgba(243,133,2,0.12); outline-offset: 3px; border-radius: 8px; }
a { color: inherit; }

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-copy h2, .lead, .hero-actions, .hero-meta, .card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .hero-image { transition: none; }
}
