/* ============================================================
   System pages — 404 (.err-*) + Thank-you (.ty-*)
   Dark hero with stylized graphic + quick exploration grid.
   ============================================================ */


/* ============================================================
   SHARED — Hero base (dark, top-padded for fixed header)
   ============================================================ */

.err-hero,
.ty-hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--topbar-h) + var(--header-h) + 32px) 0 56px;
  overflow: hidden;
  isolation: isolate;
}

@media (max-width: 1279.98px) {
  .err-hero,
  .ty-hero {
    padding-top: calc(var(--header-h) + 28px);
  }
}

@media (max-width: 767.98px) {
  .err-hero,
  .ty-hero {
    padding: calc(var(--header-h) + 24px) 0 40px;
  }
}

.err-hero__bg,
.ty-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(225, 25, 50, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(225, 25, 50, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

/* Top red stripe accent */
.err-hero::before,
.ty-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(80px, 12vw, 160px);
  height: 3px;
  background: var(--red);
  border-radius: 0 0 3px 3px;
  z-index: 1;
}

.err-hero__inner,
.ty-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  max-width: 760px;
}

/* Thank-you has check + content + 3-steps inside content + actions — tighter */
.ty-hero__inner { gap: 18px; }

@media (max-width: 767.98px) {
  .err-hero__inner,
  .ty-hero__inner { gap: 16px; }
}


/* ============================================================
   404 — Big number with sad-face center
   ============================================================ */

.err-hero__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 20px);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.err-hero__num-digit {
  font-size: clamp(72px, 13vw, 150px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.err-hero__num-digit--center {
  font-size: 0;
  width: clamp(64px, 12vw, 140px);
  height: clamp(64px, 12vw, 140px);
  color: var(--red);
  /* Subtle floaty animation */
  animation: err-float 4s var(--ease) infinite;
}

.err-hero__num-digit--center svg {
  width: 100%;
  height: 100%;
}

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

@media (prefers-reduced-motion: reduce) {
  .err-hero__num-digit--center { animation: none; }
}


/* ============================================================
   Thank-you — Big check circle
   ============================================================ */

.ty-hero__check {
  width: clamp(64px, 9vw, 92px);
  height: clamp(64px, 9vw, 92px);
  color: var(--red);
  display: inline-flex;
  animation: ty-pop 600ms var(--ease) backwards;
}

.ty-hero__check svg {
  width: 100%;
  height: 100%;
}

/* The circle and check draw-in animation */
.ty-hero__check svg circle,
.ty-hero__check svg path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: ty-draw 900ms var(--ease) forwards;
}

.ty-hero__check svg path {
  animation-delay: 400ms;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}

@keyframes ty-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes ty-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ty-hero__check { animation: none; }
  .ty-hero__check svg circle,
  .ty-hero__check svg path {
    stroke-dashoffset: 0;
    animation: none;
  }
}


/* ============================================================
   SHARED — Content (eyebrow + title + lede + actions)
   ============================================================ */

.err-hero__content,
.ty-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.err-hero__eyebrow,
.ty-hero__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--red);
}

.err-hero__title,
.ty-hero__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--white);
  text-wrap: balance;
  max-width: 28ch;
}

/* Thank-you has more content (3-step strip) — slightly compact title */
.ty-hero__title {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.2;
  max-width: 24ch;
}

.err-hero__lede,
.ty-hero__lede {
  font-size: var(--fs-14);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 56ch;
  margin-top: 2px;
}

.err-hero__actions,
.ty-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.err-hero__btn-ghost,
.ty-hero__btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.err-hero__btn-ghost:hover,
.ty-hero__btn-ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}


/* ============================================================
   Thank-you — 3 step indicator cards
   ============================================================ */

.ty-hero__next {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
}

@media (max-width: 575.98px) {
  .ty-hero__next { grid-template-columns: 1fr; }
}

.ty-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-3);
  text-align: left;
}

.ty-step__num {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-size: var(--fs-11);
  font-weight: 700;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ty-step__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ty-step__title {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.ty-step__desc {
  font-size: var(--fs-11);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}


/* ============================================================
   SHARED — Quick links + Explore grids (below hero)
   ============================================================ */

.err-quick,
.ty-explore {
  background: var(--white);
  padding: 72px 0 96px;
}

@media (max-width: 767.98px) {
  .err-quick,
  .ty-explore { padding: 56px 0 72px; }
}

.err-quick__head,
.ty-explore__head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

.err-quick__eyebrow,
.ty-explore__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.err-quick__title,
.ty-explore__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
  text-wrap: balance;
}


/* Grid */
.err-quick__grid,
.ty-explore__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1023.98px) {
  .err-quick__grid,
  .ty-explore__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 479.98px) {
  .err-quick__grid,
  .ty-explore__grid { grid-template-columns: 1fr; }
}


/* Quick / Explore card */
.err-quick-card,
.ty-explore-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur) var(--ease);
}

.err-quick-card:hover,
.ty-explore-card:hover {
  border-color: var(--ink-3);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.err-quick-card__icon,
.ty-explore-card__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: var(--r-2);
  color: var(--ink);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.err-quick-card:hover .err-quick-card__icon,
.ty-explore-card:hover .ty-explore-card__icon {
  background: var(--ink);
  color: var(--white);
}

.err-quick-card__icon svg,
.ty-explore-card__icon svg {
  width: 18px;
  height: 18px;
}

.err-quick-card__body,
.ty-explore-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.err-quick-card__label,
.ty-explore-card__label {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.err-quick-card__desc,
.ty-explore-card__desc {
  font-size: var(--fs-12);
  color: var(--text-muted);
  line-height: 1.4;
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .err-quick-card:hover,
  .ty-explore-card:hover { transform: none; }
}
