/* CLiMeM 2026 — Purple/white theme, minimal, accessible */

:root {
  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-800: #5b21b6;
  --purple-900: #4c1d95;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-500: #71717a;
  --gray-700: #3f3f46;
  --gray-900: #18181b;
  --max-width: 72rem;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', monospace;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

a {
  color: var(--purple-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--purple-700);
}

a:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--purple-700);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--purple-800);
}

.site-logo-img {
  height: 2rem;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-logo-text {
  color: inherit;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav a {
  color: var(--gray-700);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--purple-600);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--gray-700);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .site-nav {
    position: relative;
    z-index: 101;
  }

  .site-nav .container {
    position: relative;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.75rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .site-nav .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 102;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .site-nav .nav-list.open {
    display: flex;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    min-height: 2.75rem;
    -webkit-tap-highlight-color: transparent;
  }

  .site-nav a:last-child {
    border-bottom: none;
  }
}

/* Main — consistent base font and full-width content everywhere */
main {
  min-height: 50vh;
  padding: 2.5rem 0 4rem;
  font-size: 1.125rem;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.page-lead {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  max-width: none;
}

/* CFP intro paragraph spacing */
#cfp-intro .page-lead {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.gallery-placeholder-wrap {
  margin-top: 2rem;
}

.gallery-placeholder-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16rem;
  padding: 2rem 2.5rem;
  border: 2px solid var(--purple-300);
  border-radius: 0.5rem;
  background: var(--purple-50);
  color: var(--purple-800);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-placeholder-box:hover,
.gallery-placeholder-box:focus {
  background: var(--purple-100);
  border-color: var(--purple-500);
  color: var(--purple-900);
}

.gallery-placeholder-box:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.gallery-placeholder-label {
  white-space: nowrap;
}

/* Hero (home) */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--purple-50) 0%, var(--white) 100%);
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--purple-800);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--purple-600);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--gray-700);
  max-width: none;
  margin: 0 auto 1.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--purple-600);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background: var(--purple-700);
}

.btn-secondary {
  background: var(--white);
  color: var(--purple-600);
  border: 2px solid var(--purple-300);
}

.btn-secondary:hover {
  background: var(--purple-50);
}

/* Sections (home anchors) */
.section {
  padding: 2.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--gray-200);
}

.section-title,
.section h2 {
  font-size: 1.25rem;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}

.section > p {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.section > p:last-child {
  margin-bottom: 0;
}

/* Dates timeline */
.dates-list {
  list-style: none;
}

.dates-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.dates-list li:last-child {
  border-bottom: none;
}

.dates-list .date {
  font-weight: 600;
  color: var(--purple-600);
  min-width: 8rem;
}

/* Workshop Program TBA — same style as Call for Paper dates */
.tba-text {
  font-weight: 600;
  color: var(--purple-600);
}

.dates-list .tz {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Quick links */
.quick-links {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.quick-links a::before {
  content: '';
  width: 0.25rem;
  height: 0.25rem;
  background: var(--purple-500);
  border-radius: 50%;
}

/* News preview (home) */
.news-preview {
  list-style: none;
}

.news-preview li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.news-preview li:last-child {
  border-bottom: none;
}

.news-preview .news-date {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.news-preview .news-title {
  font-weight: 600;
  color: var(--gray-900);
}

.news-preview .news-body {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-top: 0.25rem;
}

/* Cards / blocks */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--purple-700);
  margin-bottom: 0.5rem;
}

/* Program schedule */
.schedule-list {
  list-style: none;
}

.schedule-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: start;
}

.schedule-list .time {
  font-weight: 500;
  color: var(--purple-600);
  font-size: 1.125rem;
}

.schedule-list .type-break {
  color: var(--gray-500);
}

/* Organizers */
.organizers-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

/* Technical & Research: 3 columns (3 then 3) */
.organizers-group.organizers-grid-3 .organizers-cards {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

/* Clinical: 5 in one row */
.organizers-group.organizers-grid-5 .organizers-cards {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 1rem;
}

@media (max-width: 1100px) {
  .organizers-group.organizers-grid-5 .organizers-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .organizers-group.organizers-grid-3 .organizers-cards,
  .organizers-group.organizers-grid-5 .organizers-cards {
    grid-template-columns: 1fr;
  }
}

.organizers-list > li.organizers-group {
  list-style: none;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.organizers-list > li.organizers-group:last-child {
  margin-bottom: 0;
}

.organizers-list > li.organizers-group .organizers-list {
  margin-top: 1rem;
}

.organizers-list li:not(.organizers-group) {
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
}

.organizer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.organizer-photo-wrap {
  margin-bottom: 0.75rem;
}

.organizer-photo {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--gray-200);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.organizer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.organizer-info {
  width: 100%;
}

.organizers-list .name {
  font-weight: 600;
  color: var(--gray-900);
}

.organizers-list .affiliation {
  font-size: 1.125rem;
  color: var(--gray-500);
}

/* FAQ */
.faq-list {
  list-style: none;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  background: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-q:hover {
  background: var(--gray-50);
}

.faq-q:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: -2px;
}

.faq-q .icon {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--purple-500);
}

.faq-item.open .faq-q .icon {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 1.25rem 1rem;
}

.faq-a-inner {
  padding: 0.75rem 0;
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Contact */
.contact-block {
  background: var(--purple-50);
  border: 1px solid var(--purple-200);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.contact-block a {
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer .footer-brand {
  font-weight: 600;
  color: var(--gray-300);
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--purple-300);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--gray-500);
}

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

#skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  margin: 0.5rem;
  background: var(--purple-600);
  color: var(--white);
  clip: auto;
  overflow: visible;
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Subtle animation (reduce motion respected) */
@media (prefers-reduced-motion: no-preference) {
  .hero-title {
    animation: fadeIn 0.6s ease-out;
  }

  .section {
    animation: fadeIn 0.4s ease-out;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page-specific: full news list */
.news-list {
  list-style: none;
}

.news-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list .news-date {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.35rem;
}

.news-list .news-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.news-list .news-body {
  font-size: 1.125rem;
  margin-top: 0.5rem;
  color: var(--gray-700);
}

.news-pinned {
  font-size: 0.75rem;
  color: var(--purple-600);
  font-weight: 600;
  margin-left: 0.5rem;
}

.cfp-topics-lead {
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--gray-900);
}

.cfp-topic-list {
  list-style: none;
  padding-left: 0;
}

.cfp-topic-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.cfp-topic-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--purple-500);
}

.guidelines-section .guidelines-para {
  margin-bottom: 1rem;
  color: var(--gray-700);
  max-width: none;
}

.guidelines-section .guidelines-para:last-child {
  margin-bottom: 0;
}

/* Awards list */
.awards-list {
  list-style: none;
}

.awards-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.awards-list li:last-child {
  border-bottom: none;
}

.awards-list .award-name {
  font-weight: 600;
  color: var(--purple-700);
}

.awards-list .award-desc {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-top: 0.25rem;
}
