/* Dignity Partnership — error pages (404 + generic HTTP errors).

   Uses the tokens defined at the top of dignity-redesign.css. The generic
   error template (templates/bundles/TwigBundle/Exception/error.html.twig)
   cannot rely on this file being reachable — a 500 may well be a broken
   deploy — so it inlines the same rules. Keep the two in sync when editing. */

.dip-error {
  padding: clamp(6rem, 12vh, 9rem) 5% clamp(4rem, 9vh, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 1240px;
  margin: 0 auto;
}

.dip-error-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.dip-error-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.dip-error h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 1.2rem;
  /* Keeps "moved on." from being orphaned on its own line. */
  text-wrap: balance;
}

.dip-error h1 em {
  color: var(--accent);
  font-style: normal;
}

.dip-error-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--mid);
  max-width: 46ch;
  margin: 0 0 2.2rem;
}

.dip-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.8rem;
}

/* Links people are most likely to have been after. */
.dip-error-links {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
}

.dip-error-links h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mid);
  margin: 0 0 1rem;
}

.dip-error-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
}

.dip-error-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.dip-error-links a::before {
  content: "→";
  color: var(--accent2);
  transition: transform 0.2s;
}

.dip-error-links a:hover {
  color: var(--accent);
}

.dip-error-links a:hover::before {
  transform: translateX(3px);
}

/* ─── The numeral ─── */
.dip-error-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: clamp(2rem, 5vw, 3.5rem);
  aspect-ratio: 1 / 0.82;
}

.dip-error-code {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 13vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback for engines that ignore background-clip: text. */
  -webkit-text-fill-color: transparent;
}

@media (max-width: 900px) {
  .dip-error {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: clamp(5rem, 14vh, 7rem);
  }
  /* On phones the numeral leads, then the copy. */
  .dip-error-visual {
    order: -1;
    aspect-ratio: auto;
    padding: 2rem;
  }
  .dip-error-lead {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dip-error-links a,
  .dip-error-links a::before {
    transition: none;
  }
}
