/* ============================================
   Claw Design System — First Layer HQ Edition
   Dark, maker-themed for 3D printing affiliate sites
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Typography */
  --font-display:   'Space Grotesk', sans-serif;
  --font-heading:   'Rajdhani', sans-serif;
  --font-body:      'Inter', sans-serif;

  /* Backgrounds — warm dark */
  --bg-void:        #0A0808;
  --bg-deep:        #110E0C;
  --bg-surface:     #1A1510;
  --bg-panel:       rgba(40, 25, 10, 0.45);
  --bg-panel-hover: rgba(50, 30, 12, 0.6);

  /* Primary palette — heated nozzle orange */
  --blue-ribbon:    #CC5500;
  --blue-mid:       #E06600;
  --blue-glow:      #FF8800;
  --blue-bright:    #FFAA44;
  --purple-edge:    #331100;

  /* Accent palette */
  --cyan:           #FFB800;
  --cyan-glow:      #FFD54F;
  --green:          #22c55e;
  --green-bright:   #44ff88;
  --red:            #ef4444;
  --red-bright:     #ff4444;
  --gold:           #ffd700;
  --orange:         #ff6b00;
  --purple:         #c0392b;

  /* Semantic colors */
  --pros-border:    #4DB87A;
  --pros-text:      #7DEBA0;
  --cons-border:    #E05A5A;
  --cons-text:      #FF8080;

  /* Chrome / text — warm white */
  --chrome-white:   #F0E8E0;
  --chrome-silver:  #A09080;
  --text-primary:   #F0EAE4;
  --text-muted:     #7A6A5A;
  --text-body:      rgba(240, 232, 224, 0.85);

  /* Borders & panels — warm tones */
  --panel-border:   rgba(255, 136, 0, 0.18);
  --border:         rgba(255, 170, 68, 0.12);
  --surface:        #161210;
  --surface2:       #1E1814;

  /* Glows — orange/amber */
  --glow-blue:      0 0 20px rgba(255,136,0,0.5), 0 0 60px rgba(255,136,0,0.15);
  --glow-green:     0 0 20px rgba(0,255,127,0.6), 0 0 60px rgba(0,255,127,0.2);
  --glow-cyan:      0 0 20px rgba(255,184,0,0.4), 0 0 60px rgba(255,184,0,0.12);

  /* Animation timings */
  --dur-fast:       0.2s;
  --dur-base:       0.5s;
  --dur-slow:       0.9s;
  --dur-dramatic:   1.5s;
  --ease-expo:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-circ:      cubic-bezier(0.85, 0, 0.15, 1);
  --stagger:        0.08s;

  /* Layout */
  --max-width:      1200px;
  --nav-height:     56px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-void);
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--blue-bright); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--cyan-glow); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--chrome-white);
}

h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }

p { color: var(--text-body); line-height: 1.75; }

::selection {
  background: rgba(255, 136, 0, 0.4);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: rgba(255, 136, 0, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 136, 0, 0.5); }

/* --- Background Layers --- */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 60%, #1A0E00 0%, var(--bg-void) 60%);
  pointer-events: none;
}

.bg-vignette {
  position: fixed; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(30,15,0,0.55) 100%);
  pointer-events: none;
}

.ribbon-canvas {
  position: fixed; inset: 0; z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}

/* Scanline overlay — disabled with html.no-scanlines */
body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}

html.no-scanlines body::before { display: none; }

/* --- Page Wrapper --- */
.page-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* --- Navigation --- */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(10, 8, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,136,0,0.1);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

#mainNav.scrolled {
  background: rgba(10, 8, 8, 0.92);
  border-bottom-color: rgba(255,136,0,0.2);
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--chrome-white);
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-logo span { color: var(--blue-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin-left: 32px;
}

.nav-links li + li::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(136, 153, 187, 0.25);
  margin: 0 16px;
  vertical-align: middle;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--chrome-silver);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 0;
  transition: color var(--dur-fast);
}

.nav-links a:hover { color: var(--blue-bright); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search-btn {
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--chrome-silver);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.nav-search-btn:hover {
  border-color: var(--blue-glow);
  color: var(--blue-bright);
}

.nav-search-btn svg { width: 16px; height: 16px; }

.nav-search-btn kbd {
  font-size: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 1px 5px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--chrome-silver);
  border-radius: 1px;
  transition: transform var(--dur-fast), opacity var(--dur-fast);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 8, 8, 0.96);
  backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mobile-drawer.open { display: flex; }

.mobile-drawer a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  color: var(--chrome-white);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.mobile-drawer a:hover { color: var(--blue-bright); }

/* --- Footer --- */
footer {
  position: relative;
  z-index: 10;
  background: rgba(10, 6, 4, 0.9);
  border-top: 1px solid var(--panel-border);
  padding: 48px 32px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--chrome-white);
  margin-bottom: 8px;
}

.footer-brand-name span { color: var(--blue-bright); }

.footer-brand-desc {
  font-size: 13px;
  color: var(--chrome-silver);
  line-height: 1.6;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--chrome-silver);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 8px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--chrome-silver);
  transition: color var(--dur-fast);
}

.footer-links a:hover { color: var(--blue-bright); }

.footer-bottom {
  border-top: 1px solid var(--panel-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 32px 0;
  font-size: 12px;
  color: var(--chrome-silver);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a { color: var(--blue-bright); font-size: 12px; }
.breadcrumb .sep { color: var(--text-muted); }

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ribbon-canvas { display: none; }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-search-btn kbd { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
}

@media (max-width: 600px) {
  footer { padding: 32px 16px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { font-size: 11px; }

  .breadcrumb { padding: 72px 16px 0; }
}
