/* Importing more authentic western fonts */
@import url("https://fonts.googleapis.com/css2?family=Rye&family=Playfair+Display:wght@400;700;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Refined color palette - more sophisticated, less cartoonish */
:root {
  --gold: #d4af37;
  --gold-dark: #b8941f;
  --dark-bg: #0a0a0a;
  --parchment: #e8dcc4;
  --parchment-dark: #d4c4a8;
  --dark-brown: #3d2817;
  --text-light: #f5f0e8;
  --text-dark: #2a1f1a;
  --border-gold: #d4af37;
}

body {
  font-family: "Playfair Display", serif;
  color: var(--text-dark);
  background-color: var(--dark-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--border-gold);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 30px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.98);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  margin: 2px;
  backdrop-filter: blur(10px);
}

.header-content {
  margin: 0;
  padding: 18px 15px 18px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Rye", serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 2.25rem;
}

.nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.656rem;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
}

.nav a:hover {
  color: var(--gold);
}

.hero {
  height: 100vh;
  min-height: 525px;
  background-image: url("public/imgs/background.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  margin: 2px;
  margin-top: 82px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.hero-content {
  position: relative;
  z-index: 10;
  color: var(--text-light);
  max-width: 675px;
  padding: 0 15px;
}

.hero-tagline {
  font-size: 0.844rem;
  margin-bottom: 1.125rem;
  letter-spacing: 1.5px;
  font-style: italic;
  color: var(--text-light);
}

.hero-title {
  font-family: "Rye", serif;
  font-size: clamp(3rem, 7.5vw, 5.25rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 9px;
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.hero-title-text {
  white-space: nowrap;
}

.hero-logo-img {
  height: clamp(60px, 10vw, 100px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.8));
  flex-shrink: 0;
}

.hero-community {
  font-size: 1.125rem;
  margin-bottom: 1.125rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  font-weight: 600;
}

.hero-subtitle {
  font-size: 1.031rem;
  margin-bottom: 2.25rem;
  font-style: italic;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
  color: var(--text-light);
}

.hero-buttons {
  display: flex;
  gap: 1.125rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.875rem;
  font-family: "Playfair Display", serif;
  font-size: 0.844rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1.5px;
  border: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--dark-bg);
}

.btn-primary {
  background-color: var(--gold);
  color: var(--dark-bg);
  border: 2px solid var(--gold);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--gold);
}

.about {
  background-color: var(--parchment);
  padding: 4.5rem 0;
  margin: 2px;
  position: relative;
  background-image: radial-gradient(ellipse 600px 400px at 15% 25%, rgba(139, 115, 85, 0.08), transparent),
    radial-gradient(ellipse 500px 350px at 85% 75%, rgba(139, 115, 85, 0.06), transparent);
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.015) 2px,
      rgba(0, 0, 0, 0.015) 4px
    ),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.015) 2px, rgba(0, 0, 0, 0.015) 4px);
  opacity: 0.4;
  pointer-events: none;
}

.about-content {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 30px;
}

