/* ============================================================
   STYLES.CSS — Hijos del Yermo · Global Styles
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
  --bg0: #0B0D10;
  --bg1: #0F1217;
  --bg2: #131820;
  --text: #ECE9E2;
  --muted: rgba(236, 233, 226, .85);
  --gold: #E3C27E;
  --gold-glow: rgba(227, 194, 126, .22);
  --border: rgba(255, 255, 255, .08);
  --border-gold: rgba(227, 194, 126, .22);
  --hielo: #8fd3ff;
  --sol: #ffd36a;
  --volcan: #ff6b6b;
  --sombra: #b8b8c4;
  --mar: #6bc7ff;
  --pantano: #9be15d;
  --ease: cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, #0B0D10 0%, #0F1217 60%, #131820 100%);
  color: var(--text);
  font-family: Inter, system-ui, Arial, sans-serif;
}

img {
  display: block;
}

a {
  color: var(--text);
  text-decoration: none;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-full {
  width: 100%;
  padding: 0;
}

/* ===== TYPOGRAPHY HELPERS ===== */
.gold {
  color: var(--gold);
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  margin: 0 0 18px;
}

#universo>.container>h2,
#mapa>.container>h2,
#libro>.container>h2 {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(227, 194, 126, .12);
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: .2px;
}

#galeria h2 {
  color: #f1d28a;
}

/* ===== FEATURE BLOCKS ===== */
.feature {
  color: var(--text);
}

.feature h3 {
  color: var(--gold);
}

.feature p {
  color: var(--muted);
}

.features {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease-bounce);
}

.feature:hover {
  border-color: var(--border-gold);
  background: rgba(227, 194, 126, .04);
  transform: translateY(-2px);
}

.feature p {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
  line-height: 1.7;
}

/* ===== BACKGROUND EFFECTS ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 50% 110%, rgba(227, 194, 126, 0.18), transparent 70%),
    radial-gradient(900px 500px at 50% 120%, rgba(255, 255, 255, 0.03), transparent 65%);
  animation: hdyRise 18s ease-in-out infinite alternate;
  will-change: opacity;
}

@keyframes hdyRise {
  0% {
    opacity: .75;
  }

  100% {
    opacity: 1;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  box-shadow: inset 0 0 240px rgba(0, 0, 0, .55), inset 0 -160px 200px rgba(0, 0, 0, .45);
}

.site-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url('../img/noise.png');
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  background: rgba(10, 12, 16, .62);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.container.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 11px;
  padding-bottom: 11px;
}

/* ===== BRAND ===== */
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
  transition: opacity .2s;
}

.brand:hover {
  opacity: .82;
}

.brand img {
  transition: transform .3s var(--ease-bounce);
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.1;
}

