/* AERN home page: cinematic public portal built around the original animated backgrounds. */

.home-page-root {
  --header-h: 76px;
  --home-gold: #c8a96b;
  --home-gold-bright: #ead39b;
  --home-line: rgba(200, 169, 107, 0.28);
  --home-line-soft: rgba(255, 255, 255, 0.11);
  --home-surface: rgba(7, 10, 13, 0.9);
  --home-surface-strong: rgba(5, 8, 11, 0.96);
  --home-serif: Georgia, "Times New Roman", serif;
}

.home-page {
  min-width: 0;
  background: #070a0d;
  color: #f2f1ed;
}

.home-page :where(*) {
  letter-spacing: 0 !important;
}

.home-page [hidden] {
  display: none !important;
}

.home-skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 10000;
  padding: 10px 16px;
  border: 1px solid var(--home-gold);
  background: #080b0e;
  color: #fff;
  transform: translate(-50%, -150%);
  transition: transform 160ms ease;
}

.home-skip-link:focus {
  transform: translate(-50%, 0);
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 2px solid var(--home-gold-bright);
  outline-offset: 3px;
}

/* Header */

.home-page .home-header {
  height: var(--header-h);
  border-bottom: 1px solid rgba(200, 169, 107, 0.16);
  background: rgba(4, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  transition: background 180ms ease, border-color 180ms ease;
}

.home-page .home-header.is-scrolled {
  border-bottom-color: rgba(200, 169, 107, 0.28);
  background: rgba(4, 7, 10, 0.96);
}

.home-page .header-inner {
  width: min(1440px, calc(100% - 48px));
  gap: 18px;
}

.home-page .brand-group {
  gap: 16px;
}

.home-page .home-brand {
  gap: 11px;
  flex: 0 0 auto;
}

.home-page .home-brand .brand-mark {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.6));
}

.home-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.home-page .home-brand .brand-name {
  font-family: var(--home-serif);
  font-size: 1.42rem;
  font-weight: 400;
  line-height: 1;
}

.home-brand-caption {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--font-body);
  font-size: 0.56rem;
  line-height: 1.1;
  white-space: nowrap;
}

.home-page .header-badges {
  gap: 8px;
  margin-left: 0;
}

.home-page .header-status-trigger,
.home-page .header-users-trigger {
  min-height: 34px;
  padding: 6px 10px;
}

.home-page .header-status-trigger::before,
.home-page .header-users-trigger::before {
  inset: 0;
}

.home-page .nav-main {
  gap: 2px;
}

.home-page .nav-main > a {
  position: relative;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 0.69rem;
  font-weight: 600;
}

.home-page .nav-main > a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 1px;
  background: var(--home-gold);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}

.home-page .nav-main > a:hover {
  color: #fff;
  opacity: 1;
}

.home-page .nav-main > a:hover::after,
.home-page .nav-main > a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-page .nav-main > a[aria-current="page"] {
  color: var(--home-gold-bright);
  opacity: 1;
}

.home-page .nav-main > a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-page .nav-auth {
  gap: 6px;
}

.home-page .nav-auth-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.76rem;
}

.home-page .nav-auth .btn {
  min-height: 40px;
  padding: 9px 14px;
  border-color: rgba(200, 169, 107, 0.55);
  color: var(--home-gold-bright);
  font-family: var(--font-body);
  font-size: 0.68rem;
}

.home-page .nav-auth .nav-register-btn {
  border-color: rgba(234, 211, 155, 0.74);
  background: #d8c39a;
  color: #15120d;
}

.home-page .nav-auth .nav-register-btn:hover,
.home-page .nav-auth .nav-register-btn:focus-visible {
  border-color: #f1dfb5;
  background: #efe0bc;
  color: #15120d;
}

/* Hero */

.home-page .home-hero {
  position: relative;
  display: flex;
  min-height: max(680px, 100svh);
  padding: var(--header-h) 0 clamp(56px, 6vw, 92px);
  overflow: hidden;
  flex-direction: column;
  background: #080b0e;
  isolation: isolate;
}

.home-page .hero-bg-img {
  object-position: center;
  image-rendering: pixelated;
  transform: none;
}

