/* College Event Portal — Public marketing site */
:root {
  --pub-bg: #f6f7fb;
  --pub-surface: #ffffff;
  --pub-ink: #0f172a;
  --pub-muted: #64748b;
  --pub-border: rgba(15, 23, 42, 0.08);
  --pub-primary: #4f46e5;
  --pub-primary-dark: #3730a3;
  --pub-accent: #06b6d4;
  --pub-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #06b6d4 100%);
  --pub-gradient-soft: linear-gradient(180deg, #eef2ff 0%, #f6f7fb 42%, #f6f7fb 100%);
  --pub-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --pub-shadow-md: 0 20px 50px rgba(79, 70, 229, 0.12);
  --pub-radius: 16px;
  --pub-radius-lg: 24px;
  --pub-header-h: 76px;
  --pub-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --pub-display: "Fraunces", Georgia, serif;
}

.public-site {
  font-family: var(--pub-font);
  color: var(--pub-ink);
  background: var(--pub-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.public-site main.site-main { flex: 1; }

.site-main--contained {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-main--bleed { padding: 0; width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--pub-header-h);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--pub-border);
}

.site-header__inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--pub-ink);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--pub-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.site-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--pub-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--pub-primary);
  background: rgba(79, 70, 229, 0.08);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}

.btn-pub:active { transform: scale(0.98); }

.btn-pub--ghost {
  color: var(--pub-ink);
  background: transparent;
  border-color: var(--pub-border);
}

.btn-pub--ghost:hover {
  background: var(--pub-surface);
  box-shadow: var(--pub-shadow-sm);
}

.btn-pub--primary {
  color: #fff;
  background: var(--pub-gradient);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.btn-pub--primary:hover {
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.34);
  color: #fff;
}

.btn-pub--lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.site-nav-toggle {
  display: none;
  border: 0;
  background: var(--pub-surface);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  box-shadow: var(--pub-shadow-sm);
}

@media (max-width: 991px) {
  .site-nav-toggle { display: inline-grid; place-items: center; }
  .site-nav-wrap {
    position: fixed;
    inset: var(--pub-header-h) 0 auto 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-bottom: 1px solid var(--pub-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }
  .site-nav-wrap.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 0.75rem 1rem; }
  .site-actions { flex-direction: column; width: 100%; margin-top: 0.5rem; }
  .site-actions .btn-pub { width: 100%; }
}

@media (min-width: 992px) {
  .site-nav-wrap { display: contents; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--pub-gradient-soft);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.hero__orb--1 { width: 420px; height: 420px; background: #a5b4fc; top: -120px; right: -80px; }
.hero__orb--2 { width: 360px; height: 360px; background: #67e8f9; bottom: -100px; left: -60px; }

.hero__slides {
  position: absolute;
  inset: 0;
  opacity: 0.14;
}

.hero__slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__inner {
  position: relative;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--pub-border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pub-primary-dark);
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--pub-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero__subtitle {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--pub-muted);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--pub-shadow-sm);
}

.stat-pill strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.stat-pill span {
  font-size: 0.78rem;
  color: var(--pub-muted);
  font-weight: 600;
}

.hero__visual {
  position: relative;
}

.hero-card-stack {
  background: var(--pub-surface);
  border-radius: var(--pub-radius-lg);
  border: 1px solid var(--pub-border);
  box-shadow: var(--pub-shadow-md);
  padding: 1rem;
}

.hero-card-stack__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pub-muted);
}

@media (max-width: 991px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__visual { order: -1; }
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section--surface { background: var(--pub-surface); }

.section__inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section__title {
  font-family: var(--pub-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0;
  color: var(--pub-muted);
  max-width: 38rem;
}

.link-arrow {
  color: var(--pub-primary);
  font-weight: 700;
  text-decoration: none;
}

.link-arrow:hover { text-decoration: underline; }

/* Event cards */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 991px) {
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .events-grid { grid-template-columns: 1fr; }
}

.event-card {
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  overflow: hidden;
  box-shadow: var(--pub-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pub-shadow-md);
}

.event-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #e2e8f0;
}

.event-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.event-card:hover .event-card__media img { transform: scale(1.04); }

.event-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0e7ff, #cffafe);
  font-size: 2rem;
  font-weight: 800;
  color: var(--pub-primary-dark);
}

.event-card__body { padding: 1.1rem 1.15rem 1.25rem; flex: 1; display: flex; flex-direction: column; }

.event-card__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--pub-primary);
  margin: 0 0 0.35rem;
}

.event-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.event-card__title a {
  color: inherit;
  text-decoration: none;
}

.event-card__title a:hover { color: var(--pub-primary); }

.event-card__meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  color: var(--pub-muted);
  font-size: 0.86rem;
}

