:root {
  --navy-black: #101821;
  --navy-deep: #0c1219;
  --umber: #241813;
  --umber-soft: #302119;
  --umber-lit: #44301f;
  --panel: rgba(43, 31, 24, 0.76);
  --panel-deep: rgba(16, 24, 33, 0.36);
  --ink: #f1e5d3;
  --ink-soft: rgba(241, 229, 211, 0.74);
  --ink-faint: rgba(241, 229, 211, 0.11);
  --saffron: #d8862d;
  --saffron-bright: #f0a343;
  --saffron-soft: rgba(216, 134, 45, 0.32);
  --saffron-faint: rgba(216, 134, 45, 0.14);
  --line: rgba(241, 229, 211, 0.075);
  --line-soft: rgba(241, 229, 211, 0.038);
  --shadow-cool: rgba(7, 13, 19, 0.52);
  --shadow-warm: rgba(35, 20, 12, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy-black);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--navy-black);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(240, 163, 67, 0.16), transparent 24%),
    radial-gradient(ellipse at 17% 84%, rgba(216, 134, 45, 0.10), transparent 28%),
    radial-gradient(ellipse at 52% 50%, rgba(241, 229, 211, 0.055), transparent 43%),
    linear-gradient(145deg, var(--navy-deep) 0%, var(--navy-black) 20%, #171716 34%, var(--umber) 56%, var(--umber-soft) 78%, var(--umber-lit) 100%);
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: -26% -18% -18% 50%;
  z-index: -3;
  background:
    linear-gradient(132deg, rgba(16, 24, 33, 0.58), rgba(48, 33, 25, 0.32) 48%, rgba(216, 134, 45, 0.10)),
    linear-gradient(180deg, rgba(240, 163, 67, 0.16), rgba(240, 163, 67, 0.018) 62%, transparent 100%);
  clip-path: polygon(18% 0, 100% 0, 83% 100%, 0 100%);
  opacity: 0.82;
  transform: skewX(-10deg) rotate(1.8deg);
}

.site-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(90deg, rgba(241, 229, 211, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(241, 229, 211, 0.020) 1px, transparent 1px);
  background-size: 18vw 100%, 100% 21vh;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.70) 40%, rgba(0, 0, 0, 0.40));
}

.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.field-line,
.calculation-line {
  position: absolute;
  display: block;
}

.field-line {
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 16%, var(--saffron-soft) 50%, var(--line) 82%, transparent 100%);
  opacity: 0.44;
}

.field-line-one { left: 10.8%; opacity: 0.32; }
.field-line-two { left: 35.7%; opacity: 0.34; }
.field-line-three { left: 61.2%; opacity: 0.38; }
.field-line-four { left: 86.6%; opacity: 0.52; }

.calculation-line {
  left: 7vw;
  right: 7vw;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-soft) 12%, var(--saffron-faint) 54%, var(--line-soft) 88%, transparent);
}

.calculation-line-one { top: 25%; opacity: 0.56; }
.calculation-line-two { bottom: 21%; opacity: 0.40; }

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(30px, 6vw, 92px);
}

.identity {
  position: relative;
  width: min(100%, 880px);
  padding: clamp(38px, 6vw, 76px) clamp(30px, 7vw, 94px);
  border: 1px solid rgba(241, 229, 211, 0.125);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.018)),
    linear-gradient(180deg, var(--panel), rgba(16, 24, 33, 0.26)),
    linear-gradient(120deg, var(--panel-deep), transparent 64%);
  box-shadow:
    0 34px 92px var(--shadow-cool),
    0 10px 32px var(--shadow-warm),
    inset 0 1px 0 rgba(241, 229, 211, 0.05);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.identity::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(4px, 0.52vw, 7px);
  background: linear-gradient(to bottom, var(--saffron-bright), var(--saffron) 42%, rgba(216, 134, 45, 0.16));
}

.identity::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -56%;
  width: clamp(270px, 42vw, 560px);
  height: clamp(270px, 42vw, 560px);
  border: 1px solid rgba(216, 134, 45, 0.13);
  background: radial-gradient(ellipse at center, rgba(16, 24, 33, 0.10), transparent 62%);
  transform: rotate(24deg);
  opacity: 0.62;
}

.initials {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  top: clamp(10px, 1.4vw, 24px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(241, 229, 211, 0.072);
  text-stroke: 1px rgba(241, 229, 211, 0.072);
  font-size: clamp(110px, 21vw, 304px);
  font-weight: 750;
  letter-spacing: -0.11em;
  line-height: 0.82;
  user-select: none;
}

.brand {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 7.8vw, 108px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.time-marks {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: clamp(9px, 1.35vw, 18px);
  height: 38px;
  margin-top: clamp(28px, 4.2vw, 54px);
}

.time-marks span {
  display: block;
  width: clamp(3px, 0.43vw, 5px);
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--saffron-bright), var(--saffron));
  box-shadow: 0 0 18px rgba(216, 134, 45, 0.42);
}

.time-marks span:nth-child(1) { height: 14px; opacity: 0.82; }
.time-marks span:nth-child(2) { height: 34px; opacity: 1; }
.time-marks span:nth-child(3) { height: 22px; opacity: 0.88; }
.time-marks span:nth-child(4) { height: 26px; opacity: 0.94; }

.error-identity {
  width: min(100%, 720px);
}

.site-name {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 520;
  letter-spacing: 0.06em;
}

.error-code {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(58px, 10vw, 104px);
  font-weight: 560;
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.error-title {
  position: relative;
  z-index: 1;
  margin: clamp(28px, 4vw, 46px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.9vw, 25px);
  font-weight: 460;
  line-height: 1.5;
}

.home-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: clamp(34px, 5vw, 62px);
  color: var(--saffron-bright);
  text-decoration: none;
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 560;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.6;
  transition: color 0.2s ease, transform 0.2s ease;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--ink);
  outline: none;
  transform: translateX(3px);
}

.translatable.is-non-latin {
  letter-spacing: 0.02em;
  text-transform: none;
}

.translatable.is-rtl {
  direction: rtl;
  unicode-bidi: isolate;
}

@media (max-width: 740px) {
  .site-shell::before {
    inset: -20% -58% -16% 42%;
    opacity: 0.66;
  }

  .site-shell::after {
    background-size: 34vw 100%, 100% 18vh;
  }

  .field-line-one { left: 14%; }
  .field-line-two { left: 42%; }
  .field-line-three { left: 70%; }
  .field-line-four { display: none; }

  .calculation-line-one { top: 22%; }
  .calculation-line-two { bottom: 16%; }

  .stage {
    padding: 24px;
  }

  .identity {
    padding: 38px 28px 42px 34px;
  }

  .initials {
    right: 16px;
    top: 16px;
    font-size: clamp(96px, 36vw, 188px);
  }

  .brand {
    max-width: 10ch;
    font-size: clamp(48px, 15vw, 76px);
    line-height: 1;
  }

  .time-marks {
    margin-top: 34px;
  }
}

@media (max-width: 420px) {
  .identity {
    padding-left: 30px;
  }

  .brand {
    font-size: clamp(42px, 14vw, 58px);
  }

  .error-code {
    font-size: clamp(58px, 20vw, 96px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