.brand-tagline {
  color: rgba(227, 194, 126, 0.5);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== LANGUAGE SWITCH ===== */
.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch .lang {
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: transform .2s var(--ease-bounce), border-color .2s, background .2s;
}

.lang-switch .lang img {
  display: block;
  border-radius: 4px;
  width: 28px;
  height: auto;
}

.lang-switch .lang:hover {
  transform: translateY(-2px) scale(1.08);
  border-color: var(--border-gold);
  background: rgba(255, 255, 255, .06);
}

.lang-switch .lang:active {
  transform: translateY(0) scale(1);
}

.flag,
.lang-label {
  display: none;
}

/* ===== NAVIGATION ===== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 9999;
}

.nav-item {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  color: rgba(236, 233, 226, .8);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
  cursor: pointer;
}

.nav-item:hover,
.has-dropdown>a:hover {
  color: var(--gold);
  background: rgba(227, 194, 126, .07);
}

.has-dropdown {
  position: relative;
}

.has-dropdown>a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.has-dropdown>a::after {
  content: "↓";
  font-size: 0.65rem;
  opacity: 0.4;
  transition: transform .22s var(--ease);
}

.has-dropdown:hover>a::after {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  padding: 6px;
  background: rgba(11, 13, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .7), 0 0 0 1px rgba(227, 194, 126, .04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transform-origin: top left;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  z-index: 99999;
  pointer-events: none;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease), padding-left .15s var(--ease);
}

.dropdown a:hover {
  background: rgba(227, 194, 126, .08);
  color: var(--gold);
  padding-left: 18px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .44) 40%, rgba(0, 0, 0, .18) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-inner {
  border: 1px solid rgba(255, 255, 255, .07);
  padding: 100px 3vw 100px 5vw;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--r-lg);
  max-width: 1080px;
  margin: 0 auto;
  z-index: 3;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  line-height: 1.06;
  font-size: clamp(36px, 5.5vw, 64px);
  max-width: 980px;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .4);
}

.hero h1 .gold {
  color: var(--gold);
  text-shadow: 0 0 32px rgba(227, 194, 126, .2);
}

.hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  margin-top: 18px;
  line-height: 1.7;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.tag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: rgba(227, 194, 126, .72);
  font-size: 13px;
  margin-top: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(227, 194, 126, .18);
  border-radius: 999px;
  background: rgba(227, 194, 126, .06);
  letter-spacing: .04em;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero_kael_full.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-grad {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 255, 255, .04), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(227, 194, 126, .13), transparent 70%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 280px rgba(0, 0, 0, .65), inset 0 -200px 240px rgba(0, 0, 0, .5);
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url('../img/noise.png');
  opacity: .06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .4;
}

.p {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 194, 126, .65), rgba(227, 194, 126, 0) 60%);
  width: 10px;
  height: 10px;
  filter: blur(1px);
  animation: float 14s linear infinite;
}

@keyframes float {
  0% {
    transform: translate(var(--x0), var(--y0)) scale(.6);
    opacity: 0;
  }

  10% {
    opacity: .9;
  }

  60% {
    opacity: .6;
  }

  100% {
    transform: translate(var(--x1), var(--y1)) scale(1);
    opacity: 0;
  }
}

/* ===== SECTIONS ===== */
section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

section:first-of-type {
  border-top: none;
}

/* ===== CARDS ===== */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--r-lg);
  padding: 22px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  transition: transform .3s var(--ease-bounce), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .44);
  border-color: rgba(255, 255, 255, .14);
}

.card .head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card .head img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  transition: transform .3s var(--ease-bounce);
}

.card:hover .head img {
  transform: scale(1.12) rotate(-3deg);
}

.card .name {
  font-weight: 900;
  font-size: 18px;
  display: inline-block;
  padding-bottom: .2rem;
  border-bottom: 2px solid color-mix(in oklab, currentColor 35%, transparent);
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.card::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 200px;
  height: 200px;
  background-repeat: no-repeat;
  background-size: 200px;
  background-position: right bottom;
  opacity: .09;
  filter: grayscale(1) brightness(.85);
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

.card:hover::after {
  opacity: .18;
}

/* Clan name colors */
#universo .card:nth-child(1) .name {
  color: var(--hielo);
}

#universo .card:nth-child(2) .name {
  color: var(--sol);
}

#universo .card:nth-child(3) .name {
  color: var(--volcan);
}

#universo .card:nth-child(4) .name {
  color: var(--sombra);
}

#universo .card:nth-child(5) .name {
  color: var(--mar);
}

#universo .card:nth-child(6) .name {
  color: var(--pantano);
}

/* Clan card shadows */
#universo .card:nth-child(1) {
  box-shadow: 0 8px 24px rgba(143, 211, 255, .06);
}

#universo .card:nth-child(2) {
  box-shadow: 0 8px 24px rgba(255, 211, 106, .06);
}

#universo .card:nth-child(3) {
  box-shadow: 0 8px 24px rgba(255, 107, 107, .06);
}

#universo .card:nth-child(4) {
  box-shadow: 0 8px 24px rgba(184, 184, 196, .06);
}

#universo .card:nth-child(5) {
  box-shadow: 0 8px 24px rgba(107, 199, 255, .06);
}

#universo .card:nth-child(6) {
  box-shadow: 0 8px 24px rgba(155, 225, 93, .06);
}

#universo .card:nth-child(1):hover {
  box-shadow: 0 18px 44px rgba(143, 211, 255, .15);
}

#universo .card:nth-child(2):hover {
  box-shadow: 0 18px 44px rgba(255, 211, 106, .15);
}

#universo .card:nth-child(3):hover {
  box-shadow: 0 18px 44px rgba(255, 107, 107, .15);
}

