/* ════════════════════════════════════════════════════════════════════
   Montreal Dermatology Symposium — design system
   Navy institutional · ice tints · gold: hero hairline + deadline accents
   ════════════════════════════════════════════════════════════════════ */

:root {
  --navy: #0d2b5c;
  --navy-2: #173e73;
  --navy-deep: #092247;
  --sky: #7eb6e8;
  --ice: #eaf2fb;
  --ink: #172033;
  --muted: #637083;
  --line: #dfe6ef;
  --bg: #f5f8fc;
  --white: #ffffff;
  --gold: #c7a44b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(13, 43, 92, 0.12);
  --shadow-sm: 0 8px 20px rgba(13, 43, 92, 0.06);
  --container: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -4%, rgba(126, 182, 232, 0.18), transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: fill the viewport so short pages (contact, sponsors)
     don't leave a gap of raw background below the footer. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { max-width: 100%; display: block; }

[hidden] { display: none !important; }

a { color: var(--navy-2); }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }

h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lede {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 8px;
}

/* ── Header / nav ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.brand-name { font-size: 15px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover { background: var(--ice); color: var(--navy); }

.nav-links a.active { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn-lg { padding: 16px 34px; font-size: 16px; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--sky); transform: translateY(-2px); }

.btn-invert { background: var(--white); color: var(--navy); }

.btn-invert:hover { background: var(--ice); transform: translateY(-2px); }

.btn-soon {
  cursor: default;
  opacity: 0.92;
  background: var(--ice);
  color: var(--navy-2);
  border-color: var(--line);
  box-shadow: none;
}

.btn-soon:hover { transform: none; background: var(--ice); box-shadow: none; }

.cta-noscript { color: var(--muted); font-size: 15px; }

/* ── Hero (home) ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 84px 0 0;
  text-align: center;
  overflow: hidden;
}

.hero .container { position: relative; z-index: 1; padding-bottom: 96px; }

.eyebrow {
  display: inline-block;
  color: var(--navy-2);
  background: var(--ice);
  border: 1px solid #d6e5f5;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordmark {
  margin: 26px 0 14px;
  display: grid;
  gap: 2px;
  line-height: 1;
  color: var(--navy);
  text-transform: uppercase;
}

.wm-top {
  font-size: clamp(15px, 2.4vw, 21px);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* optically recenters tracked caps */
  color: var(--navy-2);
}

.wm-mid {
  font-size: clamp(42px, 8.6vw, 92px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.wm-bot {
  font-size: clamp(22px, 4.6vw, 46px);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.theme-line {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
}

.theme-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: var(--gold);
}

.event-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 650;
  font-size: 14px;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.pill .icon { color: var(--sky); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* Signature: dermal wave (layered skin-strata motif from the poster) */
.dermal-wave {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
}

/* ── Countdown band ──────────────────────────────────────────────── */
.countdown-band {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  padding: 40px 0;
}

.countdown-inner { text-align: center; }

.countdown-title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 6vw, 56px);
}

.count-cell { display: grid; gap: 2px; }

.count-num {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.count-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sky);
}

.countdown-msg { margin: 0; font-size: 20px; font-weight: 700; }

/* ── Cards & grids ───────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card { text-align: left; }

.info-card .icon-badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--ice);
  color: var(--navy);
  margin-bottom: 16px;
}

.info-card h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: -0.015em;
}

.info-card p { margin: 0; color: var(--muted); font-size: 15px; }

.icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Page head (subpages) ────────────────────────────────────────── */
.page-head {
  padding: 72px 0 8px;
  text-align: center;
}

.page-head h1 {
  margin: 18px auto 10px;
  max-width: 820px;
  color: var(--navy);
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.page-head .lede { margin-inline: auto; }

/* ── Deadline strip (gold: only here and the hero theme hairline) ── */
.deadline-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid #ead9a4;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: #fdfaf1;
  color: #5c4920;
  font-weight: 700;
  font-size: 15px;
}

/* ── CTA band ────────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  text-align: center;
  padding: 64px 0;
}

.cta-band h2 { color: var(--white); }

.cta-band p { margin: 0 auto 26px; max-width: 520px; color: var(--ice); }

.cta-band strong { color: var(--white); }

/* ── Chips (topics) ──────────────────────────────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-2);
  font-size: 14px;
  font-weight: 600;
}

/* ── Timeline (abstracts) ────────────────────────────────────────── */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tl-step {
  position: relative;
  counter-increment: step;
  padding: 26px 26px 26px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tl-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--sky);
}

.tl-step h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; }

.tl-step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Coming soon block ───────────────────────────────────────────── */
.coming-soon {
  text-align: center;
  padding: 56px 32px;
}

.coming-soon .icon-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--ice);
  color: var(--navy);
  margin: 0 auto 18px;
}

.coming-soon h2 { margin-bottom: 8px; }

.coming-soon p { max-width: 480px; margin: 0 auto; color: var(--muted); }

/* ── Sponsors ────────────────────────────────────────────────────── */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo-grid li {
  display: grid;
  place-items: center;
  min-height: 110px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.logo-grid img { max-height: 64px; width: auto; }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card { text-align: center; padding: 44px 28px; }

.contact-card .icon-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ice);
  color: var(--navy);
  margin: 0 auto 16px;
}

.contact-card h2 { font-size: 20px; }

.contact-link {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(17px, 2.6vw, 21px);
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--sky);
  padding-bottom: 2px;
}

.contact-link:hover { color: var(--navy-deep); border-bottom-color: var(--navy); }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: var(--ice);
  text-align: center;
  padding: 44px 20px 36px;
}

.footer-brand {
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white);
}

.footer-meta { margin: 0 0 14px; font-size: 14px; color: var(--sky); }

.footer-links { margin: 0 0 16px; font-size: 14px; }

.footer-links a { color: var(--ice); text-decoration: none; border-bottom: 1px solid rgba(126, 182, 232, 0.5); }

.footer-links a:hover { color: var(--white); border-bottom-color: var(--white); }

.footer-links span { margin: 0 8px; color: rgba(234, 242, 251, 0.4); }

.footer-copy { margin: 0; font-size: 13px; color: rgba(234, 242, 251, 0.55); }

/* ── Motion ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in { opacity: 1; transform: none; }

.rise { animation: rise 0.7s ease both; }

.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.24s; }
.rise-4 { animation-delay: 0.36s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .rise-2, .rise-3, .rise-4 { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav-links a { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .card-grid, .trio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .timeline { grid-template-columns: 1fr; }
  .brand-name { display: none; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .nav-links a { border-radius: var(--radius-sm); padding: 12px 14px; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .card-grid, .trio-grid, .card-grid-2, .contact-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 56px; }
  .hero-actions .btn { width: 100%; }
}