.home-page-root:not(.aern-night) .hero-bg-img {
  filter: saturate(0.9) brightness(0.78) contrast(1.08);
}

.home-page-root.aern-night .hero-bg-img {
  filter: saturate(0.92) brightness(0.74) contrast(1.08);
}

.home-page .hero-bg::after {
  background:
    radial-gradient(ellipse 42% 50% at 50% 38%, rgba(4, 7, 10, 0.22), transparent 76%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 38%, rgba(3, 5, 7, 0.5) 100%);
}

.home-page .hero-bg-overlay {
  background:
    linear-gradient(180deg, rgba(3, 5, 7, 0.12) 0%, rgba(3, 5, 7, 0.08) 36%, rgba(3, 5, 7, 0.42) 68%, rgba(3, 5, 7, 0.76) 100%),
    linear-gradient(90deg, rgba(3, 5, 7, 0.45), transparent 24%, transparent 76%, rgba(3, 5, 7, 0.44));
}

.home-page .home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 4;
  height: clamp(280px, 34vh, 460px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 5, 7, 0) 0%, rgba(3, 5, 7, 0.2) 28%, rgba(3, 5, 7, 0.7) 68%, var(--bg-deep) 100%),
    radial-gradient(ellipse 90% 76% at 50% 100%, var(--bg-deep) 0%, rgba(3, 5, 7, 0.82) 36%, rgba(3, 5, 7, 0) 76%);
}

.home-page #particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
}

.home-page .home-hero-content {
  position: relative;
  z-index: 5;
  width: calc(100% - 40px);
  max-width: 900px;
  min-height: calc(100svh - var(--header-h) - clamp(56px, 6vw, 92px));
  margin: 0 auto;
  padding: clamp(48px, 8vh, 92px) 20px 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-hero-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(112px, 10vw, 168px);
  height: clamp(112px, 10vw, 168px);
  margin-bottom: clamp(12px, 1.6vw, 22px);
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.62));
}

.home-hero-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(88px, 8vw, 136px);
  height: clamp(88px, 8vw, 136px);
  object-fit: contain;
}

.home-page .home-hero-title {
  margin: 0;
  color: #eee4d7;
  font-family: var(--home-serif);
  font-size: clamp(5.2rem, 9.6vw, 9rem);
  font-weight: 400;
  line-height: 0.88;
  text-transform: none;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.18),
    0 5px 26px rgba(0, 0, 0, 0.95);
}

.home-hero-kicker {
  margin: 0 0 8px;
  color: var(--home-gold-bright);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.88);
}

.home-page .home-hero-actions {
  justify-content: center;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 38px);
}

.home-page .home-hero-actions .btn {
  position: relative;
  min-width: min(360px, 100%);
  min-height: 64px;
  padding: 19px 34px;
  overflow: hidden;
  border: 1px solid rgba(234, 211, 155, 0.68);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 18px 46px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(200, 169, 107, 0.2);
  animation: home-hero-cta-glow 3.2s ease-in-out infinite;
}

.home-page .home-hero-actions .btn:not(.btn-outline) {
  background: #d8c39a;
  color: #15120d;
}

.home-page .home-hero-actions .btn::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -48%;
  z-index: -1;
  width: 36%;
  background: rgba(255, 255, 255, 0.36);
  transform: skewX(-18deg);
  transition: left 420ms ease;
}

.home-page .home-hero-actions .btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.home-page .home-hero-actions .btn-outline {
  background: rgba(5, 8, 11, 0.62);
  color: #fff;
}

.home-page .home-hero-actions .btn:hover {
  border-color: var(--home-gold-bright);
  background: #f0dfb8;
  color: #080b0e;
  transform: translateY(-5px) scale(1.025);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 24px 54px rgba(0, 0, 0, 0.54),
    0 0 48px rgba(234, 211, 155, 0.48);
}

.home-page .home-hero-actions .btn:hover::before,
.home-page .home-hero-actions .btn:focus-visible::before {
  left: 118%;
}

