/* GLAIVORA — base: fonts, tokens, layout, header, buttons, panels, footer, lightbox.
   Note: no text-transform is used anywhere. Upper-case labels are written in upper case in i18n.js,
   because Turkish casing rules would turn "Glaive" into "GLAİVE". */

@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("../fonts/rajdhani-600.woff") format("woff"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("../fonts/rajdhani-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #070a1a;
  --bg-2: #0b1030;
  --bg-3: #121843;
  --panel: rgba(16, 21, 58, .8);
  --line: rgba(124, 160, 255, .24);
  --line-strong: rgba(124, 205, 255, .5);
  --gold: #ffdb73;
  --gold-deep: #f0b445;
  --cyan: #59e6ff;
  --violet: #a98bff;
  --text: #e9edff;
  --muted: #b3bde2;
  --r-common: #bfccdb;
  --r-rare: #4da6ff;
  --r-epic: #c761ff;
  --r-legendary: #ffb833;
  --ok: #7ef0b0;
  --bad: #ff9c9c;
  --font-display: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-body: "Rajdhani", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
html.is-locked { overflow: hidden; }
html.i18n-wait body { visibility: hidden; }
body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:not([href]) { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: #0b1030; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gloss { display: block; color: var(--muted); font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: .02em; }
.gloss:empty { display: none; }
.ibox { width: 46px; height: 46px; margin-bottom: 14px; padding: 9px; border: 1px solid rgba(255, 219, 115, .42); border-radius: 10px; background: rgba(255, 219, 115, .07); color: var(--gold); }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--gold); color: #0b1030; font-weight: 700; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #0b1030; }

/* ------------------------------------------------------------------ header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); transition: background-color .3s, box-shadow .3s; }
.site-header.is-scrolled, .site-header.is-open, .site-header--solid { background: rgba(7, 10, 26, .92); box-shadow: 0 1px 0 var(--line), 0 12px 30px rgba(0, 0, 0, .35); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-scrolled, .site-header--solid { background: rgba(7, 10, 26, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.site-header__in { display: flex; align-items: center; gap: 14px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: #fff; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .16em; text-decoration: none; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(89, 230, 255, .45)); }
.site-nav ul { display: flex; align-items: center; gap: 2px; }
.site-nav a { display: block; padding: 10px 9px; color: var(--text); font-size: .93rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; border-radius: 6px; }
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current] { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.site-nav__cta { display: none; }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(7, 10, 26, .55); }
.lang button { min-width: 42px; padding: 5px 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: .9rem; font-weight: 700; letter-spacing: .08em; line-height: 1.3; }
.lang button:hover { color: #fff; }
.lang button[aria-pressed="true"] { background: var(--gold); color: #0b1030; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7, 10, 26, .55); }
.nav-toggle .icon--close, .is-open .nav-toggle .icon--menu { display: none; }
.is-open .nav-toggle .icon--close { display: block; }
/* logged in or not: boot.js / api.js put "auth-in" on <html>; without JavaScript the login buttons show */
html.auth-in [data-auth="out"], html:not(.auth-in) [data-auth="in"] { display: none !important; }
.header-auth { display: flex; gap: 8px; }
.header-auth .btn { min-height: 40px; padding: 8px 15px; font-size: .84rem; }

@media (max-width: 1199px) {
  .js .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset: var(--header-h) 0 auto 0; max-height: calc(100vh - var(--header-h)); overflow: auto; padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0, 0, 0, .5); }
  .is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 15px 4px; font-size: 1.05rem; border-bottom: 1px solid rgba(124, 160, 255, .12); border-radius: 0; }
  .site-nav a[aria-current] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
  .site-nav__cta { display: flex; gap: 10px; padding-top: 18px; }
  .site-nav .site-nav__cta a { display: flex; flex: 1 1 0; padding: 12px 16px; border-bottom: 0; color: #101538; font-size: 1rem; }
  .site-nav .site-nav__cta .btn--ghost { color: var(--text); }
  .site-header .header-auth { display: none; }  /* two classes: must beat .btn { display }, which comes later in this file */
}
@media (max-width: 420px) {
  .site-header__in { gap: 10px; }
  .brand { gap: 8px; font-size: 1rem; letter-spacing: .1em; }
  .brand img { width: 32px; height: 32px; }
  .lang button { min-width: 36px; padding: 5px 7px; }
}

