/* =========================================================
   GOVERNOR'S COMPANION — Design tokens
   Palette: bg-void, panel, panel-alt, gold, gold-bright, wine, text, text-dim
   Type: Cinzel (display / regal), Manrope (body), JetBrains Mono (data)
   Signature: beveled "inventory-slot" panel bevels + wax-seal crest motif
   ========================================================= */

:root{
  --bg: #0A0A0F;
  --bg-soft: #0E0F16;
  --panel: #13141C;
  --panel-alt: #1B1D2A;
  --slot-shadow-dark: rgba(0,0,0,.65);
  --slot-shadow-light: rgba(255,255,255,.06);

  --gold: #C9A227;
  --gold-bright: #E8C468;
  --wine: #7A2E3B;
  --wine-bright: #9C3B4B;

  --text: #EDEAE0;
  --text-dim: #9A9BAE;
  --text-faint: #666980;

  --online: #4C9A6A;

  --font-display: 'Cinzel', serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-s: 3px;
  --radius-m: 6px;
  --container: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin:0; padding:0; }
img{ max-width:100%; display:block; }
button{ font-family: inherit; cursor: pointer; }

/* subtle background texture: faint diagonal grid, gives the "map/ledger" feel */
body{
  background-image:
    radial-gradient(circle at 15% 0%, rgba(201,162,39,.05), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(122,46,59,.07), transparent 40%),
    linear-gradient(var(--bg), var(--bg));
}

/* ---------- beveled "inventory slot" panel — signature element ---------- */
.bevel{
  background: var(--panel);
  border: 1px solid #2A2C3B;
  box-shadow:
    inset 0 1px 0 var(--slot-shadow-light),
    inset 0 -2px 0 var(--slot-shadow-dark);
  border-radius: var(--radius-s);
}

/* ---------- buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-gold{
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #241900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.25);
}
.btn-gold:hover{ filter: brightness(1.08); }
.btn-ghost{
  background: transparent;
  color: var(--text-dim);
  border-color: #2A2C3B;
}
.btn-ghost:hover{ color: var(--text); border-color: var(--gold); }
.btn-outline{
  background: transparent;
  color: var(--gold-bright);
  border: 1px solid var(--gold);
}
.btn-outline:hover{ background: rgba(201,162,39,.1); }
.btn-copy{
  background: var(--panel-alt);
  color: var(--gold-bright);
  border: 1px solid #33344a;
  font-family: var(--font-mono);
}
.btn-copy:hover{ border-color: var(--gold); }
.btn-copy.copied{ background: var(--online); color: #06170d; border-color: var(--online); }
.btn-lg{ padding: 15px 28px; font-size: 14px; }
.btn-sm{ padding: 6px 12px; font-size: 11px; }
.btn-block{ width: 100%; }
.btn-logout{
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: rgba(122,46,59,.15);
  color: #E88E9C;
  border: 1px solid var(--wine);
  border-radius: var(--radius-s);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .03em;
}
.btn-logout:hover{ background: var(--wine); color: #fff; }

/* ================= HEADER ================= */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1E202E;
}
.header-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand{ display:flex; align-items:center; gap:10px; margin-right: 8px; }
.brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand-text strong{ font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; color: var(--text); }
.brand-text em{ font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: .25em; color: var(--gold); }

