/* =========================================================
   Soulgrave — shared stylesheet
   Fonts: Germania One (display), Inter (UI/body), Roboto (rich text), Pixelify Sans (game accent)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Germania+One&family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Pixelify+Sans:wght@500;600;700&display=swap');

:root {
  --color-bg: #08090a;
  --color-bg-pure: #000000;
  --color-bg-section: #121016;
  --color-white: #ffffff;
  --color-muted-80: rgba(255, 255, 255, 0.8);
  --color-muted-60: rgba(255, 255, 255, 0.6);
  --color-muted-55: rgba(255, 255, 255, 0.55);
  --color-cta: #372659;
  --color-footer-bg: #0B0812;
  --color-tag-new: #372659;
  --color-tag-wip: #500003;
  --color-card-bg: #000000;
  --color-card-soft: rgba(255, 255, 255, 0.05);
  --font-display: 'Germania One', 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-rich: 'Roboto', 'Inter', sans-serif;
  --font-pixel: 'Pixelify Sans', 'Inter', sans-serif;
  --container-max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--banner-offset, 0px);
}

body.page-home {
  background: var(--color-bg-pure);
}

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

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
}

/* Subtle grain/texture background used on inner content pages */
.texture-bg {
  position: relative;
}

.texture-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/bg-texture.jpg') repeat;
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

.texture-bg > * {
  position: relative;
  z-index: 1;
}

/* =========================================================
   Layout helpers
   ========================================================= */

.container {
  width: 90%;
  margin: 0 auto;
  padding: 0 64px;
}

@media (max-width: 1023px) {
  .container {
    width: 100%;
    padding: 0 32px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 24px;
  }
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.section-divider h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.8px;
  color: var(--color-white);
  white-space: nowrap;
  margin: 0;
}

@media (max-width: 767px) {
  .section-divider h2 {
    font-size: 32px;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cta);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.2px;
  padding: 12px 40px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.15);
}

@media (max-width: 767px) {
  .btn-primary {
    font-size: 24px;
    letter-spacing: -0.12px;
    width: 100%;
  }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--color-cta);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.09px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =========================================================
   Announcement banner
   ========================================================= */

.site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  width: 100%;
  padding: 12px 56px;
  background: var(--color-cta);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  text-align: center;
}

.site-banner p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.site-banner-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.site-banner-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-white);
  opacity: 0.7;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.site-banner-close:hover {
  opacity: 1;
}

.site-banner.is-hidden {
  display: none;
  position: static;
}

@media (max-width: 767px) {
  .site-banner {
    padding: 10px 44px;
  }

  .site-banner p,
  .site-banner-link {
    font-size: 13px;
  }
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  margin: 0 auto;
  padding: 24px 64px;
  position: relative;
  z-index: 2;
}

@media (max-width: 1023px) {
  .site-header {
    width: 100%;
  }
}

.site-header .logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch a:hover {
  color: var(--color-white);
}

.lang-switch a[aria-current="page"] {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.14);
}

.lang-switch-sep {
  color: rgba(255, 255, 255, 0.3);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.08px;
  color: var(--color-white);
  white-space: nowrap;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-link::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -5px;
  transition: transform 0.15s ease;
}

.nav-item.open .nav-link::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.nav-dropdown {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(0, 0, 0, 0.92);
  border-radius: 12px;
  padding: 8px;
  z-index: 5;
}

.nav-item.open .nav-dropdown {
  display: flex;
}

.nav-dropdown a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav-dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .site-header {
    padding: 24px 32px;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding: 20px 24px;
  }

  .header-end {
    gap: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(0, 0, 0, 0.92);
    border-radius: 0 0 16px 16px;
    padding: 8px 20px 20px;
  }

  .site-header.nav-open nav {
    display: flex;
  }

  .nav-item {
    position: static;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 4px;
  }

  .nav-dropdown {
    position: static;
    background: transparent;
    padding: 0 4px 12px 16px;
  }

  .nav-dropdown a {
    padding: 8px 0;
  }
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--color-footer-bg);
  padding: 0 64px 60px;
}

.footer-inner {
  display: flex;
  gap: 120px;
  align-items: flex-start;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 80px 0;
  width: 90%;
  margin: 0 auto;
}

@media (max-width: 1023px) {
  .footer-inner {
    width: 100%;
  }
}