.home-scroll-cue {
  position: absolute;
  bottom: clamp(18px, 3.2vh, 36px);
  left: 50%;
  z-index: 6;
  display: grid;
  width: 44px;
  min-height: 62px;
  place-items: center;
  color: var(--home-gold-bright);
  opacity: var(--home-scroll-cue-opacity, 0.82);
  text-decoration: none;
  filter: blur(var(--home-scroll-cue-blur, 0px));
  transform: translateX(-50%) translateY(var(--home-scroll-cue-offset, 0px));
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.home-scroll-cue-hidden .home-scroll-cue {
  pointer-events: none;
}

.home-scroll-cue:hover,
.home-scroll-cue:focus-visible {
  opacity: var(--home-scroll-cue-hover-opacity, 1);
  filter: blur(var(--home-scroll-cue-blur, 0px)) drop-shadow(0 0 18px rgba(234, 211, 155, 0.5));
  transform: translateX(-50%) translateY(var(--home-scroll-cue-hover-offset, -2px));
}

.home-scroll-cue-mouse {
  position: relative;
  display: block;
  width: 28px;
  height: 44px;
  border: 1px solid rgba(234, 211, 155, 0.76);
  border-radius: 999px;
  background: rgba(5, 8, 11, 0.42);
  box-shadow:
    inset 0 0 14px rgba(200, 169, 107, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

.home-scroll-cue-wheel {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(234, 211, 155, 0.42);
  transform: translateX(-50%);
  animation: home-scroll-wheel 1.65s ease-in-out infinite;
}

.home-scroll-cue-arrow {
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.76;
  transform: rotate(45deg);
  animation: home-scroll-arrow 1.65s ease-in-out infinite;
}

@keyframes home-hero-cta-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 18px 46px rgba(0, 0, 0, 0.5), 0 0 26px rgba(200, 169, 107, 0.16); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 20px 50px rgba(0, 0, 0, 0.52), 0 0 44px rgba(234, 211, 155, 0.34); }
}

@keyframes home-scroll-wheel {
  0%, 100% {
    opacity: 0.28;
    transform: translate(-50%, 0);
  }

  44% {
    opacity: 1;
    transform: translate(-50%, 11px);
  }

  72% {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

@keyframes home-scroll-arrow {
  0%, 100% {
    opacity: 0.24;
    transform: translateY(-2px) rotate(45deg);
  }

  52% {
    opacity: 0.95;
    transform: translateY(4px) rotate(45deg);
  }
}

.home-page .home-section.home-world-section {
  padding: 96px 0 112px;
  overflow: hidden;
  background: var(--bg-deep);
}

.home-world-container {
  width: min(1220px, calc(100% - 48px));
}

.home-world-section .home-world-head {
  max-width: 760px;
  margin: 0 auto 28px;
}

.home-world-ornament {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) 28px minmax(40px, 1fr);
  align-items: center;
  gap: 15px;
  width: min(520px, 70%);
  margin: 0 auto 30px;
}

.home-world-ornament > span:not(.home-world-ornament-mark) {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 169, 107, 0.5));
}

.home-world-ornament > span:last-child {
  transform: scaleX(-1);
}

.home-world-ornament-mark {
  position: relative;
  width: 20px;
  height: 20px;
  justify-self: center;
  border: 1px solid rgba(229, 198, 128, 0.66);
  transform: rotate(45deg);
}

.home-world-ornament-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(229, 198, 128, 0.38);
}

.home-world-grid {
  display: grid;
  grid-template-columns: repeat(var(--home-world-columns, 5), minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-inline: auto;
}

.home-world-card {
  position: relative;
  min-width: 0;
  min-height: clamp(400px, 34vw, 480px);
  overflow: hidden;
  border: 1px solid rgba(200, 169, 107, 0.48);
  border-radius: 2px;
  background-color: #0d1115;
  background-image: url("/site/img/background_day.gif?v=4");
  background-repeat: no-repeat;
  background-size: auto 112%;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.68),
    0 22px 48px rgba(0, 0, 0, 0.34);
  isolation: isolate;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.home-world-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 2;
  border: 1px solid rgba(229, 198, 128, 0.24);
  pointer-events: none;
}

.home-world-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  pointer-events: none;
}

.home-world-card-index {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--home-gold-bright);
  font-family: var(--home-serif);
  font-size: 0.64rem;
  isolation: isolate;
  transform: translateX(-50%);
}