.main-nav{ display:flex; gap: 26px; flex: 1; }
.main-nav a{
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover{ color: var(--text); border-color: var(--gold); }

.header-actions{ display:flex; align-items:center; }
.guest-actions{ display:flex; gap: 10px; }

/* profile chip + dropdown */
.profile-wrap{ position: relative; }
.profile-chip{
  width: 44px; height: 44px; padding: 0;
  border-radius: var(--radius-s);
  border: 2px solid var(--gold);
  background: var(--panel-alt);
  position: relative;
  overflow: visible;
}
.profile-avatar{ width:100%; height:100%; object-fit: cover; image-rendering: pixelated; border-radius: 2px; }
.chip-online-dot{
  position:absolute; right:-3px; bottom:-3px;
  width:12px; height:12px; border-radius:50%;
  background: var(--online); border: 2px solid var(--bg);
}
.profile-dropdown{
  position: absolute; right:0; top: calc(100% + 12px);
  width: 280px;
  background: var(--panel);
  border: 1px solid #2A2C3B;
  border-radius: var(--radius-m);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  padding: 16px;
  z-index: 200;
}
.pd-head{ display:flex; align-items:center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #24263400; margin-bottom: 12px; }
.pd-avatar{ width:48px; height:48px; border-radius: var(--radius-s); border:2px solid var(--gold); image-rendering: pixelated; }
.pd-idbox{ display:flex; flex-direction:column; gap:4px; }
.pd-name{ font-weight: 800; font-size: 15px; }
.pd-tag{
  align-self:flex-start;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em;
  background: rgba(201,162,39,.15); color: var(--gold-bright);
  padding: 2px 7px; border-radius: 3px; border: 1px solid rgba(201,162,39,.35);
}
.pd-balance{
  display:flex; align-items:center; justify-content:space-between;
  background: var(--panel-alt); border-radius: var(--radius-s);
  padding: 10px 12px; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
}
.pd-balance-label{ display:block; font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); letter-spacing: .1em; }
.pd-balance-amount{ font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--gold-bright); }
.pd-links{ display:flex; flex-direction:column; gap: 2px; }
.pd-links a{
  display:flex; align-items:center; gap: 10px;
  padding: 9px 8px; border-radius: var(--radius-s);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.pd-links a:hover{ background: var(--panel-alt); color: var(--text); }
.pd-links svg{ color: var(--gold); flex-shrink:0; }
.pd-count{ margin-left:auto; font-family: var(--font-mono); font-size: 11px; background: var(--wine); color:#fff; padding:1px 7px; border-radius: 10px; }

.nav-burger{ display:none; flex-direction:column; gap:4px; background:none; border:none; padding: 8px; }
.nav-burger span{ width: 22px; height: 2px; background: var(--text); }

/* ================= HERO ================= */
.hero{ position: relative; text-align:center; padding: 90px 24px 70px; overflow:hidden; }
.hero-bg{
  position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(ellipse 700px 400px at 50% -10%, rgba(201,162,39,.14), transparent 60%),
    radial-gradient(ellipse 600px 300px at 85% 80%, rgba(122,46,59,.12), transparent 60%);
}
.hero-seal{ display:flex; justify-content:center; margin-bottom: 18px; opacity: .95; }
.hero-eyebrow{
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .25em;
  color: var(--gold); text-transform: uppercase; margin: 0 0 14px;
}
.hero-title{
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 6vw, 64px); line-height: 1.05;
  margin: 0 0 18px; letter-spacing: .01em;
}
.hero-title span{ color: var(--gold-bright); }
.hero-sub{ color: var(--text-dim); font-size: 16px; max-width: 560px; margin: 0 auto 34px; }
.hero-cta-row{ display:flex; gap: 14px; justify-content:center; flex-wrap: wrap; margin-bottom: 40px; }

.hero-ip{
  display:inline-flex; align-items:center; gap: 14px;
  background: var(--panel); border: 1px solid #2A2C3B;
  border-radius: var(--radius-m); padding: 12px 14px 12px 20px;
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
  margin-bottom: 46px;
}
.hero-ip-text{ display:flex; flex-direction:column; align-items:flex-start; text-align:left; }
.hero-ip-label{ font-family: var(--font-mono); font-size: 10px; letter-spacing: .15em; color: var(--text-faint); }
.hero-ip-value{ font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--gold-bright); }

.hero-stats{ display:flex; justify-content:center; gap: 52px; flex-wrap: wrap; }
.hero-stat{ display:flex; flex-direction:column; align-items:center; }
.stat-num{ font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text); }
.stat-label{ font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--text-faint); margin-top: 4px; }

/* ================= CONTENT GRID ================= */
.content-grid{
  max-width: var(--container); margin: 0 auto;
  padding: 30px 24px 80px;
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 36px;
}
.section-title{
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; margin: 0 0 22px; letter-spacing: .01em;
}
.section-title span{ color: var(--text-faint); font-size: 16px; font-family: var(--font-body); font-weight: 500; }
.section-title.center{ text-align:center; }
.section-sub{ color: var(--text-dim); margin: -12px 0 30px; }
.section-sub.center{ text-align:center; }

