/* Global black-purple theme */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
:root {
  --bg: #0b0b10;
  --bg-elev: #12121a;
  --text: #e8e8ef;
  --muted: #b6b6c7;
  --accent: #7c3aed; /* purple */
  --accent-2: #a855f7;
  --accent-3: #6d28d9;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 40px rgba(124, 58, 237, 0.22), 0 2px 14px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(124, 58, 237, 0.35);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: radial-gradient(
      1200px 800px at 80% -10%,
      rgba(124, 58, 237, 0.15),
      transparent 60%
    ),
    radial-gradient(
      900px 700px at -10% 120%,
      rgba(168, 85, 247, 0.12),
      transparent 60%
    ),
    var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.65;
  position: relative;
}

/* Subtle texture and glow overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      600px 400px at 10% 10%,
      rgba(168, 85, 247, 0.12),
      transparent 70%
    ),
    radial-gradient(
      700px 500px at 90% 20%,
      rgba(124, 58, 237, 0.1),
      transparent 70%
    ),
    linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 24px
    );
  pointer-events: none;
  mask-image: radial-gradient(
    1000px 600px at 50% -10%,
    black 50%,
    transparent 70%
  );
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--text);
  text-decoration: none;
}
a:hover {
  color: var(--accent-2);
}
a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}
::selection {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 16, 0.95),
    rgba(11, 11, 16, 0.85)
  );
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 80px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.brand .brand-name {
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
}
.nav a:hover {
  border-color: var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.18);
  transform: translateY(-1px);
}
.nav a:active {
  transform: translateY(0);
}

.nav-register {
  background: linear-gradient(120deg, var(--accent), var(--accent-3)) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.nav-register:hover {
  background: linear-gradient(120deg, var(--accent-2), var(--accent)) !important;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.45) !important;
  color: #fff !important;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
}

/* Banner blocks */
.banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: var(--shadow);
}
.banner--top {
  margin: 16px 0 24px;
}
.banner--mid {
  margin: 32px 0;
}
.banner img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

/* Banner carousel */
.banner-carousel {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.banner-carousel__link {
  position: relative;
  display: block;
  width: 100%;
  padding-bottom: 25%; /* Maintain aspect ratio: 400/1920 ≈ 20.83% */
}

.banner-carousel__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
  display: block;
}

.banner-carousel__img--active {
  opacity: 1;
  z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .banner-carousel__link {
    padding-bottom: 30%; /* Slightly taller on mobile for better visibility */
  }
}

@media (min-width: 1920px) {
  .banner-carousel__link {
    padding-bottom: 20.833%; /* Maintain original ratio on large screens */
  }
}

/* Main content */
main {
  padding: 24px 0 40px;
}
section {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: saturate(1.15) blur(2px);
  transition: transform 0.18s ease, box-shadow 0.22s ease,
    border-color 0.2s ease;
}
section + section {
  margin-top: 18px;
}
section:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* 404 page layout */
.error-page {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  padding: clamp(20px, 4vw, 40px);
}
.error-visual {
  position: relative;
  padding: clamp(32px, 6vw, 64px);
  border-radius: 20px;
  border: 1px solid var(--border);
  background: radial-gradient(
      circle at 20% 20%,
      rgba(124, 58, 237, 0.25),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(168, 85, 247, 0.2),
      transparent 70%
    ),
    var(--bg-elev);
  box-shadow: var(--shadow);
  text-align: center;
}
.error-code {
  font-size: clamp(72px, 16vw, 160px);
  font-weight: 700;
  letter-spacing: 4px;
  margin: 0;
  color: #fff;
  text-shadow: 0 0 25px rgba(124, 58, 237, 0.6);
}
.error-visual::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.error-content .eyebrow {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin: 0 0 12px;
}
.error-content h1 {
  margin-top: 0;
}
.error-content p {
  color: var(--muted);
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  border-color: var(--border);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover {
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(168, 85, 247, 0.35);
  color: var(--accent-2);
}
.error-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}
.error-links li {
  padding: 0;
}
.error-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.error-links a:hover {
  color: var(--accent-2);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.tips-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.tips-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.inline-cta {
  margin: 28px auto;
  display: flex;
  justify-content: center;
}
.inline-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.15),
      transparent
    ),
    linear-gradient(120deg, var(--accent), var(--accent-3));
  color: #fff;
  box-shadow: 0 14px 35px rgba(124, 58, 237, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.inline-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(124, 58, 237, 0.4);
}

