:root {
  --red: #8f1724;
  --red-light: #c63243;
  --emerald: #35b86f;
  --sphere-blue: #36a9e1;
  --gold: #b89a52;
  --gold-dark: #66542f;
  --cream: #e9eef5;
  --muted: #8e9aaa;
  --nav: #040a12;
  --night: #040912;
  --midnight: #060d18;
  --midnight-light: #0b1828;
  --panel: #0a1421;
  --panel-edge: rgba(110, 143, 174, 0.17);
  --cursor-default: url("../assets/cursor/Item 0x2073.png") 1 1, auto;
  --cursor-war: url("../assets/cursor/Item 0x205C.png") 1 1, pointer;
  --cursor-war-active: url("../assets/cursor/Item 0x205D.png") 1 1, pointer;
  --cursor-grab: url("../assets/cursor/Item 0x2075.png") 9 1, grab;
  --cursor-grabbing: url("../assets/cursor/Item 0x2072.png") 4 12, grabbing;
  --cursor-target: url("../assets/cursor/Item 0x2076.png") 12 15, crosshair;
  --cursor-wait: url("../assets/cursor/Item 0x2077.png") 15 27, wait;
  --cursor-text: url("../assets/cursor/Item 0x2078.png") 1 29, text;
  --cursor-inspect: url("../assets/cursor/Item 0x2079.png") 3 15, help;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  cursor: var(--cursor-default);
  background: #020304;
}

body {
  cursor: var(--cursor-default);
}

a,
button,
[role="button"],
input[type="button"],
input[type="submit"] {
  cursor: var(--cursor-war);
}

a:active,
button:active,
[role="button"]:active {
  cursor: var(--cursor-war-active);
}

:where(p, h1, h2, h3, time, small):not(a *) {
  cursor: var(--cursor-text);
}

input:is([type="text"], [type="email"], [type="search"], [type="password"]),
textarea,
[contenteditable="true"] {
  cursor: var(--cursor-text);
}

[draggable="true"],
.cursor-grab {
  cursor: var(--cursor-grab);
}

[draggable="true"]:active,
.cursor-grabbing {
  cursor: var(--cursor-grabbing);
}

.cursor-target {
  cursor: var(--cursor-target);
}

[aria-busy="true"],
.cursor-wait {
  cursor: var(--cursor-wait);
}

.cursor-inspect {
  cursor: var(--cursor-inspect);
}

body {
  margin: 0;
  padding: 0 24px 48px;
  color: var(--cream);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(ellipse 72% 58% at 50% 8%, rgba(15, 35, 55, 0.92), transparent 72%),
    linear-gradient(
      90deg,
      #000 0%,
      #010307 7%,
      #040914 25%,
      #07111d 50%,
      #040914 75%,
      #010307 93%,
      #000 100%
    );
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease, text-shadow 150ms ease;
}

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

.site-frame {
  position: relative;
  width: min(1188px, 100%);
  margin: 0 auto;
  overflow: clip;
  background: var(--midnight);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 0 60px 18px rgba(7, 12, 18, 0.82),
    0 24px 145px 52px rgba(0, 0, 0, 0.98);
}

.site-frame::after {
  position: absolute;
  z-index: 30;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow:
    inset 34px 0 48px -42px rgba(0, 0, 0, 0.98),
    inset -34px 0 48px -42px rgba(0, 0, 0, 0.98),
    inset 0 -52px 80px -68px rgba(0, 0, 0, 0.98);
}

/* Masthead */

.masthead {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #0a121b;
}

.masthead::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 4, 6, 0.48), transparent 50%, rgba(2, 4, 6, 0.42)),
    linear-gradient(0deg, rgba(4, 6, 8, 0.72), transparent 55%);
}

.masthead__sky {
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.masthead__sky {
  inset: 0;
  background-image: url("../assets/login_layer_background_sky_640x480.png");
  filter: saturate(0.72) contrast(1.18);
  transform: scale(1.5);
}

.masthead__castle {
  position: absolute;
  z-index: 1;
  bottom: -330px;
  left: -25px;
  width: 860px;
  max-width: 78%;
  pointer-events: none;
  filter: saturate(0.82) contrast(1.08) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.92));
}

