/**
 * LinkX Error pages — CoralBold redesign
 * Scoped to .lx-dc-error
 */

.lx-dc-error {
  --coral: #FF6B4A;
  --coral-deep: #E85535;
  --teal: #14806E;
  --bg: #FAF6F1;
  --paper: #fff;
  --ink: #2A211C;
  --muted: #756A60;
  --line: rgba(42, 33, 28, 0.08);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 0) 0 0 / 24px 24px,
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  margin: 0;
}

.lx-dc-error *,
.lx-dc-error *::before,
.lx-dc-error *::after {
  box-sizing: border-box;
}

.lx-dc-error ::selection {
  background: var(--coral);
  color: #fff;
}

.lx-dc-error a {
  color: var(--coral-deep);
  text-decoration: none;
}

.lx-dc-error a:hover {
  color: var(--coral);
}

@keyframes lx-err-float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-12px) rotate(-3deg);
  }
}

.lx-dc-error .lx-er-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
}

.lx-dc-error .lx-er-brand {
  display: flex;
  align-items: center;
  color: inherit;
}

.lx-dc-error .lx-er-brand img {
  height: 36px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
}

.lx-dc-error .lx-er-brand-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.lx-dc-error .lx-er-brand-text span {
  color: var(--coral);
}

.lx-dc-error .lx-er-nav-cta {
  background: var(--coral);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 22px -10px var(--coral);
  transition: filter 0.15s ease;
}

.lx-dc-error .lx-er-nav-cta:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.lx-dc-error .lx-er-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 32px 40px;
}

.lx-dc-error .lx-er-code-wrap {
  position: relative;
  margin-bottom: 8px;
}

.lx-dc-error .lx-er-code {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(100px, 22vw, 170px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.lx-dc-error .lx-er-badge {
  position: absolute;
  top: -14px;
  right: -30px;
  background: var(--coral);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 12px;
  animation: lx-err-float 7s ease-in-out infinite;
  white-space: nowrap;
}

.lx-dc-error .lx-er-main h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
  max-width: 600px;
  text-wrap: pretty;
  color: var(--ink);
}

.lx-dc-error .lx-er-main > p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 500px;
  margin: 0 0 30px;
  text-wrap: pretty;
}

.lx-dc-error .lx-er-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.lx-dc-error .lx-er-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 14px;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.lx-dc-error .lx-er-btn-primary {
  background: var(--coral);
  color: #fff !important;
  box-shadow: 0 14px 30px -14px var(--coral);
}

.lx-dc-error .lx-er-btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  color: #fff !important;
}

.lx-dc-error .lx-er-btn-secondary {
  background: var(--paper);
  border: 1px solid rgba(42, 33, 28, 0.14);
  color: var(--ink) !important;
}

.lx-dc-error .lx-er-btn-secondary:hover {
  border-color: var(--coral);
  color: var(--ink) !important;
}

.lx-dc-error .lx-er-hint {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.lx-dc-error .lx-er-hint a {
  font-weight: 600;
}

.lx-dc-error .lx-er-footer {
  border-top: 1px solid var(--line);
  padding: 24px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.lx-dc-error .lx-er-footer a {
  color: var(--muted);
}

.lx-dc-error .lx-er-footer a:hover {
  color: var(--coral);
}

@media (max-width: 720px) {
  .lx-dc-error .lx-er-nav {
    padding: 14px 20px;
  }

  .lx-dc-error .lx-er-main {
    padding: 48px 20px 32px;
  }

  .lx-dc-error .lx-er-badge {
    right: -8px;
    top: -18px;
    font-size: 11px;
    padding: 6px 10px;
  }

  .lx-dc-error .lx-er-nav-cta {
    padding: 10px 14px;
    font-size: 14px;
  }
}
