/* ==========================================
   MSA 2027 — CONFERENCE PROCEEDINGS
   ========================================== */

:root {
  --proc-red: #a50021;
  --proc-dark: #101b2d;
  --proc-muted: #748092;
  --proc-border: #e9ebef;
}

/* ==========================================
   GENERAL
   ========================================== */

.proceedings-hero,
.proceedings-archive {
  font-family: "Inter", sans-serif;
}

/* ==========================================
   HERO
   ========================================== */

.proceedings-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(125deg, #101b2d 0%, #21334e 75%, #162438 100%);
  color: #ffffff;
  padding: 110px 0 100px;
}

.proceedings-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 50%, rgba(165, 0, 33, 0.17), transparent 36%),
    radial-gradient(
      circle at 15% 90%,
      rgba(255, 255, 255, 0.04),
      transparent 38%
    );
  pointer-events: none;
}

.proceedings-hero-inner {
  position: relative;
  z-index: 1;
}

.proceedings-eyebrow,
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.1px;
  text-transform: uppercase;
}

.proceedings-eyebrow {
  color: #ff8296;
  margin-bottom: 24px;
}

.proceedings-hero h1 {
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -3px;
  margin-bottom: 24px;
  color: #ffffff;
  animation: heroRise 0.8s ease both;
}

.proceedings-hero h1 span {
  color: #ff6c86;
}

.proceedings-hero-inner > p {
  max-width: 600px;
  color: #c2cad7;
  font-size: 15px;
  line-height: 1.95;
  margin-bottom: 0;
  animation: heroRise 0.9s 0.12s both;
}

/* ==========================================
   HERO ORBIT
   ========================================== */

.proceedings-orbit {
  position: absolute;
  width: 410px;
  height: 410px;
  top: 50%;
  right: 2%;
  transform: translateY(-50%);
  pointer-events: none;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.orbit-ring-one {
  inset: 0;
  border-top-color: rgba(255, 108, 134, 0.8);
  animation: orbitSpin 28s linear infinite;
}

.orbit-ring-two {
  inset: 65px;
  border-bottom-color: rgba(255, 108, 134, 0.7);
  animation: orbitSpin 18s linear infinite reverse;
}

.orbit-core {
  position: absolute;
  inset: 135px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(165, 0, 33, 0.3), transparent 72%);
  box-shadow: 0 0 95px rgba(165, 0, 33, 0.15);
}

/* ==========================================
   ARCHIVE
   ========================================== */

.proceedings-archive {
  padding: 90px 0 120px;
  background: #f8f9fb;
  min-height: 600px;
}

.archive-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 32px;
}

.section-eyebrow {
  color: var(--proc-red);
  margin-bottom: 12px;
}

.archive-heading h2 {
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -1.3px;
  color: #182236;
  margin-bottom: 10px;
}

.archive-heading h2 span {
  color: var(--proc-red);
}

.archive-heading p {
  color: var(--proc-muted);
  font-size: 14px;
  margin: 0;
}

.archive-count {
  white-space: nowrap;
  color: #6c7686;
  font-size: 12px;
  font-weight: 700;
  padding-bottom: 4px;
}

/* ==========================================
   FILTERS
   ========================================== */

.archive-filters {
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--proc-border);
  border-radius: 14px;
  margin-bottom: 42px;
  box-shadow: 0 8px 30px rgba(16, 27, 45, 0.025);
}

.filter-search {
  flex: 1;
  min-width: 0;
}

.filter-year {
  width: 190px;
  flex-shrink: 0;
}

.archive-filters label {
  display: block;
  color: #293448;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  width: 19px;
  height: 19px;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: none;
  stroke: #8b94a3;
  stroke-width: 2;
  stroke-linecap: round;
}