.masthead__brand {
  position: absolute;
  z-index: 2;
  bottom: -14px;
  left: 28px;
  width: 590px;
  max-width: 56%;
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.92));
}

.play-sign {
  position: absolute;
  z-index: 3;
  top: 75px;
  right: 72px;
  display: grid;
  place-items: center;
  width: 230px;
  height: 92px;
  border: 1px solid rgba(53, 184, 111, 0.72);
  border-radius: 0;
  color: #f3e8d0;
  text-align: center;
  text-shadow: 0 2px 3px #000;
  background:
    radial-gradient(circle at 50% 35%, rgba(53, 184, 111, 0.82), transparent 60%),
    linear-gradient(#133821, #06120c);
  box-shadow:
    inset 0 0 18px #000,
    0 10px 24px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(53, 184, 111, 0.2);
  transition: filter 160ms ease, transform 160ms ease;
}

.play-sign:hover,
.play-sign:focus-visible {
  filter: brightness(1.18);
  transform: translateY(-2px);
}

.play-sign span {
  margin-top: 7px;
  color: #b9e3ca;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.22em;
}

.play-sign strong {
  margin-top: -10px;
  font-size: 24px;
  letter-spacing: 0.07em;
}

/* Navigation */

.menu-button {
  display: none;
}

.main-nav {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-height: 78px;
  padding: 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(54, 169, 225, 0.13);
  background: rgba(4, 10, 18, 0.96);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #aab6c4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 22%;
  bottom: 0;
  left: 22%;
  height: 2px;
  content: "";
  background: var(--red-light);
  box-shadow: 0 0 12px rgba(198, 50, 67, 0.45);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  color: #fff;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background:
    radial-gradient(circle at 50% 100%, rgba(198, 50, 67, 0.18), transparent 72%);
  box-shadow:
    inset 0 0 34px rgba(143, 23, 36, 0.12),
    0 0 20px rgba(143, 23, 36, 0.06);
}

.main-nav a.is-active {
  background:
    radial-gradient(circle at 50% 100%, rgba(198, 50, 67, 0.09), transparent 72%);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.main-nav i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #78889a;
  font-family: "Palatino Linotype", Georgia, serif;
  font-size: 20px;
  font-weight: normal;
  font-style: normal;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.main-nav a:hover i,
.main-nav a:focus-visible i,
.main-nav a.is-active i {
  color: var(--red-light);
  text-shadow: 0 0 10px rgba(198, 50, 67, 0.45);
}

.nav-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 3%,
    rgba(198, 50, 67, 0.65) 28%,
    rgba(54, 169, 225, 0.3) 70%,
    transparent 97%
  );
}

/* Development journal */

.development-journal {
  padding: 56px 42px 64px;
  background:
    radial-gradient(circle at 82% 18%, rgba(27, 93, 133, 0.14), transparent 30%),
    radial-gradient(circle at 10% 4%, rgba(143, 23, 36, 0.12), transparent 26%),
    linear-gradient(145deg, #050b14, #081321 58%, #050b14);
}

.journal-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 30px;
}

.journal-heading small,
.journal-card__eyebrow {
  color: var(--red-light);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.journal-heading h1 {
  margin: 8px 0 7px;
  color: #f5f7fa;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
}

.journal-heading p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.development-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(54, 169, 225, 0.22);
  border-radius: 999px;
  color: #a7bbca;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(9, 24, 38, 0.78);
}

.development-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sphere-blue);
  box-shadow: 0 0 10px rgba(54, 169, 225, 0.8);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.journal-card {
  position: relative;
  min-width: 0;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  background:
    linear-gradient(145deg, rgba(13, 28, 45, 0.96), rgba(7, 16, 27, 0.98));
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.2);
  transition: border-color 180ms ease, transform 180ms ease;
}

.journal-card:hover {
  border-color: rgba(198, 50, 67, 0.34);
  transform: translateY(-2px);
}

