@import url("_shared.css");

.page-404 .page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-404 .page-section--404 {
  flex: 1;
  padding-block: var(--subpage-content-padding-block);
}

#section-404.page-section--blend-before-scale > .err-blend-layers,
#section-404.page-section--blend-before-scale > .page-section__scale {
  grid-area: 1 / 1;
  width: 100%;
}

#section-404.page-section--blend-before-scale > .err-blend-layers {
  position: relative;
  align-self: stretch;
  min-height: 100%;
  pointer-events: none;
}

.page-404 .page-section--404 .page-section__inner {
  min-height: calc(100dvh - var(--header-height) - calc(120px * var(--subpage-coord-scale)));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* Soft-light body fill (hero-card pattern) — outside scale so blend works */
.err-number-wash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.err-number-wash__fill {
  font-family: var(--font-family);
  font-size: clamp(
    calc(200px * var(--subpage-coord-scale) * var(--layout-scale)),
    calc(28vw * var(--layout-scale)),
    calc(380px * var(--subpage-coord-scale) * var(--layout-scale))
  );
  font-weight: var(--font-weight-bold);
  font-style: var(--font-style-normal);
  font-variation-settings: "opsz" 32, "wght" 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--hero-card-body-fill);
  white-space: nowrap;
  user-select: none;
  transform: translateY(-2%);
}

.page-404 .err-content {
  position: relative;
  z-index: 1;
  max-width: calc(640px * var(--subpage-coord-scale));
  width: 100%;
  text-align: left;
}

.page-404 .err-label {
  font-size: calc(var(--h1-light-size) * var(--subpage-coord-scale));
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: calc(24px * var(--subpage-coord-scale));
}

.page-404 .err-title {
  font-size: clamp(calc(40px * var(--subpage-coord-scale)), 6vw, calc(72px * var(--subpage-coord-scale)));
  font-weight: var(--font-weight-bold);
  line-height: 1.06;
  margin-bottom: calc(20px * var(--subpage-coord-scale));
}

.page-404 .err-title em {
  font-style: normal;
  color: var(--color-accent-light);
}

.page-404 .err-sub {
  font-size: var(--subpage-text-min-size);
  line-height: calc(32px * var(--subpage-coord-scale));
  opacity: 0.85;
  margin-bottom: calc(44px * var(--subpage-coord-scale));
  max-width: calc(480px * var(--subpage-coord-scale));
}

.page-404 .err-ctas.subpage-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--hero-buttons-gap);
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
}

/* Secondary CTA wash — hide only the btn wash in fallback (number stays visible) */
html:not(.blend-enhanced) #section-404 > .err-blend-layers .err-btn-wash {
  visibility: hidden;
}

.err-btn-wash {
  position: absolute;
  border-radius: var(--hero-btn-radius-rendered);
  background-color: var(--btn-hero-secondary-bg);
  transition: background-color var(--btn-hero-secondary-hover-duration) var(--motion-ease-out);
}

#section-404:has(.btn--hero-secondary[data-subpage-action-wash]:hover)
  .err-btn-wash[data-subpage-action-wash],
#section-404:has(.btn--hero-secondary[data-subpage-action-wash]:focus-visible)
  .err-btn-wash[data-subpage-action-wash] {
  background-color: var(--btn-hero-secondary-bg-hover);
}

@import url("../components/subpage-text.css");
