:root {
  --ink: #050505;
  --paper: #ffffff;
  --soft: #f3f3f3;
  --muted: #707070;
  --line: #d8d8d8;

  --accent: #8b5cf6;
  --accent-dark: #6d28d9;
  --accent-light: #c4b5fd;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-glow: rgba(139, 92, 246, 0.28);
  --sidebar-width: clamp(3.5rem, 6vw, 5rem);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  letter-spacing: -0.015em;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: inherit;
}

/* Fixed Font Awesome icon sidebar and content shell */
.icon-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--bs-body-bg, #fff);
  border-right: var(--bs-border-width, 1px) solid
    var(--bs-border-color, #dee2e6);
}

.sidebar-link {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: var(--ink, #050505);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 50%;
  opacity: 0.65;
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  color: var(--ink, #050505);
  border-color: currentColor;
  opacity: 1;
  transform: translateY(-1px);
}

.sidebar-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.sidebar-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
}

.sidebar-icon-discord {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1.6rem;
}

.page-shell {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

/* Keep the mobile offcanvas inside the remaining content area. */
.page-shell .offcanvas-start {
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width)) !important;
}

.site-container {
  padding-inline: clamp(1.25rem, 4vw, 4.5rem);
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  content: "";
  opacity: 0.75;
  pointer-events: none;
}

.brand,
.nav-link,
.eyebrow,
.section-label,
.project-number,
.project-meta,
.news-meta,
.text-link,
.site-footer {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand {
  color: var(--accent-dark);
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: var(--accent);
}

.desktop-nav {
  list-style: none;
}

.nav-link {
  color: var(--ink);
  padding: 0 !important;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
}

.menu-toggle {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  transform-origin: center;
}

.menu-toggle span:first-child {
  top: calc(50% - 0.25rem);
  transform: translateX(-50%);
}

.menu-toggle span:last-child {
  top: calc(50% + 0.25rem);
  transform: translateX(-50%);
}

.mobile-nav-link {
  font-size: clamp(2.75rem, 12vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.055em;
  line-height: 1;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: var(--accent) !important;
}

.offcanvas .offcanvas-body {
  min-height: 100dvh;
  padding-top: 5.5rem;
  padding-bottom: 3rem;
}

.hero {
  min-height: 94vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  padding-bottom: clamp(5rem, 8vw, 8rem);
}

.hero .eyebrow {
  color: var(--accent-dark);
}

.hero-title {
  max-width: 1120px;
  font-size: clamp(4rem, 10.5vw, 10rem);
  font-weight: 200;
  letter-spacing: -0.075em;
  line-height: 0.87;
}

.lead-copy,
.body-copy {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.hero .lead-copy {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.section {
  padding-block: clamp(5.5rem, 9vw, 9rem);
}

.section-bordered {
  border-top: 1px solid var(--line);
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-label {
  color: var(--accent-dark);
}

.section-dark .section-label {
  color: var(--accent-light);
}

.section-heading {
  max-width: 1100px;
  font-size: clamp(2.8rem, 6.7vw, 6.5rem);
  font-weight: 200;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.about-heading {
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 3px solid var(--accent);
  font-size: clamp(2.5rem, 6vw, 2rem);
  font-weight: 100;
  letter-spacing: -0.05em;
  line-height: 1;
}

.rules-list {
  border-bottom: 1px solid var(--line);
}

.rules-item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}

.rules-number {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.rules-title {
  margin-bottom: 0.75rem;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.rules-item {
  transition:
    padding-inline 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.rules-item:hover {
  padding-inline: 1rem;
  background: var(--accent-soft);
  border-top-color: var(--accent);
}

@media (max-width: 575.98px) {
  .rules-item {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .rules-item:hover {
    padding-inline: 0;
  }
}

.btn-mono {
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--paper);
  padding: 1rem 1.45rem;
  box-shadow: 0 0 0 transparent;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.btn-mono:hover,
.btn-mono:focus {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--paper);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.service-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(196, 181, 253, 0.55);
}

.service-number {
  color: var(--accent-light);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 200;
  line-height: 1;
}

.service-title,
.news-title,
.project-title {
  font-weight: 300;
  letter-spacing: -0.035em;
}

.service-title {
  font-size: 1.75rem;
}

.service-copy {
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

.project-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--ink);
  transition:
    padding-inline 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.project-row:last-child {
  border-bottom: 1px solid var(--ink);
}

.project-row:hover {
  padding-inline: 0.75rem;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.project-row:hover + .project-row {
  border-top-color: var(--accent);
}

.project-row:hover .project-title,
.project-row:hover .project-number {
  color: var(--accent-dark);
}

.project-number {
  color: var(--accent-dark);
}

.project-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
}

.metrics {
  overflow: hidden;
}

.metric {
  padding: clamp(2.5rem, 5vw, 5rem);
  border-left: 1px solid var(--line);
}

.metric:first-child {
  border-left: 0;
}

.metric-value {
  color: var(--accent-dark);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 200;
  letter-spacing: -0.065em;
  line-height: 1;
}

.quote {
  max-width: 1120px;
  padding-left: clamp(1rem, 3vw, 2.5rem);
  border-left: 2px solid var(--accent);
  font-size: clamp(2.3rem, 5.2vw, 5.8rem);
  font-weight: 200;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.process-card,
.news-card {
  padding-top: 1.5rem;
  border-top: 1px solid var(--accent);
}

.news-image {
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--soft);
  border: 1px solid var(--line);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--accent-dark);
}

.news-title {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.7vw, 2.25rem);
  line-height: 1.15;
}

.no-top-border {
  border-top: none;
}

.text-link {
  display: inline-block;
  color: var(--accent-dark);
  padding-bottom: 0.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.text-link:hover,
.text-link:focus {
  color: var(--accent);
  border-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  text-underline-offset: 0.3rem;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 991.98px) {
  .hero {
    min-height: auto;
    padding-top: 10rem;
  }

  .project-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .project-meta {
    grid-column: 2;
  }

  .metric {
    padding-inline: 2rem;
  }
}

@media (max-width: 767.98px) {
  /* Let the mobile navigation cover the complete viewport, including the sidebar. */
  .page-shell .offcanvas-start {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1055;
    width: 100vw !important;
    max-width: none;
    height: 100vh;
    height: 100dvh;
  }

  #mobileNavigation .offcanvas-body {
    min-height: 0;
    flex: 1 1 auto;
  }

  .hero {
    padding-top: 9rem;
    padding-bottom: 5rem;
  }

  .hero-title {
    font-size: clamp(3.35rem, 16vw, 5.5rem);
  }

  .section {
    padding-block: 4.75rem;
  }

  .section-heading {
    font-size: clamp(2.75rem, 13vw, 4.8rem);
  }

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

  .metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric:first-child {
    border-top: 0;
  }

  .project-row:hover {
    padding-inline: 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .site-container {
    padding-inline: max(1rem, env(safe-area-inset-left))
      max(1rem, env(safe-area-inset-right));
  }

  .mobile-menu-header {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .hero-title {
    letter-spacing: -0.06em;
  }

  .hero .lead-copy {
    padding-left: 0.875rem;
  }

  .project-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 1rem;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-meta {
    font-size: 0.58rem;
  }

  .news-meta {
    flex-direction: column;
    gap: 0.4rem;
  }

  .btn-mono {
    width: 100%;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-link {
    transition: none;
  }
}