.journal-card--featured {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 390px;
  padding: 42px;
  border-top: 2px solid var(--red);
  background:
    linear-gradient(115deg, rgba(6, 14, 24, 0.98) 18%, rgba(6, 14, 24, 0.7)),
    radial-gradient(circle at 86% 14%, rgba(143, 23, 36, 0.38), transparent 45%),
    var(--panel);
}

.journal-card--featured::before {
  position: absolute;
  top: -80px;
  right: -55px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(54, 169, 225, 0.09);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 34px rgba(54, 169, 225, 0.025),
    0 0 0 72px rgba(54, 169, 225, 0.018);
}

.journal-card__meta {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 26px;
  left: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #748496;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.journal-card h2 {
  position: relative;
  max-width: 620px;
  margin: 10px 0 13px;
  color: #f1f4f7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.18;
}

.journal-card--featured h2 {
  font-size: 36px;
}

.journal-card p {
  position: relative;
  margin: 0;
  color: #9ba8b6;
  font-size: 13px;
  line-height: 1.65;
}

.journal-card--featured p {
  max-width: 650px;
  font-size: 14px;
}

.journal-card > a {
  position: relative;
  align-self: flex-start;
  margin-top: 22px;
  color: #d8e2eb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.journal-card > a span {
  margin-left: 7px;
  color: var(--red-light);
}

.journal-card__index {
  margin-bottom: 34px;
  color: rgba(54, 169, 225, 0.28);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.journal-card__state {
  display: inline-block;
  margin-top: 22px;
  color: #718599;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.journal-card__state::before {
  display: inline-block;
  width: 18px;
  height: 1px;
  margin: 0 8px 3px 0;
  content: "";
  background: var(--red);
}

.journal-card--visual {
  min-height: 390px;
  padding: 0;
  border-top: 2px solid rgba(54, 169, 225, 0.55);
  background: #050a11;
}

.screenshot-main {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  background: #050a11;
}

.screenshot-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 700ms ease;
}

.screenshot-main img.is-active {
  opacity: 1;
}

/* Launcher */

.launcher-panel {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) auto;
  gap: 25px;
  align-items: center;
  min-height: 230px;
  padding: 35px 58px;
  border-top: 1px solid rgba(143, 23, 36, 0.45);
  border-bottom: 1px solid rgba(110, 143, 174, 0.14);
  background:
    radial-gradient(circle at 18% 50%, rgba(143, 23, 36, 0.18), transparent 34%),
    linear-gradient(120deg, #0b1420, #050b12);
}

.launcher-panel small {
  color: var(--red-light);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.18em;
}

.launcher-panel h2 {
  margin: 8px 0;
  color: #f0e5cc;
  font-size: 37px;
}

.launcher-panel p {
  margin: 0;
  color: #b8b1a4;
  font-size: 14px;
}

.launcher-panel > a {
  padding: 18px 24px;
  border: 1px solid rgba(53, 184, 111, 0.72);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background:
    radial-gradient(circle at 50% 35%, rgba(53, 184, 111, 0.82), transparent 60%),
    linear-gradient(#133821, #06120c);
  box-shadow:
    inset 0 0 14px #000,
    0 6px 15px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(53, 184, 111, 0.2);
  transition: filter 160ms ease, transform 160ms ease;
}

.launcher-panel > a:hover,
.launcher-panel > a:focus-visible {
  color: #fff;
  filter: brightness(1.18);
  transform: translateY(-2px);
}

/* Support panel */

.support-panel {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.support-panel__art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 10, 0.9), rgba(4, 7, 10, 0.35), rgba(4, 7, 10, 0.88)),
    url("../assets/invicta-castle-foreground.png") center 72% / cover no-repeat,
    url("../assets/login_layer_background_sky_640x480.png") center / cover;
}

.support-panel__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 95px 1fr auto;
  gap: 25px;
  align-items: center;
  min-height: 260px;
  padding: 40px 58px;
}

.support-panel__flag {
  width: 78px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.9));
}

.invicta-banner {
  position: relative;
  display: block;
  width: 52px;
  height: 72px;
  overflow: hidden;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.9));
}

.invicta-banner img {
  position: absolute;
  top: -21px;
  left: -13px;
  width: 235px;
  max-width: none;
}

