/* ============================================================
   Galápagos Network — island-naturalist meets modern funding
   Palette: sand paper, deep ocean ink, reef teal, lava orange
   ============================================================ */

:root {
  --paper:   #f7f3ea;   /* warm sand */
  --paper-2: #efe8d8;   /* deeper sand */
  --ink:     #11302e;   /* deep ocean ink */
  --teal:    #104f4a;   /* reef teal */
  --teal-2:  #1d6b60;
  --lava:    #c2552a;   /* volcanic accent */
  --lava-2:  #a8431d;
  --sandlit: #e8a87f;   /* lit sand on teal */
  --mist:    #5d7470;   /* muted body text on light */
  --line:    rgba(17, 48, 46, 0.16);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", -apple-system, "Segoe UI", sans-serif;

  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p + p { margin-top: 1em; }
a { color: var(--teal); }
strong { color: var(--lava); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lava);
  margin-bottom: 0.9rem;
}

.centered { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.lede-small { font-size: 1.1rem; color: var(--mist); max-width: 620px; margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--lava);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--lava-2); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(194, 85, 42, 0.28); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: rgba(17,48,46,0.05); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-small { padding: 0.55rem 1.2rem; font-size: 0.85rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.8rem 24px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--teal);
  text-decoration: none;
}
.brand em { font-style: normal; color: var(--lava); }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.nav-links a:hover { opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 59px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 120% 90% at 70% 10%, #15605a 0%, var(--teal) 45%, #0a332f 100%);
  color: var(--paper);
  overflow: hidden;
}
.hero-island {
  position: absolute;
  right: clamp(-6rem, 4vw, 8rem);
  top: 50%;
  transform: translateY(-50%);
  height: min(86vh, 700px);
  color: var(--sandlit);
  pointer-events: none;
}
.island-body { stroke-width: 2.5; opacity: 0.8; fill: rgba(232, 168, 127, 0.07); }
.island-echo { stroke-width: 1.5; opacity: 0.35; }
.island-echo-2 { stroke-width: 1; opacity: 0.18; }
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 4rem 24px 6rem;
}
.hero h1 { display: flex; flex-direction: column; gap: 0.35em; margin-bottom: 2.4rem; }
.hero-line-big {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500;
  max-width: 11em;
}
.hero-line-small {
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 400;
  color: var(--sandlit);
  max-width: 22em;
}
.hero-line-small em { font-style: italic; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero .btn-ghost { color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(247,243,234,0.4); }
.hero .btn-ghost:hover { background: rgba(247,243,234,0.1); box-shadow: inset 0 0 0 1.5px var(--paper); }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  color: rgba(247,243,234,0.6);
  border: 1.5px solid rgba(247,243,234,0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s, transform 0.3s;
}
.hero-scroll svg { width: 16px; height: 16px; }
.hero-scroll:hover { color: var(--paper); border-color: var(--paper); transform: translateX(-50%) translateY(3px); }

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* panel */
#panel p { color: var(--mist); }
#panel strong { color: var(--lava); }
.agora-card {
  margin-top: 2rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.agora-card h3 { color: var(--teal); font-size: 1.15rem; }
.agora-card p { font-size: 0.95rem; margin: 0; max-width: 30em; }
.agora-card .btn { flex-shrink: 0; }

/* model */
.section-model { background: var(--teal); color: var(--paper); }
.section-model .eyebrow { color: var(--sandlit); }
.section-model .lede-small { color: rgba(247, 243, 234, 0.75); margin-top: 0.6rem; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 3rem;
}
.steps li {
  background: rgba(247, 243, 234, 0.06);
  border: 1px solid rgba(247, 243, 234, 0.14);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.steps li:hover { transform: translateY(-4px); background: rgba(247, 243, 234, 0.1); }
.step-num {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--sandlit);
  display: block;
  margin-bottom: 0.8rem;
}
.steps h3 { color: var(--paper); }
.steps p { font-size: 0.92rem; color: rgba(247, 243, 234, 0.72); }

.qf-strip {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid rgba(247, 243, 234, 0.18);
}
.qf-strip h3 { color: var(--paper); font-size: 1.5rem; margin-bottom: 0.8rem; }
.qf-strip > div > p { color: rgba(247, 243, 234, 0.75); }
.qf-strip strong { color: var(--sandlit); }
.qf-demo {
  background: rgba(247, 243, 234, 0.06);
  border: 1px solid rgba(247, 243, 234, 0.16);
  border-radius: 16px;
  padding: 1.8rem;
}
.qf-demo figcaption {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.6);
  margin-bottom: 1.4rem;
  text-align: center;
}
.qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.qf-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.7rem; color: var(--paper); }
.qf-dots { display: flex; flex-wrap: wrap; gap: 4px; min-height: 52px; align-content: flex-start; margin-bottom: 0.8rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sandlit); }
.dot-big { width: 26px; height: 26px; background: rgba(247, 243, 234, 0.85); }
.qf-bar { height: 12px; border-radius: 99px; background: rgba(247,243,234,0.12); overflow: hidden; }
.qf-fill {
  height: 100%;
  width: var(--w);
  border-radius: 99px;
  background: rgba(247,243,234,0.45);
  transform-origin: left;
  animation: grow 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.qf-fill-win { background: var(--lava); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.qf-match { font-size: 0.85rem; color: rgba(247, 243, 234, 0.6); margin-top: 0.5rem; }
.qf-match-win { color: var(--sandlit); font-weight: 600; }

/* people */
.section-people { background: var(--paper-2); }
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-top: 3rem;
}
.person {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  box-shadow: 0 1px 2px rgba(17, 48, 46, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.person:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(17, 48, 46, 0.1); }
.person h3 { color: var(--teal); margin-bottom: 0.1rem; }
.person p { font-size: 0.9rem; color: var(--mist); }
.person-role {
  font-size: 0.78rem !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lava) !important;
  margin-bottom: 0.7rem;
}
.person a { font-weight: 600; font-size: 0.9rem; display: inline-block; margin-top: 0.6rem; }
.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}
.avatar-you { background: transparent; color: var(--lava); border: 2px dashed var(--lava); }
.person-you { background: transparent; border-style: dashed; }

