/* Natural Philosophy Library — library.naturalphilosophy.org
   Palette shared with the NPRI sites: 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 { display: block; max-width: 100%; }
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.1rem, 5.2vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; 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; }
.eyebrow { font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--green-btn); margin-bottom: .9em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .75em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green-btn); color: #fff; }
.btn-primary:hover { background: var(--green-btn-hover); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--green-btn); color: var(--green-btn); background: transparent; }
.btn-outline:hover { background: var(--green-btn); color: #fff; }
.btn-lg { font-size: 1.1rem; padding: .9em 1.6em; }

/* Header */
.site-header { background: var(--navy-deep); color: #fff; position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font: 600 1.1rem/1.1 var(--serif); }
.brand img { width: 40px; height: 40px; border-radius: 6px; }
.brand small { display: block; font: 500 .72rem/1.3 var(--sans); color: var(--green-light); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: #fff; }
.nav .btn { padding: .5em 1em; font-size: .92rem; color: #fff; }
@media (max-width: 860px) { .nav a.hide-sm { display: none; } }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #3c5571 0%, transparent 60%), var(--navy); color: #fff; padding: 84px 0 92px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--green-light); }
.hero p.lede { color: rgba(255,255,255,.82); }
.hero .subjects { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; padding: 0; list-style: none; }
.hero .subjects li { border: 1px solid rgba(181,229,181,.45); color: var(--green-light); border-radius: 999px; padding: .3em .9em; font-size: .92rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo { width: 260px; height: 260px; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
@media (max-width: 820px) {
  .hero { padding: 56px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo { width: 140px; height: 140px; order: -1; border-radius: 16px; }
}

/* Sections */
section { padding: 80px 0; }
section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } section { padding: 60px 0; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 12px; }
.card ul { margin: .6em 0 0; padding-left: 1.2em; }
.card li { margin: .25em 0; }
.icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: #e8f5e8; color: var(--green-btn); display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.stat { border-left: 3px solid var(--green); padding: 4px 0 4px 16px; }
.stat b { display: block; font: 600 2rem/1.1 var(--serif); color: var(--navy-ink); }
.stat span { color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--green-light); font: 700 1rem/1 var(--sans); margin-bottom: 14px; }
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Directors */
.director { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; }
.director img { width: 150px; height: 180px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.director .role { color: var(--green-btn); font-weight: 600; font-size: .95rem; margin: -.3em 0 .8em; }
.director p { font-size: .98rem; }
.director .more { font-size: .93rem; font-weight: 600; }
@media (max-width: 560px) { .director { grid-template-columns: 1fr; } .director img { width: 130px; height: 156px; } }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 40em; margin: 0 auto 1.6em; }

/* Form */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px; } }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--navy-ink); }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], select, textarea {
  width: 100%; font: 1rem/1.4 var(--sans); padding: .7em .8em; border: 1px solid #cfccc2; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,165,0,.25); border-color: var(--green-btn); }
textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .95rem; margin-bottom: 8px; color: var(--navy-ink); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
@media (max-width: 640px) { .checks { grid-template-columns: 1fr; } }
.checks label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.checks input { margin-top: .35em; accent-color: var(--green-btn); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .9rem; color: var(--muted); margin: 14px 0 0; }
.alert { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.alert-error { background: #fdecec; border: 1px solid #f3b9b9; color: #8a1c1c; }
.alert-ok { background: #e8f5e8; border: 1px solid #b5e5b5; color: #0b4d0b; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.75); padding: 44px 0; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer a { color: var(--green-light); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