/* ------------------------------------------------------------------ buttons */
/* The cut-corner shape lives on pseudo-elements so the focus ring and the glow are not clipped. */
.btn { position: relative; z-index: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 26px; border: 0; background: none; font-family: var(--font-display); font-size: 1rem; letter-spacing: .1em; line-height: 1.2; text-align: center; text-decoration: none; transition: transform .2s, filter .2s; }
.btn::before, .btn::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.btn::before { inset: 0; background: var(--btn-edge); }
.btn::after { inset: 1px; background: var(--btn-fill); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline-offset: 5px; }
.btn--gold { --btn-edge: #fff6d6; --btn-fill: linear-gradient(180deg, #fff0b8 0%, var(--gold) 45%, var(--gold-deep) 100%); color: #101538; filter: drop-shadow(0 6px 18px rgba(255, 190, 70, .35)); }
.btn--gold:hover { color: #101538; filter: drop-shadow(0 8px 26px rgba(255, 200, 90, .6)) brightness(1.06); }
.btn--ghost { --btn-edge: var(--line-strong); --btn-fill: #0c1236; color: var(--text); }
.btn--ghost:hover { --btn-edge: var(--cyan); --btn-fill: #16215c; color: #fff; }
.btn--danger { --btn-edge: #ffb3b3; --btn-fill: linear-gradient(180deg, #b4283e, #6d1422); color: #fff; }
.btn--danger:hover { color: #fff; filter: brightness(1.1); }
.btn[disabled] { cursor: not-allowed; opacity: .5; transform: none; filter: none; }
.btn[aria-busy="true"] { cursor: progress; }
.link-btn { padding: 0; border: 0; background: none; color: var(--cyan); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }
.link-btn[disabled] { color: var(--muted); text-decoration: none; cursor: default; }

/* ------------------------------------------------------------------ sections + headings */
.section { position: relative; padding-block: clamp(56px, 8vw, 104px); isolation: isolate; }
.section--tint { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg) 100%); }
.section__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.section__bg img { width: 100%; height: 100%; object-fit: cover; }
.section__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 10, 26, var(--veil, .7)) 22%, rgba(7, 10, 26, var(--veil, .7)) 78%, var(--bg) 100%); }
.section__head { max-width: 800px; margin: 0 auto clamp(28px, 4.4vw, 48px); text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--cyan); font-family: var(--font-display); font-size: .85rem; letter-spacing: .32em; }
.kicker::before, .kicker::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); }
.kicker::after { transform: scaleX(-1); }
.title { color: var(--gold); font-family: var(--font-display); font-size: clamp(1.75rem, 4.6vw, 3rem); letter-spacing: .04em; line-height: 1.12; text-wrap: balance; text-shadow: 0 0 28px rgba(255, 200, 90, .28); }
.lead { margin-top: 18px; color: var(--text); font-size: clamp(1.2rem, 1.6vw, 1.35rem); text-wrap: pretty; }
.h3 { color: #fff; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .02em; line-height: 1.2; }
.tag { display: inline-block; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(7, 10, 26, .6); color: var(--cyan); font-size: .82rem; font-weight: 700; letter-spacing: .14em; line-height: 1.4; }
.tag--gold { border-color: rgba(255, 219, 115, .55); color: var(--gold); }
.tag--live { border-color: rgba(255, 110, 110, .6); color: #ff9c9c; }
.tag--live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 10px #ff5a5a; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ------------------------------------------------------------------ panel (glowing thin frame) */
.panel { position: relative; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(24, 31, 80, .82), rgba(11, 15, 44, .9)); box-shadow: inset 0 0 0 1px rgba(89, 230, 255, .05), 0 18px 44px rgba(0, 0, 0, .42), 0 0 26px rgba(89, 230, 255, .06); }
.panel::before, .panel::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); opacity: .8; pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.panel p:not([class]) { color: var(--muted); }
.panel .h3 + p, .panel .gloss + p { margin-top: 10px; }
.checks { display: grid; gap: 8px; margin-top: 16px; }
.checks li { position: relative; padding-left: 26px; color: var(--text); }
.checks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .52em; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px rgba(255, 200, 90, .6); }

/* ------------------------------------------------------------------ reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.d-05 { --d: .05s; } .d-06 { --d: .06s; } .d-08 { --d: .08s; } .d-10 { --d: .1s; } .d-12 { --d: .12s; }
.d-15 { --d: .15s; } .d-16 { --d: .16s; } .d-20 { --d: .2s; } .d-24 { --d: .24s; }

/* ------------------------------------------------------------------ footer */
.site-footer { position: relative; padding: 56px 0 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #080b20, #05071a); color: var(--muted); font-size: 1.05rem; }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 56px; }
.site-footer__brand { flex: 1 1 260px; }
.site-footer nav { flex: 0 1 430px; }
.site-footer .foot-legal { flex: 0 1 240px; }
.site-footer .brand { margin-bottom: 14px; }
.site-footer h2 { margin-bottom: 12px; color: var(--gold); font-family: var(--font-display); font-size: .85rem; letter-spacing: .24em; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a[href]:hover { color: var(--gold); text-decoration: underline; }
.site-footer__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(124, 160, 255, .14); font-size: .98rem; }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
.foot-links li + li { margin-top: 0; }
@media (max-width: 520px) { .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ lightbox (native <dialog>) */
.lightbox { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 56px 12px 48px; border: 0; background: rgba(4, 6, 18, .94); color: var(--text); overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(4, 6, 18, .9); }
.lightbox__figure { display: grid; justify-items: center; gap: 12px; max-width: min(1500px, 100%); max-height: 100%; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); width: auto; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 0 50px rgba(89, 230, 255, .16); background: #0b1030; }
.lightbox__cap { color: var(--text); font-size: 1.1rem; text-align: center; }
.lightbox__count { position: absolute; left: 0; right: 0; bottom: 14px; color: var(--muted); font-size: .95rem; text-align: center; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(11, 16, 48, .9); color: #fff; }
.lightbox__btn:hover { background: var(--gold); color: #0b1030; border-color: var(--gold); }
.lightbox__close { top: 10px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; margin-top: -24px; }
.lightbox__next { right: 12px; top: 50%; margin-top: -24px; }
@media (max-width: 700px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; margin: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
