/* =========================================================================
   xTakker — shared site styles
   Dead by Daylight fan site. Design ported from the Claude Design prototype.
   Fonts: Oswald (display) + Barlow (text), loaded per page via <link>.
   ========================================================================= */

:root {
  --bg: #08060a;
  --ink: #f3eff0;
  --ink-strong: #f6f2f3;
  --muted: rgba(238, 232, 234, 0.78);
  --muted-soft: rgba(214, 204, 210, 0.82);
  --red: #e11d2e;
  --red-hot: #ff2a3d;
  --hairline: rgba(255, 255, 255, 0.08);
  --panel: linear-gradient(160deg, rgba(26, 11, 15, 0.70) 0%, rgba(12, 8, 10, 0.78) 80%);
  --panel-soft: linear-gradient(160deg, rgba(24, 11, 15, 0.60) 0%, rgba(11, 8, 10, 0.72) 80%);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
  font-family: 'Barlow', system-ui, sans-serif;
  color: var(--ink);
}
a { color: inherit; }
img { max-width: 100%; }

@keyframes up   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop  { 0% { opacity: 0; transform: scale(.82); } 60% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
@keyframes glow { 0% { opacity: .45; } 50% { opacity: .9; } 100% { opacity: .45; } }

/* Entrance helper + stagger */
.up   { animation: up .65s ease-out both; }
.d1   { animation-delay: .06s; }
.d2   { animation-delay: .12s; }
.d3   { animation-delay: .18s; }
.d4   { animation-delay: .24s; }

/* ---------- Fixed atmospheric background (injected by site.js) ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg__art {
  position: absolute; inset: -4%;
  background-image: url('../uploads/DBD_CH_31_Key_Art_WEBSITE_1920x1080_FINAL_f412e55650.png');
  background-size: cover; background-position: 60% 22%;
  filter: blur(4px) brightness(0.32) saturate(0.9);
  transform: scale(1.06);
  will-change: transform;
}
.bg__grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,6,10,0.90) 0%, rgba(6,4,7,0.94) 50%, rgba(5,3,6,0.97) 100%);
}
.bg__glow {
  position: absolute; inset: 0;
  background: radial-gradient(58% 55% at 50% 22%, rgba(225,29,46,0.13) 0%, rgba(225,29,46,0) 60%);
  will-change: transform;
}
.bg__grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page { position: relative; width: 100%; min-height: 100vh; overflow: hidden; }

/* ---------- Navigation (injected by site.js) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(24px, 4.5vw, 64px);
  border-bottom: 1px solid rgba(255,255,255,0);
  background: rgba(8,6,10,0);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav.is-scrolled {
  background: rgba(8,6,10,0.92);
  border-bottom-color: rgba(255,255,255,0.07);
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand__logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(225,29,46,0.4); }
.brand__name { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink); }
.brand__name span { color: var(--red); }

.nav__center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px);
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap;
}
.nav__link { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav__link:hover, .nav__link.is-active { color: #fff; }
.nav__link--about { display: inline-flex; align-items: center; gap: 8px; }
.nav__link--about img { height: 22px; width: auto; border-radius: 5px; flex: 0 0 auto; }

.nav__right {
  display: flex; align-items: center; gap: 16px;
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap; flex: 0 0 auto;
}
.cta {
  display: inline-flex; align-items: center; gap: 8px; color: #fff;
  background: var(--red); padding: 11px 22px; border-radius: 4px; text-decoration: none;
  box-shadow: 0 8px 26px rgba(225,29,46,0.4);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.cta:hover { background: var(--red-hot); transform: translateY(-2px); box-shadow: 0 12px 34px rgba(225,29,46,0.55); }

/* "EN DIRECTO" badge — hidden until site.js sees xTakker is live */
.live {
  align-items: center; gap: 8px;
  font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: 1.6px; text-transform: uppercase; color: #fff; text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(225,29,46,0.14); border: 1px solid rgba(225,29,46,0.55);
  transition: background .18s, border-color .18s, transform .18s;
}
.live:not([hidden]) { display: inline-flex; }
.live:hover { background: rgba(225,29,46,0.24); border-color: var(--red-hot); transform: translateY(-1px); }
.live__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red-hot);
  box-shadow: 0 0 0 0 rgba(255,42,61,0.7);
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,42,61,0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(255,42,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,42,61,0); }
}
@media (prefers-reduced-motion: reduce) { .live__dot { animation: none; } }