.home-world-card-index::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(229, 198, 128, 0.68);
  background: rgba(7, 9, 11, 0.74);
  transform: rotate(45deg);
}

.home-page-root.aern-night .home-world-card {
  background-image: url("/site/img/background_night.gif?v=4");
}

.home-world-card--world { background-position: 82% 50%; }
.home-world-card--character { background-position: 17% 58%; }
.home-world-card--mechanics { background-position: 52% 48%; }
.home-world-card--guilds { background-position: 91% 54%; }
.home-world-card--community { background-position: 69% 50%; }

.home-world-card:hover,
.home-world-card:focus-visible {
  z-index: 1;
  border-color: rgba(234, 211, 155, 0.72);
  transform: translateY(-6px);
  box-shadow:
    inset 0 0 0 1px rgba(234, 211, 155, 0.18),
    0 28px 58px rgba(0, 0, 0, 0.52);
}

.home-world-card-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(3, 5, 7, 0.04) 0%, rgba(3, 5, 7, 0.12) 48%, rgba(3, 5, 7, 0.96) 88%),
    linear-gradient(90deg, rgba(3, 5, 7, 0.28), transparent 26%, transparent 74%, rgba(3, 5, 7, 0.26));
}

.home-world-card-copy {
  position: absolute;
  inset: auto 20px 28px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-world-card-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  object-fit: contain;
  opacity: 0.9;
  filter:
    grayscale(1)
    sepia(0.75)
    saturate(1.1)
    brightness(1.55)
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.9));
}

.home-world-card-copy strong {
  color: #f3eadb;
  font-family: var(--home-serif);
  font-size: 1.32rem;
  font-weight: 400;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.home-world-card-copy small {
  max-width: 190px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  line-height: 1.45;
}

/* Content bands */

.home-page .home-section {
  position: relative;
  padding: 92px 0;
  border-top: 0;
  background: var(--bg-deep);
}

.home-page .home-section::before {
  display: none;
}

.home-page .home-news-section {
  background: var(--bg-deep);
}

.home-page .home-about-section,
.home-page .home-start-section {
  background: var(--bg-deep);
}

.home-section-head {
  margin-bottom: 38px;
}

.home-page .section-label {
  margin-bottom: 9px;
  color: var(--home-gold);
  font-family: var(--font-body);
  font-size: 0.69rem;
  font-weight: 700;
}

.home-page .section-title {
  margin-bottom: 10px;
  color: #f4f1eb;
  font-family: var(--home-serif);
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  font-weight: 400;
  line-height: 1.05;
  text-transform: none;
}

.home-page .section-lead {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.94rem;
  line-height: 1.6;
}

.home-page .glass-card {
  border: 1px solid var(--home-line-soft);
  border-radius: 4px;
  background: rgba(7, 10, 13, 0.86);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.home-page .home-news-section {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 8vw, 126px) 0 clamp(84px, 8vw, 132px);
  overflow: hidden;
  background: var(--bg-deep);
}

.home-news-container {
  width: min(1320px, calc(100% - 48px));
}

.home-news-head {
  margin-bottom: 18px;
}

.home-page .home-news-head .section-title {
  margin: 0;
  font-size: clamp(2.1rem, 3vw, 3rem);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}

.home-page .news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.home-page .news-card {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(220px, 13.5vw, 310px);
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--home-line-soft);
  border-radius: 3px;
  background: rgba(6, 9, 12, 0.74);
  color: inherit;
  text-align: left;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-page .news-card:not(.news-card--placeholder):hover,
.home-page .news-card:not(.news-card--placeholder):focus-visible {
  border-color: rgba(234, 211, 155, 0.66);
  transform: translateY(-5px);
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.46);
}

.home-page .news-card:not(.news-card--placeholder):focus-visible {
  outline: 2px solid var(--home-gold-bright);
  outline-offset: 3px;
}

.home-page .news-card--placeholder {
  display: grid;
  place-items: center;
  border-color: rgba(205, 168, 94, 0.4);
  background: rgba(5, 8, 11, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(205, 168, 94, 0.07),
    0 24px 58px rgba(0, 0, 0, 0.28);
  cursor: default;
}

.home-page .news-card--placeholder::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(205, 168, 94, 0.12);
  pointer-events: none;
}