/* story */
.story {
  max-width: 680px;
  margin: 3rem auto 0;
  position: relative;
  padding-left: 2.2rem;
}
.story::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.story-beat { position: relative; padding-bottom: 2.4rem; }
.story-beat::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--lava);
}
.story-beat h3 { color: var(--teal); }
.story-beat p { color: var(--mist); }
.net-fig { color: var(--teal); text-align: center; margin-top: 1rem; }
.net-fig svg { width: 100%; max-width: 360px; }

/* join */
.section-join {
  background: linear-gradient(180deg, var(--teal) 0%, #0c3b37 100%);
  color: var(--paper);
}
.section-join .lede-small { color: rgba(247, 243, 234, 0.75); margin-top: 0.6rem; }
.join-form {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.join-form input {
  font: inherit;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid rgba(247, 243, 234, 0.35);
  background: rgba(247, 243, 234, 0.08);
  color: var(--paper);
  min-width: 280px;
  outline: none;
  transition: border-color 0.15s;
}
.join-form input::placeholder { color: rgba(247, 243, 234, 0.5); }
.join-form input:focus { border-color: var(--sandlit); }
.join-confirm { margin-top: 1.6rem; font-size: 1.05rem; color: var(--sandlit); }
.join-alt { margin-top: 1.6rem; font-size: 0.9rem; color: rgba(247, 243, 234, 0.6); }
.join-alt a { color: var(--sandlit); }

/* footer */
.footer { background: #0c3b37; color: rgba(247, 243, 234, 0.55); font-size: 0.85rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid rgba(247, 243, 234, 0.12);
}

/* ---------- reveal on scroll ----------
   Hidden state only applies once JS has tagged <html class="js">,
   so the page is never blank if scripts fail to load. */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal:not(.in) { opacity: 0; transform: translateY(22px); }

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

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .split, .qf-strip { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hero-island { right: 50%; transform: translate(50%, -50%); opacity: 0.45; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .qf-row { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .join-form input { min-width: 0; width: 100%; }
  .story { padding-left: 1.8rem; }
  .story-beat::before { left: -1.8rem; }
}