.footer-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.48px;
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-brand .tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.08px;
  color: var(--color-muted-55);
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 197px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.08px;
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0 0 8px;
  padding-bottom: 8px;
}

.footer-col a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.08px;
  color: var(--color-muted-55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 1023px) {
  .site-footer {
    padding: 0 32px 96px;
  }

  .footer-inner {
    gap: 96px;
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding: 0 24px 64px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 64px;
    padding: 64px 0;
  }

  .footer-nav {
    flex-direction: column;
    gap: 28px;
  }

  .footer-col {
    width: 100%;
  }
}

/* =========================================================
   Home page
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.8) 100%),
    url('../assets/images/main-hero.png') center / cover no-repeat;
  transition: transform 1.2s ease;
}

.hero:hover::before {
  transform: scale(1.03);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 220px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-bg-pure) 100%);
  pointer-events: none;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding: 40px 64px 96px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 88px;
  line-height: 1.1;
  letter-spacing: -1.76px;
  margin: 0;
  color: var(--color-white);
}

.hero-content .hero-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.1px;
  color: var(--color-muted-80);
  max-width: 640px;
  margin: -8px auto 0;
}

.hero-content .btn-primary {
  font-size: 24px;
  padding: 8px 28px;
  border-radius: 10px;
}

@media (max-width: 1023px) {
  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 32px 32px 72px;
  }

  .hero-content h1 {
    font-size: 64px;
    letter-spacing: -1.28px;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 440px;
  }

  .hero-content {
    padding: 24px 24px 48px;
    gap: 20px;
  }

  .hero-content h1 {
    font-size: 44px;
    letter-spacing: -0.88px;
  }

  .hero-content .hero-tagline {
    font-size: 16px;
    margin-top: -4px;
  }

  .hero-content .btn-primary {
    font-size: 18px;
    padding: 8px 20px;
    width: auto;
  }
}

.hero-images {
  overflow: hidden;
  padding: 32px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
}

.hero-images-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: hero-scroll 147s linear infinite;
}

.hero-images:hover .hero-images-track {
  animation-play-state: paused;
}

.hero-image-item {
  position: relative;
  width: 305px;
  height: 305px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.hero-images-track img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-item:hover {
  transform: scale(1.06);
  z-index: 1;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hero-image-item:hover .hero-image-overlay,
.hero-image-item:focus-within .hero-image-overlay {
  opacity: 1;
}

.hero-image-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.25;
  color: #fff;
}

.hero-image-desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes hero-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-images-track {
    animation: none;
  }

  .hero-image-item {
    transition: none;
  }

  .hero-image-item:hover {
    transform: none;
  }

  .hero-image-overlay {
    transition: none;
  }

  .lightbox-backdrop,
  .lightbox-panel {
    animation: none;
  }

  .lightbox-media,
  .lightbox-text {
    transition: none;
  }

  .lightbox-panel.is-switching .lightbox-media,
  .lightbox-panel.is-switching .lightbox-text {
    transform: none;
  }
}

@media (max-width: 1023px) {
  .hero-image-item {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 767px) {
  .hero-images {
    padding: 24px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  }

  .hero-images-track {
    gap: 12px;
    animation-duration: 105s;
  }

  .hero-image-item {
    width: 200px;
    height: 269px;
  }

  .hero-image-overlay {
    padding: 12px;
  }

  .hero-image-title {
    font-size: 14px;
  }

  .hero-image-desc {
    font-size: 12px;
    -webkit-line-clamp: 4;
  }
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  padding: 64px;
}

.world-section {
  background: var(--color-bg-section);
}

.section-separator {
  display: block;
  width: 100%;
  height: auto;
  margin: -2.2vw 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 1023px) {
  .feature-cards {
    padding: 60px 32px;
  }
}

@media (max-width: 767px) {
  .feature-cards {
    padding: 32px 24px;
    gap: 32px;
  }
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 20px;
  width: 100%;
}

.bento-tile {
  position: relative;
  display: block;
  grid-column: span 1;
  grid-row: span 1;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: var(--color-card-bg);
}

.bento-tile.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bento-tile:hover img {
  transform: scale(1.05);
}

.bento-tile.bento-soon img {
  filter: grayscale(35%) brightness(0.6);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
}

.bento-tile .bento-overlay h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.44px;
  color: var(--color-white);
  margin: 0;
}

.bento-tile.bento-large .bento-overlay h3 {
  font-size: 32px;
  letter-spacing: -0.64px;
}

.bento-tile .bento-overlay p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-muted-80);
  margin: 0;
}

.bento-badge {
  align-self: flex-start;
  background: var(--color-tag-wip);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 2px;
}

@media (max-width: 1023px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .bento-tile.bento-large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 767px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
    gap: 12px;
  }

  .bento-tile.bento-large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-overlay {
    padding: 14px;
  }

  .bento-overlay h3 {
    font-size: 18px;
  }

  .bento-tile.bento-large .bento-overlay h3 {
    font-size: 22px;
  }

  .bento-overlay p {
    display: none;
  }
}

.extra-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  align-items: start;
}

.extra-content .card-generic .thumb {
  flex: none;
  height: auto;
}

.extra-content .card-generic .thumb img {
  height: auto;
  object-fit: contain;
}

.extra-content .card-generic:nth-child(1) .thumb {
  aspect-ratio: 775 / 584;
}

.extra-content .card-generic:nth-child(2) .thumb {
  aspect-ratio: 1232 / 928;
}

@media (max-width: 1023px) {
  .extra-content {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
}

.rpg-feature {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.rpg-feature .card-generic.featured {
  width: 100%;
}

.rpg-feature .card-generic .thumb {
  min-height: 320px;
}

.rpg-feature .card-generic.featured .thumb {
  width: 100%;
  min-height: 0;
  aspect-ratio: 2276 / 939;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpg-feature .card-generic.featured .thumb-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.rpg-feature .card-generic.featured .thumb-poster {
  position: relative;
  z-index: 1;
  width: 80%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.55));
  transition: transform 0.4s ease;
}

.rpg-feature .card-generic.featured:hover .thumb-bg {
  transform: scale(1.05);
}

.rpg-feature .card-generic.featured:hover .thumb-poster {
  transform: scale(1.06);
}

.rpg-feature .card-generic.featured .featured-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 40px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 80%);
  transition: background 0.3s ease;
}

.rpg-feature .card-generic.featured:hover .featured-overlay,
.rpg-feature .card-generic.featured:focus-within .featured-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%);
}

.rpg-feature .card-generic.featured .featured-overlay h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.56px;
  color: var(--color-white);
}

.rpg-feature .card-generic.featured .featured-overlay p {
  margin: 0;
  max-width: 560px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-muted-80);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.8em;
  transition: max-height 0.35s ease;
}

.rpg-feature .card-generic.featured:hover .featured-overlay p,
.rpg-feature .card-generic.featured:focus-within .featured-overlay p {
  -webkit-line-clamp: unset;
  max-height: 200px;
}

.rpg-components {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.rpg-components .card-generic {
  flex: 1;
}

.rpg-components .card-generic .text {
  flex: 1;
}

.rpg-components .card-generic .thumb {
  flex: none;
  height: 160px;
}

.rpg-components .card-generic .thumb img {
  transition: transform 0.4s ease;
}

.rpg-components .card-generic:hover .thumb img {
  transform: scale(1.08);
}


.card-generic.wide {
  width: 100%;
  flex-direction: row;
}

.card-generic.wide .text {
  flex: 1;
  justify-content: center;
}

.card-generic.wide .thumb {
  flex: 0 0 340px;
  min-height: 0;
}

.card-generic.wide .thumb img {
  transition: transform 0.4s ease;
}

.card-generic.wide:hover .thumb img {
  transform: scale(1.08);
}

@media (max-width: 767px) {
  .rpg-components {
    flex-direction: column;
  }

  .card-generic.wide {
    flex-direction: column;
  }

  .card-generic.wide .thumb {
    flex: none;
    height: 200px;
  }

  .rpg-feature .card-generic.featured .thumb {
    aspect-ratio: 1 / 1;
  }

  .rpg-feature .card-generic.featured .thumb-poster {
    width: 85%;
    height: 85%;
  }

  .rpg-feature .card-generic.featured .featured-overlay {
    padding: 20px;
  }

  .rpg-feature .card-generic.featured .featured-overlay h3 {
    font-size: 20px;
  }

  .rpg-feature .card-generic.featured .featured-overlay p {
    font-size: 14px;
  }
}

.card-generic {
  background: var(--color-card-soft);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  outline: 1px solid rgba(255, 255, 255, 0.15);
}

.card-generic .text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-card-bg);
}

.card-generic .text h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.4px;
  margin: 0;
}

.card-badge {
  align-self: flex-start;
  background: var(--color-tag-new);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-generic.featured .text {
  gap: 12px;
}

.card-generic.featured .text p {
  color: var(--color-muted-80);
}

.card-generic .text.pixel h4 {
  font-family: var(--font-pixel);
}

.card-generic .text p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.09px;
  color: var(--color-muted-55);
  margin: 0;
}

.card-generic .thumb {
  flex: 1;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.card-generic .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-generic .thumb .screen-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-1.1deg);
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-generic.no-thumb {
  min-height: 200px;
  justify-content: center;
}

@media (max-width: 767px) {
  .card-generic .text {
    padding: 24px;
  }
}

/* =========================================================
   Placeholder pages (sections not built out yet)
   ========================================================= */