.home-page .news-card--placeholder::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 86px;
  border-top: 1px solid rgba(205, 168, 94, 0.18);
  background: rgba(8, 11, 14, 0.82);
}

.home-page .news-card--placeholder .news-card-index {
  opacity: 0.58;
}

.home-page .news-placeholder-mark {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(205, 168, 94, 0.38);
  transform: translate(-50%, -50%) rotate(45deg);
}

.home-page .news-placeholder-mark::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(205, 168, 94, 0.28);
}

.home-page .news-placeholder-label {
  position: absolute;
  bottom: 34px;
  left: 24px;
  z-index: 2;
  color: rgba(231, 207, 157, 0.64);
  font-family: var(--home-serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.home-page .news-thumb {
  position: absolute;
  inset: 0 0 86px;
  display: block;
  min-height: 0;
  margin: 0;
  border: 0;
  background-color: #11161b;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: transform 260ms ease;
}

.home-page .news-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 5, 7, 0.04) 48%, rgba(3, 5, 7, 0.58) 100%);
}

.home-page .news-card:not(.news-card--placeholder):hover .news-thumb,
.home-page .news-card:not(.news-card--placeholder):focus-visible .news-thumb {
  transform: scale(1.025);
}

.home-page .news-thumb--fallback {
  background-image:
    linear-gradient(135deg, rgba(5, 8, 11, 0.36), rgba(5, 8, 11, 0.76)),
    url("/site/img/background_day.gif?v=4");
}

.home-page-root.aern-night .news-thumb--fallback {
  background-image:
    linear-gradient(135deg, rgba(5, 8, 11, 0.3), rgba(5, 8, 11, 0.78)),
    url("/site/img/background_night.gif?v=4");
}

.home-page .news-card-index {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--home-line);
  background: rgba(5, 8, 11, 0.78);
  color: var(--home-gold-bright);
  font-family: var(--home-serif);
  font-size: 0.68rem;
  transform: rotate(45deg);
}

.home-page .news-card-index > span {
  display: block;
  transform: rotate(-45deg);
}

.home-page .news-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  width: 100%;
  height: 86px;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 13px 20px;
  border-top: 1px solid rgba(200, 169, 107, 0.16);
  background: rgba(7, 10, 13, 0.94);
}

.home-page .news-date {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
}

.home-page .news-title {
  display: -webkit-box;
  margin: 0 42px 0 0;
  overflow: hidden;
  color: #f3f0e9;
  font-family: var(--home-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 400;
  line-height: 1.12;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-page .news-excerpt {
  display: none;
}

.home-page .news-card-action {
  display: none;
}

.home-page .news-card-action::after {
  content: "→";
  font-size: 0.9rem;
}

.home-news-ornament {
  display: grid;
  grid-template-columns: 1fr 14px 1fr;
  align-items: center;
  gap: 14px;
  width: min(420px, 74%);
  margin: -10px auto 34px;
}

.home-news-ornament span:first-child,
.home-news-ornament span:last-child {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--home-line));
}

.home-news-ornament span:last-child {
  transform: scaleX(-1);
}

.home-news-ornament span:nth-child(2) {
  width: 12px;
  height: 12px;
  border: 1px solid var(--home-line);
  transform: rotate(45deg);
}

