/* wakaplay.site — RF NOVUS. FANTASY, the same language as the in-game UI (src/client_ui/ux):
   dark leather panels in a double gold frame with corner ornaments, gilded serif titles,
   ornament dividers, gold bars, wax seals, engraved plaque buttons. Layout: a game-portal grid
   (hero, server, news, …). Pictures come from the game client (site/art.ps1). */
:root {
  --bg: #120c08;
  --leather: #1d140e;
  --leather2: #2a1d14;
  --gold: #e3b45c;
  --gold-l: #fff1c8;
  --gold-d: #a8742c;
  --ink: #f2e6cc;
  --dim: #b09a76;
  --blood: #c8432f;
  --leaf: #8fbf5a;
  --sky: #6fa8d6;
  --rose: #c77ad6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 400 17px/1.65 "PT Serif", Georgia, serif; overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(227, 180, 92, .12), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(200, 67, 47, .10), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 7px),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; line-height: 1.05; }
.dim { color: var(--dim); }
.label { font: 700 13px "Cormorant SC", serif; letter-spacing: .16em; color: var(--dim); }
.grid-bg { display: none; }

/* gilded text */
.gild, .glitch, .server h2, .lime .big, .card-head h2, .post h1, .notfound h1 {
  color: transparent; background: linear-gradient(180deg, var(--gold-l) 0%, var(--gold) 52%, var(--gold-d) 100%);
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .9)) drop-shadow(0 0 12px rgba(227, 180, 92, .25));
}

/* --- leather panel in a double gold frame with corner ornaments */
.card {
  position: relative; padding: 26px; border-radius: 6px; border: 2px solid var(--gold-d);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 120, .09), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--leather2), var(--leather) 60%, #160f0a);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 5px rgba(0, 0, 0, .25), inset 0 0 0 6px rgba(227, 180, 92, .28), 0 14px 34px rgba(0, 0, 0, .55), inset 0 0 50px rgba(0, 0, 0, .45);
}
.card::before, .card::after {
  content: "❧"; position: absolute; color: var(--gold); font-size: 22px; line-height: 1; text-shadow: 0 0 8px rgba(227, 180, 92, .45); pointer-events: none; z-index: 3;
}
.card::before { top: 4px; left: 6px; transform: rotate(180deg) scaleX(-1); }
.card::after { bottom: 4px; right: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { font-size: 30px; letter-spacing: .02em; }

/* ornament divider */
.orn { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 12px; letter-spacing: .3em; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-d)); }
.orn::after { transform: scaleX(-1); }

