﻿/* UI kit вЂ” site shell styles. Loads colors_and_type.css, then adds layout. */
@import url("./colors_and_type.css");

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font-body);}
body {
  background:
    radial-gradient(circle at 12% -10%, rgba(212,166,74,0.08), transparent 50%),
    radial-gradient(circle at 90% 5%, rgba(192,57,43,0.06), transparent 50%),
    var(--night-1000);
  background-attachment: fixed;
}

/* ------- shared helpers ------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-6); }
.eyebrow { font-family: var(--font-serif); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-500); font-weight: 600; }
.lead { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 19px; color: var(--fg-muted); }
.rule-gold { display:flex; align-items:center; gap:10px; color: var(--gold-500); }
.rule-gold::before, .rule-gold::after { content:""; flex:1; height:1px; background: linear-gradient(90deg, transparent, var(--gold-700) 20%, var(--gold-500) 50%, var(--gold-700) 80%, transparent); }

/* Frame with gold corner ornaments */
.ornframe { position: relative; border: 1px solid var(--gold-700); }
.ornframe > .corner { position:absolute; width:18px; height:18px; border:1px solid var(--gold-500); pointer-events:none;}
.ornframe > .corner.tl { top:-1px; left:-1px; border-right:0; border-bottom:0;}
.ornframe > .corner.tr { top:-1px; right:-1px; border-left:0; border-bottom:0;}
.ornframe > .corner.bl { bottom:-1px; left:-1px; border-right:0; border-top:0;}
.ornframe > .corner.br { bottom:-1px; right:-1px; border-left:0; border-top:0;}
.ornframe > .corner::after { content:""; position:absolute; width:4px; height:4px; background: var(--gold-500); transform:rotate(45deg); box-shadow: 0 0 6px var(--gold-500);}
.ornframe > .corner.tl::after { top:-2px; left:-2px;}
.ornframe > .corner.tr::after { top:-2px; right:-2px;}
.ornframe > .corner.bl::after { bottom:-2px; left:-2px;}
.ornframe > .corner.br::after { bottom:-2px; right:-2px;}

/* ------- header ------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,14,28,0.78);
  border-bottom: 1px solid var(--border);
  height: 72px;
}
.site-header .inner { display: flex; align-items:center; gap: 24px; height: 100%;}
.site-header .nav { display: flex; gap: 4px; flex: 1;}
.site-header .nav a {
  font-family: var(--font-serif); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 10px 14px; border-radius: var(--r-sm);
  color: var(--fg-muted); text-decoration: none;
  position: relative;
  transition: color 160ms ease, background 160ms ease;
  cursor: pointer;
}
.site-header .nav a:hover { color: var(--gold-300); background: rgba(212,166,74,0.06);}
.site-header .nav a.active {
  color: var(--gold-100); background: rgba(212,166,74,0.10);
  box-shadow: 0 0 0 1px rgba(212,166,74,0.30) inset;
}
.site-header .nav a.active::after { content:""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--gold-500); box-shadow: 0 0 8px var(--gold-500);}
.site-header .brand { display:flex; align-items:center; gap: 10px; text-decoration:none; }
.site-header .brand img { height: 44px; }
.site-header .actions { display:flex; gap: 8px; align-items: center; flex-shrink: 0;}
.site-header .actions .btn { white-space: nowrap; flex-shrink: 0; }
.site-header .live-pill {
  display: inline-flex; align-items:center; gap: 8px;
  font-family: var(--font-mono); font-size: 14px;
  padding: 4px 12px; border: 1px solid rgba(47,170,106,0.45); border-radius: var(--r-pill);
  color: var(--emerald-300); background: rgba(47,170,106,0.10);
}
.site-header .live-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-500); box-shadow: 0 0 8px var(--emerald-500); animation: ro-pulse 1.6s ease-in-out infinite;}

/* ------- hero ------- */
.hero {
  position: relative;
  height: 580px;
  background: url("../assets/hero-bg.svg") center/cover no-repeat;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::after {
  content:""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--night-1000) 100%);
  pointer-events: none;
}
.hero .center {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 24px;
}
.hero .display {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #f5e3aa, #d4a64a 55%, #8a6020);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 8px 0 12px;
  animation: hero-rise 900ms cubic-bezier(0.16,1,0.3,1) both;
}
.hero .lead-line { animation: hero-rise 900ms 120ms cubic-bezier(0.16,1,0.3,1) both; }
.hero .ctas { display: flex; gap: 14px; margin-top: 28px; animation: hero-rise 900ms 240ms cubic-bezier(0.16,1,0.3,1) both;}
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px);} to { opacity: 1; transform: none;}}