.home-news-dialog {
  width: min(900px, calc(100% - 36px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 4px;
  background: #080b0e;
  color: #f4f1eb;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.72);
}

.home-news-dialog::backdrop {
  background: rgba(2, 4, 6, 0.82);
  backdrop-filter: blur(7px);
}

.home-news-dialog-shell {
  position: relative;
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.home-news-dialog-close {
  position: sticky;
  top: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px auto;
  border: 1px solid var(--home-line);
  border-radius: 50%;
  background: rgba(5, 8, 11, 0.9);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}

.home-news-dialog-close:hover,
.home-news-dialog-close:focus-visible {
  border-color: var(--home-gold-bright);
  outline: none;
}

.home-news-dialog-media {
  min-height: 310px;
  border-bottom: 1px solid var(--home-line-soft);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.home-news-dialog-article {
  padding: 42px clamp(24px, 6vw, 70px) 58px;
}

.home-news-dialog-date {
  display: block;
  margin: 2px 0 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-news-dialog h2 {
  margin: 0;
  font-family: var(--home-serif);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 400;
  line-height: 1.08;
}

.home-news-dialog-summary {
  margin: 18px 0 0;
  color: var(--home-gold-bright);
  font-size: 1rem;
  line-height: 1.65;
}

.home-news-dialog-content {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
  line-height: 1.85;
  white-space: pre-wrap;
}

.home-news-dialog-status {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

.home-page .about-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 54px;
}

.home-page .about-text p {
  max-width: 670px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.96rem;
  line-height: 1.75;
}

.home-page .about-socials {
  width: 100%;
  margin: 28px auto 0;
  justify-content: center;
}

.home-page .about-social-link {
  width: 86px;
}

.home-page .about-social-icon {
  width: 62px;
  height: 62px;
  border-color: rgba(88, 101, 242, 0.54);
  border-radius: 4px;
  background: rgba(39, 45, 112, 0.5);
}

.home-page .about-social-icon img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}

.home-page .about-social-icon-text {
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.home-page .about-social-name {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-body);
  font-size: 0.67rem;
}

.home-page .about-stats {
  gap: 10px;
}

.home-page .stat-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
}

.home-page .stat-card:hover {
  border-color: var(--home-line);
  background: rgba(12, 16, 20, 0.94);
}

.home-stat-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  object-fit: contain;
}

.home-page .stat-value {
  color: var(--home-gold-bright);
  font-family: var(--home-serif);
  font-size: 2rem;
  font-weight: 400;
  text-transform: none;
}

.home-page .stat-label {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.67rem;
}

.home-page .steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.home-page .step-card {
  min-height: 310px;
  padding: 30px 26px;
  border-top-color: rgba(200, 169, 107, 0.42);
}

.home-step-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  object-fit: contain;
}

.home-page .step-num {
  color: rgba(200, 169, 107, 0.34);
  font-family: var(--home-serif);
  font-size: 3.4rem;
  font-weight: 400;
}

.home-page .step-card h3 {
  color: #f4f1eb;
  font-family: var(--home-serif);
  font-size: 1.35rem;
  font-weight: 400;
  text-transform: none;
}

.home-page .step-card p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  line-height: 1.6;
}

.home-page .step-card .btn {
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(200, 169, 107, 0.54);
  border-radius: 2px;
  background: rgba(200, 169, 107, 0.1);
  color: var(--home-gold-bright);
  font-family: var(--font-body);
  font-size: 0.69rem;
  box-shadow: none;
}

.home-page .step-card .btn:hover {
  background: var(--home-gold);
  color: #080b0e;
}

.home-page .step-launcher-hint {
  font-size: 0.72rem;
}

.home-page .home-footer {
  border-top-color: rgba(200, 169, 107, 0.2);
  background: #050709;
}

.home-page .footer-col h4 {
  color: var(--home-gold);
}

.home-page .footer-links a:hover {
  color: var(--home-gold-bright);
}

/* Responsive */

@media (min-width: 1081px) and (max-width: 1420px) {
  .home-page .nav-main > a {
    padding-inline: 10px;
  }

  .home-page .home-hero {
    min-height: max(660px, 100svh);
    padding-bottom: 54px;
  }

  .home-page .home-hero-content {
    padding-top: 42px;
  }

  .home-page .home-hero-title {
    font-size: 4.35rem;
  }

  .home-news-head {
    margin-bottom: 12px;
  }

  .home-page .home-news-head .section-title {
    font-size: 2rem;
  }

  .home-page .news-grid {
    gap: 14px;
  }

  .home-page .news-card {
    height: 190px;
    min-height: 190px;
  }

  .home-page .news-thumb {
    bottom: 72px;
  }

  .home-page .news-body,
  .home-page .news-card--placeholder::after {
    height: 72px;
  }

  .home-page .news-placeholder-label {
    bottom: 28px;
  }
}