.about-title {
  font-family: "Rye", serif;
  font-size: 1.875rem;
  text-align: center;
  color: var(--text-dark);
  letter-spacing: 4.5px;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.section-title {
  font-family: "Rye", serif;
  font-size: 1.875rem;
  text-align: center;
  color: var(--gold);
  letter-spacing: 4.5px;
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.about-subtitle {
  text-align: center;
  font-size: 0.938rem;
  color: var(--dark-brown);
  margin-bottom: 3rem;
  font-style: italic;
}

.about-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.about-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 3px solid var(--dark-brown);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  background-color: var(--parchment-dark);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

.character-name {
  text-align: center;
  font-family: "Rye", serif;
  font-size: 0.938rem;
  color: var(--dark-brown);
  margin-top: 0.75rem;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.about-text {
  max-width: 675px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: 0.844rem;
  line-height: 1.8;
  color: var(--dark-brown);
  margin-bottom: 1.125rem;
}

.features {
  background-color: var(--dark-bg);
  padding: 4.5rem 0;
  margin: 2px;
  background-image: url("public/imgs/bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.features::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.9));
  pointer-events: none;
}

.features .container {
  position: relative;
  z-index: 1;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: rgba(212, 196, 168, 0.03);
  padding: 1.875rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.feature-card:hover {
  background-color: rgba(212, 196, 168, 0.06);
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
}

.feature-title {
  font-family: "Rye", serif;
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  letter-spacing: 1.5px;
}

.feature-description {
  font-size: 0.844rem;
  line-height: 1.7;
  color: var(--text-light);
}

.join {
  background-color: var(--parchment);
  padding: 4.5rem 0;
  margin: 2px;
  position: relative;
  background-image: radial-gradient(ellipse 700px 500px at 25% 20%, rgba(139, 115, 85, 0.06), transparent),
    radial-gradient(ellipse 600px 400px at 75% 80%, rgba(139, 115, 85, 0.05), transparent);
}

.join-subtitle {
  text-align: center;
  font-size: 0.844rem;
  color: var(--dark-brown);
  margin-bottom: 3rem;
  font-style: italic;
}

.join-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.server-ip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--dark-brown);
  padding: 0.938rem 1.5rem;
  border: 2px solid var(--border-gold);
  flex-wrap: wrap;
  justify-content: center;
}

.ip-label {
  font-weight: 700;
  font-size: 0.844rem;
  color: var(--text-light);
  letter-spacing: 0.75px;
}

.ip-address {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.563rem 0.938rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-copy {
  background-color: var(--gold);
  color: var(--dark-bg);
  border: 2px solid var(--gold);
  padding: 0.563rem 1.125rem;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.75px;
}

.btn-copy:hover {
  background-color: transparent;
  color: var(--gold);
}

.law-outlaw {
  background-color: var(--dark-bg);
  padding: 4.5rem 0;
  margin: 2px;
  background-image: url("public/imgs/bg3.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.law-outlaw::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.9));
  pointer-events: none;
}

.law-outlaw .container {
  position: relative;
  z-index: 1;
}

.section-subtitle {
  text-align: center;
  font-size: 0.844rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-style: italic;
}

.law-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.25rem;
}

.law-card {
  background-color: rgba(212, 196, 168, 0.03);
  padding: 2.25rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

.law-card:hover {
  background-color: rgba(212, 196, 168, 0.06);
  border-color: rgba(212, 175, 55, 0.5);
}

.law-title {
  font-family: "Rye", serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1.125rem;
  letter-spacing: 2.25px;
}

.law-description {
  font-size: 0.844rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.law-features {
  list-style: none;
}

.law-features li {
  font-size: 0.844rem;
  color: var(--text-light);
  margin-bottom: 0.563rem;
  padding-left: 1.125rem;
  position: relative;
}

.law-features li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.gallery {
  background-color: var(--dark-bg);
  padding: 4.5rem 0;
  margin: 2px;
  background-image: url("public/imgs/bg2.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.9));
  pointer-events: none;
}

.gallery .container {
  position: relative;
  z-index: 1;
}

.gallery-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.gallery-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1.5rem 0;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-image {
  height: 300px;
  width: auto;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.gallery-arrow {
  background-color: rgba(212, 175, 55, 0.2);
  border: 2px solid var(--gold);
  color: var(--gold);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 10;
}

.gallery-arrow:hover {
  background-color: var(--gold);
  color: var(--dark-bg);
  transform: scale(1.1);
}

.gallery-arrow:active {
  transform: scale(0.95);
}

html {
  scroll-behavior: smooth;
}

.section-separator {
  background-color: var(--dark-bg);
  padding: 2.25rem 0;
  margin: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.section-separator::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.section-separator::after {
  content: "★";
  font-size: 1.5rem;
  color: var(--gold);
  position: relative;
  z-index: 1;
  background-color: var(--dark-bg);
  padding: 0 1.5rem;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(212, 175, 55, 0.9);
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.back-to-top:hover {
  background-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.team {
  background-color: var(--parchment);
  padding: 4.5rem 0;
  margin: 2px;
  position: relative;
  background-image: radial-gradient(ellipse 600px 400px at 20% 30%, rgba(139, 115, 85, 0.08), transparent),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(139, 115, 85, 0.06), transparent);
}

.team::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.015) 2px,
      rgba(0, 0, 0, 0.015) 4px
    ),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.015) 2px, rgba(0, 0, 0, 0.015) 4px);
  opacity: 0.4;
  pointer-events: none;
}

.team .container {
  position: relative;
  z-index: 1;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 2.25rem;
  margin-top: 3rem;
}

.team-card {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 2.25rem;
  border: 2px solid var(--dark-brown);
  text-align: center;
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(61, 40, 23, 0.3);
}

.team-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: "Rye", serif;
  font-size: 1.125rem;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
  letter-spacing: 1.5px;
}

.team-role {
  font-size: 0.844rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-bio {
  font-size: 0.844rem;
  line-height: 1.6;
  color: var(--dark-brown);
}

.footer {
  background-color: var(--dark-bg);
  padding: 2.25rem 0 1.5rem;
  margin: 2px;
  margin-bottom: 2px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  color: var(--text-light);
}

.footer-title {
  font-family: "Rye", serif;
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: 0.375rem;
  letter-spacing: 2.25px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.75px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 169, 97, 0.3);
  color: var(--text-light);
}

@media (max-width: 1024px) {
  .about-images {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 20px;
  }

  .nav {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav a {
    font-size: 0.6rem;
  }

  .hero {
    margin-top: 82px;
  }

  .hero-title {
    font-size: 3rem;
    letter-spacing: 6px;
    flex-wrap: wrap;
  }

  .hero-title-text {
    white-space: normal;
  }

  .hero-community {
    font-size: 0.938rem;
  }

  .features-grid,
  .law-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .server-ip {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .container,
  .header-content,
  .about-content {
    padding: 0 20px;
  }

  .gallery-image {
    height: 200px;
  }

  .gallery-arrow {
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}