.placeholder-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 80px 24px;
}

.placeholder-page h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  margin: 0;
  color: var(--color-white);
}

.placeholder-page p {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-muted-60);
  margin: 0;
}

@media (max-width: 767px) {
  .placeholder-page h1 {
    font-size: 40px;
  }
}

/* =========================================================
   Wiki article template (Sobre el mundo entries)
   ========================================================= */

.wiki-article {
  width: 90%;
  margin: 0 auto;
  padding: 64px 64px 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.article-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted-60);
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
}

.article-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  letter-spacing: -1.28px;
  line-height: 1.1;
  margin: 0;
  color: var(--color-white);
}

.article-dek {
  font-family: var(--font-rich);
  font-weight: 400;
  font-size: 20px;
  color: var(--color-muted-80);
  margin: 0;
}

.article-hero {
  width: 100%;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  align-items: start;
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-figure {
  margin: 8px 0;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.article-figure.float-right,
.article-figure.float-left {
  width: 100%;
  margin: 8px 0;
}

.article-figure figcaption {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-muted-55);
  margin-top: 8px;
}

.article-aside {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-panel {
  background: var(--color-card-soft);
  border-radius: 16px;
  padding: 24px;
}

.aside-panel .panel-cover {
  display: block;
  width: calc(100% + 48px);
  max-width: calc(100% + 48px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: -24px -24px 20px;
  border-radius: 16px 16px 0 0;
}

.aside-panel h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted-60);
  margin: 0 0 14px;
}

.aside-toc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aside-toc a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-muted-80);
  text-decoration: none;
}

