/* ============================================================
   Sciovia — visual design system
   Warm, calm, academic. Attractive through craft, not hype.
   ============================================================ */

:root {
  /* Brand palette */
  --pine:        #14524b;
  --pine-dark:   #0e3a35;
  --pine-tint:   #e7efec;
  --gold:        #c1832f;
  --gold-soft:   #f4e7cd;
  --cream:       #faf7f1;
  --paper:       #ffffff;
  --ink:         #1a2a2a;
  --muted:       #5f716f;
  --line:        #e7e1d5;

  /* Category accents */
  --c-conf:  #2f6f8f;
  --c-cfp:   #7a5aa8;
  --c-fund:  #b5792a;
  --c-pos:   #2e8a63;
  --c-intern:#177f7a;
  --c-calls: #5457a6;
  --c-news:  #b0516a;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(20,40,38,.05), 0 2px 8px rgba(20,40,38,.05);
  --shadow-md: 0 6px 24px rgba(20,40,38,.09);
  --shadow-lg: 0 18px 48px rgba(20,40,38,.14);

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .4em; }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 14px;
}
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--pine); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--pine-dark); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: #a86f24; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pine); background: var(--pine-tint); }
.btn-lg { font-size: 1rem; padding: .95em 1.7em; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,241,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.nav-link { font-size: .95rem; font-weight: 500; color: var(--ink); }
.nav-links a.nav-link:hover { color: var(--pine); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 55% at 82% 12%, rgba(193,131,47,.14), transparent 60%),
    radial-gradient(70% 60% at 10% 90%, rgba(20,82,75,.10), transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 780px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: .28em; }
.hero h1 .accent { color: var(--pine); }
.hero .lead { font-size: 1.22rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.chip {
  font-size: .82rem; font-weight: 500; color: var(--pine-dark);
  background: var(--pine-tint); border: 1px solid rgba(20,82,75,.14);
  padding: .42em .9em; border-radius: 999px;
}
.attribution { margin-top: 40px; font-size: .9rem; color: var(--muted); font-style: italic; }

/* ---------- Section headings ---------- */
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }

/* ---------- Feature cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(20,82,75,.25); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--pine-tint); color: var(--pine); margin-bottom: 16px;
}
.card h3 { font-size: 1.25rem; margin-bottom: .35em; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card.award { border-top: 3px solid var(--gold); }
.card.award .ic { background: var(--gold-soft); color: var(--gold); font-size: 1.3rem; }

/* ---------- Alternating band ---------- */
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-pine { background: var(--pine); color: #fff; }
.band-pine h2, .band-pine .eyebrow { color: #fff; }
.band-pine .eyebrow { color: var(--gold-soft); }
.band-pine .lead { color: rgba(255,255,255,.82); }

/* ---------- Opportunities / event cards ---------- */
.ev-toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font-family: var(--font-sans); font-size: .88rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  padding: .5em 1em; border-radius: 999px; cursor: pointer; transition: .18s;
}
.tab:hover { border-color: var(--pine); color: var(--pine); }
.tab.active { background: var(--pine); color: #fff; border-color: var(--pine); }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: .5em 1em; min-width: 240px;
}
.search input { border: 0; outline: 0; font-family: var(--font-sans); font-size: .92rem; width: 100%; background: transparent; color: var(--ink); }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.ev-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .22s ease;
}
.ev-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .34em .7em; border-radius: 999px; color: #fff; white-space: nowrap;
}
.tag--conference { background: var(--c-conf); }
.tag--cfp        { background: var(--c-cfp); }
.tag--funding    { background: var(--c-fund); }
.tag--position   { background: var(--c-pos); }
.tag--internship { background: var(--c-intern); }
.tag--calls      { background: var(--c-calls); }
.tag--news       { background: var(--c-news); }
.ev-card h3 { font-size: 1.2rem; margin: 0; line-height: 1.22; }
.ev-org { font-size: .92rem; color: var(--muted); font-weight: 500; margin: 0; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--muted); margin-top: 2px; }
.ev-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ev-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.deadline { font-size: .82rem; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: .38em .8em; border-radius: 999px; }
.deadline.soon { color: #a33; background: #f6e0dc; }
.ev-link { font-size: .9rem; font-weight: 600; }
.sample-note {
  display: flex; gap: 10px; align-items: center; background: var(--gold-soft);
  border: 1px solid rgba(193,131,47,.3); color: #7a5418; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: .9rem; margin-bottom: 28px;
}
.empty { text-align: center; color: var(--muted); padding: 40px; grid-column: 1 / -1; }

/* ---------- Forms (subscribe + list event) ---------- */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7em .9em;
  background: var(--cream); transition: border .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(20,82,75,.12); background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.form-note { font-size: .84rem; color: var(--muted); margin-top: 14px; }

/* Subscribe inline form */
.subscribe-form { display: flex; gap: 12px; max-width: 480px; margin-top: 24px; }
.subscribe-form input {
  flex: 1; font-family: var(--font-sans); font-size: 1rem; padding: .85em 1.1em;
  border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12); color: #fff;
}
.subscribe-form input::placeholder { color: rgba(255,255,255,.7); }
.subscribe-form input:focus { outline: 0; border-color: #fff; background: rgba(255,255,255,.18); }
.band-pine .subscribe-form .btn-gold { background: var(--gold); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine-dark); color: rgba(255,255,255,.85); padding: 60px 0 30px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; margin-bottom: 40px; }
.footer-brand { max-width: 320px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: rgba(255,255,255,.7); font-size: .92rem; margin: 0; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-soft); margin: 0 0 14px; }
.footer-col a { display: block; color: rgba(255,255,255,.8); font-size: .92rem; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-bottom .attribution { margin: 0; color: rgba(255,255,255,.75); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: 70px; left: 0; right: 0; background: var(--cream);
    border-bottom: 1px solid var(--line); padding: 24px; z-index: 40;
  }
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form input { border-radius: var(--radius-sm); }
  .panel { padding: 26px; }
  .member-result { grid-template-columns: 1fr !important; }
}

/* ---------- Membership ---------- */
.badge-soft {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--gold); background: var(--gold-soft);
  padding: .2em .6em; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
@media (max-width: 820px) { .tier-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tier-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px; text-align: center;
}
.tier h4 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 6px; color: var(--pine); }
.tier p { margin: 0; font-size: .86rem; color: var(--muted); }

.member-result { display: none; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; margin-top: 8px; }
.member-result.show { display: grid; }
#member-card { width: 100%; max-width: 560px; border-radius: 14px; box-shadow: var(--shadow-lg); display: block; }
.member-no-big {
  font-family: var(--font-sans); font-weight: 600; font-size: 1.6rem; color: #fff;
  letter-spacing: .02em; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm); padding: .5em .8em; display: inline-block; margin: 6px 0 18px;
}
.member-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- How it works (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step .num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--pine); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600;
  font-size: 1.15rem; margin-bottom: 16px;
}
.step h3 { font-size: 1.25rem; margin-bottom: .3em; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose p { color: var(--muted); font-size: 1.06rem; line-height: 1.7; margin: 0 0 1.1em; }
.prose p strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 740px; margin: 34px auto 0; }
.faq { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 0 22px; }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; font-family: var(--font-sans);
  color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; font-weight: 400; line-height: 1; }
.faq[open] summary::after { content: "\2013"; }
.faq p { margin: 0 0 18px; color: var(--muted); font-size: .96rem; line-height: 1.65; }