.news-list{ display:flex; flex-direction:column; gap: 18px; }
.news-card{
  display:flex; gap: 18px; padding: 18px;
  background: var(--panel); border: 1px solid #22232f;
  border-radius: var(--radius-m);
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
  transition: border-color .15s ease;
}
.news-card:hover{ border-color: var(--gold); }
.news-thumb{
  width: 96px; height: 96px; flex-shrink:0; border-radius: var(--radius-s);
  background: linear-gradient(135deg, var(--panel-alt), #232537);
  display:flex; align-items:center; justify-content:center;
  font-size: 30px; border: 1px solid #2A2C3B;
}
.news-body{ display:flex; flex-direction:column; gap: 6px; min-width:0; }
.news-date{ font-family: var(--font-mono); font-size: 11px; color: var(--gold); letter-spacing: .05em; }
.news-title{ font-family: var(--font-display); font-size: 16px; font-weight: 700; margin:0; }
.news-excerpt{ color: var(--text-dim); font-size: 13px; margin:0; }
.news-more{ font-size: 12px; font-weight: 700; color: var(--gold-bright); margin-top: 4px; }

.side-panel{
  background: var(--panel); border: 1px solid #22232f; border-radius: var(--radius-m);
  padding: 20px; margin-bottom: 24px;
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
}
.side-title{
  display:flex; align-items:center; gap: 8px;
  font-family: var(--font-display); font-size: 14px; font-weight:700;
  margin: 0 0 16px; color: var(--gold-bright);
}
.side-title svg{ color: var(--gold); }
.mini-list{ display:flex; flex-direction:column; gap: 10px; margin-bottom: 16px; }
.mini-row{
  display:flex; align-items:center; gap: 10px;
  padding: 8px; border-radius: var(--radius-s); background: var(--panel-alt);
}
.mini-avatar{ width: 30px; height:30px; border-radius: 3px; image-rendering: pixelated; flex-shrink:0; }
.mini-text{ display:flex; flex-direction:column; min-width:0; }
.mini-name{ font-size: 12.5px; font-weight: 700; }
.mini-item{ font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }

.player-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.player-slot{
  display:flex; flex-direction:column; align-items:center; gap: 6px;
  padding: 10px 4px; border-radius: var(--radius-s);
  background: var(--panel-alt);
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
}
.player-avatar{ width: 40px; height:40px; border-radius: 3px; image-rendering: pixelated; border: 1px solid #2A2C3B; }
.player-name{ font-size: 10.5px; font-weight: 700; text-align:center; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; max-width: 100%; }

/* ================= STORE ================= */
.store-teaser{ max-width: var(--container); margin: 0 auto; padding: 20px 24px 90px; }
.store-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 34px; }
.store-card{
  position: relative;
  background: var(--panel); border: 1px solid #22232f; border-radius: var(--radius-m);
  padding: 28px 22px; text-align:center;
  box-shadow: inset 0 1px 0 var(--slot-shadow-light), inset 0 -2px 0 var(--slot-shadow-dark);
  transition: transform .15s ease, border-color .15s ease;
}
.store-card:hover{ transform: translateY(-4px); border-color: var(--gold); }
.store-card.featured{ border-color: var(--gold); background: linear-gradient(180deg, rgba(201,162,39,.06), var(--panel)); }
.store-badge{
  position:absolute; top:-11px; left:50%; transform: translateX(-50%);
  background: var(--gold); color:#241900; font-size: 9px; font-weight:800;
  letter-spacing: .08em; padding: 4px 10px; border-radius: 20px;
}
.store-icon{ font-size: 34px; margin-bottom: 12px; }
.store-card h4{ font-family: var(--font-display); font-size: 16px; margin: 0 0 8px; }
.store-card p{ color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }
.store-price{ font-family: var(--font-mono); font-weight: 700; color: var(--gold-bright); font-size: 16px; }

/* ================= SUPPORT BAND ================= */
.support-band{ background: var(--panel-alt); border-top: 1px solid #22232f; border-bottom: 1px solid #22232f; }
.support-inner{
  max-width: var(--container); margin: 0 auto; padding: 50px 24px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px; flex-wrap: wrap;
}
.support-inner .section-title{ margin-bottom: 8px; }
.support-inner .section-sub{ margin: 0; }

/* ================= FOOTER ================= */
.site-footer{ background: var(--bg-soft); border-top: 1px solid #1E202E; }
.footer-ip-band{ background: var(--panel); border-bottom: 1px solid #22232f; }
.footer-ip-inner{
  max-width: var(--container); margin:0 auto; padding: 20px 24px;
  display:flex; align-items:center; gap: 24px; flex-wrap: wrap;
}
.footer-brand-mini{ display:flex; align-items:center; gap: 12px; flex: 1; min-width: 240px; }
.footer-brand-mini strong{ display:block; font-family: var(--font-mono); font-size: 13px; letter-spacing:.03em; }
.footer-brand-mini span{ display:block; font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.footer-ip-box{ display:flex; flex-direction:column; }

.footer-columns{
  max-width: var(--container); margin: 0 auto; padding: 46px 24px;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px;
}
.footer-col h4{ font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--gold); margin: 0 0 16px; }
.footer-col a, .footer-desc{ display:block; font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.footer-col a:hover{ color: var(--gold-bright); }

.footer-bottom{
  border-top: 1px solid #1E202E; padding: 18px 24px;
  text-align:center; font-size: 12px; color: var(--text-faint);
}

/* ================= AUTH MODAL ================= */
.modal-overlay{
  position: fixed; inset:0; z-index: 500;
  background: rgba(6,6,10,.75); backdrop-filter: blur(4px);
  display:flex; align-items:center; justify-content:center; padding: 20px;
}
.auth-modal{
  position: relative; width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid #2A2C3B; border-radius: var(--radius-m);
  padding: 30px 26px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-close{
  position:absolute; top: 12px; right: 14px;
  background:none; border:none; color: var(--text-faint);
  font-size: 22px; line-height:1;
}
.modal-close:hover{ color: var(--text); }
.auth-tabs{ display:flex; gap: 4px; margin-bottom: 22px; background: var(--panel-alt); border-radius: var(--radius-s); padding: 4px; }
.auth-tab{
  flex:1; padding: 10px; background:none; border:none; border-radius: var(--radius-s);
  font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--text-faint);
}
.auth-tab.active{ background: var(--gold); color: #241900; }
.auth-form{ display:flex; flex-direction:column; }
.field-label{ font-size: 12px; font-weight: 700; color: var(--text-dim); margin: 12px 0 6px; }
.field-label:first-child{ margin-top:0; }
.field-input{
  background: var(--bg); border: 1px solid #2A2C3B; border-radius: var(--radius-s);
  padding: 11px 12px; color: var(--text); font-family: var(--font-mono); font-size: 13px;
}
.field-input:focus{ outline: none; border-color: var(--gold); }
.field-hint{ font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.form-msg{ font-size: 12.5px; margin: 14px 0 0; min-height: 16px; }
.form-msg.error{ color: #E8828F; }
.form-msg.success{ color: var(--online); }
.auth-form .btn{ margin-top: 18px; }

/* ================= TOAST ================= */
.toast{
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel); border: 1px solid var(--gold); color: var(--gold-bright);
  font-size: 13px; font-weight: 600; padding: 12px 20px; border-radius: var(--radius-s);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 999;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px){
  .content-grid{ grid-template-columns: 1fr; }
  .store-grid{ grid-template-columns: 1fr; }
  .footer-columns{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px){
  .main-nav{ display:none; }
  .nav-burger{ display:flex; }
  .guest-actions .btn-ghost{ display:none; }
  .footer-columns{ grid-template-columns: 1fr; }
  .hero-stats{ gap: 30px; }
}
@media (max-width: 480px){
  .player-grid{ grid-template-columns: repeat(2,1fr); }
  .news-card{ flex-direction: column; }
  .news-thumb{ width:100%; height: 120px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