.aside-toc a:hover {
  color: var(--color-white);
}

.aside-facts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.aside-facts dt {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted-55);
  margin: 0 0 2px;
}

.aside-facts dd {
  font-family: var(--font-rich);
  font-size: 15px;
  color: var(--color-muted-80);
  margin: 0;
}

.article-body p {
  font-family: var(--font-rich);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-muted-80);
  margin: 0;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.64px;
  color: var(--color-white);
  margin: 12px 0 0;
}

.article-quote {
  font-family: var(--font-rich);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.5;
  color: var(--color-white);
  border-left: 3px solid var(--color-cta);
  padding: 4px 0 4px 24px;
  margin: 8px 0;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  font-family: var(--font-rich);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-muted-80);
}

.article-list li strong {
  color: var(--color-white);
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.48px;
  color: var(--color-white);
  margin: 4px 0 0;
}

.race-carousel-viewport {
  display: flex;
  align-items: center;
  gap: 12px;
}

.race-carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px;
  scrollbar-width: none;
}

.race-carousel-track::-webkit-scrollbar {
  display: none;
}

.race-carousel-card {
  position: relative;
  flex: 0 0 150px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  background: var(--color-card-bg);
}

.race-carousel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.race-carousel-card:hover img {
  transform: scale(1.06);
}

.race-carousel-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
}

.race-carousel-arrow {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--color-card-soft);
  color: var(--color-white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.race-carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 767px) {
  .race-carousel-card {
    flex-basis: 120px;
  }

  .race-carousel-arrow {
    display: none;
  }
}

.article-table-wrap {
  overflow-x: auto;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-rich);
  font-size: 16px;
}

.article-table th,
.article-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-muted-80);
}

.article-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-muted-60);
}

