/* ============================================================
   HOXWORX — global styles
   Drop into Bluehost as-is. All pages share this stylesheet.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (from logo) */
  --hx-black: #0B0B0C;
  --hx-black-2: #131316;
  --hx-black-3: #1C1C20;
  --hx-charcoal: #2A2A2F;
  --hx-steel: #45454C;
  --hx-fog: #8A8A92;

  --hx-bone: #E8E4DA;
  --hx-bone-2: #C9C3B5;
  --hx-paper: #F4F1EA;

  --hx-olive: #4A5A33;
  --hx-olive-2: #3D4A2A;
  --hx-olive-deep: #2A3320;

  --hx-brass: #B8964A;
  --hx-brass-2: #C9A659;
  --hx-brass-deep: #8A6E33;

  --hx-blood: #8A2A1F;
  --hx-blaze: #D45A1F;

  /* Semantic — defaults to DARK theme */
  --bg: var(--hx-black);
  --bg-2: var(--hx-black-2);
  --bg-3: var(--hx-black-3);
  --fg: var(--hx-bone);
  --fg-mute: var(--hx-bone-2);
  --fg-dim: #6E6E76;
  --line: rgba(232, 228, 218, 0.10);
  --line-strong: rgba(232, 228, 218, 0.22);
  --accent: var(--hx-brass);
  --accent-2: var(--hx-brass-2);
  --accent-deep: var(--hx-brass-deep);
  --accent-soft: rgba(184, 150, 74, 0.14);

  /* Texture (default: clean) */
  --texture: none;
  --texture-opacity: 0;

  /* Typography stacks (defaults to condensed) */
  --font-display: "Oswald", "Bebas Neue", "Impact", sans-serif;
  --font-body: "Saira Semi Condensed", "Barlow Semi Condensed", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display-tracking: 0.04em;
  --display-weight: 600;

  /* Sizing */
  --radius: 2px;
  --radius-lg: 4px;
  --container: 1320px;
}

/* Light theme override */
[data-theme="light"] {
  --bg: var(--hx-paper);
  --bg-2: #ECE8DD;
  --bg-3: #DFD9CA;
  --fg: var(--hx-black);
  --fg-mute: #2A2A2F;
  --fg-dim: #6B6A60;
  --line: rgba(11, 11, 12, 0.12);
  --line-strong: rgba(11, 11, 12, 0.28);
  --accent-soft: rgba(138, 110, 51, 0.16);
}

/* Accent overrides */
[data-accent="olive"] {
  --accent: #6B8045;
  --accent-2: #8AA15B;
  --accent-deep: #4A5A33;
  --accent-soft: rgba(107, 128, 69, 0.16);
}
[data-accent="blaze"] {
  --accent: #D45A1F;
  --accent-2: #E87340;
  --accent-deep: #A04015;
  --accent-soft: rgba(212, 90, 31, 0.16);
}

/* Type variant overrides */
[data-type="stencil"] {
  --font-display: "Black Ops One", "Stardos Stencil", "Oswald", sans-serif;
  --display-tracking: 0.02em;
  --display-weight: 400;
}
[data-type="slab"] {
  --font-display: "Oswald", "Roboto Slab", "Zilla Slab", serif;
  --font-body: "Roboto Slab", "Zilla Slab", Georgia, serif;
  --display-tracking: 0.01em;
  --display-weight: 700;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Global texture overlay ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--texture);
  background-size: var(--texture-size, 24px 24px);
  opacity: var(--texture-opacity);
  mix-blend-mode: overlay;
}

[data-texture="grid"] {
  --texture-opacity: 0.35;
  --texture-size: 32px 32px;
  --texture: linear-gradient(to right, rgba(184,150,74,0.08) 1px, transparent 1px),
             linear-gradient(to bottom, rgba(184,150,74,0.08) 1px, transparent 1px);
}
[data-texture="topo"] {
  --texture-opacity: 0.5;
  --texture-size: 220px 220px;
  --texture: radial-gradient(circle at 20% 30%, transparent 30%, rgba(184,150,74,0.05) 31%, transparent 32%),
             radial-gradient(circle at 70% 60%, transparent 22%, rgba(184,150,74,0.05) 23%, transparent 24%),
             radial-gradient(circle at 40% 80%, transparent 18%, rgba(184,150,74,0.05) 19%, transparent 20%),
             radial-gradient(circle at 90% 20%, transparent 14%, rgba(184,150,74,0.05) 15%, transparent 16%);
}
[data-texture="concrete"] {
  --texture-opacity: 0.4;
  --texture-size: 200px 200px;
  --texture:
    radial-gradient(circle at 17% 23%, rgba(255,255,255,0.04) 0.5px, transparent 1px),
    radial-gradient(circle at 53% 71%, rgba(0,0,0,0.18) 0.5px, transparent 1.5px),
    radial-gradient(circle at 81% 39%, rgba(255,255,255,0.03) 0.5px, transparent 1px),
    radial-gradient(circle at 33% 83%, rgba(0,0,0,0.14) 0.5px, transparent 1px);
}