/* Tools dropdown (CSS hover) */
.tools { position: relative; padding-bottom: 8px; margin-bottom: -8px; }
.tools__trigger { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; transition: color .2s; }
.tools:hover .tools__trigger, .tools__trigger:focus-visible { color: #fff; outline: none; }
.tools__caret { font-size: 9px; opacity: .7; }
.tools__menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  padding-top: 10px; min-width: 230px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.tools:hover .tools__menu, .tools:focus-within .tools__menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.tools__panel {
  background: rgba(14,9,12,0.97); border: 1px solid var(--hairline);
  border-radius: 10px; box-shadow: 0 22px 50px rgba(0,0,0,0.6);
  overflow: hidden; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tools__item { display: block; padding: 15px 18px; text-decoration: none; color: #e9e3e5; border-left: 2px solid transparent; transition: background .15s, border-color .15s; }
.tools__item + .tools__item { border-top: 1px solid rgba(255,255,255,0.05); }
.tools__item:hover { background: rgba(225,29,46,0.12); border-left-color: var(--red); }
.tools__item-title { display: block; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; }
.tools__item-sub { display: block; font-family: 'Barlow', sans-serif; font-weight: 400; font-size: 12px; color: #948a90; margin-top: 2px; }

.nav-spacer { height: 64px; }

/* ---------- Layout + hero pattern ---------- */
.shell { position: relative; z-index: 5; max-width: 1180px; margin: 0 auto; }
.shell--wide { max-width: 1240px; }
.head { padding: clamp(24px, 4vh, 50px) clamp(20px, 5vw, 56px) clamp(28px, 4vh, 44px); }
.body { padding: 0 clamp(20px, 5vw, 56px) clamp(60px, 9vh, 110px); }

.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.eyebrow--center { justify-content: center; }
.eyebrow__line { display: block; width: 30px; height: 2px; background: var(--red); }
.eyebrow__text { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 12.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--red); }

.page-title {
  margin: 0 0 16px; font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(40px, 5.4vw, 80px); line-height: 0.92; letter-spacing: -0.5px;
  text-transform: uppercase; color: var(--ink-strong); text-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.lead { margin: 0; font-family: 'Barlow', sans-serif; font-weight: 400; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.62; color: var(--muted-soft); max-width: 660px; text-wrap: pretty; }

/* ---------- Reusable components ---------- */
.panel {
  position: relative; padding: clamp(24px, 3.4vw, 40px); border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--panel); box-shadow: var(--shadow);
}
.panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.panel__line { display: block; width: 20px; height: 2px; background: var(--red); }
.panel__label { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); }

/* Empty image slot (where the user drops a TierMaker/infographic image) */
.slot {
  display: block; width: 100%; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(45deg, rgba(225,29,46,0.05) 0 12px, rgba(255,255,255,0.015) 12px 24px), rgba(16,10,13,0.6);
}
.slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slot--contain img { object-fit: contain; }
.slot--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 24px; border: 1px dashed rgba(255,255,255,0.10);
}
.slot__icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(225,29,46,0.12); border: 1px solid rgba(225,29,46,0.35); color: #ff6470;
}
.slot__text { max-width: 32ch; font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 14px; color: rgba(214,205,210,0.66); }

/* Primary action button (tools) */
.btn {
  display: inline-flex; align-items: center; gap: 11px; font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase; color: #fff;
  background: var(--red); border: none; padding: 16px 40px; border-radius: 5px; cursor: pointer;
  box-shadow: 0 10px 34px rgba(225,29,46,0.45); transition: background .18s, transform .18s, box-shadow .18s;
}
.btn:hover { background: var(--red-hot); transform: translateY(-2px); box-shadow: 0 16px 44px rgba(225,29,46,0.6); }
.btn:active { transform: translateY(0); }
.btn__spin { font-size: 17px; line-height: 1; }

/* Perk diamond (build randomizer / killer detail) */
.perk { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.perk__diamond {
  width: clamp(60px, 9vw, 84px); height: clamp(60px, 9vw, 84px); transform: rotate(45deg);
  border: 1.5px solid rgba(225,29,46,0.42); border-radius: 14px; background: rgba(18,10,13,0.7);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 22px rgba(0,0,0,0.45);
}
.perk__diamond > * { transform: rotate(-45deg); opacity: 0.3; color: var(--red); }
.perk__name { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: clamp(11px, 1vw, 13px); line-height: 1.25; color: rgba(228,219,224,0.92); min-height: 32px; display: flex; align-items: flex-start; justify-content: center; text-align: center; text-wrap: balance; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) { .nav__center { display: none; } }
@media (max-width: 560px) { .nav__right .nav__link { display: none; } }
