:root {
  --tb-bg: #ffffff;
  --tb-text: #111827;
  --tb-muted: #667085;
  --tb-border: #e5e7eb;
  --tb-primary: #635bff;
  --tb-content: min(1120px, calc(100vw - 40px));
}

body {
  margin: 0;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.titanbase-site-header,
.titanbase-site-footer {
  border-color: var(--tb-border);
}

.titanbase-site-header {
  border-bottom: 1px solid var(--tb-border);
}

.titanbase-container {
  width: var(--tb-content);
  margin: 0 auto;
}

.titanbase-header-inner,
.titanbase-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.titanbase-brand {
  font-weight: 800;
  text-decoration: none;
}

.titanbase-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.titanbase-menu a {
  text-decoration: none;
  color: var(--tb-muted);
  font-weight: 650;
}

.titanbase-menu a:hover,
.titanbase-menu a:focus {
  color: var(--tb-primary);
}

.titanbase-main {
  min-height: 55vh;
}

.titanbase-content {
  width: var(--tb-content);
  margin: 0 auto;
  padding: 56px 0;
}

.titanbase-site-footer {
  border-top: 1px solid var(--tb-border);
  color: var(--tb-muted);
}

.titanbase-404 {
  position: relative;
  display: grid;
  min-height: clamp(520px, 68vh, 760px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--tb-primary) 16%, transparent), transparent 31rem),
    linear-gradient(145deg, color-mix(in srgb, var(--tb-primary) 5%, #fff), var(--tb-bg));
}

.titanbase-404__inner {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: clamp(56px, 9vw, 112px);
}

.titanbase-404__card {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid color-mix(in srgb, var(--tb-primary) 22%, var(--tb-border));
  border-radius: clamp(24px, 4vw, 44px);
  background: color-mix(in srgb, var(--tb-bg) 88%, transparent);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px);
}

.titanbase-404__identity {
  margin-bottom: clamp(28px, 5vw, 48px);
  color: var(--tb-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.titanbase-404__identity .custom-logo-link {
  display: inline-flex;
}

.titanbase-404__identity .custom-logo {
  width: auto;
  max-width: min(220px, 55vw);
  max-height: 68px;
  object-fit: contain;
}

.titanbase-404__code {
  margin: 0 0 10px;
  color: var(--tb-primary);
  font-size: clamp(0.78rem, 1.2vw, 0.9rem);
  font-weight: 850;
  letter-spacing: 0.24em;
}

.titanbase-404 h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.titanbase-404__copy {
  max-width: 58ch;
  margin: clamp(22px, 4vw, 34px) 0 0;
  color: var(--tb-muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.7;
}

.titanbase-404__button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(28px, 5vw, 42px);
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--tb-primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.titanbase-404__button:hover,
.titanbase-404__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--tb-primary) 28%, transparent);
}

.titanbase-404__decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.titanbase-404__decoration span {
  position: absolute;
  right: clamp(-72px, 2vw, 30px);
  border: 1px solid color-mix(in srgb, var(--tb-primary) 24%, transparent);
  border-radius: 999px;
  transform: rotate(-18deg);
}

.titanbase-404__decoration span:nth-child(1) {
  top: 18%;
  width: 210px;
  height: 74px;
}

.titanbase-404__decoration span:nth-child(2) {
  top: 39%;
  width: 310px;
  height: 98px;
}

.titanbase-404__decoration span:nth-child(3) {
  top: 64%;
  width: 250px;
  height: 82px;
}

@media (max-width: 700px) {
  .titanbase-header-inner,
  .titanbase-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }

  .titanbase-404__card {
    padding: 32px 24px;
  }

  .titanbase-404 h1 {
    max-width: none;
  }

  .titanbase-404__decoration {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .titanbase-404__button {
    transition: none;
  }
}