.archive-filters input,
.archive-filters select {
  width: 100%;
  height: 48px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fafbfc;
  color: #263145;
  font: inherit;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.archive-filters input {
  padding: 0 16px 0 46px;
}

.archive-filters select {
  padding: 0 12px;
  cursor: pointer;
}

.archive-filters input:focus,
.archive-filters select:focus {
  border-color: var(--proc-red);
  box-shadow: 0 0 0 3px rgba(165, 0, 33, 0.08);
}

.clear-filters {
  height: 48px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
  color: #536075;
  font-size: 12px;
  font-weight: 700;
  padding: 0 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

.clear-filters:hover {
  color: var(--proc-red);
  border-color: var(--proc-red);
  background: #fff8f9;
}

/* ==========================================
   GRID
   ========================================== */

.proceedings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
}

/* ==========================================
   PUBLICATION CARDS
   ========================================== */

.proceeding-card {
  position: relative;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--proc-border);
  border-radius: 13px;
  overflow: hidden;

  /*
   * IMPORTANT:
   * Cards are visible by default.
   * Never hide them while waiting
   * for IntersectionObserver.
   */
  opacity: 1;
  visibility: visible;
  clip-path: none;

  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.proceeding-card:hover {
  transform: translateY(-10px);
  border-color: rgba(165, 0, 33, 0.22);
  box-shadow: 0 22px 55px rgba(16, 27, 45, 0.12);
}

/* ==========================================
   COVER
   ========================================== */

.proceeding-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 295px;
  padding: 24px;
  overflow: hidden;

  background: radial-gradient(circle at 50% 35%, #ffffff, #edf0f5 90%);

  text-decoration: none;
}

.proceeding-cover::after {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(circle, rgba(165, 0, 33, 0.08), transparent 70%);

  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.proceeding-card:hover .proceeding-cover::after {
  opacity: 1;
}

.proceeding-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;

  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.14));

  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.proceeding-card:hover .proceeding-cover img {
  transform: scale(1.08) rotate(-2deg);
}

/* IMAGE FALLBACK */

.cover-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 80%;
  height: 90%;
  padding: 20px;
  background: #1b2a42;
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
  text-align: center;
  box-shadow: 8px 12px 25px rgba(0, 0, 0, 0.12);
}

.cover-fallback.show {
  display: flex;
}

.proceeding-cover img[hidden] {
  display: none;
}

/* ==========================================
   CARD CONTENT
   ========================================== */

.proceeding-body {
  padding: 23px 21px 24px;
}

.proceeding-year {
  display: inline-block;
  color: var(--proc-red);
  background: #fff0f3;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 14px;
}

.proceeding-body h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  color: #1d283a;
  margin-bottom: 8px;
}

.proceeding-edition {
  color: #8992a1;
  font-size: 12px;
  min-height: 20px;
  margin-bottom: 20px;
}

.proceeding-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--proc-red);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.proceeding-link span:last-child {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.proceeding-link:hover {
  color: #ce0030;
}

.proceeding-link:hover span:last-child {
  transform: translate(3px, -3px);
}

/* ==========================================
   CIRCULAR REVEAL ANIMATION
   ========================================== */

/*
 * This animation runs only after JS
 * adds the .reveal-active class.
 *
 * Cards are never hidden while waiting
 * for the observer.
 */

.proceeding-card.reveal-active {
  animation: circularReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;

  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes circularReveal {
  0% {
    opacity: 0;
    clip-path: circle(0% at 50% 45%);
    transform: translateY(45px) scale(0.88);
  }

  60% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    clip-path: circle(150% at 50% 45%);
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   HERO ANIMATIONS
   ========================================== */

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.proceedings-empty {
  text-align: center;
  padding: 80px 20px;
  background: #ffffff;
  border: 1px solid var(--proc-border);
  border-radius: 14px;
}

.proceedings-empty[hidden] {
  display: none;
}

.empty-icon {
  font-size: 65px;
  line-height: 1;
  color: #b7beca;
  margin-bottom: 16px;
}

.proceedings-empty h3 {
  font-size: 22px;
  font-weight: 800;
  color: #1d283a;
}

.proceedings-empty p {
  color: #818b9b;
  font-size: 14px;
  margin-bottom: 24px;
}

.proceedings-empty button {
  background: var(--proc-red);
  border: none;
  border-radius: 7px;
  color: #ffffff;
  padding: 13px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.proceedings-empty button:hover {
  background: #c4002b;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1199px) {
  .proceedings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .proceedings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proceedings-orbit {
    right: -230px;
    opacity: 0.3;
  }

  .proceedings-hero {
    padding: 90px 0;
  }
}

@media (max-width: 650px) {
  .proceedings-hero {
    padding: 75px 0;
  }

  .proceedings-hero h1 {
    letter-spacing: -2px;
  }

  .proceedings-orbit {
    display: none;
  }

  .archive-heading {
    display: block;
  }

  .archive-count {
    display: block;
    margin-top: 15px;
  }

  .archive-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-year {
    width: 100%;
  }

  .proceedings-grid {
    grid-template-columns: 1fr;
    max-width: 410px;
    margin: 0 auto;
  }

  .proceedings-archive {
    padding: 65px 0 85px;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .proceeding-card,
  .proceeding-cover img,
  .proceeding-link span {
    transition: none;
  }

  .proceeding-card.reveal-active {
    animation: none;
    opacity: 1;
    clip-path: none;
    transform: none;
  }

  .proceedings-hero h1,
  .proceedings-hero-inner > p,
  .orbit-ring {
    animation: none;
  }
}
