/* APPREA — Asia Pacific Paediatric Retinal Association
   Stylesheet, v1
   Tone: sober academic medical, warm paediatric accent.
   Palette derived from the inaugural council banner (cobalt + green).
*/

:root {
  --navy: #0a3d8c;
  --navy-2: #082f6e;
  --blue: #1565c0;
  --blue-2: #1a73d1;
  --sky: #e8f1fb;
  --sky-2: #f3f8fe;
  --green: #2e7d32;
  --green-2: #1f5d23;
  --coral: #d65d3f;
  --gold: #c8961e;

  --ink: #15233e;
  --ink-2: #2a3856;
  --mute: #5b6b86;
  --rule: #dde6f1;
  --paper: #ffffff;
  --cream: #f7faff;

  --serif: "Source Serif 4", "Source Serif Pro", "Georgia", "Cambria", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 35, 80, .06), 0 1px 3px rgba(10, 35, 80, .08);
  --shadow:    0 4px 14px rgba(10, 35, 80, .08);
  --shadow-lg: 0 12px 32px rgba(10, 35, 80, .12);

  --container: 1180px;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.8rem); }
h2 { font-size: clamp(1.45rem, 1.2vw + 1rem, 1.85rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; color: var(--ink-2); }
p  { margin: 0 0 1em; color: var(--ink-2); }
small { color: var(--mute); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar (slim) ---------- */
.topbar {
  background: var(--navy-2);
  color: #cfe0fb;
  font-size: 13px;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  height: 36px;
}
.topbar a { color: #e3eefb; }
.topbar a:hover { color: #ffffff; text-decoration: none; }
.topbar .meta { display: flex; gap: 18px; }
.topbar .meta a::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--green); border-radius: 50%; margin-right: 8px;
  vertical-align: middle;
}

/* ---------- Header / nav ---------- */
.site-header {
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.92)),
    radial-gradient(1200px 200px at 80% -50%, rgba(21, 101, 192, .18), transparent 60%);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(8px);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink);
}
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand .wordmark {
  font-family: var(--serif);
  font-weight: 700; font-size: 1.15rem; line-height: 1.05;
  color: var(--navy);
}
.brand .wordmark small {
  display: block; font: 500 .72rem/1.1 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-2); margin-top: 4px;
}

.nav { margin-left: auto; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px; align-items: center;
}
.nav a {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius);
  font-weight: 500; color: var(--ink-2); font-size: .95rem;
}
.nav a:hover { background: var(--sky); color: var(--navy); text-decoration: none; }
.nav a.active { color: var(--navy); background: var(--sky); }
.nav .cta {
  background: var(--navy); color: #fff; padding: 9px 16px;
  border-radius: var(--radius); margin-left: 8px;
}
.nav .cta:hover { background: var(--navy-2); color: #fff; }

.menu-btn {
  display: none; background: none; border: 1px solid var(--rule);
  padding: 8px 10px; border-radius: var(--radius); cursor: pointer;
  margin-left: auto;
}
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

@media (max-width: 920px) {
  .nav { position: absolute; top: 100%; left: 0; right: 0;
         background: #fff; border-top: 1px solid var(--rule);
         display: none; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: 12px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav .cta { margin: 8px 0 0; text-align: center; }
  .menu-btn { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 380px at 90% 0%, rgba(46, 125, 50, .12), transparent 60%),
    linear-gradient(135deg, #0a3d8c 0%, #1565c0 60%, #1a73d1 100%);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 8px;
  background: linear-gradient(90deg, #0a3d8c, #2e7d32 40%, #c8961e 70%, #d65d3f);
  opacity: .85;
}
.hero .container { position: relative; padding-top: 72px; padding-bottom: 84px; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero p.lede { font-size: 1.15rem; color: #dbe7fa; max-width: 60ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  background: #fff; color: var(--navy);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { background: #fff; color: var(--navy-2); text-decoration: none; box-shadow: var(--shadow); }
.btn.outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn.outline:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--rule); }
.btn.ghost:hover { background: var(--sky); }

.hero-decor {
  position: absolute; right: -40px; top: -40px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(255,255,255,0) 60%);
  pointer-events: none;
}

/* ---------- Page header (interior pages) ---------- */
.page-head {
  background:
    linear-gradient(180deg, var(--sky-2), #fff),
    linear-gradient(135deg, var(--navy), var(--blue));
  border-bottom: 1px solid var(--rule);
  padding: 56px 0 32px;
}
.page-head .breadcrumb {
  font-size: .85rem; color: var(--mute); letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 8px;
}
.page-head h1 { margin-bottom: 8px; }
.page-head p { max-width: 70ch; color: var(--ink-2); }

/* ---------- Sections / cards / grid ---------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section.alt { background: var(--cream); }
section .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-2); background: rgba(46,125,50,.08);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
section h2 + p.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 70ch; }

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

.card {
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d6ea; }
.card h3 { margin-top: 0; color: var(--navy); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--sky); color: var(--navy);
  display: grid; place-items: center; margin-bottom: 12px;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
}

.feature {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
}
.feature .ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--sky); color: var(--navy);
  display: grid; place-items: center; font-weight: 700;
  font-family: var(--serif); font-size: 1.15rem;
  border: 1px solid #cfe0fb;
}

/* Council member card */
.member {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 16px;
}
.member .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), #cfe0fb);
  color: var(--navy); display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
  flex: none;
}
.member .name { font-weight: 600; color: var(--ink); }
.member .role { font-size: .88rem; color: var(--mute); }
.member .country {
  display: inline-block; font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-2);
  margin-top: 2px;
}

/* Lists */
.bare { list-style: none; padding: 0; margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative; padding: 8px 0 8px 32px; border-bottom: 1px dashed var(--rule);
}
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 14px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.checklist li:last-child { border-bottom: 0; }

/* Tables */
table.data {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--rule); border-radius: var(--radius-lg);
  overflow: hidden;
}
table.data th, table.data td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule);
  font-size: .95rem;
}
table.data th { background: var(--sky-2); color: var(--ink); font-weight: 600; }
table.data tr:last-child td { border-bottom: 0; }

