:root {
  --xc-bg: #000;
  --xc-card: rgba(120, 103, 244, 0.1);
  --xc-card-soft: rgba(255, 255, 255, 0.04);
  --xc-line: rgba(120, 103, 244, 0.16);
  --xc-accent: #7867f4;
  --xc-text: #fff;
  --xc-muted: rgba(255, 255, 255, 0.68);
  --xc-dim: rgba(255, 255, 255, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--xc-bg);
  color: var(--xc-text);
  font-family: var(--font-body, Onest, system-ui, sans-serif);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 24px;
  top: 16px;
  z-index: 999;
  transform: translateY(-140%);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--xc-accent);
  text-decoration: none;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 13px;
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.public-shell > main {
  flex: 1 0 auto;
}

.public-shell::before,
.public-shell::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 920px;
  height: 920px;
  border-radius: 999px;
  background: var(--xc-accent);
  opacity: 0.22;
  filter: blur(230px);
  pointer-events: none;
}

.public-shell::before {
  top: -520px;
  left: -460px;
}

.public-shell::after {
  top: 120px;
  right: -640px;
}

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: soft-light;
  background-image: url("../assets/ui/materials/noise.webp");
}

.public-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 32px clamp(24px, 6vw, 128px);
}

.public-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.public-brand img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 34px rgba(120, 103, 244, 0.55);
}

.public-brand span {
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 24px;
  border-radius: 999px;
  background: rgba(120, 103, 244, 0.045);
}

.public-nav a,
.public-footer a,
.mobile-nav a {
  text-decoration: none;
}

.public-nav a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 300;
  transition: color .25s ease;
}

.public-nav a:hover {
  color: rgba(255, 255, 255, 0.72);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
}

.nav-divider {
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-pill,
.public-login,
.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
  border: 0;
  text-decoration: none;
}

.language-pill {
  gap: 8px;
  min-width: 52px;
  height: 44px;
}

.language-pill img {
  width: 20px;
  height: 20px;
}

.public-login {
  gap: 12px;
  height: 44px;
  padding: 0 24px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 300;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}

.mobile-toggle > span {
  display: none;
}

.mobile-toggle::before,
.mobile-toggle::after {
  content: "";
  position: absolute;
  left: 13px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mobile-toggle::before {
  top: 21px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.mobile-toggle::after {
  top: 21px;
  opacity: 0;
}

.mobile-toggle[aria-expanded="true"]::before {
  transform: rotate(45deg);
  box-shadow: none;
}

.mobile-toggle[aria-expanded="true"]::after {
  opacity: 1;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: none;
}

.page-main {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  padding: 160px 0 80px;
}

.page-main.narrow {
  width: min(100% - 48px, 860px);
}

.page-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 72px;
  position: relative;
}

.page-hero.center {
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
  border-radius: 999px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 12px;
}

.page-title {
  margin: 0;
  max-width: 780px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  text-wrap: balance;
}

.page-title span,
.gradient-text {
  background: linear-gradient(90deg, #fff, var(--xc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-lede {
  max-width: 720px;
  margin: 0;
  color: var(--xc-muted);
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-title {
  margin: 0 0 18px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  font-weight: 700;
  text-wrap: balance;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-card,
.legal-card,
.support-card,
.resource-card,
.auth-card,
.status-card {
  border-radius: 16px;
  background: var(--xc-card);
  border: 1px solid var(--xc-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.public-card,
.support-card,
.resource-card {
  padding: 28px;
}

.support-card.primary {
  color: #fff;
  background: var(--xc-accent);
}

.support-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 260px;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.support-card:hover,
.resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 103, 244, 0.46);
}

.support-tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.25);
}

.support-card:not(.primary) .support-tag {
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
}

.card-title {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 17px;
  font-weight: 600;
}

.card-copy,
.legal-card p,
.legal-card li,
.public-card p,
.resource-card p,
.faq-answer {
  color: var(--xc-muted);
  font-size: 14px;
  line-height: 1.75;
}

.support-card.primary .card-copy {
  color: rgba(255, 255, 255, 0.76);
}

.icon-halo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
}

.stat-card {
  padding: 22px;
  border-radius: 16px;
  background: var(--xc-card-soft);
}

.stat-card p {
  margin: 8px 0 0;
  color: var(--xc-dim);
  font-size: 13px;
  line-height: 1.6;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 500;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 190px;
  text-decoration: none;
  background: rgba(120, 103, 244, 0.08);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.legal-card {
  padding: clamp(24px, 5vw, 40px);
}

.legal-card + .legal-card {
  margin-top: 18px;
}

.legal-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 22px;
}

.legal-card h3 {
  margin: 24px 0 8px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 16px;
}

.legal-card ul,
.public-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 16px;
  background: var(--xc-card-soft);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 15px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  margin: 0;
  padding: 0 24px 22px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.auth-card {
  padding: clamp(26px, 5vw, 42px);
}

.auth-card.visual {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.auth-card.visual img {
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 520px;
  max-width: none;
  opacity: .26;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  color: var(--xc-muted);
  font-size: 13px;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(120, 103, 244, 0.22);
  background: rgba(120, 103, 244, 0.1);
  color: #fff;
  outline: none;
}

.form-field input:focus {
  border-color: var(--xc-accent);
  box-shadow: 0 0 0 3px rgba(120, 103, 244, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error {
  display: none;
  color: #ff7a7a;
  font-size: 12px;
}

.cta-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 400;
}

.cta-button {
  color: #fff;
  background: var(--xc-accent);
}

.secondary-button {
  color: var(--xc-accent);
  background: rgba(120, 103, 244, 0.15);
}

.status-card {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(34px, 7vw, 58px);
  text-align: center;
}

.status-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  margin-bottom: 24px;
  color: #fff;
  background: var(--xc-accent);
  font-size: 34px;
}

.status-mark.error {
  background: #e05264;
}

.public-footer {
  width: min(100% - 48px, 1180px);
  margin: auto auto 0;
  padding: 24px 0 70px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, .7fr));
  gap: 48px;
}

.footer-copy {
  max-width: 420px;
  color: var(--xc-muted);
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--xc-accent);
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-display, Unbounded, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 300;
}

.copyright {
  margin-top: 34px;
  color: var(--xc-dim);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .public-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: flex;
    position: fixed;
    top: 88px;
    left: 24px;
    right: 24px;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(8, 8, 16, 0.96);
    border: 1px solid var(--xc-line);
  }

  .mobile-nav a {
    padding: 14px 16px;
    border-radius: 12px;
    color: #fff;
    background: rgba(120, 103, 244, 0.08);
    font-family: var(--font-display, Unbounded, system-ui, sans-serif);
    font-size: 14px;
  }
}

@media (max-width: 780px) {
  .public-header {
    padding: 24px;
  }

  .public-brand span {
    font-size: 15px;
  }

  .public-login {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }

  .page-main,
  .page-main.narrow,
  .public-footer {
    width: min(100% - 32px, 1120px);
  }

  .page-main {
    padding-top: 130px;
  }

  .grid-2,
  .grid-3,
  .auth-layout,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .support-card {
    min-height: 230px;
  }

  .auth-card.visual {
    min-height: 300px;
  }

  .auth-card.visual img {
    width: 360px;
  }

  .page-title {
    font-size: 32px;
  }

  .page-lede {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
