/* ============================================================
   ProMed Academy — stylesheet
   Aesthetic: refined clinical editorial.
   Deep pine green + warm paper + copper accent.
   Display: Fraunces (serif)   Body: Hanken Grotesk
   ============================================================ */

:root {
  --paper: #f4efe4;
  --paper-deep: #ece4d4;
  --ink: #21302b;
  --ink-soft: #4a5a52;
  --pine: #1f3a33;
  --pine-deep: #15271f;
  --copper: #b8623a;
  --copper-soft: #d68a5f;
  --gold: #c79a4b;
  --line: #d8cdb8;
  --card: #fbf8f1;

  --shadow-sm: 0 1px 2px rgba(21, 39, 31, 0.06);
  --shadow-md: 0 18px 40px -24px rgba(21, 39, 31, 0.45);
  --shadow-lg: 0 40px 80px -40px rgba(21, 39, 31, 0.55);

  --radius: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain overlay (fixed, non-interactive) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--copper);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Fraunces", serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--pine);
  color: var(--paper);
}
.brand .mark svg { width: 20px; height: 20px; }
.brand b { color: var(--copper); font-weight: 600; }
.nav-links { display: flex; gap: 30px; font-size: 0.92rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--pine); }
.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--pine);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.nav-cta:hover { background: var(--pine-deep); transform: translateY(-1px); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(199, 154, 75, 0.32), rgba(199, 154, 75, 0) 62%);
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  margin: 18px 0 0;
}
.hero h1 .ital { font-style: italic; color: var(--copper); }
.hero p.lede {
  margin: 26px 0 0;
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 30em;
}
.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
}
.btn-primary { background: var(--copper); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: #a4522e; transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--pine); color: var(--pine); }
.btn-ghost:hover { background: var(--pine); color: var(--paper); }

.hero-stats {
  display: flex; gap: 34px; margin-top: 48px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.hero-stats .stat .n { font-family: "Fraunces", serif; font-size: 1.9rem; color: var(--pine); }
.hero-stats .stat .l { font-size: 0.82rem; color: var(--ink-soft); letter-spacing: 0.02em; }

/* hero figure card */
.hero-card {
  position: relative;
  background: var(--pine);
  color: var(--paper);
  border-radius: 24px;
  padding: 34px 32px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(199,154,75,0.28), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
.hero-card .pulse {
  position: relative;
  height: 64px; margin-bottom: 22px;
}
.hero-card .pulse svg { width: 100%; height: 100%; }
.hero-card h3 { font-size: 1.5rem; margin: 0 0 6px; }
.hero-card p { color: rgba(244,239,228,0.74); font-size: 0.96rem; margin: 0 0 22px; }
.hero-card .mini {
  display: flex; align-items: center; gap: 12px;
  padding-top: 18px; border-top: 1px solid rgba(244,239,228,0.16);
  font-size: 0.86rem; color: rgba(244,239,228,0.86);
}
.hero-card .mini .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copper-soft); box-shadow: 0 0 0 0 rgba(214,138,95,0.7); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(214,138,95,0.6);} 70%{ box-shadow: 0 0 0 12px rgba(214,138,95,0);} 100%{ box-shadow:0 0 0 0 rgba(214,138,95,0);} }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 60px 0 40px; }
}

/* ---------- section heading ---------- */
.section { padding: 72px 0; position: relative; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 40px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin: 10px 0 0; max-width: 16em; }
.section-head p { color: var(--ink-soft); max-width: 26em; margin: 0; }

.divider-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- course grid (clickable poster tiles) ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.course-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  overflow: hidden;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #c9bda3;
}
.course-card:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }

.cc-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--paper-deep);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.cc-poster img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
  transition: transform 0.5s var(--ease);
}
.course-card:hover .cc-poster img { transform: scale(1.04); }
.cc-poster-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--pine); color: var(--paper);
}
.cc-poster-fallback svg { width: 84px; height: 84px; }

.cc-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 20px; }
.cc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cc-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--pine);
  color: var(--paper);
  flex: none;
}
.cc-icon svg { width: 22px; height: 22px; }
.cc-tag {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--pine);
  padding: 5px 11px; border-radius: 999px; background: rgba(31,58,51,0.08);
}
.cc-status {
  position: absolute; top: 14px; left: 14px;
  font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  color: #fff; padding: 5px 11px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.cc-status.past { background: rgba(31,58,51,0.78); }
.cc-status.soon { background: rgba(214,138,95,0.92); }

.course-card h3 { font-size: 1.18rem; line-height: 1.25; margin: 0 0 14px; }

.cc-meta { display: grid; gap: 9px; margin-bottom: 16px; }
.cc-meta .row { display: flex; align-items: center; gap: 11px; font-size: 0.88rem; }
.cc-meta .row svg { width: 16px; height: 16px; color: var(--copper); flex: none; }
.cc-meta .row .v { color: var(--ink); }
.cc-meta .row .sub { color: var(--ink-soft); }

.cc-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  font-weight: 600; font-size: 0.9rem; color: var(--pine);
}
.cc-foot .arrow { transition: transform 0.3s var(--ease); }
.cc-foot .arrow svg { width: 18px; height: 18px; }
.course-card:hover .cc-foot .arrow { transform: translateX(5px); }

