/* NextAzollaEvent: draft styles
   Palette is drawn from the plant itself: pond water, green fronds,
   and the wine red Azolla turns when it is short on phosphorus. */

:root {
  --pond: #0e3b36;       /* deep pond water: text, dark bands */
  --frond: #4f8a2b;      /* healthy frond green: links, buttons */
  --frond-dark: #3a6a1e;
  --wine: #8f2c43;       /* red fronds: used sparingly for emphasis */
  --surface: #eaf1ec;    /* pale pond surface: alternate section bg */
  --paper: #ffffff;
  --silt: #56655f;       /* muted text */
  --line: #c9d8cf;

  --display: "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;

  --measure: 62ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--pond);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--frond-dark); text-underline-offset: 3px; }
a:hover { color: var(--pond); }

:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--pond);
  color: var(--paper);
  padding: 8px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* Placeholder notes left for the editor */
.todo {
  background: #fff4c2;
  color: #5a4600;
  padding: 0 4px;
  border-radius: 3px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--pond);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--frond);
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-size: 0.6rem;
  font-family: var(--body);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--pond);
  border-radius: 6px;
  color: var(--pond);
  font: inherit;
  font-size: 1rem;
  padding: 6px 12px;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--pond);
  text-decoration: none;
  font-weight: 700;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.site-nav .nav-cta {
  background: var(--frond);
  color: var(--paper);
  padding: 9px 18px;
  border-radius: 999px;
}
.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  background: var(--frond-dark);
  color: var(--paper);
  text-decoration: none;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; padding: 12px 0 8px; }
}

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

.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid var(--frond);
}
.btn-solid { background: var(--frond); color: var(--paper); }
.btn-solid:hover { background: var(--frond-dark); border-color: var(--frond-dark); color: var(--paper); }
.btn-line { color: var(--pond); border-color: var(--pond); }
.btn-line:hover { background: var(--pond); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Image placeholders ---------- */
/* Swap each .ph for an <img> with the same classes once art is ready. */

.ph {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(79, 138, 43, 0.08) 14px 28px),
    var(--surface);
  border: 2px dashed var(--frond);
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: var(--silt);
  font-size: 0.95rem;
  overflow: hidden;
}
.ph.wide { aspect-ratio: 16 / 9; }
.ph.square { aspect-ratio: 1 / 1; }
.ph.portrait { aspect-ratio: 4 / 5; }

/* The signature shape: images framed as pond outlines */
.pond-frame { border-radius: 50%; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-tint { background: var(--surface); }
.section-dark { background: var(--pond); color: var(--paper); }
.section-dark a { color: #cfe8b8; }
.section-dark p { color: #dbe8e2; }

.intro { max-width: var(--measure); margin-bottom: 40px; }
.lede { font-size: 1.3rem; color: var(--silt); }
.section-dark .lede { color: #dbe8e2; }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 { max-width: 13ch; }
.hero .lede { max-width: 36ch; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .hero-art { order: -1; }
}

/* ---------- Alternating image + text rows ---------- */

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.row + .row { margin-top: clamp(56px, 8vw, 96px); }
.row.flip .row-art { order: 2; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .row.flip .row-art { order: 0; }
}

/* ---------- Three across (spaces, process, involvement) ---------- */

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.trio > li h3 { margin-top: 16px; }
.trio > li p { font-size: 1rem; }
@media (max-width: 760px) {
  .trio { grid-template-columns: 1fr; }
}

/* The process is a real sequence, so it gets numbers */
.steps { counter-reset: step; }
.steps > li { counter-increment: step; }
.steps h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--wine);
  color: var(--paper);
  font-size: 0.85em;
}

/* ---------- Status list ---------- */

.status { list-style: none; padding: 0; margin: 0 0 24px; }
.status li {
  padding: 12px 0 12px 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
  max-width: var(--measure);
}
.status li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 14px;
  height: 14px;
  background: var(--frond);
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
}

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.team h3 { margin: 16px 0 4px; }
.team .role { color: var(--wine); font-weight: 700; margin-bottom: 6px; font-size: 1rem; }
.team p { font-size: 1rem; }

/* ---------- Form ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

form { display: grid; gap: 18px; }
label { font-weight: 700; display: block; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--silt); }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--pond);
}
input:focus, select:focus, textarea:focus { border-color: var(--frond); outline: none; box-shadow: 0 0 0 3px rgba(79, 138, 43, 0.25); }
textarea { min-height: 150px; resize: vertical; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; justify-self: start; }
.form-note { font-size: 0.95rem; color: var(--wine); min-height: 1.5em; margin: 0; }

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

.site-footer {
  background: var(--pond);
  color: #dbe8e2;
  padding: 48px 0 40px;
  font-size: 0.95rem;
}
.site-footer a { color: #cfe8b8; }
.site-footer .wrap { display: grid; gap: 20px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-top .brand { color: var(--paper); }
.footer-top .brand-mark { background: #7fb24f; }
.site-footer .funding { max-width: 80ch; color: #b9cbc3; font-size: 0.875rem; margin: 0; }

/* ---------- Photos ---------- */

.group-photo { margin: 36px 0 0; }
.group-photo img,
.photo {
  width: 100%;
  height: auto;
  border-radius: 14px;
}
figcaption { margin-top: 10px; font-size: 0.95rem; color: var(--silt); }

/* Single-column hero for inner pages */
.hero.plain .wrap { display: block; }

/* Keep the footer distinct when a dark section sits above it */
.site-footer { border-top: 6px solid var(--frond); }

/* Looping pond clip */
.clip { position: relative; margin: 0; }
.clip video { aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); }
.clip-toggle {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(14, 59, 54, 0.8);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* Photos that replace placeholders keep the same frame shapes */
.pic {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface);
}
.pic.square { aspect-ratio: 1 / 1; }
.pic.portrait { aspect-ratio: 4 / 5; }
.pic.wide { aspect-ratio: 16 / 9; }
.pic.pond-frame { border-radius: 50%; }
.caption-note { margin-top: 10px; font-size: 0.95rem; }
.team .affil { font-size: 0.95rem; color: var(--silt); margin-bottom: 8px; }
.inline-photo { margin: 0 0 20px; max-width: 320px; }
.inline-photo .pic { aspect-ratio: 4 / 3; }