/* ---------- Layout primitives ---------- */
.hx-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .hx-container { padding: 0 20px; }
}

main { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.hx-display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--fg);
}
.hx-h1 { font-size: clamp(48px, 7vw, 96px); }
.hx-h2 { font-size: clamp(34px, 4.5vw, 60px); }
.hx-h3 { font-size: clamp(22px, 2.5vw, 32px); }

.hx-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hx-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.hx-data-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.hx-lede { font-size: 18px; color: var(--fg-mute); max-width: 60ch; }

/* ---------- Buttons ---------- */
.hx-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.hx-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.hx-btn--primary {
  background: var(--accent);
  color: var(--hx-black);
  border-color: var(--accent);
}
.hx-btn--primary:hover { background: var(--accent-2); color: var(--hx-black); border-color: var(--accent-2); }
.hx-btn--ghost { background: transparent; }
.hx-btn .arrow { font-family: var(--font-mono); font-weight: 400; }

/* ---------- Header / Nav ---------- */
.hx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hx-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 76px;
  gap: 32px;
}
.hx-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.18em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
}
.hx-brand img { height: 44px; width: auto; filter: var(--logo-filter, none); }
[data-theme="light"] .hx-brand img { filter: none; }

.hx-nav {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.hx-nav a {
  position: relative;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  transition: color 0.15s ease;
}
.hx-nav a:hover, .hx-nav a.is-active { color: var(--fg); }
.hx-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
}
.hx-nav a .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-right: 6px;
  letter-spacing: 0.1em;
}

.hx-header__cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hx-cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--fg);
  transition: all 0.15s ease;
}
.hx-cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.hx-cart-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--hx-black);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

@media (max-width: 860px) {
  .hx-header__inner { grid-template-columns: auto auto; }
  .hx-nav { display: none; }
}

/* ---------- Footer ---------- */
.hx-footer {
  margin-top: 120px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  position: relative;
  z-index: 1;
}
.hx-footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding: 64px 0 48px;
}
.hx-footer__brand p { color: var(--fg-mute); max-width: 36ch; }
.hx-footer__col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.hx-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hx-footer__col a { color: var(--fg-mute); transition: color 0.15s; }
.hx-footer__col a:hover { color: var(--accent); }

.hx-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .hx-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
}

/* ---------- Section header ---------- */
.hx-section { padding: 96px 0; position: relative; }
.hx-section--tight { padding: 64px 0; }
.hx-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.hx-section__head h2 { margin: 12px 0 0; }
.hx-section__head p { margin: 0; max-width: 44ch; color: var(--fg-mute); }

/* ---------- Card / placeholder image ---------- */
.hx-img-ph {
  background:
    linear-gradient(135deg, transparent 49%, var(--line) 49%, var(--line) 51%, transparent 51%),
    var(--bg-3);
  background-size: 16px 16px, 100% 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.hx-img-ph::after {
  content: attr(data-label);
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border: 1px solid var(--line);
}
[data-theme="light"] .hx-img-ph::after { background: rgba(255,255,255,0.7); }
.hx-img-ph__icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

/* Corner brackets for the rugged look */
.hx-bracket {
  position: relative;
}
.hx-bracket::before,
.hx-bracket::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  pointer-events: none;
}
.hx-bracket::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hx-bracket::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ---------- Utility ---------- */
.hx-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hx-divider::before, .hx-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  flex: 1;
}

.hx-chevron-down {
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent);
}

/* ---------- Tweaks panel z-index — float above content ---------- */
[class*="tweaks"] { z-index: 100; }
