:root {
  --color-bg: #f7f4ec;
  --color-bg-alt: #efe8d8;
  --color-surface: #fffdf8;
  --color-ink: #1c1d22;
  --color-text-muted: #5c5e68;
  --color-navy: #1a2340;
  --color-navy-deep: #10182e;
  --color-orange: #c9622d;
  --color-orange-deep: #a94f22;
  --color-border: #ddd4bd;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1160px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--color-navy);
}

p { margin: 0 0 1em; }

a { color: var(--color-navy); }

::selection { background: var(--color-orange); color: #fff; }

/* Eyebrow labels */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange-deep);
  margin: 0 0 1rem;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.75);
}

/* Scroll reveal (progressive enhancement) */
.js .reveal {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.js .reveal.in-view {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s var(--ease);
}

.site-nav.is-scrolled {
  box-shadow: 0 4px 24px rgba(16, 24, 46, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 36px;
  width: auto;
  display: block;
}

.site-nav nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.site-nav nav a {
  position: relative;
  text-decoration: none;
  color: var(--color-ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0;
}

.site-nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--color-orange);
  transition: right 0.25s var(--ease);
}

.site-nav nav a:hover::after { right: 0; }

.site-nav nav a.nav-cta {
  background: var(--color-navy);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
}

.site-nav nav a.nav-cta::after { display: none; }
.site-nav nav a.nav-cta:hover { background: var(--color-navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* Hero */
.hero {
  position: relative;
  padding: 7rem 1.5rem 6rem;
  text-align: center;
  background: radial-gradient(120% 100% at 50% 0%, var(--color-navy) 0%, var(--color-navy-deep) 70%);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 64px
  );
  pointer-events: none;
}

.hero-inner { max-width: 680px; margin: 0 auto; position: relative; }

.hero-logo {
  width: 130px;
  max-width: 40%;
  height: auto;
  margin-bottom: 1.75rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  font-weight: 500;
}

.hero-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 100px;
  display: block;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: #fff;
  transform: translateX(-50%);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-orange);
  color: #fff;
}

.btn-primary:hover { background: var(--color-orange-deep); }

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.section .btn-secondary {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.section .btn-secondary:hover { background: var(--color-navy); color: #fff; }

/* Sections */
.section {
  --section-pad: 4.5rem;
  padding: var(--section-pad) 1.5rem;
  /* land the eyebrow ~1.25rem below the fixed nav, not a full section-pad */
  scroll-margin-top: calc(64px + 1.5rem - var(--section-pad));
}

@media (min-width: 960px) {
  .section { --section-pad: 6rem; }
}

.section-alt { background: var(--color-bg-alt); }

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section h2 { font-size: clamp(1.85rem, 3.4vw, 2.5rem); }

.section-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-top: -0.15em;
  max-width: 46ch;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(5, 1fr); }
}

.card {
  position: relative;
  background: transparent;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 1.5rem 2.25rem;
  transition: background 0.25s var(--ease);
}

.card:hover { background: var(--color-surface); }

.card-index {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-border);
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.08rem;
  color: var(--color-navy-deep);
  margin-bottom: 0.6em;
}

.card p {
  font-size: 0.92rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

@media (min-width: 760px) {
  .story-grid { grid-template-columns: 0.85fr 1.3fr; }
}

.story-photo-wrap {
  margin: 0;
}

.story-photo {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.story-text h2 { font-size: 1.6rem; }

.story-close {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--color-navy);
  font-weight: 500;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 1.5rem;
}

.story-logo {
  display: block;
  width: 150px;
  height: auto;
  margin-top: 1.25rem;
}

/* Photo carousel */
.carousel {
  position: relative;
  margin-top: 3.5rem;
}

.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar { display: none; }
.carousel.is-marquee .carousel-track { scroll-snap-type: none; }

.carousel-slide {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
}

.carousel-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.carousel-open:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; }

.carousel-slide img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 2px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: var(--color-navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(16, 24, 46, 0.12);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.carousel-btn:hover { background: var(--color-navy); color: #fff; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
.carousel-prev { left: -0.75rem; }
.carousel-next { right: -0.75rem; }

@media (hover: hover) and (min-width: 640px) {
  .carousel-btn { display: flex; }
}

@media (min-width: 960px) {
  .carousel-slide { width: 250px; }
  .carousel-slide img { height: 185px; }
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: rgba(16, 24, 46, 0.94);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop { background: transparent; }

.lightbox-img {
  max-width: min(94vw, 1280px);
  max-height: 90vh;
  max-height: 90dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(16, 24, 46, 0.6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-close { top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; font-size: 1.75rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; font-size: 2rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

html.lightbox-open { overflow: hidden; }

/* Initiatives */
.initiative-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 1.75rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .initiative-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .initiative-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.initiative {
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
}

.initiative-media {
  overflow: hidden;
}

.initiative-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s var(--ease);
}

.initiative:hover .initiative-media img { transform: scale(1.04); }

.initiative-body {
  padding: 1.5rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.initiative-body h3 {
  font-size: 1.15rem;
  color: var(--color-navy-deep);
}

.initiative-body p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.initiative-cta {
  margin-top: auto;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--color-orange-deep);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.initiative-cta .arrow {
  transition: transform 0.2s var(--ease);
}

.initiative:hover .initiative-cta .arrow { transform: translateX(4px); }

/* TODO placeholders */
.todo-note {
  color: var(--color-text-muted);
  font-style: italic;
  border-left: 3px solid var(--color-border);
  padding-left: 0.75rem;
}

/* Founder */
/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

@media (min-width: 720px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-block h3 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.1rem;
  border: none;
  border-bottom: 1.5px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  color: var(--color-ink);
  transition: border-color 0.2s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-orange);
}

.contact-form button { margin-top: 1.5rem; align-self: flex-start; }

.donate-btn { margin-top: 0.5rem; }

/* Footer */
.site-footer {
  background: var(--color-navy-deep);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-brand { display: flex; flex-direction: column; gap: 1rem; }

.footer-logo {
  height: 34px;
  width: auto;
  align-self: flex-start;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #fff;
  margin: 0;
}

.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }

.footer-links h4 {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-links a:hover { color: var(--color-orange); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

/* Mobile nav */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  .site-nav nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .site-nav.is-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .site-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.5rem 2rem;
  }

  .site-nav nav ul li { width: 100%; border-bottom: 1px solid var(--color-border); }

  .site-nav nav a {
    display: block;
    padding: 1rem 0;
    font-size: 0.95rem;
  }

  .site-nav nav a.nav-cta {
    display: inline-block;
    margin-top: 1rem;
  }
}
