/* Kitcove 404 — a deliberate, editorial recovery page. */
#MainContent[data-template="404"].kc-404-ready > :not(.kc-404) {
  display: none !important;
}

.kc-404 {
  --kc-404-ink: #3a2a22;
  --kc-404-paper: #fff8f1;
  --kc-404-accent: #e7a783;
  width: 100%;
  min-height: calc(100svh - var(--header-group-height, 0px));
  overflow: hidden;
  color: var(--kc-404-paper);
  background: var(--kc-404-ink);
}

.kc-404__inner {
  width: min(1180px, calc(100% - 48px));
  min-height: clamp(570px, 72vh, 760px);
  margin: 0 auto;
  padding: clamp(72px, 8vw, 120px) 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(72px, 9vw, 148px);
}

.kc-404__number {
  color: transparent;
  font-family: var(--kc-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(190px, 22vw, 350px);
  font-weight: 600;
  line-height: 0.7;
  letter-spacing: -0.08em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(255, 248, 241, 0.25);
  user-select: none;
}

.kc-404__eyebrow {
  margin: 0 0 20px;
  color: var(--kc-404-accent);
  font: 700 11px/1.2 var(--kc-ui, Inter, sans-serif);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kc-404 h1 {
  max-width: 8ch;
  margin: 0;
  color: var(--kc-404-paper) !important;
  font-family: var(--kc-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(62px, 7vw, 104px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.kc-404 h1 em {
  color: var(--kc-404-accent) !important;
  font-style: italic;
  font-weight: 500;
}

.kc-404__body {
  max-width: 38ch;
  margin: 30px 0 0;
  color: rgba(255, 248, 241, 0.7);
  font: 400 17px/1.7 var(--kc-ui, Inter, sans-serif);
  text-wrap: pretty;
}

.kc-404__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.kc-404__button {
  min-height: 54px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid var(--kc-404-accent);
  border-radius: 999px;
  color: var(--kc-404-ink);
  background: var(--kc-404-accent);
  font: 600 13px/1 var(--kc-ui, Inter, sans-serif);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.kc-404__button:hover {
  color: var(--kc-404-paper);
  background: transparent;
  transform: translateY(-2px);
}

.kc-404__button span {
  font-size: 18px;
  line-height: 1;
}

.kc-404__home {
  padding: 10px 0;
  color: rgba(255, 248, 241, 0.82);
  font: 600 13px/1.2 var(--kc-ui, Inter, sans-serif);
  text-decoration: underline;
  text-decoration-color: rgba(255, 248, 241, 0.35);
  text-underline-offset: 5px;
}

.kc-404__home:hover {
  color: var(--kc-404-paper);
  text-decoration-color: currentColor;
}

.kc-404__routes {
  border-top: 1px solid rgba(255, 248, 241, 0.2);
}

.kc-404__routes-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kc-404__route {
  min-width: 0;
  padding: 30px clamp(24px, 3vw, 42px) 34px;
  color: var(--kc-404-paper);
  text-decoration: none;
  border-left: 1px solid rgba(255, 248, 241, 0.16);
}

.kc-404__route:first-child {
  padding-left: 0;
  border-left: 0;
}

.kc-404__route:last-child {
  padding-right: 0;
}

.kc-404__route-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font: 600 clamp(22px, 2vw, 30px)/1.15 var(--kc-display, "Cormorant Garamond", Georgia, serif);
}

.kc-404__route-label span:last-child {
  color: var(--kc-404-accent);
  font: 400 18px/1 var(--kc-ui, Inter, sans-serif);
  transition: transform 180ms ease;
}

.kc-404__route:hover .kc-404__route-label span:last-child {
  transform: translateX(4px);
}

.kc-404__route small {
  margin-top: 9px;
  display: block;
  color: rgba(255, 248, 241, 0.58);
  font: 400 13px/1.55 var(--kc-ui, Inter, sans-serif);
}

@media (max-width: 899px) {
  .kc-404__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .kc-404__number {
    font-size: clamp(150px, 36vw, 250px);
  }

  .kc-404 h1 {
    max-width: 9ch;
  }
}

@media (max-width: 599px) {
  .kc-404__inner {
    width: min(100% - 36px, 1180px);
    min-height: auto;
    padding: 58px 0 64px;
    gap: 34px;
  }

  .kc-404__number {
    font-size: clamp(126px, 42vw, 178px);
  }

  .kc-404 h1 {
    font-size: clamp(54px, 16vw, 72px);
  }

  .kc-404__body {
    margin-top: 24px;
    font-size: 16px;
  }

  .kc-404__actions {
    margin-top: 30px;
    align-items: stretch;
    flex-direction: column;
  }

  .kc-404__button {
    width: 100%;
  }

  .kc-404__home {
    align-self: center;
  }

  .kc-404__routes-inner {
    width: min(100% - 36px, 1180px);
    grid-template-columns: 1fr;
  }

  .kc-404__route,
  .kc-404__route:first-child,
  .kc-404__route:last-child {
    padding: 24px 0 26px;
    border-left: 0;
    border-top: 1px solid rgba(255, 248, 241, 0.14);
  }

  .kc-404__route:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kc-404__button,
  .kc-404__route-label span:last-child {
    transition: none;
  }
}
