/* core.css: components every template shares (page veil, download popup, server strip,
   cookie banner, status dot, scrollbar). Loaded after styles.css.
   They are drawn with the accent family (--gold, --gold-h1, --gold-deep, --gold-light, --gold-warm,
   --gold-shine, --gold-pale and their -rgb twins) plus --ink-dim, --header-bg, --panel-line,
   --font-* and --ease-out from the template's own :root. Keep this file identical across templates;
   restyle through the variables, or override a class in the template's styles.css. */

/* ============================================
   Scrollbar: dark track, accent thumb
   ============================================ */
html { scrollbar-gutter: stable; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #14100b; border-left: 1px solid rgba(var(--gold-rgb),0.14); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border: 2px solid #14100b;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold-shine), var(--gold-warm)); }
::-webkit-scrollbar-corner { background: #14100b; }
/* Firefox does not know the pseudo-elements above */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--gold-deep) #14100b; }
}

/* ============================================
   Status dot: live world indicator
   ============================================ */
.status-dot { position: relative; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #ffd98a; box-shadow: 0 0 8px rgba(255,217,138,0.9); }
.status-dot.is-offline { background: #b4532a; box-shadow: 0 0 8px rgba(180,83,42,0.8); }
.status-dot.is-maintenance { background: #b3a081; box-shadow: none; }
/* a slow ring breathes out of the live dot (transform + opacity only) */
.status-dot.is-online::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #ffd98a;
  animation: dot-ring 2.4s ease-out infinite;
}
@keyframes dot-ring {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .status-dot.is-online::after { animation: none; } }

/* ============================================
   Server strip: which worlds exist and which one is open. A world that is not
   open yet is shown greyed out, so players see a project with a plan.
   ============================================ */
.realm-servers {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 0;
  list-style: none;
  background: linear-gradient(180deg, rgba(18,14,9,0.74), rgba(18,14,9,0.5));
  border: 1px solid rgba(var(--gold-h1-rgb),0.22);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,236,190,0.08), 0 10px 24px rgba(0,0,0,0.28);
}
.realm-server {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
}
.realm-server + .realm-server::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(var(--gold-light-rgb),0.6) 50%, transparent);
}
.realm-name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f1e9d6;
}
.realm-rates {
  font-family: var(--font-numeral);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #fff4d6 0%, var(--gold-warm) 45%, var(--gold-bronze) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.realm-state {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b3a081;
}
/* not open yet */
.realm-server.is-soon { opacity: 0.5; filter: grayscale(0.7); cursor: default; }
.status-dot.is-soon { background: transparent; border: 1px solid #b3a081; box-shadow: none; }
@media (max-width: 640px) {
  .realm-servers { flex-direction: column; width: 100%; }
  .realm-server { padding: 10px 16px; }
  .realm-server .realm-state { margin-left: auto; }
  .realm-server + .realm-server::before { left: 16px; right: 16px; top: 0; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--gold-light-rgb),0.5), transparent); }
}

