﻿.nf-stage {
  --nf-ease: cubic-bezier(.22, 1, .36, 1);
  --nf-direction: 1;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #0a0a0a;
  color: #fff;
}

.nf-scene, .nf-stage::after {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.nf-scene { overflow: hidden; }
.nf-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 52%;
  transform: scaleX(var(--nf-direction));
}

.nf-stage::after {
  content: "";
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(0deg, #000c, transparent 27%, transparent 76%, #0003),
    linear-gradient(var(--nf-shade, 90deg), #000c, #0007 37%, #0001 68%, #0003);
}

.nf-stage:dir(rtl) { --nf-shade: 270deg; --nf-direction: -1; }

.nf-stage-wrap {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  align-items: center;
  min-block-size: clamp(558px, calc(100svh - var(--header-height) - 40px), 880px);
  gap: clamp(24px, 4.4vw, 84px);
  padding-block: 64px;
}

.nf-content {
  position: relative;
  z-index: 1;
  min-inline-size: 0;
}

.nf-message::before {
  content: "";
  display: block;
  inline-size: 42px;
  block-size: 3px;
  margin-block-end: 24px;
  background: var(--yellow);
  transform-origin: left;
  animation: nf-mark .68s var(--nf-ease) both;
}

.nf-message:dir(rtl)::before { transform-origin: right; }

.sp-page.sp-404 .nf-message h1 {
  font-size: clamp(38px, 5.15vw, 78px);
  font-weight: var(--display-weight);
  line-height: 1.03;
  letter-spacing: -.057em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.sp-page.sp-404 .nf-message h1:lang(ar) {
  letter-spacing: normal;
  line-height: 1.22;
}

.sp-404 .nf-message p {
  margin-block-start: 15px;
  color: #fffe;
  font-size: clamp(15px, 1.34vw, 19px);
  line-height: 1.52;
}

.nf-arrow {
  display: inline-grid;
  flex: none;
  place-items: center;
  line-height: 1;
  font-size: 20px;
  font-weight: 400;
  transition: translate .28s var(--nf-ease, ease);
}

.sp-404:dir(rtl) .nf-arrow { scale: -1 1; }
.sp-404 :is(.nf-home, .nf-destinations a, .nf-enquiry):is(:hover, :focus-visible) .nf-arrow { translate: 4px; }
.sp-404:dir(rtl) :is(.nf-home, .nf-destinations a, .nf-enquiry):is(:hover, :focus-visible) .nf-arrow { translate: -4px; }

.nf-home, .nf-enquiry {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 53px;
  max-inline-size: 100%;
  gap: clamp(15px, 2.25vw, 33px);
  padding: 12px 19px;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: var(--control-weight);
  line-height: 1.35;
  transition: background .25s, color .25s;
}

.nf-home {
  margin-block-start: 29px;
  background: var(--yellow);
  color: #0a0a0a;
}

.nf-home:hover { background: #fff; }
.sp-404 .nf-home:focus-visible { outline-color: var(--yellow); }

.nf-search {
  max-inline-size: 495px;
  margin-block-start: 13px;
}

.nf-search form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-block-size: 56px;
  padding: 4px;
  border: 1px solid #fff6;
  background: #101010d9;
  color: #fff;
  box-shadow: 0 10px 30px #0003;
  transition: border-color .22s;
}

.nf-search form:focus-within { border-color: var(--yellow); }

.nf-magnifier {
  position: relative;
  inline-size: 15px;
  block-size: 15px;
  margin-inline: 13px 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: #fffd;
}

.nf-magnifier::after {
  content: "";
  position: absolute;
  inline-size: 6px;
  block-size: 1.5px;
  inset-inline-end: -5px;
  inset-block-end: -2px;
  background: currentColor;
  rotate: 48deg;
}

.nf-magnifier:dir(rtl)::after { rotate: -48deg; }

.sp-404 .nf-search input {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding-inline: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  color-scheme: dark;
  font-size: 16px;
  text-overflow: ellipsis;
}

.nf-search input::placeholder { color: #fffc; font-size: 13px; }
.sp-404 .nf-search input:focus-visible { outline: 0; }

.sp-404 .nf-search button {
  align-self: stretch;
  min-block-size: 44px;
  padding-inline: clamp(10px, 1.65vw, 22px);
  border: 1px solid #fff5;
  background: #fff;
  color: #0a0a0a;
  font-size: 13px;
  font-weight: var(--control-weight);
  transition: background .22s, border-color .22s;
}

.sp-404 .nf-search button:is(:hover, :focus-visible) {
  border-color: var(--yellow);
  background: var(--yellow);
}

.sp-404 .nf-search button:focus-visible { outline-offset: -4px; }

.nf-art {
  --nf-corner: linear-gradient(var(--yellow), var(--yellow));
  position: relative;
  display: grid;
  place-items: center;
  min-inline-size: 0;
  padding: clamp(25px, 3.1vw, 56px) 0;
  background:
    var(--nf-corner) left 0 top 0 / 26px 1px,
    var(--nf-corner) left 0 top 0 / 1px 15px,
    var(--nf-corner) right 0 bottom 0 / 26px 1px,
    var(--nf-corner) right 0 bottom 0 / 1px 15px;
  background-repeat: no-repeat;
  pointer-events: none;
}

.nf-art:dir(rtl) {
  background-position: right top, right top, left bottom, left bottom;
}

.nf-code {
  display: block;
  padding-inline: .06em .14em;
  color: var(--yellow);
  font-size: clamp(100px, 15.5vw, 286px);
  font-weight: var(--display-weight);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.105em;
  line-height: .82;
}

@supports ((background-clip: text) and (-webkit-text-stroke: 1px #fff)) {
  .nf-code {
    background-image:
      linear-gradient(112deg, transparent 43%, #fff9 48%, #ffcc00ce 51%, transparent 58%),
      repeating-linear-gradient(0deg, transparent 0 7px, #ffcc0063 7px 8px),
      repeating-linear-gradient(90deg, #0006 0 7px, #ffcc0077 7px 8px),
      linear-gradient(160deg, #ffcc004d, #0008 71%);
    background-position: 100% 0, 0 0, 0 0, 0 0;
    background-size: 245% 100%, auto, auto, auto;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px #ffd334ef;
    filter: drop-shadow(0 10px 24px #0008);
    animation: nf-sweep 2.15s .18s var(--nf-ease) both;
    transition: filter .4s;
  }

  .nf-stage:has(.nf-home:is(:hover, :focus-visible), .nf-search form:focus-within) .nf-code {
    filter: drop-shadow(0 8px 26px #ffcc0038);
  }
}

@keyframes nf-mark {
  from { scale: 0 1; }
  to { scale: 1 1; }
}

@keyframes nf-sweep {
  from { background-position-x: 100%, 0, 0, 0; }
  to { background-position-x: 0%, 0, 0, 0; }
}

.nf-directory {
  padding-block-start: clamp(34px, 4vw, 62px);
}

.sp-404 :is(.nf-directory, .nf-brief) h2 {
  font-size: clamp(23px, 2.3vw, 34px);
  letter-spacing: -.04em;
}

.sp-404:dir(rtl) :is(.nf-directory, .nf-brief) h2 { letter-spacing: normal; }

.nf-destinations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block-start: 22px;
  border-block: 1px solid #111;
}

.nf-destinations a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-inline-size: 0;
  min-block-size: 104px;
  padding: 20px clamp(15px, 2vw, 32px);
  transition: background .25s;
}

.nf-destinations a:first-child { padding-inline-start: 0; }
.nf-destinations a:last-child { padding-inline-end: 0; }
.nf-destinations a + a { border-inline-start: 1px solid #0002; }

.nf-destinations a::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  block-size: 3px;
  background: var(--yellow);
  scale: 0 1;
  transform-origin: left;
  transition: scale .38s var(--nf-ease, ease);
}

.nf-destinations a:dir(rtl)::after { transform-origin: right; }
.nf-destinations a:is(:hover, :focus-visible)::after { scale: 1 1; }
.nf-destinations a:focus-visible { z-index: 1; outline-offset: -4px; }

.nf-destinations a > span:first-child { min-inline-size: 0; overflow-wrap: anywhere; }
.nf-destinations strong {
  display: block;
  font-size: clamp(17px, 1.65vw, 24px);
  line-height: 1.16;
}
.nf-destinations small {
  display: block;
  margin-block-start: 7px;
  color: #454545;
  font-size: 13px;
  line-height: 1.45;
}

.nf-brief {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px 40px;
  padding-block: clamp(24px, 4vw, 54px);
}

.sp-404 .nf-brief h2 { font-size: clamp(21px, 2vw, 29px); }
.sp-404 .nf-brief p { margin-block-start: 6px; color: var(--sp-muted); }
.nf-brief-actions { display: flex; align-items: center; gap: 10px clamp(16px, 2vw, 30px); flex-wrap: wrap; }
.nf-brief-actions .sp-link { align-items: center; min-block-size: 44px; }
.nf-enquiry { background: #111; color: #fff; }
.nf-enquiry:hover { background: var(--yellow); color: #111; }
.sp-404 .nf-enquiry:focus-visible { outline-color: #111; }

@media (max-width: 800px) {
  .nf-stage:dir(rtl) { --nf-direction: 1; }

  .nf-scene {
    inset-block-end: auto;
    block-size: clamp(265px, 67vw, 390px);
  }

  .nf-scene img { object-position: 62% center; }

  .nf-stage::after {
    background:
      linear-gradient(0deg, #0a0a0a, #0a0a0a 17%, #0a0a0a00 86%) top / 100% clamp(300px, 76vw, 434px) no-repeat,
      linear-gradient(90deg, #0003, #0002);
  }

  .nf-stage-wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(176px, 44vw, 280px) auto;
    gap: 12px;
    min-block-size: 0;
    padding-block: 20px 33px;
  }

  .nf-art {
    grid-row: 1;
    justify-self: center;
    inline-size: min(100%, 440px);
    padding-block: 15px;
  }

  .nf-code { font-size: clamp(108px, 30vw, 202px); }

  .nf-message::before {
    inline-size: 30px;
    margin-block-end: 14px;
  }

  .sp-page.sp-404 .nf-message h1 {
    font-size: clamp(37px, 8.25vw, 56px);
    text-wrap: pretty;
  }

  .sp-404 .nf-message p { margin-block-start: 9px; }
  .nf-home { margin-block-start: 19px; }
  .nf-search { max-inline-size: 100%; }

  .nf-directory { padding-block-start: 30px; }
  .nf-destinations { grid-template-columns: 1fr; margin-block-start: 16px; }
  .nf-destinations a { min-block-size: 76px; padding: 14px 0; }
  .nf-destinations a + a { border-inline-start: 0; border-block-start: 1px solid #0002; }
  .nf-brief { flex-wrap: wrap; }
}

@media (max-width: 390px) {
  .nf-magnifier { margin-inline: 9px 3px; }
  .sp-404 .nf-search input { padding-inline: 8px; }
  .nf-search input::placeholder { font-size: 12px; }

  body:has(.sp-404) :is(.footer-atlas, .footer-identity) { grid-template-columns: minmax(0, 1fr); }
  body:has(.sp-404) .footer-navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body:has(.sp-404) .footer-directory { overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
  body:has(.sp-404) .site-navigation .dispatch-bar { gap: 5px; }
  body:has(.sp-404) .site-navigation .dispatch-brand img { width: 74px; }
  body:has(.sp-404) .site-navigation .quote-tool { min-width: 0; padding-inline: 6px; gap: 3px; }
  body:has(.sp-404) .site-navigation .quote-label-short {
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-message::before, .nf-code { animation: none; }
  .sp-404 .nf-arrow, .nf-destinations a::after { transition: none; }
}