#universo .card:nth-child(4):hover {
  box-shadow: 0 18px 44px rgba(184, 184, 196, .15);
}

#universo .card:nth-child(5):hover {
  box-shadow: 0 18px 44px rgba(107, 199, 255, .15);
}

#universo .card:nth-child(6):hover {
  box-shadow: 0 18px 44px rgba(155, 225, 93, .15);
}

/* Clan icon filters */
#universo .card:nth-child(1) .head img {
  filter: invert(84%) sepia(12%) saturate(734%) hue-rotate(175deg) brightness(104%) contrast(98%);
}

#universo .card:nth-child(2) .head img {
  filter: invert(87%) sepia(63%) saturate(426%) hue-rotate(357deg) brightness(101%) contrast(98%);
}

#universo .card:nth-child(3) .head img {
  filter: invert(65%) sepia(58%) saturate(1154%) hue-rotate(323deg) brightness(96%) contrast(101%);
}

#universo .card:nth-child(4) .head img {
  filter: invert(79%) sepia(6%) saturate(182%) hue-rotate(202deg) brightness(92%) contrast(90%);
}

#universo .card:nth-child(5) .head img {
  filter: invert(81%) sepia(14%) saturate(1421%) hue-rotate(179deg) brightness(101%) contrast(97%);
}

#universo .card:nth-child(6) .head img {
  filter: invert(83%) sepia(17%) saturate(830%) hue-rotate(55deg) brightness(101%) contrast(96%);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #111;
  padding: 11px 20px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 4px 18px rgba(227, 194, 126, .28);
  transition: transform .2s var(--ease-bounce), box-shadow .2s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(227, 194, 126, .4);
}

.btn:hover::after {
  background: rgba(255, 255, 255, .09);
}

.btn:active {
  transform: translateY(0);
}

.btn.alt {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: none;
}

.btn.alt:hover {
  border-color: var(--border-gold);
  background: rgba(227, 194, 126, .07);
  color: var(--gold);
  box-shadow: none;
}

/* ===== MISC ===== */
#mapa .container>div a[href*="inkarnate.com"] {
  display: none !important;
}

.libro-datos {
  margin: 12px 0 6px;
  padding-left: 18px;
  color: var(--muted);
}

.libro-datos li {
  margin: 6px 0;
  line-height: 1.65;
}

.pull {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(227, 194, 126, .05);
  border-radius: 0 10px 10px 0;
  color: rgba(236, 233, 226, .9);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ===== GALLERY SLIDER ===== */
.slider21x9 {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 16px auto 0;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  background: #111;
}

.slider21x9 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s var(--ease);
}

.slider21x9 img.is-active {
  opacity: 1;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: rgba(236, 233, 226, .55);
  text-align: center;
  font-size: 14px;
}

.social-links {
  text-align: center;
  margin-top: 14px;
}

.social-links p {
  color: rgba(227, 194, 126, .55);
  margin-bottom: 10px;
  font-size: 0.78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.social-links a {
  color: rgba(227, 194, 126, .65);
  font-size: 1.45rem;
  margin: 0 10px;
  display: inline-block;
  transition: color .25s var(--ease), transform .25s var(--ease-bounce);
}

.social-links a:hover {
  color: #fff;
  transform: scale(1.2) translateY(-2px);
}

/* ===== MOBILE ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background .2s;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, .07);
}

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 44px);
  }

  .hero p {
    font-size: 16px;
  }

  .hero-inner {
    padding: 52px 22px;
  }

  section {
    padding: 44px 0;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tagline {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 230px;
    background: rgba(11, 13, 16, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--r-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
    flex-direction: column;
    align-items: stretch;
    display: none;
    padding: 10px;
    gap: 4px;
  }

  .main-nav.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, .05);
  }

  .dropdown {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid rgba(227, 194, 126, .22);
    margin-left: 12px;
    padding-left: 8px;
    border-radius: 0;
    pointer-events: auto;
    background: transparent;
    backdrop-filter: none;
  }

  .has-dropdown.active .dropdown {
    display: flex;
    flex-direction: column;
  }

  .dropdown a {
    font-size: 0.8rem;
    padding: 7px 10px;
  }

  .dropdown a:hover {
    padding-left: 14px;
  }
}