/* ============================================
   Page veil: covers the page while it loads and while leaving for another page.
   First visit of a session carries the logo and a gold line; later pages fade plain.
   Opacity and transform only. Script sets .is-done / .is-leaving; a CSS timer lifts it
   anyway if script never runs.
   ============================================ */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 46%, rgba(var(--gold-rgb),0.13), transparent 70%), var(--veil-bg, #0b0907);   /* a template may set --veil-bg */
  opacity: 1;
  pointer-events: none;
  animation: veil-safety 0.5s ease 4s forwards;
}
.veil-logo {
  width: min(300px, 62vw);
  height: auto;
  opacity: 0;
  transform: scale(0.94);
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.6));
  animation: veil-in 0.8s var(--ease-out) 0.1s forwards;
}
.veil-line {
  width: min(220px, 50vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-h1), transparent);
  transform: scaleX(0);
  animation: veil-line 1.2s ease-out 0.2s forwards;
}
.veil-quiet .veil-logo, .veil-quiet .veil-line { display: none; }
.page-veil.is-done {
  opacity: 0;
  visibility: hidden;
  animation: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.veil-quiet .page-veil.is-done { transition-duration: 0.3s, 0s; transition-delay: 0s, 0.3s; }
.page-veil.is-leaving {
  opacity: 1;
  visibility: visible;
  animation: none;
  transition: opacity 0.22s ease;
}
.page-veil.is-leaving .veil-logo, .page-veil.is-leaving .veil-line { display: none; }
@keyframes veil-in { to { opacity: 1; transform: none; } }
@keyframes veil-line { to { transform: scaleX(1); } }
@keyframes veil-safety { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .page-veil { display: none; }
}

/* ============================================
   Download popup
   ============================================ */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.dl-modal.is-open { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }
.dl-lock { overflow: hidden; }
.dl-backdrop { position: absolute; inset: 0; background: rgba(8,6,4,0.8); cursor: pointer; }
.dl-panel {
  position: relative;
  width: min(660px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 38px 36px 28px;
  background: linear-gradient(180deg, #2a2016 0%, #17110b 100%);
  border: 1px solid rgba(var(--gold-h1-rgb),0.32);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,236,190,0.1), 0 30px 80px rgba(0,0,0,0.6);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.3s var(--ease-out);
}
.dl-panel::-webkit-scrollbar { display: none; }
.dl-modal.is-open .dl-panel { transform: none; }
.dl-panel h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); color: #f8f1e0; margin: 0 0 10px; padding-right: 40px; }
.dl-lede { margin: 0 0 24px; color: #cabb9e; font-size: 0.98rem; line-height: 1.6; max-width: 52ch; }
.dl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #cabb9e;
  background: transparent;
  border: 1px solid rgba(var(--gold-h1-rgb),0.28);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.dl-close svg { width: 18px; height: 18px; }
.dl-close:hover { color: var(--gold-h1); border-color: var(--gold-h1); }
.dl-options { display: grid; gap: 12px; }
.dl-option {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  color: inherit;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(var(--gold-h1-rgb),0.2);
  border-radius: 3px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.dl-option.is-featured { border-color: rgba(var(--gold-h1-rgb),0.65); background: rgba(var(--gold-h1-rgb),0.07); }
.dl-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--gold-h1);
  background: radial-gradient(circle at 38% 30%, #54463a, #221b14 70%);
  border: 1.5px solid rgba(var(--gold-h1-rgb),0.5);
  box-shadow: inset 0 1px 0 rgba(255,236,190,0.14);
}
.dl-icon svg { width: 26px; height: 26px; }
.dl-body { display: grid; gap: 4px; min-width: 0; }
.dl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; color: #f8f1e0; }
.dl-badge {
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #241a08;
  background: linear-gradient(115deg, var(--gold-deep), var(--gold-shine));
  border-radius: 2px;
}
.dl-text { font-size: 0.9rem; line-height: 1.5; color: #cabb9e; }
.dl-meta { font-size: 0.76rem; letter-spacing: 0.04em; color: #a89a80; }
.dl-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #241a08;
  background: linear-gradient(115deg, var(--gold-deep) 0%, var(--gold-shine) 45%, var(--gold-deep) 100%);
  border-radius: 2px;
}
.dl-go svg { width: 15px; height: 15px; }
.dl-guide { display: inline-block; margin-top: 20px; font-size: 0.85rem; font-weight: 700; color: var(--gold-h1); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--gold-h1-rgb),0.4); }
.dl-guide:hover { text-decoration-color: var(--gold-h1); }
@media (hover: hover) and (pointer: fine) { .dl-option:hover { border-color: var(--gold-h1); background: rgba(var(--gold-h1-rgb),0.1); } }
@media (max-width: 560px) {
  .dl-panel { padding: 30px 20px 22px; }
  .dl-option { grid-template-columns: 48px 1fr; gap: 14px; padding: 14px; }
  .dl-icon { width: 48px; height: 48px; }
  .dl-go { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-modal, .dl-panel { transition: none; }
}
}

/* legal line + credit */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(var(--gold-h1-rgb),0.14);
}
.footer-bottom p { margin: 0; font-size: 0.78rem; line-height: 1.6; color: #7d735f; max-width: 70ch; }
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #8f846f;
  transition: color 0.15s ease;
}
.footer-credit span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--gold-pale), var(--gold-h1) 55%, var(--gold-bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-credit svg { width: 12px; height: 12px; color: var(--gold-h1); transition: transform 0.2s var(--ease-out); }
.footer-credit:hover { color: #cbbfa6; }
@media (hover: hover) and (pointer: fine) { .footer-credit:hover svg { transform: translate(2px, -2px); } }

/* ============================================
   Cookie banner
   ============================================ */
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 640px;
  margin: 0 auto;
  background: var(--header-bg);
  border: 1px solid var(--panel-line);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(36,29,20,0.25);
  padding: 22px 26px;
  transform: translateY(140%);
  transition: transform 0.5s var(--ease-out);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { flex: 1; min-width: 220px; color: var(--ink-dim); font-size: 0.88rem; margin: 0; line-height: 1.5; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: transform 0.2s ease; }
}
@media (max-width: 560px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px 20px; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}

/* ============================================
   Mobile menu: at 980px and below the nav becomes a panel under the header,
   opened by the toggle button (core.js sets html.nav-open). Sign in / Sign up move
   into the panel on phones.
   ============================================ */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--gold-h1);
  background: rgba(18,14,9,0.6);
  border: 1px solid rgba(var(--gold-h1-rgb),0.4);
  border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-account { display: none; }
