/*
 * COMMAND 070 — Defect Fix + Visual Improvement (small pass)
 * Load LAST after theme-069-header.css
 * Industrial Loft first; subtle AI/cyan accent only.
 * Geometry/safety from 067–069 preserved.
 */

body.cw-r2 {
  --c070-steel: #2A2E32;
  --c070-graphite: #16191C;
  --c070-copper: #B87333;
  --c070-copper-hi: #E0A45A;
  --c070-amber: #C56F24;
  --c070-ivory: #F2ECE3;
  --c070-muted: #A8A29A;
  --c070-ai: rgba(64, 180, 220, 0.28);
  --c070-ai-edge: rgba(90, 200, 230, 0.45);
}

/* ---------- Page atmosphere: loft steel, not neon ---------- */
body.cw-r2.cw-mi,
body.cw-r2.cw-g {
  background-color: #121416;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(184, 115, 51, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 30% at 92% 18%, var(--c070-ai), transparent 60%),
    linear-gradient(180deg, #16191C 0%, #101214 40%, #0E1012 100%);
}

body.cw-r2 .main-container::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 11px,
      rgba(255, 255, 255, 0.35) 11px,
      rgba(255, 255, 255, 0.35) 12px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 11px,
      rgba(255, 255, 255, 0.25) 11px,
      rgba(255, 255, 255, 0.25) 12px
    );
}

body.cw-r2 .main-container > * {
  position: relative;
  z-index: 1;
}

/* ---------- 1) Logo / brand: fill frame, Craft and CO first ---------- */
body.cw-r2 .cw-g-mono-wrap,
body.cw-r2 .cw-mi-mark,
body.cw-r2 .cw-069-mark {
  width: 78px !important;
  height: 78px !important;
  flex: 0 0 78px;
  padding: 2px !important;
  background:
    linear-gradient(145deg, #3A3F44 0%, #15181B 48%, #0C0E10 100%) !important;
  border: 1px solid rgba(184, 115, 51, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
  border-radius: 2px;
}

body.cw-r2 .cw-g-mono-wrap img,
body.cw-r2 .cw-mi-mark img,
body.cw-r2 .cw-069-mark img,
body.cw-r2 .cw-g-mono-img,
body.cw-r2 .cw-mi-mark-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: scale(1.22);
  transform-origin: center;
}

body.cw-r2 .cw-g-master {
  font-size: clamp(1.05rem, 0.3vw + 0.95rem, 1.22rem) !important;
  letter-spacing: 0.16em;
  color: var(--c070-copper-hi) !important;
  font-weight: 700;
}

body.cw-r2 .cw-g-lp {
  font-size: 0.64rem !important;
  letter-spacing: 0.18em;
  color: var(--c070-ivory) !important;
  opacity: 0.88;
}

/* Sub-brand: keep data-brand-name in DOM, visual weight on Modern Industrial only */
body.cw-r2 .cw-069-tagline [data-brand-name],
body.cw-r2 .cw-069-tagline-sep {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.cw-r2 .cw-069-tagline {
  position: relative;
  margin-top: 0.35rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(90, 200, 230, 0.18);
  font-size: 0.62rem !important;
  letter-spacing: 0.16em;
  color: rgba(176, 141, 87, 0.7) !important;
  font-weight: 500;
  opacity: 0.8;
}

body.cw-r2 .contact-main-toggle.active {
  color: var(--c070-copper-hi) !important;
  background: linear-gradient(160deg, #4A3830, #1A1E22) !important;
}

body.cw-r2 .contact-main-toggle .icon-close.hide {
  display: none;
}
body.cw-r2 .contact-main-toggle.active .icon-chat {
  display: none;
}
body.cw-r2 .contact-main-toggle.active .icon-close {
  display: block !important;
}

/* ---------- 2) Header: steel plate + depth ---------- */
body.cw-r2 #main-header {
  background:
    linear-gradient(180deg, #32383D 0%, #1C2125 42%, #14181B 100%) !important;
  border-bottom: 1px solid rgba(184, 115, 51, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 12px 28px rgba(0, 0, 0, 0.4) !important;
  position: relative;
}

body.cw-r2 #main-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    -18deg,
    transparent 0 6px,
    rgba(255, 255, 255, 0.35) 6px 7px
  );
}

body.cw-r2 #main-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(184, 115, 51, 0.55) 18%,
    rgba(90, 200, 230, 0.35) 50%,
    rgba(184, 115, 51, 0.55) 82%,
    transparent 100%
  );
}

/* Restore plate bolts (visual only) */
body.cw-r2 .cw-g-header .cw-064-bolt {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  z-index: 2;
  box-shadow:
    0 0 0 1px #0A0A0A,
    inset 0 1px 0 rgba(255, 220, 160, 0.45) !important;
}

