/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --bg: #14171f;
  --bg-raised: #1b1f2a;
  --bg-card: #1f2430;
  --line: #2c3242;
  --text: #e9e6dc;
  --text-dim: #a6a9b8;
  --text-faint: #6d7180;
  --gold: #c9a24b;
  --gold-soft: #8d7439;
  --gold-glow: rgba(201, 162, 75, 0.18);

  --font-display: "Cinzel", serif;
  --font-serif: "Marcellus", serif;
  --font-body: "Inter", sans-serif;

  --radius: 6px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(201,162,75,0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: url('../images/cursor.png'), auto;
}

a { color: var(--gold); text-decoration: none; }
a:hover { 
  text-decoration: underline; 
  cursor: url('../images/cursor.png'), auto;
}

/* =========================================================
   BACKGROUND VIDEO
   ========================================================= */
.genshin-entry-body-bg-video-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;        /* sits behind all content */
  background: url('../images/bg_fallback.png') center center / cover no-repeat;
}
 
.genshin-entry-body-bg-video-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;               /* fills the screen, crops overflow */
  transform: translate(-50%, -50%);
}
 
/* dark overlay so text stays readable over the footage */
.genshin-entry-body-bg-video-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.55);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 23, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.site-header__brand:hover { text-decoration: none; color: var(--gold); }
.brand-mark { color: var(--gold); font-size: 1.1rem; }

.site-header__nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.site-header__nav a {
  color: var(--text-dim);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.site-header__nav a:hover { color: var(--gold); text-decoration: none; }

.site-header__search {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.site-header__search:hover { color: var(--gold); border-color: var(--gold-soft); }

/* =========================================================
   BREADCRUMB STRIP
   ========================================================= */
.crumb-strip {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}
.crumb-strip__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 0.78rem;
  display: flex;
  gap: 10px;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.crumb-strip__warn {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 0.78rem;
  display: flex;
  gap: 10px;
  justify-content: center;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.crumb-strip__warnlabel { text-align: center; letter-spacing: 0.06em; color: #ad2b21; }
.crumb-strip__label { text-transform: uppercase; letter-spacing: 0.06em; }
.crumb-strip a { color: var(--text-dim); }

/* =========================================================
   PAGE HERO
   ========================================================= */
.page-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--bg), transparent 90%);
}
.page-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 24px 32px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* =========================================================
   TABS
   ========================================================= */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow: hidden; 
}
.tabs__btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active { color: var(--gold); }
.tabs__btn.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--gold);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   PROSE / CONTENT
   ========================================================= */
.prose-block {
  background-color: color-mix(in srgb, var(--bg-card) 50%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 24px;
}
.prose-block h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.prose-block h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--text);
}
.prose-block p {
  color: var(--text-dim);
  margin: 0 0 14px;
}
.prose-block p:last-child { margin-bottom: 0; }

.prose-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}
.prose-list li { margin-bottom: 8px; }

.story-entry { margin-bottom: 22px; }
.story-entry:last-child { margin-bottom: 0; }

/* =========================================================
   HOME INTERACTIVE PORTAL CARDS (NEW)
   ========================================================= */
.portal-card {
  text-decoration: none !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 0 12px var(--gold-glow);
}
.portal-card__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.portal-card:hover .portal-card__arrow {
  transform: translateX(4px);
}

/* =========================================================
   HOME UPDATES FEED STYLING (NEW)
   ========================================================= */
.update-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
  transition: padding-left 0.2s ease;
}
.update-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.update-item:hover {
  padding-left: 6px;
}

/* Talent grid */
.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.talent-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.talent-card__icon {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.talent-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.talent-card p { font-size: 0.82rem; margin: 0; color: var(--text-faint); }

/* Quotes */
.quote-block {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-block p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--text);
}
.quote-block cite {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-style: normal;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.gallery-item {
  aspect-ratio: 3 / 4;
  background: var(--bg-raised);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 10px;
}

/* =========================================================
   INFOBOX
   ========================================================= */
.infobox {
  background-color: color-mix(in srgb, var(--bg-card) 50%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 84px;
}

.infobox__portrait {
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--bg-raised), #12141b);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.infobox__portrait-placeholder {
  color: var(--text-faint);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.infobox__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-align: center;
  margin: 0 0 2px;
}
.infobox__title {
  text-align: center;
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  margin: 0 0 18px;
}

.infobox__stats, .infobox__va { margin: 0; }
.infobox__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.infobox__row:last-child { border-bottom: none; }
.infobox__row dt {
  color: var(--text-faint);
  font-weight: 500;
}
.infobox__row dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  font-weight: 500;
}

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill--vision {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--gold-soft);
}

.stars { color: var(--gold); letter-spacing: 1px; }

.infobox__divider {
  text-align: center;
  color: var(--gold-soft);
  letter-spacing: 8px;
  font-size: 0.7rem;
  margin: 16px 0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  text-align: center;
}
.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--text-faint);
  font-size: 0.78rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .infobox {
    position: static;
    order: -1;
  }
  .site-header__nav { display: none; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
.tabs__btn:focus-visible,
.site-header__search:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab-panel.is-active { animation: none; }
}