:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-alt: #f7f4ff;
  --text: #1f2442;
  --muted: #434c73;
  --accent: #1e4db7;
  --accent-strong: #173f96;
  --ring: #2457c8;
  --border: #d9def3;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(28, 39, 85, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, #ffe8ef 0%, transparent 34%),
    radial-gradient(circle at 90% 0%, #e7f2ff 0%, transparent 33%),
    radial-gradient(circle at 80% 70%, #fff0cf 0%, transparent 32%),
    var(--bg);
  line-height: 1.6;
  padding-top: 72px;
}

a {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.7rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--bg) 82%, white 18%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8fb0, #7aa8ff);
  box-shadow: 0 0 0 6px rgba(122, 168, 255, 0.22);
}

.brand-text {
  letter-spacing: 0.01em;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.main-nav a {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  transition: transform 160ms ease, background-color 200ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: #e8eeff;
  transform: translateY(-1px);
}

.member-link {
  background: linear-gradient(120deg, #7aa8ff 0%, #ff8fb0 100%);
  color: #172452 !important;
  font-weight: 700;
}

.member-link:hover,
.member-link.active {
  background: linear-gradient(120deg, #6f9ff5 0%, #f77fa4);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hero {
  position: relative;
  isolation: isolate;
  padding: 5.5rem 0 4rem;
}

.hero-content {
  max-width: 700px;
}

.eyebrow {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1,
h2 {
  font-family: "Source Serif 4", serif;
}

h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
}

.lead {
  font-size: clamp(1.05rem, 1.9vw, 1.2rem);
  color: var(--muted);
  max-width: 58ch;
}

.cta {
  margin-top: 1rem;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, background-color 180ms ease;
}

.cta:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
}

.hero-shape {
  position: absolute;
  right: 5%;
  top: 2rem;
  width: min(40vw, 340px);
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 45% 55% 58% 42% / 42% 40% 60% 58%;
  background: linear-gradient(140deg, #ffdbe7 0%, #dce8ff 48%, #fff0c8 100%);
  animation: floatBlob 8s ease-in-out infinite;
}

.section {
  padding: 3.6rem 0;
  scroll-margin-top: 96px;
}

.section-alt {
  background: color-mix(in oklab, var(--surface-alt) 88%, white 12%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-bottom: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 8px 18px rgba(31, 36, 66, 0.08);
  transition: transform 220ms ease;
}

.card:hover {
  transform: translateY(-4px);
}

.event-list {
  margin: 0;
  padding-left: 1.2rem;
}

.site-footer {
  background:
    radial-gradient(circle at 10% 20%, #f9dcff 0%, transparent 30%),
    radial-gradient(circle at 88% 15%, #d8e9ff 0%, transparent 32%),
    #eef2ff;
  color: #1e2752;
  padding: 2rem 0 1.4rem;
  border-top: 1px solid #cfd9fb;
}

.site-footer a {
  color: #1a47a9;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr;
  gap: 1.2rem;
  align-items: start;
}

.footer-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.footer-text {
  margin: 0.2rem 0;
  color: #2f3a67;
}

.social-links {
  display: grid;
  gap: 0.45rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #1e2752;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #cfdbff;
  width: fit-content;
}

.social-link:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  color: #1a47a9;
  background: #e1ebff;
}

.icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.footer-legal {
  display: grid;
  gap: 0.35rem;
}

.footer-legal a {
  width: fit-content;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page .container {
  max-width: 860px;
}

.legal-page h1 {
  margin-bottom: 0.8rem;
}

.auth-page {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 2rem 0 4rem;
}

.auth-card {
  width: min(500px, 96%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d5def9;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.auth-card h1 {
  margin-bottom: 0.4rem;
}

.auth-help {
  color: var(--muted);
  margin-bottom: 1rem;
}

.form-row {
  margin-bottom: 0.9rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-row input {
  width: 100%;
  border: 1px solid #bcc9ef;
  border-radius: 10px;
  padding: 0.62rem 0.74rem;
  font: inherit;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
}

.auth-button {
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, #1e4db7 0%, #6f5bff 100%);
}

.alert {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.9rem;
}

.alert-error {
  color: #6b1b1b;
  background: #ffe6e7;
  border: 1px solid #ffc6c9;
}

.member-area {
  padding: 2rem 0 4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
}

@media (max-width: 860px) {
  body {
    padding-top: 66px;
  }

  .header-inner {
    min-height: 66px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: fixed;
    top: 66px;
    right: 4%;
    width: min(280px, 92vw);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .main-nav ul {
    padding: 0.55rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .main-nav a {
    width: 100%;
    padding: 0.75rem 0.8rem;
    border-radius: 10px;
  }

  .hero {
    padding-top: 4.2rem;
  }

  .hero-shape {
    right: -40px;
    opacity: 0.75;
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
.dash-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.2rem;
}

.dash-card {
  background: linear-gradient(170deg, #ffffff 0%, #f4f7ff 100%);
  border: 1px solid #d7e1ff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 20px rgba(31, 36, 66, 0.08);
}

.dash-card h2 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.dash-number {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700;
  margin: 0.2rem 0 0.4rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-panel {
  width: 100%;
}

.form-row textarea {
  width: 100%;
  border: 1px solid #bcc9ef;
  border-radius: 10px;
  padding: 0.62rem 0.74rem;
  font: inherit;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem;
  border-bottom: 1px solid #dbe3fb;
}

.admin-table th {
  font-weight: 700;
  color: #293563;
}

.contact-form {
  margin-top: 0.8rem;
  max-width: 680px;
}

.alert-success {
  color: #143c26;
  background: #e8fff1;
  border: 1px solid #b8e8c7;
}

@media (max-width: 860px) {
  .dash-cards {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}