body.cw-r2 .cw-g-header-inner,
body.cw-r2 .cw-header-inner {
  position: relative;
  z-index: 1;
}

body.cw-r2 .primary-nav.desktop-nav {
  padding: 0.35rem 0.85rem !important;
  background: linear-gradient(180deg, rgba(20, 22, 24, 0.55), rgba(10, 12, 14, 0.35)) !important;
  border: 1px solid rgba(90, 95, 100, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35) !important;
  border-radius: 2px;
  gap: clamp(0.45rem, 1vw, 1.25rem) !important;
}

body.cw-r2 .primary-nav.desktop-nav a {
  color: var(--c070-ivory) !important;
  font-weight: 600 !important;
  font-size: clamp(0.9rem, 0.2vw + 0.84rem, 1rem) !important;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

body.cw-r2 .primary-nav.desktop-nav a:hover,
body.cw-r2 .primary-nav.desktop-nav a:focus-visible {
  color: var(--c070-copper-hi) !important;
}

body.cw-r2 .primary-nav.desktop-nav a.active,
body.cw-r2 .primary-nav.desktop-nav a[aria-current="page"] {
  color: var(--c070-copper-hi) !important;
  box-shadow: inset 0 -2px 0 var(--c070-copper) !important;
}

body.cw-r2 .cw-header-cta {
  background: linear-gradient(180deg, #D4893A 0%, #A35A1E 55%, #7A4214 100%) !important;
  color: #120E0A !important;
  border: 1px solid rgba(224, 164, 90, 0.85) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.35) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  border-radius: 2px !important;
}

body.cw-r2 .cw-header-cta:hover,
body.cw-r2 .cw-header-cta:focus-visible {
  filter: brightness(1.06);
}

body.cw-r2 .cw-g-beam,
body.cw-r2 .cw-mi-ibeam {
  height: 10px !important;
  background:
    linear-gradient(180deg, #7A8288 0%, #2C3136 38%, #B87333 72%, rgba(90, 200, 230, 0.55) 100%) !important;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(90, 200, 230, 0.12) !important;
}

/* ---------- 3) Contact dock + modal: larger, icon-first ---------- */
body.cw-r2 .contact-widget-container,
body.cw-r2 .cw-g-dock.contact-widget-container {
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 9999;
  gap: 14px;
}

body.cw-r2 .floating-buttons-row {
  gap: 14px;
}

body.cw-r2 .contact-main-toggle,
body.cw-r2 .contact-call-btn {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px;
  min-height: 64px;
  border-radius: 4px !important;
  background:
    linear-gradient(160deg, #3A4148 0%, #1A1E22 55%, #0E1114 100%) !important;
  border: 1px solid rgba(184, 115, 51, 0.75) !important;
  color: var(--c070-copper-hi) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 10px 22px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(90, 200, 230, 0.12) !important;
}

body.cw-r2 .contact-call-btn {
  color: #6EE7B7 !important;
  border-color: rgba(16, 185, 129, 0.65) !important;
}

body.cw-r2 .contact-main-toggle svg,
body.cw-r2 .contact-call-btn svg {
  width: 30px;
  height: 30px;
}

body.cw-r2 .contact-widget-card {
  width: min(440px, calc(100vw - 1.25rem)) !important;
  max-height: min(82vh, 680px);
  overflow: auto;
  background:
    linear-gradient(180deg, #23282D 0%, #15191C 55%, #101316 100%) !important;
  border: 1px solid rgba(184, 115, 51, 0.5) !important;
  border-radius: 4px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(90, 200, 230, 0.08) !important;
}

body.cw-r2 .contact-card-header {
  padding: 1rem 1.15rem !important;
  background: linear-gradient(180deg, #2C3238, #1A1E22) !important;
  border-bottom: 1px solid rgba(184, 115, 51, 0.35) !important;
}

body.cw-r2 .contact-header-title h4 {
  font-size: 1.05rem !important;
  letter-spacing: 0.04em;
  color: var(--c070-ivory) !important;
}

body.cw-r2 .contact-close-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--c070-ivory) !important;
}

body.cw-r2 .contact-channels-section,
body.cw-r2 .contact-form-section {
  padding: 1.1rem 1.15rem !important;
}

body.cw-r2 .contact-channels-section .section-label,
body.cw-r2 .contact-form-section .section-label {
  font-size: 0.72rem !important;
  margin-bottom: 0.85rem !important;
}

body.cw-r2 .contact-channels-grid {
  gap: 14px !important;
}

body.cw-r2 .channel-item {
  gap: 8px !important;
  min-height: 88px;
  padding: 0.55rem 0.25rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.cw-r2 .channel-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 8px !important;
}

body.cw-r2 .channel-icon svg {
  width: 28px !important;
  height: 28px !important;
}

body.cw-r2 .channel-name {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

body.cw-r2 .contact-input,
body.cw-r2 .contact-textarea {
  min-height: 48px;
  padding: 0.85rem 0.95rem !important;
  font-size: 1rem !important;
  border-radius: 3px !important;
  border: 1px solid rgba(184, 115, 51, 0.35) !important;
  background: rgba(8, 10, 12, 0.75) !important;
  color: var(--c070-ivory) !important;
}

body.cw-r2 .contact-textarea {
  min-height: 110px;
  resize: vertical;
}

body.cw-r2 .contact-submit-btn {
  min-height: 52px !important;
  margin-top: 0.65rem;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #D4893A, #8B4A18) !important;
  color: #120E0A !important;
  border: 1px solid rgba(224, 164, 90, 0.8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.4),
    0 8px 18px rgba(0, 0, 0, 0.35) !important;
}

/* ---------- 5) Icons / visual cues larger ---------- */
body.cw-r2 .cw-process-ico {
  width: 64px !important;
  height: 64px !important;
  font-size: 1.55rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #3A4148, #15191C) !important;
  border: 1px solid rgba(184, 115, 51, 0.55) !important;
  color: var(--c070-copper-hi) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 14px rgba(90, 200, 230, 0.1) !important;
  border-radius: 3px;
}

body.cw-r2 .cw-shop-cat-card {
  position: relative;
  overflow: hidden;
}

body.cw-r2 .cw-shop-cat-card .cw-070-cat-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--c070-copper-hi);
  background: linear-gradient(160deg, rgba(40, 44, 48, 0.92), rgba(12, 14, 16, 0.92));
  border: 1px solid rgba(184, 115, 51, 0.6);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(90, 200, 230, 0.12);
}

body.cw-r2 .cw-shop-cat-copy h3 {
  font-size: clamp(1.15rem, 0.4vw + 1.05rem, 1.35rem) !important;
}

body.cw-r2 .cw-r2-section-head .eyebrow {
  letter-spacing: 0.18em;
  color: var(--c070-copper-hi);
  text-shadow: 0 0 12px rgba(90, 200, 230, 0.15);
}

body.cw-r2 .cw-im-plate {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 14px 28px rgba(0, 0, 0, 0.35) !important;
}

/* Soft section steel edge */
body.cw-r2 .cw-r2-section.cw-g-gun,
body.cw-r2 .cw-r2-section.cw-g-concrete,
body.cw-r2 .cw-r2-section.cw-g-fab {
  position: relative;
}

body.cw-r2 .cw-r2-section.cw-g-gun::before,
body.cw-r2 .cw-r2-section.cw-g-concrete::before,
body.cw-r2 .cw-r2-section.cw-g-fab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 115, 51, 0.35),
    rgba(90, 200, 230, 0.25),
    rgba(184, 115, 51, 0.35),
    transparent
  );
  pointer-events: none;
}