.event-card__meta li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.event-card__link {
  margin-top: auto;
  font-weight: 700;
  color: var(--pub-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.event-status,
.event-badge-featured {
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-status { left: 0.75rem; background: rgba(15, 23, 42, 0.72); color: #fff; }
.event-badge-featured { right: 0.75rem; background: #fbbf24; color: #78350f; }
.status-live { background: #059669 !important; }
.status-done { background: #475569 !important; }

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 991px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

.category-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: var(--pub-radius);
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.category-chip:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: var(--pub-shadow-sm);
}

.category-chip__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--pub-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } }

.step-card {
  padding: 1.25rem;
  border-radius: var(--pub-radius);
  border: 1px solid var(--pub-border);
  background: var(--pub-bg);
}

.step-card__num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pub-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--pub-gradient-soft);
  border-bottom: 1px solid var(--pub-border);
  padding: 2.5rem 0 2rem;
}

.page-hero__inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--pub-display);
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--pub-muted);
  margin-bottom: 0.75rem;
}

.breadcrumbs a { color: var(--pub-primary); text-decoration: none; }

/* Filters panel */
.events-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 991px) {
  .events-layout { grid-template-columns: 1fr; }
}

.filter-panel {
  position: sticky;
  top: calc(var(--pub-header-h) + 1rem);
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1.25rem;
  box-shadow: var(--pub-shadow-sm);
}

.filter-panel label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pub-muted);
  margin-bottom: 0.35rem;
}

.filter-panel .form-control,
.filter-panel .form-select {
  border-radius: 12px;
  border-color: var(--pub-border);
  margin-bottom: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--pub-border);
  border-radius: var(--pub-radius-lg);
  background: var(--pub-surface);
}

/* Event detail */
.event-detail-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: end;
  color: #fff;
  background: #0f172a;
}

.event-detail-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.event-detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.event-detail-hero__content {
  position: relative;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0;
}

.detail-layout {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

@media (max-width: 991px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-panel {
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  padding: 1.25rem;
  box-shadow: var(--pub-shadow-sm);
  position: sticky;
  top: calc(var(--pub-header-h) + 1rem);
}

.detail-panel dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.detail-panel dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pub-muted);
  font-weight: 800;
}

.detail-panel dd { margin: 0; font-weight: 600; }

.prose h2 {
  font-family: var(--pub-display);
  font-size: 1.35rem;
  margin-top: 1.75rem;
}

/* Announcements, policies, gallery */
.content-card {
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--pub-shadow-sm);
  margin-bottom: 1rem;
}

.content-card time {
  font-size: 0.82rem;
  color: var(--pub-muted);
  font-weight: 600;
}

.policy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.policy-tabs a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--pub-border);
  text-decoration: none;
  color: var(--pub-muted);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--pub-surface);
}

.policy-tabs a.is-active,
.policy-tabs a:hover {
  color: var(--pub-primary);
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.06);
}

.gallery-grid {
  columns: 3;
  column-gap: 1rem;
}

@media (max-width: 991px) { .gallery-grid { columns: 2; } }
@media (max-width: 640px) { .gallery-grid { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--pub-radius);
  overflow: hidden;
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  box-shadow: var(--pub-shadow-sm);
}

.gallery-item img { width: 100%; display: block; }
.gallery-item figcaption { padding: 0.75rem 0.85rem; font-size: 0.85rem; color: var(--pub-muted); }

/* CTA band */
.cta-band {
  background: var(--pub-ink);
  color: #e2e8f0;
  border-radius: var(--pub-radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-family: var(--pub-display);
  color: #fff;
  margin: 0 0 0.35rem;
}

/* Footer */
.site-footer {
  background: #0b1220;
  color: #94a3b8;
  margin-top: auto;
}

.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }

.site-footer__inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 991px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

.site-footer__brand p { max-width: 22rem; line-height: 1.6; }

.site-footer h4 {
  color: #f8fafc;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; font-size: 0.92rem; }

.site-footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding: 1rem 0 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

/* Auth pages */
.auth-shell {
  min-height: calc(100vh - var(--pub-header-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 991px) {
  .auth-shell { grid-template-columns: 1fr; }
}

.auth-shell__brand {
  background: var(--pub-gradient);
  color: #fff;
  padding: clamp(2rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-shell__brand h1 {
  font-family: var(--pub-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.auth-shell__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--pub-bg);
}

.auth-card {
  width: min(440px, 100%);
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  padding: 2rem;
  box-shadow: var(--pub-shadow-md);
}

.auth-card .form-control,
.auth-card .form-select {
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

/* Flash on public */
.public-flash {
  width: min(1200px, calc(100% - 2rem));
  margin: 1rem auto 0;
}

.public-flash .alert {
  border-radius: 12px;
  border: 0;
  box-shadow: var(--pub-shadow-sm);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