@media (min-width: 1081px) and (max-height: 760px) {
  .home-page .home-hero-content {
    min-height: calc(100svh - var(--header-h) - 54px);
    padding-top: 34px;
    padding-bottom: 0;
  }

  .home-page .home-hero-title {
    font-size: 5.3rem;
  }

  .home-page .home-hero-actions {
    margin-top: 20px;
  }

  .home-scroll-cue {
    bottom: 12px;
    transform: translateX(-50%) translateY(var(--home-scroll-cue-offset, 0px)) scale(0.9);
  }

}

@media (max-width: 1080px) {
  .home-page .header-inner {
    width: min(100% - 32px, 920px);
  }

  .home-page .header-actions {
    background: rgba(4, 7, 10, 0.98);
    border-bottom-color: var(--home-line);
  }

  .home-page .nav-main > a {
    font-size: 0.78rem;
  }

  .home-page .nav-main > a::after {
    display: none;
  }

  .home-page .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .home-page .home-hero {
    min-height: max(620px, 100svh);
    padding-bottom: 52px;
  }

  .home-page .hero-bg-img {
    object-position: 38% center;
  }

  .home-page .home-hero-content {
    min-height: calc(100svh - var(--header-h) - 52px);
    padding: 34px 12px 0;
  }

  .home-news-container {
    width: calc(100% - 32px);
  }

  .home-page .news-grid {
    grid-template-columns: none;
    grid-auto-columns: minmax(280px, 82%);
    grid-auto-flow: column;
    gap: 14px;
    padding: 4px 2px 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-color: rgba(200, 169, 107, 0.52) rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
  }

  .home-page .news-card {
    height: clamp(270px, 58vw, 320px);
    min-height: 270px;
    scroll-snap-align: start;
  }

  .home-page .home-news-section {
    padding: 68px 0 82px;
  }

  .home-page .home-section.home-world-section {
    padding: 72px 0 82px;
  }

  .home-world-container {
    width: calc(100% - 32px);
  }

  .home-world-grid {
    grid-template-columns: none;
    grid-auto-columns: minmax(230px, 36%);
    grid-auto-flow: column;
    justify-content: start;
    gap: 12px;
    width: 100%;
    padding: 7px 2px 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-color: rgba(200, 169, 107, 0.52) rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
  }

  .home-world-card {
    min-height: 430px;
    scroll-snap-align: start;
  }

  .home-page .home-section {
    padding: 72px 0;
  }

  .home-page .about-grid {
    gap: 36px;
  }
}