@media (max-width: 600px) {
  .error-page {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 20px;
    text-align: center;
  }
  .error-visual {
    padding: 28px;
    margin: 0 auto;
  }
  .error-content {
    text-align: center;
  }
  .error-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    width: 100%;
  }
  .error-links {
    margin-top: 16px;
    text-align: center;
  }
  .error-links a {
    justify-content: center;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 12px;
  }
  .tips-grid {
    grid-template-columns: 1fr;
  }
  .error-code {
    font-size: clamp(64px, 30vw, 120px);
  }
  .inline-cta {
    margin: 24px 0;
  }
  .inline-cta__btn {
    width: 100%;
  }
}

ul,
ol {
  padding-left: 22px;
}
li {
  margin: 6px 0;
}
strong {
  color: var(--accent-2);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(
    0deg,
    rgba(11, 11, 16, 0.96),
    rgba(11, 11, 16, 0.88)
  );
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px 0;
  justify-items: center;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.footer-brand img {
  width: 64px;
  height: 32px;
  border-radius: 8px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.footer-nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
}
.footer-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.copyright {
  color: var(--muted);
  font-size: 14px;
}

.site-footer::before {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(124, 58, 237, 0.6),
    transparent
  );
}

/* Responsive */
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .nav[data-open="true"] {
    display: flex;
    position: absolute;
    right: 16px;
    top: 64px;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none !important;
  }
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  color: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.scroll-to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
}
.scroll-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(124, 58, 237, 0.35),
    0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Typography enhancements for content */
main section h1,
main section h2,
main section h3 {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, Helvetica, Arial;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1px;
  margin: 6px 0 14px;
}
main section h1 {
  font-size: clamp(28px, 4vw, 44px);
}
main section h2 {
  font-size: clamp(22px, 3vw, 32px);
}
main section h3 {
  font-size: clamp(18px, 2.2vw, 24px);
}

/* Accent underline for headings */
main section h1,
main section h2 {
  position: relative;
}
main section h1::after,
main section h2::after {
  content: "";
  display: block;
  height: 2px;
  width: 76px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin-top: 8px;
}

/* Refined paragraphs and links inside content */
main section p {
  margin: 10px 0 12px;
  font-size: 16px;
}
main section p a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(168, 85, 247, 0.55);
}
main section p a:hover {
  text-decoration-color: rgba(168, 85, 247, 0.9);
}

/* Beautiful lists */
main section ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}
main section ul li {
  position: relative;
  padding-left: 22px;
  margin: 8px 0;
}
main section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    var(--accent-2),
    var(--accent-3)
  );
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

main section ol {
  list-style: none; /* custom numbering */
  counter-reset: item;
  padding-left: 0;
  margin: 12px 0;
}
main section ol > li {
  position: relative;
  padding-left: 32px;
  margin: 8px 0;
  counter-increment: item;
}
main section ol > li::before {
  content: counters(item, ".") " "; /* no extra trailing dot */
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--accent-2);
  font-weight: 700;
}

/* nested ordered lists alignment and reset */
main section ol > li ol {
  list-style: none;
  counter-reset: item;
  margin-top: 6px;
  padding-left: 0;
}
main section ol > li ol > li {
  padding-left: 36px;
  counter-increment: item;
}
main section ol > li ol > li::before {
  content: counters(item, ".") " ";
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--accent-2);
  font-weight: 700;
}

/* Number UL items inside OL as sub-steps (e.g., 3.1, 3.2) */
/* keep ULs inside OL as bullet lists (styled by UL rules above) */
main section ol > li ul {
  margin-top: 6px;
}
main section ol > li ul > li {
  padding-left: 22px;
}

/* Improve images inside content blocks */
main section img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