/* floating motes */
.hero .mote { position:absolute; width: 4px; height: 4px; border-radius:50%; background:#d4a64a; box-shadow: 0 0 10px #d4a64a; animation: rise 12s linear infinite; bottom: 0;}
@keyframes rise { 0%{ transform: translateY(0) scale(0.5); opacity:0;} 20%{opacity:0.85;} 100%{ transform: translateY(-580px) scale(1); opacity: 0;}}

/* ------- buttons ------- */
.btn {
  --c1: var(--gold-300); --c2: var(--gold-600); --fgc: var(--ink-900);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 26px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--c1), var(--c2));
  color: var(--fgc);
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 -1px 0 rgba(0,0,0,0.4) inset, var(--shadow-md);
  cursor: pointer; text-decoration: none;
  transition: transform 90ms ease-in, box-shadow 220ms ease, filter 220ms ease;
}
.btn:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 -1px 0 rgba(0,0,0,0.4) inset, var(--glow-gold); filter: brightness(1.05);}
.btn:active { transform: scale(0.98); }
.btn.crimson { --c1: var(--crimson-300); --c2: var(--crimson-700); --fgc: #fff5f0;}
.btn.ghost { background: transparent; color: var(--gold-300); border: 1px solid var(--border-strong); box-shadow:none;}
.btn.ghost:hover { background: rgba(212,166,74,0.08); border-color: var(--gold-500); color: var(--gold-100); filter:none;}
.btn.lg { padding: 16px 32px; font-size: 14px;}
.btn.sm { padding: 8px 16px; font-size: 11px;}

/* ------- card ------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: transform 220ms cubic-bezier(0.16,1,0.3,1), border-color 220ms;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong);}
.card.gold { border-color: rgba(212,166,74,0.55); box-shadow: var(--shadow-md), 0 0 24px rgba(212,166,74,0.14);}
.card.parchment { background: linear-gradient(180deg, var(--parchment-50), var(--parchment-100)); border-color: var(--parchment-300); color: var(--ink-900);}

/* ------- inputs ------- */
.field { display: flex; flex-direction: column; gap: 6px;}
.field .lbl { font-family: var(--font-serif); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-300);}
.field .inp {
  background: var(--night-900); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 12px 14px; color: var(--fg);
  font-family: var(--font-mono); font-size: 16px;
  box-shadow: var(--inset-deep); outline:none;
  transition: border-color 160ms, box-shadow 220ms;
}
.field .inp:focus { border-color: var(--gold-500); box-shadow: var(--inset-deep), var(--glow-gold);}
.field .hint { font-family: var(--font-body); font-size: 12px; color: var(--fg-dim);}

/* ------- badges ------- */
.badge {
  display: inline-flex; align-items:center; gap: 6px;
  font-family: var(--font-serif); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(212,166,74,0.10); color: var(--gold-300);
  border: 1px solid rgba(212,166,74,0.35);
}
.badge .dot { width: 6px; height: 6px; border-radius:50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: ro-pulse 1.6s ease-in-out infinite;}
.badge.crimson { color: var(--crimson-300); background: rgba(192,57,43,0.12); border-color: rgba(192,57,43,0.45);}
.badge.live { color: var(--emerald-300); background: rgba(47,170,106,0.10); border-color: rgba(47,170,106,0.4);}
.badge.solid { background: linear-gradient(180deg, var(--gold-300), var(--gold-600)); color: var(--ink-900); border-color: rgba(0,0,0,0.4);}

/* ------- placeholders for game art ------- */
.sprite-ph {
  display:flex; align-items:center; justify-content:center; text-align:center;
  background:
    repeating-linear-gradient(45deg, rgba(212,166,74,0.06) 0 6px, transparent 6px 12px),
    var(--night-700);
  border: 1px dashed rgba(212,166,74,0.45);
  color: var(--gold-500);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; line-height: 1.2;
  border-radius: var(--r-sm);
  padding: 6px;
}

/* ------- progress bar ------- */
.bar { height: 8px; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.05); border-radius: 2px; overflow:hidden;}
.bar > i { display:block; height:100%; background: linear-gradient(90deg, var(--c, var(--gold-500)), color-mix(in srgb, var(--c, var(--gold-500)) 60%, white)); transition: width 800ms ease;}

/* ------- footer ------- */
.site-footer {
  margin-top: 80px;
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(192,57,43,0.04));
  font-size: 13px; color: var(--fg-muted);
}
.site-footer h5 { font-family: var(--font-serif); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-300); margin: 0 0 12px;}
.site-footer .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px;}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px;}
.site-footer a { color: var(--fg-muted); text-decoration: none;}
.site-footer a:hover { color: var(--gold-300);}
.site-footer .legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); text-align: center; letter-spacing: 0.04em;}

/* screen transitions */
.screen-enter { animation: screen-in 480ms cubic-bezier(0.16,1,0.3,1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;}}

/* stagger children */
.stagger > * { animation: row-in 600ms cubic-bezier(0.16,1,0.3,1) both;}
.stagger > *:nth-child(1){ animation-delay: 40ms;}
.stagger > *:nth-child(2){ animation-delay: 90ms;}
.stagger > *:nth-child(3){ animation-delay: 140ms;}
.stagger > *:nth-child(4){ animation-delay: 190ms;}
.stagger > *:nth-child(5){ animation-delay: 240ms;}
.stagger > *:nth-child(6){ animation-delay: 290ms;}
.stagger > *:nth-child(7){ animation-delay: 340ms;}
.stagger > *:nth-child(8){ animation-delay: 390ms;}
.stagger > *:nth-child(9){ animation-delay: 440ms;}
.stagger > *:nth-child(10){ animation-delay: 490ms;}
@keyframes row-in { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none;}}

/* modal + toast */
@keyframes modal-in { from { opacity: 0;} to { opacity: 1;}}
@keyframes modal-rise { from { opacity: 0; transform: translateY(14px) scale(0.98);} to { opacity: 1; transform: none;}}
@keyframes toast-in { from { opacity: 0; transform: translateX(20px);} to { opacity: 1; transform: none;}}

/* item tooltip hover */
.item-tt-trigger { cursor: help; position: relative; display: inline-flex; align-items: center; gap: 4px; }
.item-tt-trigger:hover .item-tt-pop { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;}
.item-tt-pop { position: absolute; bottom: calc(100% + 10px); left: 0; opacity: 0; transform: translateY(6px) scale(0.97); transition: opacity 200ms, transform 200ms cubic-bezier(0.16,1,0.3,1); pointer-events: none; z-index: 20;}
