/*
Theme Name: Twilight Hammer
Theme URI: https://twilighthammer.test
Description: Custom theme for the Twilight Hammer WooCommerce store. Ported from the HTML prototype. Dark-fantasy streetwear + loyalty layer.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: twilight-hammer
*/

/* -------------------------------------------------------------------------
   Design tokens (from prototype assets/css/th-unified-layout.css :root)
   ------------------------------------------------------------------------- */
:root{
  --th-bg:#030303;
  --th-panel:#070707;
  --th-white:#f2efe7;
  --th-muted:#8f8f8f;
  --th-line:rgba(255,255,255,.14);
  --th-soft:rgba(255,255,255,.075);
  /* accent tokens — for borders, glows, fills (slightly desaturated vs the
     original pure-neon so they stop vibrating on #030303) */
  --th-blue:#26dbe8;
  --th-green:#6ee83a;
  --th-red:#ef4a42;
  --th-purple:#a869ef;
  --th-gold:#b99a62;
  /* -ink variants — WCAG-safe for text on the dark ground */
  --th-blue-ink:#72e0e8;
  --th-green-ink:#84dd6a;
  --th-red-ink:#f5837d;
  --th-purple-ink:#c49af0;
  --th-display:Impact,Haettenschweiler,"Arial Narrow Bold","Arial Black",system-ui,sans-serif;
  --th-ui:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,Helvetica,sans-serif;
  --th-cut:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));
  --th-cut-sm:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,9px 100%,0 calc(100% - 9px));

  /* rarity */
  --th-rarity-basic:#65ff24;
  --th-rarity-uncommon:#00eaff;
  --th-rarity-rare:#a855ff;
  --th-rarity-epic:#ff3128;
  --th-rarity-legendary:#d4a847;

  --th-maxw:1320px;
  --th-gap:22px;
  --th-gutter:clamp(14px,4vw,28px); /* one fluid side gutter site-wide */
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--th-bg);
  color:var(--th-white);
  font-family:var(--th-ui);
  font-size:15px;
  line-height:1.5;
  letter-spacing:.01em;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
h1,h2,h3,h4{
  font-family:var(--th-display);
  font-weight:400;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin:0 0 .5em;
  line-height:.95;
}
p{margin:0 0 1em}

.th-container{max-width:var(--th-maxw);margin:0 auto;padding:0 var(--th-gutter,clamp(14px,4vw,28px))}
.th-section{padding:64px 0}
.th-section > .th-container > h2{font-size:clamp(30px,4vw,52px);margin-bottom:28px}

.th-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:52px;padding:0 22px;
  border:1px solid var(--th-gold);
  clip-path:var(--th-cut-sm);
  background:rgba(185,154,98,.08);
  color:var(--th-white);
  font:800 12px/1.15 var(--th-ui);
  letter-spacing:.14em;text-transform:uppercase;
  text-align:center;white-space:normal;text-wrap:balance;
  cursor:pointer;transition:.16s ease;
}
.th-btn:hover{background:rgba(185,154,98,.2);transform:translateY(-1px)}
.th-btn--primary{background:var(--th-blue);border-color:var(--th-blue);color:#031014}
.th-btn--primary:hover{background:#5ff4ff}
.th-btn--danger{border-color:var(--th-red);color:var(--th-red);background:rgba(255,49,40,.06)}
.th-btn--danger:hover{background:rgba(255,49,40,.16)}
.th-btn--block{width:100%}

.th-xp-badge{
  display:inline-flex;align-items:center;
  padding:2px 8px;border:1px solid var(--th-blue);
  color:var(--th-blue);
  font:800 9px/1.4 var(--th-ui);letter-spacing:.14em;text-transform:uppercase;
  vertical-align:middle;
}

.th-skip-link{position:absolute;left:-9999px}
.th-skip-link:focus{left:16px;top:16px;z-index:9999;background:#000;padding:10px 16px;border:1px solid var(--th-gold)}

:where(a,button,input,select,textarea):focus-visible{
  outline:2px solid var(--th-blue);outline-offset:2px;
}

/* loading guard from prototype — release immediately, no JS timeout dance */
html.th-loading body{opacity:1}
