/* =========================================================
   ENLIL — Media & Business Solutions
   Loading screen landing page
   ========================================================= */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-100: #a6a6a6;
  --gray-200: #7a7a7a;
  --gray-300: #4d4d4d;
  --gray-400: #1a1a1a;

  --overlay: rgba(0, 0, 0, 0.5);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;

  --vh: 1vh;
}

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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: calc(var(--vh, 1vh) * 100);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Background layer
   ========================================================= */

.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  z-index: 0;
  opacity: 0;
  animation: bgFadeIn 1800ms var(--ease-standard) both;
  animation-delay: 150ms;
}

.bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.03);
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 42% at 50% 46%, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.62) 100%);
}

@keyframes bgFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================================
   Stage / centered content
   ========================================================= */

.stage {
  position: relative;
  z-index: 1;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand__logo {
  width: 100%;
  max-width: 340px;
  height: auto;
  opacity: 0;
  animation: logoReveal 1200ms var(--ease-out) both;
  animation-delay: 500ms;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   Loading indicator
   ========================================================= */

.loading {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeIn 900ms var(--ease-standard) both;
  animation-delay: 1250ms;
}

.loading__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 22px;
}

.loading__track {
  position: relative;
  width: 200px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  border-radius: 1px;
}

.loading__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: sweep 2000ms linear infinite;
  animation-delay: 1600ms;
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================================
   Contact
   ========================================================= */

.contact {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 20px calc(36px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  animation: fadeIn 1000ms var(--ease-standard) both;
  animation-delay: 1950ms;
}

.contact__primary {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--white);
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 300ms var(--ease-standard);
}

.contact__primary:hover,
.contact__primary:focus-visible {
  opacity: 1;
}

.contact__careers {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray-100);
}

.contact__label {
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.65;
}

.contact__link {
  letter-spacing: 0.4px;
  color: var(--gray-100);
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 300ms var(--ease-standard);
}

.contact__link:hover,
.contact__link:focus-visible {
  opacity: 1;
  color: var(--white);
}

a:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .brand__logo {
    max-width: 250px;
  }

  .loading {
    margin-top: 34px;
  }
}

@media (max-width: 480px) {
  .brand__logo {
    max-width: 180px;
  }

  .loading {
    margin-top: 28px;
  }

  .loading__label {
    font-size: 10px;
    letter-spacing: 6px;
  }

  .loading__track {
    width: 160px;
  }

  .contact {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .contact__primary {
    font-size: 12px;
  }

  .bg__image {
    object-position: 62% center;
  }

  .bg__overlay {
    background:
      radial-gradient(ellipse 78% 30% at 50% 45%, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 75%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.62) 100%);
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .brand__logo {
    max-width: 140px;
  }

  .loading {
    margin-top: 18px;
  }

  .contact {
    position: static;
    margin-top: 18px;
    opacity: 1;
    animation: none;
  }

  .stage {
    padding-top: 32px;
    padding-bottom: 32px;
    height: auto;
    min-height: calc(var(--vh, 1vh) * 100);
  }

  body {
    overflow-y: auto;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .bg,
  .brand__logo,
  .loading,
  .contact {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .loading__bar {
    animation-duration: 2600ms;
  }
}