/* Footer continuity */
body.cw-r2 .main-footer {
  background: linear-gradient(180deg, #1A1E22, #0E1012) !important;
  border-top: 1px solid rgba(184, 115, 51, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---------- Responsive: keep 069 height + hamburger contract ---------- */
@media (max-width: 1199px) {
  body.cw-r2 .cw-g-mono-wrap,
  body.cw-r2 .cw-mi-mark,
  body.cw-r2 .cw-069-mark {
    width: 60px !important;
    height: 60px !important;
    flex-basis: 60px;
  }
  body.cw-r2 .primary-nav.desktop-nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

@media (max-width: 767px) {
  body.cw-r2 .cw-g-mono-wrap,
  body.cw-r2 .cw-mi-mark,
  body.cw-r2 .cw-069-mark {
    width: 48px !important;
    height: 48px !important;
    flex-basis: 48px;
  }
  body.cw-r2 .cw-069-tagline,
  body.cw-r2 .cw-g-combo,
  body.cw-r2 .cw-g-lp {
    display: none !important;
  }
  body.cw-r2 .contact-widget-container {
    right: 0.75rem;
    bottom: 5.5rem;
  }
  body.cw-r2 .contact-main-toggle,
  body.cw-r2 .contact-call-btn {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px;
    min-height: 58px;
  }
  body.cw-r2 .contact-widget-card {
    width: min(100vw - 1rem, 400px) !important;
    max-height: min(72vh, 580px);
  }
  body.cw-r2 .channel-icon {
    width: 52px !important;
    height: 52px !important;
  }
  body.cw-r2 .cw-shop-cat-card .cw-070-cat-badge {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }
}

/* Safety: no horizontal overflow from decorative layers */
body.cw-r2,
body.cw-r2 .main-container {
  overflow-x: clip;
  max-width: 100%;
}