/* Hero buttons stay on one line on wider screens */
.hero-btns { flex-wrap: nowrap; }
.hero-btns .btn { padding: 11px 18px; font-size: 1rem; white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 861px) {
  .hero-btns .btn { padding: 10px 14px; font-size: 0.95rem; }
}
@media (max-width: 520px) {
  .hero-btns { flex-wrap: wrap; }
}
.btn-small { padding: 8px 16px; font-size: 0.95rem; margin-top: 4px; }

.model-note { margin-top: 32px; font-size: 1.05rem; }
.figure-wide { margin: 0; }
.figure-wide img { width: 100%; height: auto; border-radius: 14px; }

/* FAQ */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 14px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--frond);
  transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 20px; }

/* Credentials strip under the hero */
.creds { background: var(--pond); color: var(--paper); padding: 28px 0; }
.creds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cred p { margin: 0; color: #dbe8e2; font-size: 0.95rem; }
.cred .cred-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--paper);
  margin-bottom: 4px;
}
.creds a { color: #cfe8b8; }
@media (max-width: 760px) { .creds-grid { grid-template-columns: 1fr; gap: 16px; } }

/* Carbon flow diagram */
.flow { margin: 0; }
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  counter-reset: none;
}
.flow-step {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  color: var(--pond);
}
.flow-step svg { width: 64px; height: 64px; display: block; margin: 0 auto 8px; color: var(--pond); }
.flow-step h3 { font-size: 1.05rem; margin: 0 0 4px; }
.flow-step p { font-size: 0.9rem; margin: 0 auto; color: var(--silt); }
.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--frond);
}
.flow figcaption { margin-top: 16px; font-size: 0.95rem; color: var(--silt); max-width: 70ch; }
@media (max-width: 860px) {
  .flow-steps { grid-template-columns: 1fr; gap: 14px; }
  .flow-step { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; text-align: left; align-items: center; }
  .flow-step svg { grid-row: span 2; width: 56px; height: 56px; margin: 0; }
  .flow-step p { margin: 0; }
  .flow-step + .flow-step::before {
    left: 36px; top: -13px;
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 10px solid var(--frond); border-bottom: 0;
  }
}

/* Stat-over-photo tiles */
.stat-tiles {
  list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px);
}
.stat-tile { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; }
.stat-tile img { width: 100%; height: 100%; object-fit: cover; }
.stat-tile p {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; max-width: none;
  padding: 48px 18px 18px;
  background: linear-gradient(to top, rgba(14, 59, 54, 0.92), rgba(14, 59, 54, 0));
  color: var(--paper); font-weight: 700; font-size: 1.05rem; line-height: 1.3;
}
.stat-num { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05; }
@media (max-width: 760px) { .stat-tiles { grid-template-columns: 1fr; } .stat-tile { aspect-ratio: 16 / 9; } }