.nav-open { overflow: hidden; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .brand, .header-right { position: relative; z-index: 2; }
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    width: auto;
    margin: 0;
    justify-self: stretch;   /* a desktop grid header may say start; the panel must span the screen */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 96px 24px 26px;
    background: linear-gradient(180deg, #1a130c, #0f0b07);
    border-bottom: 1px solid rgba(var(--gold-h1-rgb),0.35);
    box-shadow: 0 26px 50px rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }
  .nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
  }
  .main-nav > a, .main-nav > .nav-item > a, .main-nav .nav-menu-btn {
    padding: 16px 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f1e9d6;
    text-shadow: none;
    border-bottom: 1px solid rgba(var(--gold-h1-rgb),0.14);
  }
  .main-nav > a[aria-current="page"], .main-nav > .nav-item > a[aria-current="page"] { color: var(--gold-h1); }
  .main-nav .nav-item { border-bottom: 1px solid rgba(var(--gold-h1-rgb), 0.14); }
  .main-nav .nav-item > a, .main-nav .nav-menu-btn { display: block; width: 100%; border-bottom: 0; }
  .main-nav .nav-item .nav-menu-btn { cursor: default; pointer-events: none; }
  .main-nav .nav-item .nav-menu-btn::before { display: none; }
  .main-nav .nav-item .nav-menu { position: static; opacity: 1; visibility: inherit; transition: none; transform: none; min-width: 0; margin: 0 0 12px; padding: 0; background: none; border: 0; border-left: 2px solid rgba(var(--gold-h1-rgb), 0.35); box-shadow: none; }
  .main-nav .nav-item .nav-menu::before { display: none; }
  .main-nav .nav-item .nav-menu a { padding: 12px 14px; border-bottom: 0; }
}
@media (max-width: 640px) {
  .main-nav { padding-top: 76px; }
  .account-switch { display: none; }
  .nav-account { display: flex; gap: 10px; padding-top: 20px; }
  .nav-account a { flex: 1; }
}
/* the panel's buttons must not inherit the nav link colours */
.main-nav .nav-account .btn-gold-sm { color: #241a08; text-shadow: none; }
.main-nav .nav-account .btn-ghost-sm { color: #f1e9d6; text-shadow: none; border: 1px solid rgba(var(--gold-h1-rgb),0.45); }
@media (prefers-reduced-motion: reduce) {
  .nav-toggle span, .main-nav { transition: none; }
}

/* ============================================
   Tabs: [role="tablist"] of .tab buttons, each controlling a .tabpanel.
   Colours come from the template's own --ink / --ink-dim / --panel-line and the accent family, so it
   works on dark and light surfaces. core.js wires the behaviour.
   ============================================ */
.tabs { display: flex; border-bottom: 1px solid var(--panel-line); }
.tab {
  flex: 1;
  padding: 18px 12px;
  font: 600 1.1rem var(--font-numeral);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tab.is-active { color: var(--ink); border-bottom-color: var(--gold-h1); background: rgba(var(--gold-deep-rgb), 0.16); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }
.tabpanel[hidden] { display: none; }
@media (max-width: 560px) { .tab { font-size: 0.95rem; letter-spacing: 0.1em; padding: 16px 6px; } }

/* ============================================
   Nav that helps: scroll progress, a bar that sticks after the hero, and the current section lit.
   core.js sets html.nav-stuck, .is-current on the nav link, and the progress bar's scale.
   ============================================ */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-h1), var(--gold-shine));
  box-shadow: 0 0 10px rgba(var(--gold-h1-rgb), 0.7);
  transform: scaleX(0);
  transform-origin: left;
}
.nav-stuck .site-header {
  position: fixed;
  background: var(--bar-bg, rgba(11, 9, 7, 0.96));   /* solid: nothing behind a moving page may be blurred */
  border-bottom: 1px solid rgba(var(--gold-h1-rgb), 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: bar-in 0.35s var(--ease-out);
}
.nav-stuck .header-inner { height: 64px; }
.nav-stuck .brand-logo { height: 46px; }
@keyframes bar-in { from { transform: translateY(-100%); } to { transform: none; } }
.main-nav a.is-current, .main-nav a[aria-current="page"] { color: var(--gold-light); }
.main-nav a.is-current::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .nav-stuck .site-header { animation: none; } }