/* staggered reveal */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

.empty-note {
  grid-column: 1 / -1;
  text-align: center; padding: 48px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- detail page ---------- */
.detail-hero { padding: 56px 0 28px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; margin-bottom: 26px; transition: gap 0.25s, color 0.25s; }
.back-link:hover { color: var(--pine); gap: 12px; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 48px; align-items: start; }
.detail-main h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 14px 0 0; }
.detail-main .summary { font-size: 1.18rem; color: var(--ink-soft); margin: 22px 0 0; max-width: 32em; }
.detail-main .body { margin-top: 30px; }
.detail-main .body p { margin: 0 0 16px; color: var(--ink); }
.detail-main h2.sub { font-size: 1.4rem; margin: 38px 0 16px; }
.hl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hl-list li { display: flex; gap: 13px; align-items: flex-start; }
.hl-list li svg { width: 20px; height: 20px; color: var(--copper); flex: none; margin-top: 2px; }

/* ---------- faculty & speakers ---------- */
.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 26px 18px;
  margin-top: 4px;
}
.speaker { margin: 0; text-align: center; }
.speaker-photo {
  width: 120px; height: 120px; margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-deep);
  border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-md);
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.speaker-name { display: block; font-weight: 600; color: var(--pine); font-size: 0.98rem; line-height: 1.25; }
.speaker-role { display: block; color: var(--copper); font-size: 0.8rem; letter-spacing: 0.02em; margin-top: 3px; }

.detail-aside {
  position: sticky; top: 92px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.detail-aside .aside-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--pine); color: var(--paper); display: grid; place-items: center; margin-bottom: 18px; }
.detail-aside .aside-icon svg { width: 30px; height: 30px; }
.detail-poster {
  margin: 0 0 20px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--paper-deep);
}
.detail-poster img { width: 100%; height: auto; display: block; }
.aside-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.aside-row:last-of-type { border-bottom: none; }
.aside-row .k { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.aside-row .v { font-size: 1rem; margin-top: 3px; }
.detail-aside .btn { width: 100%; justify-content: center; margin-top: 22px; }
.detail-aside .agenda-btn { margin-top: 12px; }

/* ---------- programme / agenda schedule ---------- */
.schedule { display: grid; gap: 26px; }
.sched-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.sched-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  padding: 16px 20px;
  background: var(--pine); color: var(--paper);
}
.sched-head h3 { font-size: 1.05rem; margin: 0; color: var(--paper); }
.sched-date { font-size: 0.85rem; color: rgba(244,239,228,0.78); }
.sched-scroll { overflow-x: auto; }
.sched-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
.sched-table th {
  text-align: left; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
  padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--paper-deep);
}
.sched-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched-table tr:last-child td { border-bottom: none; }
.sched-table .t-time { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--pine); width: 1%; }
.sched-table .t-session { color: var(--ink); }
.sched-table .t-speaker { color: var(--ink-soft); white-space: nowrap; }
.sched-table tr.is-break td { color: var(--ink-soft); font-style: italic; background: rgba(31,58,51,0.025); }
.sched-table tr.is-break .t-time { font-style: normal; }

@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
}

/* ---------- value strip ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value { }
.value .vi { width: 46px; height: 46px; border-radius: 12px; background: rgba(184,98,58,0.12); color: var(--copper); display: grid; place-items: center; margin-bottom: 16px; }
.value .vi svg { width: 24px; height: 24px; }
.value h3 { font-size: 1.2rem; margin: 0 0 8px; }
.value p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- footer ---------- */
.site-foot {
  background: var(--pine);
  color: var(--paper);
  padding: 64px 0 34px;
  margin-top: 20px;
}
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-foot .brand { color: var(--paper); }
.site-foot .brand .mark { background: var(--paper); color: var(--pine); }
.site-foot .brand b { color: var(--copper-soft); }
.foot-blurb { color: rgba(244,239,228,0.7); max-width: 26em; margin: 18px 0 0; font-size: 0.95rem; }
.foot-col h4 { font-family: "Hanken Grotesk", sans-serif; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244,239,228,0.55); margin: 0 0 16px; }
.foot-col a, .foot-col p { display: block; color: rgba(244,239,228,0.85); font-size: 0.94rem; margin-bottom: 11px; transition: color 0.2s; }
.foot-col a:hover { color: var(--copper-soft); }
.foot-base { margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(244,239,228,0.16); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.84rem; color: rgba(244,239,228,0.6); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 30px; } }

::selection { background: var(--copper); color: #fff; }
