/* =========================================================
   FDF — Future Directions in Finance
   Prototype stylesheet
   ========================================================= */

:root {
  --green: #1f7a3a;
  --green-dark: #155a2a;
  --green-soft: #e6f1e9;
  --ink: #0e1116;
  --ink-2: #2a2f36;
  --cream: #f7f7f4;
  --grey-1: #f2f2ee;
  --grey-2: #d8d8d2;
  --grey-3: #8a8f98;
  --amber: #e3a857;
  --amber-dark: #b8862f;
  --red: #c94444;

  --serif: "Fraunces", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(14, 17, 22, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 17, 22, 0.08);
  --max-w: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--grey-2); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.muted { color: var(--grey-3); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 244, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--grey-2);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .04em;
}
.nav-links {
  display: flex; gap: 22px; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink-2); font-size: .94rem; font-weight: 500;
}
.nav-links a.active, .nav-links a:hover { color: var(--green); text-decoration: none; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--cream);
  padding: 9px 16px; border-radius: var(--radius); font-weight: 500; font-size: .9rem;
}
.nav-cta:hover { background: var(--green); color: #fff; text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0;
}

@media (max-width: 880px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); flex-direction: column; gap: 0; padding: 8px 0; border-bottom: 1px solid var(--grey-2); }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--grey-2); }
  .nav-links a { display: block; padding: 14px var(--gutter); }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../assets/arrows-pattern.svg");
  background-size: 520px;
  opacity: 0.09;
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { max-width: 16ch; }
.hero p.lead { max-width: 56ch; margin-top: 10px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 500; font-size: .98rem;
  cursor: pointer; border: 0;
  transition: transform .08s ease, background .15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--ink); color: var(--cream); }
.btn-secondary:hover { background: var(--ink-2); color: var(--cream); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--grey-2); }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 0;
  border-top: 1px solid var(--grey-2);
  border-bottom: 1px solid var(--grey-2);
  background: #fff;
}
.stat { padding: 0 var(--gutter); text-align: center; }
.stat-num { font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--green); line-height: 1; }
.stat-lbl { font-size: .85rem; color: var(--grey-3); margin-top: 6px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; } }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--ink-2); }
.card h3 { margin-top: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Latest report featured card ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.feature-cover {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff 72%, rgba(0,0,0,0) 100%), url("../assets/arrows-pattern.svg") center/contain no-repeat, var(--cream);
  border: 1px solid var(--grey-2);
  position: relative;
  padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-md);
}
.feature-cover h3 { font-family: var(--serif); font-size: 1.6rem; margin: 0; }
.feature-cover .sub { color: var(--grey-3); margin-top: 4px; font-size: .92rem; }
.feature ul { padding-left: 18px; color: var(--ink-2); margin: 12px 0 20px; }
.feature ul li { margin-bottom: 6px; }
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; padding: 24px; } }

/* ---------- Timeline (annual topics) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  position: relative;
  margin-top: 32px;
}
.timeline::before {
  content: "";
  position: absolute; top: 22px; left: 4%; right: 4%;
  height: 2px; background: var(--grey-2);
  z-index: 0;
}
.t-step {
  position: relative; z-index: 1;
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-top: 48px;
}
.t-step.current { border-color: var(--green); box-shadow: var(--shadow-md); }
.t-dot {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--cream); border: 3px solid var(--grey-2);
}
.t-step.current .t-dot { background: var(--green); border-color: var(--green); }
.t-step.future .t-dot { background: var(--cream); border-color: var(--amber); border-style: dashed; }
.t-year { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.t-topic { font-weight: 600; font-size: .96rem; margin-top: 4px; color: var(--green); }
.t-n { color: var(--grey-3); font-size: .82rem; margin-top: 4px; }
.t-desc { font-size: .88rem; color: var(--ink-2); margin-top: 10px; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 14px; }
  .timeline::before { display: none; }
  .t-step { margin-top: 0; }
  .t-dot { position: static; display: inline-block; vertical-align: middle; margin-right: 10px; transform: none; }
}

/* ---------- Map ---------- */
.map-wrap {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .map-wrap { grid-template-columns: 1fr; } }