/* ---- dropdown (Community): a button in the nav that opens a small list ---- */
.nav-item { position: relative; }
.main-nav .nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.main-nav .nav-menu-btn::after { display: none; }   /* templates draw an underline on nav links; the caret replaces it here */
.main-nav .nav-menu-btn::before {
  content: "";
  order: 2;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.nav-item.is-open .nav-menu-btn::before { transform: rotate(-135deg) translate(-1px, -1px); }
.nav-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: -16px;
  z-index: 5;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bar-bg, #120c08);
  border: 1px solid rgba(var(--gold-h1-rgb), 0.35);
  border-top: 2px solid var(--gold-h1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }   /* keeps the hover from dropping in the gap */
.nav-item.is-open .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.25s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .nav-item:not(.is-dismissed):hover .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.25s var(--ease-out); }
}
.main-nav .nav-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  text-shadow: none;
  color: #f1e9d6;
}
.main-nav .nav-menu a::after { display: none; }
.main-nav .nav-menu a svg { width: 18px; height: 18px; color: var(--gold-light); flex-shrink: 0; }
.main-nav .nav-menu a:hover { background: rgba(var(--gold-deep-rgb), 0.3); color: #fff; }
@media (prefers-reduced-motion: reduce) { .nav-menu { transition: none; } }

/* ============================================
   Social dock: a column of icons fixed to the left, Discord first. For a few seconds after landing the
   Discord icon pulses (core.js adds .is-calling, then removes it); the label shows on hover or keyboard focus.
   Hidden below 1340px, where the page content (1200px column + padding + the scrollbar) would run under it. Templates restyle via --dock-* and colour tokens.
   ============================================ */
.dock { position: fixed; z-index: 60; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
@media (max-height: 820px) { .dock { top: auto; bottom: 20px; transform: none; } }
@media (max-width: 1339px) { .dock { display: none; } }
.dock:not(:has(.dock-item)) { display: none; }   /* no Discord and no socials configured: no dock */
.dock-item { position: relative; display: grid; }
.dock-link {
  --cut: 11px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--gold-light);
  background: rgba(var(--gold-h1-rgb), 0.55);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
}
.dock-link::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: #120c08; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%); transition: background 0.2s ease; }
.dock-link svg { width: 20px; height: 20px; }
.dock-discord .dock-link { width: 54px; height: 54px; --cut: 13px; background: linear-gradient(115deg, var(--gold-deep), var(--gold-shine), var(--gold-deep)); }
.dock-discord .dock-link svg { width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) { .dock-link:hover::before { background: rgba(var(--gold-deep-rgb), 0.5); } }
.dock-ring {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(var(--gold-h1-rgb), 0.55);
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 13px 100%, 0 50%);
  opacity: 0;
  pointer-events: none;
}
.dock-label {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  z-index: 2;
  white-space: nowrap;
  padding: 9px 18px;
  font: 700 0.74rem var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f1e9d6;
  background: #120c08;
  border: 1px solid rgba(var(--gold-h1-rgb), 0.55);
  opacity: 0;
  transform: translate(-8px, -50%);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
  pointer-events: none;
}
.dock-item:hover .dock-label, .dock-item:focus-within .dock-label { opacity: 1; transform: translate(0, -50%); }   /* the label only on hover: while calling, the pulse alone must not cover page text */
.dock-item.is-calling .dock-ring { animation: dock-pulse 1.8s ease-out infinite; }
@keyframes dock-pulse { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(2.1); } }
@media (prefers-reduced-motion: reduce) { .dock-item.is-calling .dock-ring { animation: none; } }

/* ============================================
   Scroll depth helpers (see core.js): data-parallax and data-stack
   ============================================ */
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
@media (min-width: 901px) {
  [data-stack] > .chapter { position: sticky; top: var(--stick, 0px); }
  [data-stack] > .chapter + .chapter { box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.5); }
}
@media (prefers-reduced-motion: reduce) { [data-parallax] { transform: none; will-change: auto; } }