@media (max-width: 560px) {
  .home-page-root {
    --header-h: 68px;
  }

  .home-page .home-brand .brand-mark {
    width: 44px;
    height: 44px;
  }

  .home-page .home-brand .brand-name {
    font-size: 1.12rem;
  }

  .home-brand-caption {
    display: none;
  }

  .home-page .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .home-page .home-hero {
    min-height: max(580px, 100svh);
    padding-bottom: 44px;
  }

  .home-page .home-hero-content {
    width: calc(100% - 24px);
    min-height: calc(100svh - var(--header-h) - 44px);
    padding: 24px 8px 0;
  }

  .home-page .home-hero-title {
    font-size: clamp(4rem, 24vw, 5.4rem);
  }

  .home-page .home-hero-actions {
    width: min(300px, 100%);
    flex-direction: column;
  }

  .home-scroll-cue {
    bottom: 14px;
    min-height: 54px;
  }

  .home-scroll-cue-mouse {
    width: 24px;
    height: 38px;
  }

  .home-news-container {
    width: calc(100% - 24px);
  }

  .home-page .home-news-section {
    padding: 56px 0 68px;
  }

  .home-news-head {
    margin-bottom: 24px;
  }

  .home-page .home-news-head .section-title {
    font-size: 2.35rem;
  }

  .home-page .news-card {
    height: clamp(250px, 72vw, 300px);
    min-height: 260px;
  }

  .home-page .news-thumb {
    bottom: 92px;
  }

  .home-page .news-body,
  .home-page .news-card--placeholder::after {
    height: 92px;
  }

  .home-page .news-body {
    padding: 14px 17px;
  }

  .home-page .news-title {
    font-size: 1.18rem;
  }

  .home-page .news-placeholder-label {
    bottom: 36px;
    left: 18px;
    font-size: 0.98rem;
  }

  .home-page .home-hero-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .home-page .home-section.home-world-section {
    padding: 62px 0 70px;
  }

  .home-world-container {
    width: calc(100% - 24px);
  }

  .home-world-section .home-world-head {
    margin-bottom: 22px;
  }

  .home-world-ornament {
    width: 78%;
    margin-bottom: 24px;
  }

  .home-world-grid {
    grid-auto-columns: minmax(236px, 72%);
    gap: 10px;
  }

  .home-world-card {
    min-height: 400px;
    background-size: auto 112%;
  }

  .home-world-card-copy {
    inset-inline: 18px;
    bottom: 24px;
  }

  .home-world-card-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
  }

  .home-world-card-copy strong {
    font-size: 1.2rem;
  }

  .home-world-card-copy small {
    font-size: 0.68rem;
  }

  .home-page .home-section {
    padding: 62px 0;
  }

  .home-news-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .home-news-dialog-shell {
    max-height: calc(100dvh - 16px);
  }

  .home-news-dialog-media {
    min-height: 220px;
  }

  .home-news-dialog-article {
    padding: 34px 22px 42px;
  }

  .home-page .section-title {
    font-size: 2.2rem;
  }

  .home-page .about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .stat-card {
    min-height: 116px;
    padding: 18px 8px;
  }

  .home-page .step-card {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page #particles {
    display: none;
  }

  .home-page .home-world-card,
  .home-page .news-card,
  .home-page .home-hero-actions .btn,
  .home-scroll-cue,
  .home-scroll-cue-wheel,
  .home-scroll-cue-arrow {
    animation: none;
    transition: none;
  }

  .home-scroll-cue-wheel {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* News page */

.news-page .home-news-section {
  min-height: calc(100vh - var(--header-h));
  padding: calc(var(--header-h) + clamp(28px, 4vw, 56px)) 0 clamp(104px, 8vw, 146px);
  background: #06090c;
}

.news-page .home-news-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 9, 12, 0.58), rgba(6, 9, 12, 0.92) 34%, #06090c 100%),
    linear-gradient(90deg, rgba(6, 9, 12, 0.94), rgba(6, 9, 12, 0.58) 50%, rgba(6, 9, 12, 0.94)),
    url("/site/img/background_day.gif?v=4") center 42% / cover no-repeat;
  opacity: 0.84;
  pointer-events: none;
}

.home-page-root.aern-night .news-page .home-news-section::after {
  background:
    linear-gradient(180deg, rgba(6, 9, 12, 0.54), rgba(6, 9, 12, 0.9) 34%, #06090c 100%),
    linear-gradient(90deg, rgba(6, 9, 12, 0.94), rgba(6, 9, 12, 0.56) 50%, rgba(6, 9, 12, 0.94)),
    url("/site/img/background_night.gif?v=4") center 42% / cover no-repeat;
}

.news-page .news-page-container {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 56px));
}

.news-page .news-page-head {
  display: none;
}

.news-page .home-news-head .section-title {
  font-size: clamp(3.2rem, 6vw, 5.4rem);
}

.news-page .news-grid {
  gap: 24px;
}

.news-page .news-card {
  height: clamp(300px, 22vw, 430px);
  min-height: 300px;
}

.news-page .news-thumb {
  bottom: 100px;
}

.news-page .news-body,
.news-page .news-card--placeholder::after {
  height: 100px;
}

.news-page .news-body {
  padding: 18px 24px;
}

.news-page .news-title {
  font-size: clamp(1.26rem, 1.8vw, 1.78rem);
}

.news-page .news-placeholder-label {
  bottom: 38px;
  font-size: 1.2rem;
}

@media (max-width: 820px) {
  .news-page .home-news-section {
    padding: calc(var(--header-h) + 24px) 0 72px;
  }

  .news-page .news-page-container {
    width: calc(100% - 32px);
  }

  .news-page .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 16px;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .news-page .news-card {
    height: clamp(280px, 62vw, 360px);
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .news-page .home-news-section {
    padding: calc(var(--header-h) + 18px) 0 58px;
  }

  .news-page .news-page-container {
    width: calc(100% - 24px);
  }

  .news-page .home-news-head .section-title {
    font-size: 2.9rem;
  }

  .news-page .news-card {
    height: clamp(270px, 78vw, 330px);
    min-height: 270px;
  }
}