/* Credentials band: affiliation + three matching accomplishments */
.creds-grid { grid-template-columns: 1.15fr 1fr 1fr 1fr; align-items: center; }
.cred { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, 0.25); }
.cred-home { padding-left: 0; border-left: 0; }
.cred-home img { width: 210px; height: auto; margin-bottom: 6px; }
.cred .cred-big { font-size: 1.15rem; }
@media (max-width: 960px) {
  .creds-grid { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .cred:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .creds-grid { grid-template-columns: 1fr; }
  .cred { padding-left: 0; border-left: 0; }
}

/* Stat tiles: caption below the photo, no overlay */
.stat-tile { aspect-ratio: auto; background: var(--paper); border: 2px solid var(--line); }
.stat-tile img { aspect-ratio: 1 / 1; height: auto; display: block; }
.stat-tile p {
  position: static; padding: 14px 18px 18px; background: none;
  color: var(--pond); font-weight: 400; font-size: 1rem;
}
.stat-num { color: var(--frond-dark); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 2px; }
@media (max-width: 760px) { .stat-tile { aspect-ratio: auto; } .stat-tile img { aspect-ratio: 16 / 9; } }

/* Footer branding */
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.footer-brand img { width: 220px; height: auto; }
.footer-brand p { margin: 0; }

/* Sources and photo credits */
.source-note { font-size: 0.9rem; color: var(--silt); }
.credit-fig { margin: 0; }
.credit-fig figcaption { font-size: 0.8rem; margin-top: 4px; }

/* Team "You?" card */
.you-link { display: block; color: inherit; text-decoration: none; }
.you-box {
  aspect-ratio: 4 / 5; border-radius: 14px; border: 2px dashed var(--frond);
  background: var(--paper); display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 6rem; color: var(--frond);
}
.you-link:hover .you-box { background: var(--surface); }
.you-link .btn { margin-top: 4px; }

/* Logo mark (Clara's Azolla drawing) */
.brand-logo { width: auto; height: 52px; flex: none; }
.site-footer .brand-logo { width: auto; height: 56px; }

/* Labeled photo (frond anatomy) */
.labeled { position: relative; margin: 0; }
.labeled .pic { aspect-ratio: 3 / 4; }
.labeled svg { position: absolute; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 3 / 4; pointer-events: none; }
.callout circle { fill: var(--paper); stroke: var(--pond); stroke-width: 4; }
.callout line { stroke: var(--paper); stroke-width: 4; }
.callout rect { fill: var(--paper); opacity: 0.94; }
.callout text { fill: var(--pond); font-family: var(--body); font-weight: 700; font-size: 32px; text-anchor: middle; }
.labeled figcaption { margin-top: 10px; font-size: 0.95rem; color: var(--silt); }

/* Science page: research questions with evidence */
.question + .question { margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.question .figure-wide { margin-top: 32px; }
.sub-h { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.readmore { margin-top: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.readmore summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--frond-dark); }
.readmore p { padding: 0 16px; font-size: 1rem; }
.readmore p:last-child { padding-bottom: 8px; }
.tour-link { font-size: 0.95rem; margin: 0; }

/* Growth chart */
.chart-fig { margin: 0; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 16px; }
.chart-fig img { width: 100%; height: auto; }
.chart-fig figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--silt); }

/* ---------- November 2026 updates ---------- */

/* SoMAS logo beside SBU in the dark bands */
.cred-home .somas-logo { width: 190px; height: auto; margin-top: 10px; }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-brand .somas-logo { width: 200px; height: auto; }

/* Note under the stat tiles */
.stat-footnote { margin: 16px 0 0; font-size: 0.95rem; color: var(--silt); max-width: 70ch; }

/* Store photo: keep the dried Azolla, not the bag label, in view */
.store-pic { object-position: 50% 96%; }

/* Get involved: two cards, and a solid band on phones */
.trio.duo { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
@media (max-width: 760px) { .trio.duo { grid-template-columns: 1fr; } }
.involve-band { padding-top: 0; background: linear-gradient(var(--paper) 0 30%, var(--surface) 30%); }
@media (max-width: 760px) { .involve-band { padding-top: 32px; background: var(--surface); } }

/* Lab link on team cards */
.team .lab-link { font-size: 0.95rem; font-weight: 700; margin-top: -4px; }

/* Student photo gallery: one large photo, clickable thumbnails */
.gallery { margin: 0; }
.gallery-main { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--surface); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(14, 59, 54, 0.75); color: var(--paper); font-size: 1.8rem; line-height: 1;
}
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
.gallery-arrow:hover { background: var(--pond); }
.gallery-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery-thumb { display: block; width: 100%; padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: 0.7; }
.gallery-thumb img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb[aria-current="true"] { opacity: 1; }
.gallery-thumb[aria-current="true"] { border-color: var(--frond); }

/* Narrowest phones: keep the logo, name, and Menu button on one line */
@media (max-width: 400px) {
  .site-header .brand { font-size: 1.05rem; gap: 8px; }
  .site-header .brand-logo { height: 40px; }
}
