/* NPRI projects portal (landing page + suggestion form) for projects.naturalphilosophy.org.
   Rendered by ~/openproject/branding/portal; bump CnpsPortal::CSS_VERSION after editing.
   Palette from NPXSquare.png: navy #2d3e50, green #00a500, light green #b5e5b5. */

:root {
  --navy: #2d3e50;
  --navy-deep: #1b2735;
  --navy-ink: #22313f;
  --green: #00a500;
  --green-btn: #007a00;
  --green-btn-hover: #006400;
  --green-light: #b5e5b5;
  --paper: #f7f6f2;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #5b6875;
  --line: #e2e0d8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 39, 53, .06), 0 6px 24px rgba(27, 39, 53, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--green-btn); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--navy-ink); }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.2em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green-btn); color: #fff; }
.btn-green:hover { background: var(--green-btn-hover); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-large { padding: .9em 1.5em; font-size: 1.05rem; }
.btn-small { padding: .45em .95em; font-size: .9rem; }
.btn:focus-visible, .chip:focus-visible, .kind-card:focus-visible, a:focus-visible { outline: 3px solid var(--green-light); outline-offset: 2px; }

/* Header */
.site-header { background: var(--navy-deep); color: #fff; position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: #d7dee6; text-decoration: none; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--green-light); }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(0, 165, 0, .22), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(181, 229, 181, .12), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%);
}
.hero-inner { position: relative; padding: 110px 24px 120px; max-width: 1160px; }
.hero h1 { color: #fff; max-width: 13em; }
.hero .hl { color: var(--green-light); font-style: italic; }
.hero-orbits {
  position: absolute; right: -120px; top: 50%; width: 680px; height: 680px;
  transform: translateY(-50%); color: rgba(181, 229, 181, .22); stroke-width: 1.2;
}
.hero-orbits .core { fill: var(--green); filter: drop-shadow(0 0 18px rgba(0, 165, 0, .8)); }
.hero-orbits .dot { fill: var(--green-light); opacity: .8; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--green-light); margin-bottom: 1rem; }
.eyebrow-dark { color: var(--green-btn); }
.lede { font-size: 1.2rem; max-width: 36em; color: #d7dee6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

/* Sections */
.section { padding: 88px 0; }
.section-lede { color: var(--muted); max-width: 40em; font-size: 1.1rem; margin-bottom: 2.5rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow svg { transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Per-type accent colours */
.type-documentary { --accent: #b4462f; --accent-bg: #fbe9e4; }
.type-experiment { --accent: #007a00; --accent-bg: #e3f5e3; }
.type-podcast { --accent: #7a3fa8; --accent-bg: #f1e8f8; }
.type-video-series { --accent: #c0392b; --accent-bg: #fbe5e2; }
.type-book-publication { --accent: #8a5a12; --accent-bg: #f8eedb; }
.type-conference-event { --accent: #1f6fb2; --accent-bg: #e3eef8; }
.type-software-simulation { --accent: #0f7f86; --accent-bg: #ddf3f3; }
.type-education-course { --accent: #2d3e50; --accent-bg: #e4e9ee; }
.type-research-collaboration { --accent: #4f5bd5; --accent-bg: #e8eafb; }
.type-outreach-campaign { --accent: #c4601a; --accent-bg: #fcebdc; }
.type-other, .type-project { --accent: #5b6875; --accent-bg: #eceeef; }

/* Kinds of project */
.kinds { background: var(--paper); }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.kind-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.kind-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.kind-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-bg, #eceeef); color: var(--accent, #5b6875); margin-bottom: 6px;
}
.kind-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--navy-ink); }
.kind-blurb { color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* Projects */
.projects { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  padding: .4em .95em; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); text-decoration: none; font-size: .9rem;
}
.chip:hover { border-color: var(--green-btn); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.project-card {
  display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--accent);
  box-shadow: var(--shadow);
}
.project-card h3 { font-size: 1.4rem; margin-top: 14px; }
.project-card h3 a { color: var(--navy-ink); text-decoration: none; }
.project-card h3 a:hover { color: var(--accent); }
.project-card p { color: var(--muted); font-size: .97rem; }
.project-card .link-arrow { margin-top: auto; color: var(--accent); }
.project-top { display: flex; align-items: center; gap: 10px; }
.project-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-bg); color: var(--accent); }
.project-icon svg { width: 20px; height: 20px; }
.project-type { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.status { margin-left: auto; font-size: .78rem; font-weight: 600; padding: .2em .7em; border-radius: 999px; background: #eceeef; color: var(--muted); }
.status-on_track { background: #e3f5e3; color: #006400; }
.status-at_risk { background: #fdf1d8; color: #8a5a12; }
.status-off_track { background: #fbe5e2; color: #a5281b; }
.status-finished { background: #e4e9ee; color: var(--navy); }
.help-wanted { background: #f2faf2; border-left: 3px solid var(--green); padding: 8px 12px; border-radius: 6px; color: var(--ink) !important; }
.empty {
  text-align: center; padding: 56px 24px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper);
}
.empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e3f5e3; color: var(--green-btn); margin-bottom: 12px; }
.empty p { color: var(--muted); }

/* How it works */
.steps { list-style: none; padding: 0; margin: 2rem 0 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: none; }
.steps li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 20px; }
.steps p { color: var(--muted); font-size: .96rem; margin: 0; }
.step-n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--green-light); font: 700 1.1rem var(--serif); margin-bottom: 14px;
}
.tips { background: var(--navy); color: #d7dee6; border-radius: var(--radius); padding: 32px 36px; }
.tips h3 { color: #fff; }
.tips ul { margin: 0; padding-left: 1.2em; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 36px; }
.tips li::marker { color: var(--green); }
.tips strong { color: #fff; }

/* Closing call to action */
.cta {
  color: #fff; text-align: center; padding: 96px 0;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(0, 165, 0, .25), transparent 70%),
    var(--navy-deep);
}
.cta h2 { color: #fff; max-width: 18em; margin: 0 auto .6em; }
.cta p { color: #d7dee6; max-width: 40em; margin: 0 auto; font-size: 1.1rem; }
.cta .hero-actions { justify-content: center; }

/* Footer */
.site-footer { background: #121b25; color: #9fb0c0; padding: 48px 0; font-size: .93rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner p { max-width: 30em; margin-top: 12px; }
.brand-footer { font-size: 1rem; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; align-content: start; }
.site-footer nav a { color: #d7dee6; text-decoration: none; }
.site-footer nav a:hover { color: var(--green-light); }

/* Suggestion form */
.page-hero {
  color: #fff; padding: 72px 0 64px;
  background: radial-gradient(900px 400px at 90% 0%, rgba(0, 165, 0, .2), transparent 60%), linear-gradient(160deg, var(--navy), var(--navy-deep));
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); }
.form-section { padding-top: 48px; }
.suggest-form { display: grid; gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 0; min-width: 0; }
legend { font: 700 1.3rem var(--serif); color: var(--navy-ink); padding: 0; display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 18px; }
legend + * { clear: both; }
.legend-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--green-light); font-size: .95rem; }
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-tile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .93rem; transition: border-color .15s, background .15s;
}
.type-tile .kind-icon { width: 36px; height: 36px; margin: 0; flex: none; border-radius: 9px; }
.type-tile .kind-icon svg { width: 20px; height: 20px; }
.type-tile:hover { border-color: var(--accent); }
.type-option input:checked + .type-tile { border-color: var(--accent); background: var(--accent-bg); }
.type-option input:focus-visible + .type-tile { outline: 3px solid var(--green-light); outline-offset: 2px; }
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 4px; }
.hint { color: var(--muted); font-size: .9rem; margin: -2px 0 8px; }
input[type=text], input[type=email], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #cfd5dc; border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green-btn); box-shadow: 0 0 0 3px rgba(0, 122, 0, .15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-list { display: grid; gap: 8px; }
.choice-inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; cursor: pointer; }
.choice input { accent-color: var(--green-btn); width: 18px; height: 18px; }
.field-error { color: #a5281b; font-size: .9rem; margin: 6px 0 0; font-weight: 600; }
.alert { background: #fbe5e2; border: 1px solid #f0b8b0; color: #7a1d12; padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; }
.privacy { color: var(--muted); font-size: .88rem; margin: 18px 0 0; }
.form-actions { display: flex; justify-content: flex-end; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks-hero { text-align: center; padding: 110px 0 120px; }
.thanks-hero .lede { margin: 0 auto; }
.thanks-hero .hero-actions { justify-content: center; }
.thanks-icon { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(0, 165, 0, .2); color: var(--green-light); margin-bottom: 20px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-nav a:not(.btn) { display: none; }
  .hero-inner { padding: 72px 16px 80px; }
  .hero-orbits { width: 420px; height: 420px; right: -200px; top: 30%; opacity: .6; }
  .section { padding: 60px 0; }
  .project-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .tips { padding: 24px; }
  .tips ul { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .kind-card, .link-arrow svg { transition: none; }
}