/* Badges / chips */
.badge {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--sky); color: var(--navy); letter-spacing: .04em;
}
.badge.green { background: rgba(46,125,50,.10); color: var(--green-2); }
.badge.amber { background: rgba(200,150,30,.14); color: #8c6712; }
.badge.coral { background: rgba(214,93,63,.12); color: #a4391b; }

/* Callouts */
.callout {
  border-left: 4px solid var(--blue);
  background: var(--sky-2);
  padding: 16px 20px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--ink-2);
}
.callout.warn { border-color: var(--coral); background: #fdf3ef; }
.callout.ok   { border-color: var(--green); background: #effaef; }
.callout strong { color: var(--ink); }

/* FAQ */
details.faq {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 0; margin-bottom: 12px; overflow: hidden;
}
details.faq[open] { border-color: #c9d6ea; box-shadow: var(--shadow-sm); }
details.faq > summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 12px;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after {
  content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--blue); line-height: 1;
}
details.faq[open] > summary::after { content: "−"; }
details.faq .body { padding: 0 20px 18px; color: var(--ink-2); }

/* Hero numbers strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: #fff;
}
.stats .stat { padding: 22px 24px; border-right: 1px solid var(--rule); text-align: left; }
.stats .stat:last-child { border-right: 0; }
.stats .num { font-family: var(--serif); font-size: 1.9rem; color: var(--navy); font-weight: 600; }
.stats .lab { font-size: .85rem; color: var(--mute); letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2) { border-right: 0; }
  .stats .stat:nth-child(1), .stats .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}
.field .help { font-size: .82rem; color: var(--mute); margin-top: 4px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery .ph {
  aspect-ratio: 4/3; border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 30%, #cfe0fb 0%, #1565c0 80%);
  display: grid; place-items: center;
  color: rgba(255,255,255,.85); font-family: var(--serif); font-size: 1rem; text-align: center;
  padding: 12px;
}

/* News list */
.news .item {
  display: grid; grid-template-columns: 120px 1fr; gap: 22px;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.news .item:last-child { border-bottom: 0; }
.news .date { color: var(--mute); font-size: .9rem; }
.news h3 { margin: 0 0 4px; }

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #0a2454 0%, #061a3d 100%);
  color: #c5d3ee; margin-top: 80px;
}
.site-footer a { color: #e6efff; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .container {
  padding-top: 56px; padding-bottom: 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .85rem;
  letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer .brand-foot { display: flex; gap: 14px; align-items: flex-start; }
.site-footer .brand-foot img { width: 60px; height: 60px; background: #fff; border-radius: 12px; padding: 4px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; font-size: .92rem; }
.site-footer .legal {
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 16px 0;
  font-size: .82rem; color: #9ab1d8;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.site-footer .stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--navy), var(--green) 40%, var(--gold) 70%, var(--coral));
}
@media (max-width: 800px) {
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer .container { grid-template-columns: 1fr; }
}

/* Utility */
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.center { text-align: center; }
.muted { color: var(--mute); }
.divider { height: 1px; background: var(--rule); margin: 24px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; background: var(--sky); color: var(--navy);
}
.pill.coral { background: rgba(214,93,63,.12); color: #a4391b; }
.pill.green { background: rgba(46,125,50,.10); color: var(--green-2); }

/* Print */
@media print {
  .topbar, .site-header, .site-footer, .hero .actions, .menu-btn { display: none; }
  body { color: #000; }
}
