/* Loyalty Interactive — editorial dark theme */
:root {
  --bg: #111110;
  --bg-2: #1b1a19;
  --bg-3: #252422;
  --paper: #efede8;
  --ink: #111110;
  --text: #ecebe7;
  --muted: #97948d;
  --line: #2f2e2c;
  --accent: #f4b62a;
  --accent-dark: #dc9c0e;
  --on-accent: #16130c;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: min(1280px, 100% - 64px); margin: 0 auto; }
.section { padding: 110px 0; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }

.kicker {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}
.kicker.dark { color: #9a6a00; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px 0 8px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
  border-radius: 4px; overflow: hidden;
  transition: background 0.25s;
}
.btn-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 3px;
  background: rgba(0, 0, 0, 0.18); font-size: 18px; line-height: 1;
  transition: transform 0.35s var(--ease);
}
.btn:hover { background: var(--accent-dark); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid #4a4845; padding: 0 22px; }
.btn-outline:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 48px; padding: 0 32px;
  background: linear-gradient(rgba(10, 10, 9, 0.7), rgba(10, 10, 9, 0));
  transition: background 0.35s, transform 0.4s var(--ease), border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(17, 17, 16, 0.96); border-color: var(--line); }
.nav.hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 40px; }
.brand span {
  font-family: var(--head); font-weight: 900; font-size: 13px; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.nav-links { display: flex; gap: 34px; margin-right: auto; }
.nav-links a {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: #cfccc6; position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.current { color: #fff; }
.nav-links a:hover::after, .nav-links a.current::after { transform: scaleX(1); }
.nav-cta {
  height: 38px; padding: 0 18px; display: inline-flex; align-items: center;
  background: var(--accent); color: var(--on-accent); border-radius: 4px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  transition: background 0.25s;
}
.nav-cta:hover { background: var(--accent-dark); }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; transition: transform 0.3s var(--ease), opacity 0.2s; }
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 25px; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero carousel ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; }
.slide { position: absolute; inset: 0; visibility: hidden; }
.slide.is-active { visibility: visible; z-index: 1; }
.slide.is-leaving { visibility: visible; z-index: 0; }
.slide-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1s ease, transform 7.5s linear;
}
.slide.is-active .slide-bg { opacity: 1; transform: scale(1); }
.slide.is-leaving .slide-bg { opacity: 0; transition: opacity 1s ease; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 9, 0.85) 0%, rgba(10, 10, 9, 0.35) 55%, rgba(10, 10, 9, 0) 80%),
    linear-gradient(0deg, rgba(17, 17, 16, 1) 0%, rgba(17, 17, 16, 0) 30%);
}
.slide-content {
  position: absolute; z-index: 2; left: max(32px, (100% - 1280px) / 2); bottom: 20%;
  max-width: 620px;
}
.slide-content > * { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.8s var(--ease); }
.slide.is-active .slide-content > * { opacity: 1; transform: none; }
.slide.is-active .slide-content > :nth-child(1) { transition-delay: 0.25s; }
.slide.is-active .slide-content > :nth-child(2) { transition-delay: 0.35s; }
.slide.is-active .slide-content > :nth-child(3) { transition-delay: 0.45s; }
.slide.is-active .slide-content > :nth-child(4) { transition-delay: 0.55s; }
.slide-content h1 { font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 900; letter-spacing: -0.035em; line-height: 0.95; margin-bottom: 20px; }
.slide-content p { font-size: clamp(1rem, 1.4vw, 1.2rem); color: #d9d6d0; max-width: 460px; margin-bottom: 32px; }

.hero-bars {
  position: absolute; z-index: 3; bottom: 40px; left: max(32px, (100% - 1280px) / 2); right: max(32px, (100% - 1280px) / 2);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hero-bars button { background: none; border: 0; cursor: pointer; text-align: left; padding: 10px 0; }
.hero-bars i { display: block; height: 3px; background: rgba(255, 255, 255, 0.25); position: relative; overflow: hidden; margin-bottom: 10px; }
.hero-bars i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
.hero-bars span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.5); transition: color 0.3s; }
.hero-bars button.active span, .hero-bars button:hover span { color: #fff; }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.link-small {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 14px; background: var(--bg-3); border-radius: 4px; transition: background 0.25s;
}
.link-small:hover { background: var(--accent); color: var(--on-accent); }

