:root {
  --pink-primary: #ce7a8a;
  --pink-dark: #b94c67;
  --pink-deep: #a83e56;
  --pink-light: #e9bcc3;
  --pink-muted: #d7909d;
  --bg-dark: #0f172a;
  --bg-card: rgba(233, 188, 195, 0.08);
  --bg-card-hover: rgba(233, 188, 195, 0.14);
  --text-main: #f8fafc;
  --text-muted: #9ca3af;
  --text-secondary: #d1d5db;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(15, 23, 42, 0.62);
  --header-border: rgba(233, 188, 195, 0.16);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 6.5rem;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle at 10% 20%, rgba(44, 154, 236, 0.06), transparent 20%),
    url('../apply.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 3px;
}

/* navigation bar */
header.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pink-primary);
}

.nav-menu {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  align-items: center;
}

.nav-btn {
  background-color: var(--pink-dark);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms ease;
}

.nav-btn.active { background-color: var(--pink-deep); }

@media (hover: hover) {
  .nav-btn:hover { background-color: #9d3b52; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .nav-btn:hover { transform: translateY(-1px); }
}

/* the checkbox fills the whole label, so mouse and keyboard both work */
.burger {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 8px;
  z-index: 101;
}

.burger input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), opacity 150ms ease;
}

.burger span:nth-of-type(1) { top: 14px; }
.burger span:nth-of-type(2) { top: 21px; }
.burger span:nth-of-type(3) { top: 28px; }

.burger input:checked ~ span:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.burger input:checked ~ span:nth-of-type(2) { opacity: 0; }
.burger input:checked ~ span:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }

.burger:focus-within {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  header.navbar { padding: 0.75rem 1rem; }
  .burger { display: block; }
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    width: 100%;
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: rgba(15, 23, 42, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 1.25rem;
    gap: 0.6rem;
    z-index: 100;
  }
  .nav-menu.active { display: flex; }
  .nav-btn { text-align: center; }
  body { background-attachment: scroll; }
}

/* hero */
.rules-hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

.rules-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 40px rgba(206, 122, 138, 0.45);
  margin-bottom: 0.75rem;
}

.rules-hero h1 span {
  display: inline-block;
  color: var(--pink-primary);
}

.rules-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* slide the hero text in from the sides; everything else stays still */
@keyframes hero-in-left {
  from { opacity: 0; transform: translateX(-32px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-in-right {
  from { opacity: 0; transform: translateX(72px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-in-soft {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .rules-hero h1 {
    animation: hero-in-left 620ms cubic-bezier(0.2, 0, 0, 1) both;
  }

  .rules-hero h1 span {
    animation: hero-in-right 620ms 80ms cubic-bezier(0.2, 0, 0, 1) both;
  }

  .rules-hero p {
    animation: hero-in-soft 520ms 160ms cubic-bezier(0.2, 0, 0, 1) both;
  }
}

/* category navigation */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  background: rgba(233, 188, 195, 0.12);
  border: 1px solid rgba(206, 122, 138, 0.25);
  color: var(--pink-light);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  text-decoration: none;
}

@media (hover: hover) {
  .pill:hover {
    background: rgba(206, 122, 138, 0.3);
    border-color: var(--pink-primary);
    color: #fff;
  }
}

.pill.active {
  background: rgba(206, 122, 138, 0.3);
  border-color: var(--pink-primary);
  color: #fff;
}

/* rules content */
main {
  flex: 1;
  padding: 0 1.5rem 4rem;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.rules-section {
  margin-bottom: 3rem;
  scroll-margin-block-start: 6.5rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pink-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(206, 122, 138, 0.35), transparent);
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid rgba(233, 188, 195, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.rule-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.rule-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 68ch;
}

/* footer */
footer {
  background-color: transparent;
  color: #d1d5db;
  text-align: center;
  padding: 1.25rem;
  font-size: 0.875rem;
  border-top: 1px solid var(--border-subtle);
}

footer a {
  color: var(--pink-light);
  text-underline-offset: 2px;
}

@media (hover: hover) {
  footer a:hover { color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .burger span { transition: none; }
}