.invicta-banner--large {
  width: 78px;
  height: 108px;
}

.invicta-banner--large img {
  top: -31px;
  left: -19px;
  width: 353px;
}

.support-panel__content small {
  color: var(--red-light);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.18em;
}

.support-panel__content h2 {
  margin: 8px 0;
  font-size: 37px;
}

.support-panel__content p {
  margin: 0;
  color: #b8b1a4;
  font-size: 14px;
}

.support-panel__content > button {
  min-width: 210px;
  padding: 17px 22px;
  border: 1px solid rgba(123, 139, 153, 0.28);
  border-radius: 0;
  color: #93866d;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: #151515;
  cursor: not-allowed;
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 0;
  padding: 13px 28px;
  border-top: 1px solid rgba(54, 169, 225, 0.14);
  background: linear-gradient(90deg, #040810, #07111d 50%, #040810);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand__sphere {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.82;
  filter: drop-shadow(0 0 8px rgba(31, 146, 200, 0.22));
}

.footer-brand span {
  color: #958b79;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.back-to-top {
  color: #8f846f;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Interaction feedback */

a:hover:not(.play-sign),
a:focus-visible:not(.play-sign) {
  color: #e35b68;
  text-shadow: 0 0 8px rgba(198, 50, 67, 0.34);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sphere-blue);
  outline-offset: 3px;
}

/* Responsive layout */

@media (max-width: 900px) {
  body {
    padding: 0;
  }

  .masthead {
    height: 245px;
  }

  .masthead__castle {
    bottom: -285px;
    left: -70px;
    width: 790px;
    max-width: 82%;
  }

  .masthead__brand {
    bottom: -2px;
    left: 12px;
    width: 530px;
    max-width: 62%;
  }

  .play-sign {
    top: 68px;
    right: 28px;
    width: 190px;
  }

  .journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-card--featured {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .masthead {
    height: 235px;
  }

  .masthead__castle {
    bottom: -190px;
    left: -130px;
    width: 610px;
    max-width: none;
    opacity: 0.82;
  }

  .masthead__brand {
    bottom: 12px;
    left: -18px;
    width: 430px;
    max-width: 72%;
  }

  .play-sign {
    top: 62px;
    right: 12px;
    width: 150px;
    height: 78px;
  }

  .play-sign strong {
    font-size: 18px;
  }

  .menu-button {
    position: sticky;
    z-index: 51;
    top: 0;
    display: block;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(54, 169, 225, 0.13);
    color: #d4dce5;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(4, 10, 18, 0.97);
  }

  .main-nav {
    top: 52px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    min-height: 0;
    padding: 0;
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    min-height: 58px;
    border-bottom: 1px solid rgba(110, 143, 174, 0.1);
    font-size: 9px;
  }

  .main-nav i {
    width: 20px;
    font-size: 14px;
  }

  .development-journal {
    padding: 38px 14px 42px;
  }

  .journal-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .journal-heading h1 {
    font-size: 34px;
  }

  .journal-grid {
    grid-template-columns: 1fr;
  }

  .journal-card--featured {
    grid-column: auto;
    min-height: 410px;
  }

  .journal-card--featured h2 {
    font-size: 29px;
  }

  .journal-card--visual {
    min-height: 0;
  }

  .journal-card {
    padding: 24px;
  }

  .journal-card--featured {
    padding: 30px 24px;
  }

  .journal-card--visual {
    padding: 0;
  }

  .launcher-panel {
    grid-template-columns: 62px 1fr;
    padding: 35px 24px;
  }

  .launcher-panel .invicta-banner--large {
    width: 58px;
    height: 80px;
  }

  .launcher-panel .invicta-banner--large img {
    top: -23px;
    left: -14px;
    width: 262px;
  }

  .launcher-panel h2 {
    font-size: 28px;
  }

  .launcher-panel > a {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }

  .support-panel__content {
    grid-template-columns: 62px 1fr;
    padding: 35px 24px;
  }

  .support-panel__flag {
    width: 58px;
    height: 80px;
    object-fit: contain;
  }

  .support-panel__content > button {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }

  .site-footer {
    padding: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