/* --- top bar */
.top {
  position: sticky; top: 10px; z-index: 20; display: flex; align-items: center; gap: 18px;
  max-width: 1240px; margin: 10px auto 0; padding: 10px 14px 10px 14px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(42, 29, 20, .96), rgba(22, 15, 10, .96)); border: 2px solid var(--gold-d);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 4px rgba(0, 0, 0, .2), inset 0 0 0 5px rgba(227, 180, 92, .25), 0 8px 24px rgba(0, 0, 0, .5);
}
.logo { display: flex; align-items: center; gap: 10px; font: 700 24px "Cormorant SC", serif; letter-spacing: .08em; white-space: nowrap; color: var(--gold-l); }
.logo b { color: var(--gold); font-weight: 700; }
.hexlogo, .hexemb, .hexicon {                       /* round gold medallions */
  display: grid; place-items: center; flex: none; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c8, var(--gold) 45%, var(--gold-d) 80%);
  box-shadow: 0 0 0 1px #000, 0 3px 6px rgba(0, 0, 0, .6);
}
.hexlogo { width: 36px; }
.hexlogo img, .hexemb img, .hexicon img { width: calc(100% - 5px); height: calc(100% - 5px); border-radius: 50%; object-fit: cover; background: #1a110a; }
.pills { display: flex; gap: 2px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.pills a { position: relative; padding: 6px 14px; color: var(--dim); font: 700 17px "Cormorant Garamond", serif; white-space: nowrap; transition: color .2s; }
.pills a::after { content: "◆"; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) scale(0); font-size: 8px; color: var(--gold); transition: transform .2s; }
.pills a:hover { color: var(--gold-l); }
.pills a:hover::after, .pills a.on::after { transform: translateX(-50%) scale(1); }
.pills a.on { color: var(--gold); }

/* --- engraved plaque buttons, bookmark chips */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 4px; cursor: pointer;
  font: 700 18px "Cormorant SC", serif; letter-spacing: .08em; color: var(--ink);
  border: 1px solid var(--gold); background: linear-gradient(#6b4a22, #3b2610);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .35), 0 2px 0 #000; text-shadow: 0 1px 0 #000; transition: filter .2s, box-shadow .2s;
}
.btn:hover { filter: brightness(1.15); color: var(--gold-l); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .45), 0 2px 0 #000, 0 0 14px rgba(227, 180, 92, .35); }
.btn.accent { background: linear-gradient(#a8742c, #6b4a22); border-color: var(--gold-l); color: #fff8e6; }
.btn.small { padding: 6px 14px; font-size: 15px; }
.chip { display: inline-block; padding: 0 9px; border-radius: 10px; font: 700 13px "Cormorant SC", serif; letter-spacing: .06em; white-space: nowrap;
  color: var(--gold); border: 1px solid var(--gold-d); background: rgba(227, 180, 92, .08); }
.chip.warm { color: #e9925f; border-color: #a3532f; background: rgba(200, 67, 47, .1); }

/* --- layout */
main { max-width: 1240px; margin: 0 auto; padding: 16px 12px 40px; }
.bento { display: grid; gap: 16px; margin-bottom: 16px; }
.bento > *, .side > * { min-width: 0; }
.top-row { grid-template-columns: minmax(0, 1fr) 380px; }
.mid-row { grid-template-columns: minmax(0, 1fr) 420px; }
.low-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arrow { position: absolute; right: 22px; bottom: 18px; font: 700 22px "Cormorant Garamond", serif; color: var(--gold); transition: transform .2s, text-shadow .2s; }
a.card { transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 0 0 1px #000, inset 0 0 0 5px rgba(0, 0, 0, .25), inset 0 0 0 6px rgba(227, 180, 92, .45), 0 18px 40px rgba(0, 0, 0, .6), 0 0 22px rgba(227, 180, 92, .18); }
a.card:hover .arrow { transform: translateX(4px); text-shadow: 0 0 10px var(--gold); }

/* --- hero */
.hero { min-height: 540px; padding: 0; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 38%; filter: sepia(.25) saturate(1.1) contrast(1.05); transform: scale(1.04); animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.1) translateX(-1.5%); } }
.hero::after {                                       /* reuse ::after: warm vignette instead of an ornament */
  content: ""; position: absolute; inset: 0; z-index: 1; font-size: 0; transform: none;
  background: linear-gradient(90deg, rgba(18, 12, 8, .96) 0%, rgba(18, 12, 8, .72) 36%, rgba(18, 12, 8, .05) 66%),
              linear-gradient(0deg, rgba(18, 12, 8, .92) 0%, transparent 42%),
              radial-gradient(ellipse at 70% 30%, rgba(255, 160, 60, .12), transparent 60%);
}
.hero::before { z-index: 4; }
.race-tabs { position: absolute; top: 20px; right: 22px; z-index: 3; display: flex; gap: 4px; }
.race-tabs button {
  padding: 6px 16px; border-radius: 4px 4px 0 0; border: 1px solid #5a4126; border-bottom: 0; cursor: pointer;
  background: linear-gradient(#2c1f15, #1f160f); color: var(--dim); font: 700 16px "Cormorant Garamond", serif; transition: all .2s;
}
.race-tabs button:hover { color: var(--ink); border-color: var(--gold-d); }
.race-tabs button.on { color: var(--gold-l); border-color: var(--gold); background: linear-gradient(#5b3d1f, #2c1d10); box-shadow: inset 0 1px 0 rgba(255, 220, 150, .3), 0 0 12px rgba(227, 180, 92, .3); }
.hero-text { position: relative; z-index: 2; max-width: 600px; padding: 56px 36px 34px; }
.kicker { margin: 0 0 6px; color: var(--gold); font: 700 15px "Cormorant SC", serif; letter-spacing: .3em; }
.glitch { display: inline-block; font: 700 clamp(56px, 8.5vw, 104px)/1 "Cormorant SC", serif; letter-spacing: .04em; }
.glitch::before, .glitch::after { content: none; }
.lead { margin: 14px 0 16px; color: #e3d5b8; font-size: 18px; text-shadow: 0 1px 2px #000; }
.race-line {
  display: none; align-items: center; gap: 14px; margin: 0 0 22px; padding: 12px 18px 12px 12px; max-width: 520px; border-radius: 4px;
  color: #e3d5b8; font-size: 15px; background: rgba(18, 12, 8, .78); border: 1px solid var(--gold-d); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .3);
}
.race-line.on { display: flex; animation: fade .4s; }
.race-line b { color: var(--gold-l); font-family: "Cormorant Garamond", serif; font-size: 18px; }
.hexemb { width: 58px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* --- side cards */
.side { display: grid; gap: 16px; grid-template-rows: 1fr 1fr; }
.server { display: flex; flex-direction: column; justify-content: space-between; }
.server-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server h2 { font: 700 40px "Cormorant SC", serif; margin: 8px 0 12px; }
.bars { display: grid; gap: 6px; margin-bottom: 14px; }
.bars i { display: block; height: 7px; width: var(--w); border-radius: 4px; border: 1px solid var(--gold-d);
  background: linear-gradient(180deg, #ffe08a, #c08a2a 60%, #8a5a18); box-shadow: 0 0 6px rgba(255, 200, 100, .35); }
.bars i:nth-child(2) { background: linear-gradient(180deg, #e66a4f, #7a1f12); }
.bars i:nth-child(3) { background: linear-gradient(180deg, #8fb6e6, #233f8c); }
.server-foot { display: flex; align-items: center; justify-content: space-between; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 700 15px "Cormorant SC", serif; letter-spacing: .1em; }
.status i { width: 9px; height: 9px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 10px currentColor; animation: blink 1.6s infinite; }
.status.soon { color: #f0b860; }
@keyframes blink { 50% { opacity: .35; } }
.lime { display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 100% 0%, rgba(200, 67, 47, .25), transparent 60%), linear-gradient(180deg, var(--leather2), var(--leather) 60%, #160f0a); }
.lime .big { font: 700 84px/1 "Cormorant SC", serif; margin: 6px 0 2px; }

/* --- news: rows like the in-game journal */
.news-row {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  padding: 12px 16px 12px 22px; margin-bottom: 8px; border-radius: 3px; border: 1px solid #4a3520;
  background: linear-gradient(90deg, rgba(255, 230, 180, .06), rgba(255, 230, 180, .015)); transition: border-color .2s, background .2s;
}
.news-row::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; background: var(--gold); }
.news-row:has(.warm)::before { background: var(--blood); }
.news-row:hover { border-color: var(--gold); background: linear-gradient(90deg, rgba(227, 180, 92, .16), rgba(227, 180, 92, .03)); }
.news-title { font: 700 21px "Cormorant Garamond", serif; color: var(--gold-l); }
.news-row time { color: var(--dim); font: italic 14px "PT Serif", serif; white-space: nowrap; }
.news-sum { grid-column: 2 / 4; color: #cdbb98; font-size: 15px; }

/* --- features with game icons in gold medallions */
.feat { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.feat + .feat { border-top: 1px solid rgba(168, 116, 44, .3); }
.hexicon { width: 46px; transition: box-shadow .2s; }
.feat:hover .hexicon { box-shadow: 0 0 0 1px #000, 0 0 14px rgba(227, 180, 92, .6); }
.feat b { display: block; font: 700 19px "Cormorant Garamond", serif; color: var(--gold-l); }
.feat span { color: var(--dim); font-size: 14px; }

/* --- bottom tiles */
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 160px; }
.tile b { font: 700 26px "Cormorant Garamond", serif; margin-top: 6px; color: var(--gold-l); }

/* --- post page */
.post { max-width: 880px; margin: 0 auto; padding: 36px clamp(22px, 5vw, 52px) 40px; }
.back { font: 700 16px "Cormorant SC", serif; letter-spacing: .1em; color: var(--gold); }
.back:hover { text-shadow: 0 0 10px var(--gold); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 10px; color: var(--dim); font: italic 15px "PT Serif", serif; }
.post h1 { font-size: clamp(34px, 5.5vw, 52px); margin-bottom: 22px; }
.post-cover, .content figure { margin: 0 0 24px; padding: 6px; border-radius: 4px; background: #0d0806; border: 1px solid var(--gold-d); box-shadow: inset 0 0 0 1px #000; }
.post-cover img, .content img { display: block; width: 100%; height: auto; border-radius: 2px; }
.content figcaption { padding: 8px 6px 2px; color: var(--dim); font: italic 15px "PT Serif", serif; text-align: center; }
.content p, .content li { color: #e3d5b8; }
.content h2 { font-size: 30px; margin: 36px 0 10px; color: var(--gold-l); }
.content h2::before { content: "◆ "; color: var(--gold); font-size: .6em; vertical-align: middle; }
.content h3 { font-size: 22px; margin: 24px 0 8px; color: var(--gold); }
.content ul { padding-left: 0; list-style: none; }
.content li { position: relative; padding-left: 24px; margin: 8px 0; }
.content li::before { content: "◈"; position: absolute; left: 0; color: var(--gold); }
.content strong { color: var(--gold-l); }
.content code { padding: 1px 7px; border-radius: 3px; color: var(--gold); background: rgba(227, 180, 92, .08); border: 1px solid rgba(168, 116, 44, .5); font-size: .88em; }
.content blockquote { margin: 22px 0; padding: 14px 20px; border-left: 3px solid var(--gold); background: rgba(227, 180, 92, .06); color: #e3d5b8; font-style: italic; }
.content a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(227, 180, 92, .4); }
.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.notfound { max-width: 520px; margin: 60px auto; text-align: center; }
.notfound h1 { font: 700 120px "Cormorant SC", serif; }

/* --- footer */
.foot { max-width: 1240px; margin: 0 auto 24px; padding: 18px 24px; display: grid; gap: 4px; font-size: 14px; border-top: 1px solid var(--gold-d); }
.foot b { font: 700 17px "Cormorant SC", serif; color: var(--gold); }

/* --- narrow screens */
@media (max-width: 1000px) {
  .top-row, .mid-row { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .top { top: 0; margin: 0; flex-wrap: wrap; row-gap: 6px; padding: 10px 12px; border-radius: 0; border-width: 0 0 2px; }
  .top .btn { margin-left: auto; padding: 6px 12px; font-size: 15px; }
  .pills { order: 3; width: 100%; margin: 0; }
  .pills a { padding: 5px 10px; font-size: 16px; }
  .low-row, .side { grid-template-columns: minmax(0, 1fr); }
  main { padding: 10px 10px 30px; }
  .hero { min-height: 600px; }
  .hero::after { background: linear-gradient(0deg, rgba(18, 12, 8, .97) 0%, rgba(18, 12, 8, .75) 50%, rgba(18, 12, 8, .1) 100%); }
  .hero-bg { object-position: 66% 30%; }
  .race-tabs { left: 14px; right: 14px; }
  .race-tabs button { flex: 1; padding: 6px 4px; font-size: 15px; }
  .hero-text { padding: 24px 20px; }
  .race-line { max-width: 100%; }
  .news-row { grid-template-columns: 1fr auto; }
  .news-row .chip { grid-column: 1 / 3; justify-self: start; }
  .news-sum { grid-column: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