.europe-map {
  width: 100%; height: auto;
  background: #fff;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.europe-map .country { fill: var(--grey-1); stroke: var(--grey-2); stroke-width: 0.8; transition: fill .15s ease; cursor: default; }
.europe-map .country.covered { fill: var(--green-soft); stroke: var(--green); stroke-width: 1; cursor: pointer; }
.europe-map .country.covered:hover, .europe-map .country.active { fill: var(--green); }
.europe-map .country-label { font-family: var(--sans); font-size: 10px; fill: var(--ink-2); pointer-events: none; }

.country-list { display: flex; flex-direction: column; gap: 8px; }
.country-row {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.country-row:hover, .country-row.active { border-color: var(--green); background: var(--green-soft); }
.country-flag { font-size: 1.3rem; line-height: 1; }
.country-name { font-weight: 600; font-size: .94rem; }
.country-partner { color: var(--grey-3); font-size: .8rem; margin-top: 2px; }
.country-n { font-variant-numeric: tabular-nums; color: var(--green); font-weight: 600; font-size: .92rem; }

/* ---------- Professor cards (one card per country) ---------- */
.prof-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  grid-auto-rows: 1fr; /* every card the same size, 1 or 2 people */
}
@media (max-width: 700px) { .prof-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.prof {
  display: flex; gap: 18px; padding: 22px; height: 100%;
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius-lg);
}
.prof-country { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prof-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border: 1px solid var(--grey-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; color: var(--green); font-size: 1.4rem;
  letter-spacing: .04em;
}
.prof-avatar[data-len="3"] { font-size: 1.1rem; }
.prof-country-name {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--grey-3); text-align: center; line-height: 1.3;
}
.prof-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.prof-person + .prof-person { border-top: 1px solid var(--grey-1); padding-top: 16px; }
.prof-name { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 2px; }
.prof-role { color: var(--grey-3); font-size: .86rem; margin-bottom: 4px; }
.prof-inst { font-size: .9rem; color: var(--ink-2); }
.prof-links { margin-top: 10px; display: flex; gap: 14px; font-size: .84rem; }
.badge-coord {
  display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--amber); color: #3b2a0a; padding: 2px 8px; border-radius: 4px; margin-left: 8px;
  vertical-align: middle; font-weight: 700;
}

/* ---------- Report cards ---------- */
.report {
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.report-cover {
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(14,17,22,0.03) 100%), url("../assets/arrows-pattern.svg") center/cover no-repeat, var(--cream);
  position: relative;
  border-bottom: 1px solid var(--grey-2);
  padding: 24px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.report-year {
  font-family: var(--serif); font-size: 1.5rem; color: var(--green);
}
.report-title {
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; color: var(--ink);
}
.report-body { padding: 20px 22px; }
.report-body ul { padding-left: 16px; margin: 0 0 16px; color: var(--ink-2); font-size: .9rem; }
.report-body ul li { margin-bottom: 4px; }
.report-footer { padding: 0 22px 22px; margin-top: auto; }

.report-coming {
  opacity: .65; pointer-events: none;
}

/* ---------- Get Involved cards ---------- */
.track {
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column;
}
.track-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.track h3 { margin-top: 0; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.tier {
  border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 18px;
  background: var(--cream);
}
.tier-name { font-family: var(--serif); font-size: 1.1rem; color: var(--green); margin-bottom: 4px; }
.tier-tag { font-size: .78rem; color: var(--grey-3); margin-bottom: 12px; }
.tier ul { padding-left: 16px; margin: 0; font-size: .86rem; color: var(--ink-2); }
.tier ul li { margin-bottom: 4px; }
@media (max-width: 800px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
.form-group .hint { font-size: .78rem; color: var(--grey-3); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  font-family: inherit; font-size: .94rem;
  background: #fff; color: var(--ink);
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.12); }
textarea { min-height: 110px; resize: vertical; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 10px 0;
  font-size: .88rem; color: var(--ink-2);
}
.checkbox-row input { margin-top: 3px; }

.form-err { color: var(--red); font-size: .8rem; margin-top: 4px; display: none; }
.form-err.show { display: block; }

.form-success {
  background: var(--green-soft); border: 1px solid var(--green);
  padding: 18px 20px; border-radius: var(--radius); color: var(--green-dark);
  display: none;
}
.form-success.show { display: block; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 17, 22, 0.55);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 520px; width: 100%;
  padding: 28px; position: relative;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--grey-3);
}
.modal-close:hover { color: var(--ink); }

/* ---------- Logo wall ---------- */
.logos {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 24px;
}
.logo-badge {
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius);
  padding: 16px; text-align: center;
  font-family: var(--serif); font-size: .95rem; color: var(--ink-2);
  min-height: 68px; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease;
}
.logo-badge:hover { border-color: var(--ink-2); }
.logo-badge small { display: block; color: var(--grey-3); font-family: var(--sans); font-size: .72rem; margin-top: 2px; }
@media (max-width: 700px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: .98rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--green); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 10px 0 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- News list ---------- */
.news-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--grey-2);
  display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: start;
}
.news-item:last-child { border-bottom: 0; }
.news-date { color: var(--grey-3); font-size: .86rem; font-variant-numeric: tabular-nums; }
.news-title { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 6px; }
.news-excerpt { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Tables ---------- */
.table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--grey-2); border-radius: var(--radius-lg); overflow: hidden;
}
.table th, .table td { padding: 14px 18px; text-align: left; font-size: .94rem; border-bottom: 1px solid var(--grey-2); }
.table th { background: var(--cream); font-weight: 600; color: var(--ink); }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 56px 0 28px;
  margin-top: 80px;
}
.footer a { color: var(--cream); opacity: .8; }
.footer a:hover { opacity: 1; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 40px; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.footer ul li { margin-bottom: 8px; }
.footer .brand { color: #fff; }
.footer p { color: rgba(247,247,244,.65); font-size: .9rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; border-top: 1px solid rgba(247,247,244,.12);
  font-size: .82rem; color: rgba(247,247,244,.55);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(247,247,244,.65); text-decoration: underline; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Sections with alt background ---------- */
.bg-cream { background: var(--cream); }
.bg-white { background: #fff; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-sm { gap: 10px; }
.gap-md { gap: 18px; }
.gap-lg { gap: 32px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; overflow: hidden; clip: rect(0 0 0 0); width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; }