.article-table td:first-child,
.article-table th:first-child {
  color: var(--color-white);
  white-space: nowrap;
}

.example-roll {
  background: var(--color-card-soft);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-roll p {
  margin: 0;
}

.dice-set {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.die {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  outline: 1px solid rgba(255, 255, 255, 0.15);
}

.die.success {
  background: var(--color-cta);
  outline-color: transparent;
}

.die.advantage {
  box-shadow: 0 0 0 2px var(--color-white) inset;
}

.die.desventaja {
  background: var(--color-tag-wip);
  outline-color: transparent;
}

.die.cancelled {
  opacity: 0.4;
  text-decoration: line-through;
}

.dice-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--color-muted-60);
  text-transform: uppercase;
}

.dice-roller {
  background: var(--color-card-soft);
  border-radius: 12px;
  outline: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.dice-roller .dice-set {
  gap: 14px;
}

.dice-roller .die {
  min-width: 64px;
  height: 64px;
  font-size: 28px;
  border-radius: 12px;
  transition: transform 0.15s ease;
}

.dice-roller-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.dice-roller-image[hidden] {
  display: none;
}

.dice-roller-result {
  font-family: var(--font-rich);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-white);
  margin: 0;
  min-height: 26px;
}

@media (max-width: 480px) {
  .dice-roller .die {
    min-width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

.article-note {
  background: rgba(80, 0, 3, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-muted-80);
}

.article-back {
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .wiki-article {
    width: 100%;
    padding: 48px 32px 72px;
  }

  .article-header h1 {
    font-size: 48px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-panel {
    flex: 1 1 220px;
  }
}

@media (max-width: 767px) {
  .wiki-article {
    padding: 32px 24px 56px;
    gap: 28px;
  }

  .article-header h1 {
    font-size: 36px;
    letter-spacing: -0.72px;
  }

  .article-dek {
    font-size: 17px;
  }

  .article-body p,
  .article-list li {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: 26px;
  }

  .article-body h3 {
    font-size: 20px;
  }

  .article-table {
    font-size: 14px;
  }

  .article-table th,
  .article-table td {
    padding: 10px 12px;
  }

  .article-quote {
    font-size: 19px;
  }

  .article-aside {
    flex-direction: column;
  }
}

/* =========================================================
   Juego de rol — hub page
   ========================================================= */

.download-panel {
  background: linear-gradient(160deg, rgba(55, 38, 89, 0.45), var(--color-card-soft));
}

.download-panel p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-muted-80);
  margin: 0 0 16px;
}

.card-badge.badge-wip {
  background: var(--color-tag-wip);
}

.card-generic.is-soon .thumb img {
  filter: grayscale(35%) brightness(0.6);
}

.highlight-card {
  background: var(--color-card-soft);
  border-radius: 16px;
  outline: 1px solid rgba(255, 255, 255, 0.12);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-card h3 {
  margin: 0;
}

@media (max-width: 767px) {
  .highlight-card {
    padding: 24px;
  }
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 8px 0;
}

.pillar-card {
  background: var(--color-card-soft);
  border-radius: 16px;
  outline: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pillar-card h3 {
  margin: 0;
}

@media (max-width: 767px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pillar-card {
    padding: 20px;
  }
}

.manual-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 64px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 100%),
    url('../assets/images/portada-sepulcro-fondo.png') center / cover no-repeat;
}

.manual-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 480px;
}

.manual-banner-content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.72px;
  color: var(--color-white);
  margin: 0;
}

.manual-banner-content p {
  font-family: var(--font-rich);
  font-size: 16px;
  color: var(--color-muted-80);
  margin: 0;
}

.manual-banner .btn-primary {
  font-size: 22px;
  padding: 10px 32px;
}

@media (max-width: 767px) {
  .manual-banner {
    padding: 48px 24px;
  }

  .manual-banner-content h2 {
    font-size: 28px;
  }
}

/* =========================================================
   Sobre el mundo — hub page
   ========================================================= */

.section-copy {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-copy p {
  font-family: var(--font-rich);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-muted-80);
  margin: 0;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: var(--color-card-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.img-placeholder.ratio-wide {
  aspect-ratio: 21 / 9;
}

.img-placeholder span {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--color-muted-55);
  max-width: 480px;
}

.card-generic .thumb .img-placeholder,
.bento-tile .img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.bento-tile .img-placeholder span {
  max-width: 160px;
}

.places-grid {
  grid-auto-rows: 220px;
}

.razas-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
}

