/* TerraNigra public homepage — dark fantasy, SEO-friendly static sections */

.auth-gate {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-gate .auth-scene {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.site-homepage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
  box-sizing: border-box;
}

.site-homepage a {
  color: #c9a24d;
}

.site-hero {
  position: relative;
  margin: 0 -20px;
  min-height: min(92vh, 820px);
  padding: 20px 24px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-bottom: 1px solid rgba(201, 162, 77, 0.2);
}

.site-hero__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 24px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(90, 69, 32, 0.55);
  border-radius: 2px;
  background: rgba(12, 10, 8, 0.42);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.site-hero__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 240px;
  min-width: 0;
}

.site-hero__logo {
  flex-shrink: 0;
  width: clamp(64px, 12vw, 88px);
  height: clamp(64px, 12vw, 88px);
  border-radius: 50%;
  border: 2px solid #5a4520;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  object-fit: cover;
}

.site-hero__titles {
  text-align: left;
}

.site-hero h1 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.06em;
  color: #f2e3b0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.site-hero__tagline {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.4;
  color: #e0d0a8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.site-hero__auth {
  flex: 0 0 auto;
  align-self: center;
}

.site-section {
  padding: 40px 18px 28px;
  margin-top: 8px;
  border-bottom: 1px solid rgba(90, 69, 32, 0.3);
  border-radius: 2px;
  background: rgba(14, 11, 8, 0.72);
  box-shadow: inset 0 0 0 1px rgba(214, 180, 104, 0.05);
}

.site-section:last-child {
  border-bottom: none;
}

.site-section h2 {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f2e3b0;
  text-transform: uppercase;
}

.site-section h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  color: #e8d9a8;
}

.site-section p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: #c8baa0;
  max-width: 72ch;
}

.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.site-card {
  padding: 20px 18px;
  border: 1px solid #4f3f23;
  background: linear-gradient(180deg, rgba(34, 27, 18, 0.88), rgba(14, 11, 8, 0.92));
  box-shadow: inset 0 0 0 1px rgba(214, 180, 104, 0.06);
}

.site-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #a89878;
}

.site-card--future {
  opacity: 0.88;
  border-style: dashed;
}

.site-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-features li {
  position: relative;
  padding: 10px 0 10px 22px;
  font-size: 15px;
  line-height: 1.5;
  color: #c8baa0;
}

.site-features li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: #8a6b2e;
  font-size: 10px;
  top: 14px;
}

.site-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.site-gallery figure {
  margin: 0;
  border: 1px solid #4f3f23;
  background: #0a0806;
  overflow: hidden;
}

.site-gallery img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center;
}

.site-gallery figcaption {
  padding: 8px 10px;
  font-size: 12px;
  color: #9a8a6a;
  text-align: center;
}

.site-whats-new-date {
  margin: -8px 0 16px;
  font-size: 13px;
  color: #8a7a5a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-whats-new,
.site-legal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 78ch;
}

.site-whats-new li,
.site-legal-list li {
  position: relative;
  padding: 0 0 14px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #c8baa0;
}

.site-whats-new li::before,
.site-legal-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 6px;
  color: #8a6b2e;
  font-size: 9px;
}

.site-whats-new li strong,
.site-legal-list li strong {
  color: #e8d9a8;
}

.site-footer {
  margin-top: 24px;
  padding: 28px 18px 12px;
  text-align: center;
  border-top: 1px solid rgba(90, 69, 32, 0.35);
}

.site-footer__copy {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: #c9a24d;
  letter-spacing: 0.04em;
}

.site-footer__note {
  margin: 0 0 16px;
  font-size: 13px;
  color: #7a6a52;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.site-footer__nav a {
  font-size: 13px;
  color: #9a8a6a;
  text-decoration: none;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus {
  color: #f2e3b0;
  text-decoration: underline;
}

.auth-play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-landing-btn {
  min-width: 132px;
  padding: 13px 24px;
  border: 2px solid #5a4520;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(42, 33, 24, 0.94), rgba(18, 14, 10, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.14),
    0 6px 20px rgba(0, 0, 0, 0.4);
  color: #f5e6b8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-landing-btn:hover,
.auth-landing-btn:focus {
  border-color: #c9a24d;
  color: #fff6dc;
  outline: none;
}

.auth-landing-btn--primary {
  border-color: #8a6b2e;
  background: linear-gradient(180deg, #6b4f28, #4a3618);
}

/*
 * Shared TerraNigra theme for every language <select> (landing page + in-game
 * Settings menu). The closed box is fully styleable; the native <option> list
 * only accepts background-color/color, but Chromium/Firefox both honor those
 * on the popup itself, so this is as close to the dark/gold theme as a plain
 * <select> can get without replacing it with a custom dropdown widget.
 */
.i18n-language-select {
  min-width: 108px;
  padding: 10px 30px 10px 12px;
  border: 2px solid #5a4520;
  border-radius: 2px;
  background-color: #1c150c;
  background-image:
    linear-gradient(180deg, rgba(42, 33, 24, 0.94), rgba(18, 14, 10, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a24d' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  color: #f5e6b8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.i18n-language-select:hover,
.i18n-language-select:focus {
  border-color: #c9a24d;
  color: #fff6dc;
  outline: none;
}

.i18n-language-select option {
  background-color: #1c150c;
  color: #f5e6b8;
}

@media (max-width: 640px) {
  .i18n-language-select {
    width: 100%;
    box-sizing: border-box;
  }
}

#authHomepage.hidden {
  display: none;
}

@media (max-width: 640px) {
  .site-homepage {
    padding: 0 16px 32px;
  }

  .site-hero {
    margin: 0 -16px;
    min-height: min(88vh, 720px);
    padding: 16px;
  }

  .site-hero__bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .site-hero__auth {
    order: -1;
    width: 100%;
  }

  .auth-play-actions {
    flex-direction: column;
  }

  .auth-landing-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .site-hero__brand {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  .site-hero__titles {
    text-align: center;
  }

  .site-gallery img {
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-gallery img {
    transition: none;
  }
}
