/* ==========================================================================
   SMUN XIV — Committees (index + committee template)
   1. Committee logo circle   3. Floating logo     5. Background guide card
   2. Index rows              4. Committee hero
   ========================================================================== */

/* ---------- 1. Committee logo circle ---------- */
.c-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size, 52px);
  height: var(--size, 52px);
  border-radius: 50%;
  background: var(--c, var(--green));
  box-shadow: 0 0 0 calc(var(--size, 52px) * .03 + .5px) var(--sand);   /* the sand ring */
  overflow: hidden;
  flex: none;
}
.c-logo::after {                        /* thin inner ring, like the design */
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  pointer-events: none;
}
.c-logo img { width: 100%; height: 100%; object-fit: cover; }
.c-logo__abbr {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: #fff;
}

/* ---------- 2. Index rows ---------- */
.committees-index { padding-top: clamp(32px, 4vw, 64px); }
.committee-list { list-style: none; margin: 0; padding: 0; }
.committee-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px 52px minmax(0, 1fr);
  grid-template-areas:
    "num logo name"
    ".   .    agenda";
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
  text-decoration: none;
}
.committee-row::before {                /* hover background (fades, doesn't move layout) */
  content: "";
  position: absolute;
  inset: 0 calc(-1 * min(var(--gutter), 24px));
  background: var(--paper-deep);
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  z-index: -1;
}
.committee-list li { position: relative; z-index: 0; }
.committee-row__num {
  grid-area: num;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--terra);
  transition: color .3s var(--ease-out), transform .3s var(--ease-out);
}
.committee-row__logo { grid-area: logo; transition: transform .3s var(--ease-out); }
.committee-row__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.12;
  transition: transform .3s var(--ease-out);
}
.committee-row__agenda {
  grid-area: agenda;
  font-family: var(--font-read);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  transition: transform .3s var(--ease-out);
}
.committee-row__arrow { display: none; }
@media (min-width: 900px) {
  .committee-row {
    grid-template-columns: 52px 52px minmax(0, 480px) minmax(0, 1fr) auto;
    grid-template-areas: "num logo name agenda arrow";
    column-gap: 28px;
    padding: 26px 0;
  }
  .committee-row::before { inset: 0; }
  .committee-row__arrow {
    grid-area: arrow;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding-right: 26px;
    font-family: var(--font-ui);
    font-size: 22px;
    color: var(--ink);
    transition: color .3s var(--ease-out);
  }
  .committee-row__open {
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  }
  /* Hover/focus: tint, slide the content 24px (a transform, so nothing reflows),
     numeral turns orange, logo grows, arrow becomes "Open →". */
  .committee-row:hover::before, .committee-row:focus-visible::before { opacity: 1; }
  .committee-row:hover .committee-row__num,
  .committee-row:focus-visible .committee-row__num { color: var(--orange); }
  .committee-row:hover :is(.committee-row__num, .committee-row__name, .committee-row__agenda),
  .committee-row:focus-visible :is(.committee-row__num, .committee-row__name, .committee-row__agenda) { transform: translateX(24px); }
  .committee-row:hover .committee-row__logo,
  .committee-row:focus-visible .committee-row__logo { transform: translateX(24px) scale(1.08); }
  .committee-row:hover .committee-row__arrow,
  .committee-row:focus-visible .committee-row__arrow { color: var(--green); }
  .committee-row:hover .committee-row__open,
  .committee-row:focus-visible .committee-row__open { opacity: 1; transform: none; }
}
.committee-row:focus-visible { outline-offset: 4px; }

/* ---------- 3. Floating logo (js/committees.js) ---------- */
.float-logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-floating);
  width: 200px;
  height: 200px;
  pointer-events: none;
  filter: drop-shadow(0 14px 28px rgba(26, 38, 32, .25));
}
.float-logo > .c-logo, .float-logo__layer, .float-logo__layer > .c-logo { position: absolute; inset: 0; width: 100%; height: 100%; }
.float-logo .c-logo { box-shadow: 0 0 0 5px var(--sand); }
.float-logo .c-logo__abbr { font-style: normal; }

/* ---------- 4. Committee hero ---------- */
.committee-top { padding-top: clamp(28px, 4vw, 52px); }
.committee-hero {
  display: grid;
  gap: 28px;
  padding: 28px 0 clamp(28px, 3vw, 36px);
}
.committee-hero__logo .c-logo { --size: 140px !important; }
.committee-hero__logo .c-logo__abbr { font-size: 30px !important; }
.committee-hero__text .kicker { margin-bottom: 14px; }
.committee-hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 5.8vw, 84px);
  line-height: 1;
  letter-spacing: -.01em;
  max-width: 18ch;
}
.committee-hero__label { margin-top: clamp(20px, 2vw, 26px); }
.committee-hero__agenda {
  max-width: 780px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.35;
}
.committee-hero__agenda.is-tba { color: var(--muted); }
.board__tba {                       /* shown until the Executive Board is announced */
  padding: clamp(28px, 4vw, 44px) 0 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(19px, 1.8vw, 23px);
  color: var(--muted);
}
@media (min-width: 900px) {
  .committee-hero { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
  .committee-hero__logo .c-logo { --size: 240px !important; }
  .committee-hero__logo .c-logo__abbr { font-size: 48px !important; }
  .committee-hero__text { padding-top: 0; }
}
.committee-missing { padding-bottom: var(--section-y); }

/* ---------- 5. Background guide card ---------- */
.guide {
  display: grid;
  gap: 32px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--card);
  border: 1px solid rgba(26, 38, 32, .12);
}
@media (min-width: 768px) {
  .guide { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: center; }
}
.guide__thumb {
  position: relative;
  width: 220px;
  height: 290px;
  margin: 8px 0 8px 4px;
}
.guide__page {
  position: absolute;
  inset: 0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 38, 32, .14);
  transform-origin: 30% 90%;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.guide__page--back { opacity: .6; transform: rotate(5deg) translate(14px, -6px); }
.guide__page--front {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid rgba(26, 38, 32, .08);
}
.guide__kicker { margin-top: 18px; font-size: 8px; }
.guide__name { margin-top: 6px; font-family: var(--font-display); font-size: 18px; line-height: 1.2; }
.guide__lines { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 22px; }
.guide__lines i { display: block; height: 4px; border-radius: 4px; background: rgba(26, 38, 32, .1); }
.guide__lines i:nth-child(3n) { width: 64%; }
.guide__lines i:nth-child(4n) { width: 82%; }
/* Hover: the front page lifts and tilts, the back page fans out. */
.guide:hover .guide__page--front { transform: translateY(-10px) rotate(-2deg); box-shadow: 0 22px 40px rgba(26, 38, 32, .2); }
.guide:hover .guide__page--back { transform: rotate(9deg) translate(26px, -8px); }
.guide__heading {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.15;
}
.guide__desc { max-width: 580px; font-family: var(--font-read); font-size: 15px; line-height: 1.65; color: var(--muted); }
.guide__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.committee-back { margin-top: 32px; }