.razas-grid .bento-tile {
  aspect-ratio: 2 / 1;
}

.razas-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.article-layout.single-col {
  grid-template-columns: 1fr;
}

.religion-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.religion-card {
  display: flex;
  align-items: stretch;
  min-height: 300px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-card-bg);
  text-decoration: none;
  color: inherit;
}

.religion-card.reverse {
  flex-direction: row-reverse;
}

.religion-card-media {
  flex: 1 1 60%;
  position: relative;
  overflow: hidden;
}

.religion-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.religion-pair .bento-tile {
  aspect-ratio: 2 / 1;
}

.religion-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.religion-card:hover .religion-card-media img {
  transform: scale(1.05);
}

.religion-card-media .img-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.religion-card-text {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 40px;
}

.religion-card-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--color-white);
  margin: 0;
}

.religion-card-text p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-muted-80);
  margin: 0;
}

.religion-card-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1023px) {
  .religion-card-text {
    padding: 28px;
  }
}

@media (max-width: 767px) {
  .places-grid {
    grid-auto-rows: 180px;
  }

  .razas-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .religion-card {
    flex-direction: column;
    min-height: 0;
  }

  .religion-card-media {
    aspect-ratio: 16 / 9;
    flex: none;
  }

  .religion-card-text {
    padding: 24px;
  }

  .religion-pair {
    grid-template-columns: 1fr;
  }
}

.placeholder-label {
  font-style: italic;
  color: var(--color-muted-55) !important;
}

.btn-secondary.btn-inline {
  width: auto;
  align-self: flex-start;
  flex: none;
  padding: 10px 20px;
  font-size: 15px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0 0;
}

.section-heading h2 {
  margin: 0;
}

a.img-placeholder {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.img-placeholder:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.img-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
}

.img-frame.ratio-wide {
  aspect-ratio: 21 / 9;
}

.img-frame.ratio-book {
  aspect-ratio: 4 / 3;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

a.img-frame:hover img {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* =========================================================
   Lightbox — preview popup opened from carousel images
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  border: none;
  padding: 0;
  cursor: pointer;
  animation: lightbox-fade-in 0.2s ease;
}

.lightbox-arrow {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  margin: 0 16px;
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-arrow:hover {
  color: var(--color-muted-80);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 90vw);
  max-height: 85vh;
  display: flex;
  background: var(--color-card-bg);
  border-radius: 16px;
  overflow: hidden;
  outline: 1px solid rgba(255, 255, 255, 0.15);
  animation: lightbox-pop-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes lightbox-fade-in {
  from {
    opacity: 0;
  }
}

@keyframes lightbox-pop-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-white);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-media {
  flex: 1.4;
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-text {
  flex: 1;
  min-width: 280px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.lightbox-text[hidden],
[data-lightbox-link][hidden] {
  display: none;
}

.lightbox-panel.is-switching .lightbox-media,
.lightbox-panel.is-switching .lightbox-text {
  opacity: 0;
  transform: translateX(8px);
}

.lightbox-text h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.48px;
  margin: 0;
}

.lightbox-text p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-muted-80);
  margin: 0;
  flex: 1;
}

.lightbox-text .btn-inline {
  align-self: flex-start;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .lightbox-arrow {
    display: none;
  }

  .lightbox-panel {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }

  .lightbox-media {
    flex: none;
    height: 240px;
  }
}

@media (max-width: 767px) {
  .lightbox-text {
    padding: 24px;
  }
}

/* =========================================================
   Aspectos y estadísticas (páginas de raza)
   ========================================================= */

.tools-panel p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-muted-80);
  margin: 0 0 16px;
}

.tools-panel .btn-secondary + .btn-secondary {
  margin-top: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-tile {
  background: var(--color-card-soft);
  border-radius: 12px;
  outline: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.stat-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted-55);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-white);
}

.aspectos-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.aspecto-card {
  padding: 22px 24px;
  gap: 10px;
}

.aspecto-card h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--color-white);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.aspecto-card p {
  font-family: var(--font-rich);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-muted-80);
  margin: 0;
}

@media (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .aspectos-list {
    grid-template-columns: 1fr;
  }
}