.badge {
  display: inline-block; margin-right: 10px; padding: 4px 8px; border-radius: 3px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.badge.on-img { position: absolute; z-index: 1; top: 16px; left: 16px; margin: 0; }
.img-wrap { position: relative; }

/* ---------- Image wrappers ---------- */
.img-wrap { overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
.wipe.in, .in .wipe { clip-path: inset(0 0 0 0); }

/* ---------- News ---------- */
.news { background: var(--bg); }
.news-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 32px; }
.news-feature .img-wrap { aspect-ratio: 16 / 9; margin-bottom: 22px; }
.news-feature h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin-bottom: 12px; transition: color 0.25s; }
.news-feature:hover img, .news-item:hover img { transform: scale(1.05); }
.news-feature:hover h3, .news-item:hover h4 { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.meta b { color: var(--text); font-weight: 600; }
.news-list { display: grid; gap: 16px; align-content: start; }
.news-item {
  display: grid; grid-template-columns: 1fr 150px; gap: 18px; align-items: center;
  padding: 16px; background: var(--bg-2); border-radius: 4px; transition: background 0.25s;
}
.news-item:hover { background: var(--bg-3); }
.news-item h4 { font-size: 17px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.news-item .img-wrap { aspect-ratio: 16 / 10; }

/* ---------- Game tiles ---------- */
.games { background: var(--bg-2); }
.game-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.5s; filter: saturate(0.85); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 10, 9, 0.92) 0%, rgba(10, 10, 9, 0) 55%); }
.tile-info { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px; }
.tile-info h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.platform { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: #cfccc6; margin-bottom: 8px; }
.tile::before {
  content: ""; position: absolute; z-index: 2; left: 0; bottom: 0; height: 4px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.tile:hover img { transform: scale(1.06); filter: saturate(1.05); }
.tile:hover::before { transform: scaleX(1); }

/* ---------- Game detail ---------- */
.game { border-top: 1px solid var(--line); }
.game-top { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; margin-bottom: 56px; }
.game-top.reverse .game-text { order: 2; }
.game-text h2 { margin-bottom: 20px; }
.lead { font-size: 1.15rem; color: #fff; font-weight: 500; margin-bottom: 16px; }
.game-text p:not(.lead) { color: #b6b3ac; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 30px 0 34px; border-top: 1px solid var(--line); }
.facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 4px; }
.facts dd { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.game-cover .img-wrap { aspect-ratio: 460 / 215; }
.game-icon { justify-self: center; }
.game-icon img { width: min(300px, 60vw); border-radius: 22%; transition: transform 0.6s var(--ease); }
.game-icon:hover img { transform: rotate(-3deg) scale(1.03); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; cursor: zoom-in;
  background: var(--bg-3);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease), filter 0.3s;
  transition-delay: var(--d, 0s);
}
.gallery img.in { opacity: 1; transform: none; }
.gallery img.in:hover { filter: brightness(1.12); transition-delay: 0s; }

/* ---------- Studio (light) ---------- */
.studio { background: var(--paper); color: var(--ink); padding: 120px 0; }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.studio h2 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 900; }
.studio-body p { font-size: 1.1rem; color: #3b3a37; }
.studio-body p + p { margin-top: 18px; }
.studio-body .btn { margin-top: 32px; }

/* ---------- Contact ---------- */
.contact-title { font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 900; margin-bottom: 40px; }
.mail {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--head); font-weight: 700; font-size: clamp(1.1rem, 3vw, 2.2rem);
  padding-bottom: 10px; border-bottom: 3px solid var(--accent);
  word-break: break-all; transition: color 0.25s;
}
.mail .btn-arrow { background: var(--accent); color: var(--on-accent); flex-shrink: 0; }
.mail:hover { color: var(--accent); }
.mail:hover .btn-arrow { transform: translate(3px, -3px); }
.links { list-style: none; margin-top: 72px; border-top: 1px solid var(--line); }
.links a {
  display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease), color 0.25s;
}
.links span { font-family: var(--head); font-weight: 800; font-size: clamp(1.2rem, 2.4vw, 1.8rem); }
.links em { font-style: normal; color: var(--muted); font-size: 14px; }
.links i { font-style: normal; font-size: 20px; color: var(--muted); transition: transform 0.35s var(--ease), color 0.25s; }
.links a:hover { padding-left: 16px; color: #fff; }
.links a:hover i { color: var(--accent); transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.footer { background: #0b0b0a; border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer-logo { width: 150px; opacity: 0.9; }
.footer nav { display: flex; gap: 24px; margin-right: auto; }
.footer nav a { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); transition: color 0.2s; }
.footer nav a:hover { color: #fff; }
.footer p { font-size: 13px; color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(8, 8, 7, 0.95);
  display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: 88vw; }
.lightbox img { max-width: 88vw; max-height: 80vh; border-radius: 3px; transform: scale(0.97); transition: transform 0.4s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox figcaption { margin-top: 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--bg-3); font-size: 18px; transition: background 0.2s;
}
.lightbox button:hover { background: var(--accent); color: var(--on-accent); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lb-next { right: 20px; top: 50%; translate: 0 -50%; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .news-grid, .game-top, .studio-grid { grid-template-columns: 1fr; gap: 40px; }
  .game-top.reverse .game-text { order: 0; }
  .game-tiles { grid-template-columns: 1fr 1fr; }
  .game-tiles .tile:last-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  :root { --nav-h: 62px; }
  .wrap { width: calc(100% - 40px); }
  .section { padding: 80px 0; }
  .nav { padding: 0 20px; gap: 16px; }
  .nav-cta { margin-left: auto; }
  .burger { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 20px; background: var(--bg);
    transform: translateX(100%); transition: transform 0.45s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-family: var(--head); font-size: 28px; font-weight: 800; text-transform: none; letter-spacing: -0.01em; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .slide-content { left: 20px; right: 20px; bottom: 140px; }
  .hero-bars { left: 20px; right: 20px; bottom: 24px; gap: 10px; }
  .hero-bars span { font-size: 10px; }
  .game-tiles { grid-template-columns: 1fr; }
  .game-tiles .tile, .game-tiles .tile:last-child { grid-column: auto; aspect-ratio: 16 / 10; }
  .news-item { grid-template-columns: 1fr 110px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .facts { grid-template-columns: 1fr; }
  .links a { grid-template-columns: 1fr auto; }
  .links em { display: none; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
