/* ============================================
   UPKAR HANDTOOLS — 2028 INDUSTRIAL DESIGN
   ============================================ */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: rgba(255,255,255,.03);
  --text: #f0f0f2;
  --text-muted: rgba(240,240,242,.55);
  --text-secondary: rgba(240,240,242,.72);
  --border: rgba(255,255,255,.08);
  --border-hover: rgba(255,255,255,.16);
  --accent: #d4a853;
  --accent-glow: rgba(212,168,83,.15);
  --accent-bright: #f0c96e;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --container: 1200px;
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-out: cubic-bezier(.33,1,.68,1);
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---- UTILITY ---- */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}
.hide-mobile { display: inline; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  background: rgba(10,10,11,.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, box-shadow .3s ease;
}
.header.scrolled {
  background: rgba(10,10,11,.88);
  box-shadow: 0 4px 30px rgba(0,0,0,.4);
}

.logo img {
  height: 48px;
  width: auto;
  transition: transform .3s var(--ease);
}
.logo:hover img { transform: scale(1.04); }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-desktop a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color .25s ease;
  position: relative;
}
.nav-desktop a:hover { color: #fff; }
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.nav-desktop a:hover::after { width: 100%; }
.nav-cta {
  padding: 9px 20px !important;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  font-size: 12px !important;
  letter-spacing: .1em !important;
  transition: all .3s var(--ease) !important;
}
.nav-cta:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 20px; height: 1.5px;
  background: #fff;
  transition: all .3s var(--ease);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10,10,11,.96);
  backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-secondary);
  transition: color .25s ease;
}
.mobile-nav a:hover { color: #fff; }

/* ============================================
   HERO
   ============================================ */
.page { padding-top: 72px; }

.hero {
  position: relative;
  height: calc(100vh - 72px);
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(212,168,83,.06), transparent 70%),
    linear-gradient(180deg, rgba(10,10,11,.15) 0%, rgba(10,10,11,.5) 50%, rgba(10,10,11,.92) 100%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 860px;
  padding: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(212,168,83,.25);
  background: rgba(212,168,83,.08);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 28px;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,83,.4); }
  50% { box-shadow: 0 0 0 8px rgba(212,168,83,0); }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.hero-sub {
  margin: 20px auto 0;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, rgba(212,168,83,.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: .4; transform: scaleY(.6); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0b;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s var(--ease);
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(212,168,83,0);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 8px 32px rgba(212,168,83,.3);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s var(--ease);
  text-decoration: none;
}
.btn-outline:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.3);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.stats-track {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 12px 24px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  color: var(--accent);
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products {
  padding: 100px 0 120px;
  background: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.section-desc {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text-muted);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 240px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.select-wrap {
  min-width: 200px;
}
.select-wrap select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: #fff;
  font-size: 14px;
  outline: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  transition: border-color .25s ease;
}
.select-wrap select:focus {
  border-color: var(--accent);
}

.count {
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .04em;
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* CARD */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all .35s var(--ease);
  outline: none;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(212,168,83,.06), transparent 60%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 1;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,168,83,.2);
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 40px rgba(212,168,83,.06);
}
.card:hover::before { opacity: 1; }
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thumb {
  height: 200px;
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  position: relative;
  overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .thumb img { transform: scale(1.06); }
.thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.badge {
  position: absolute;
  left: 12px; top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,11,.65);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  z-index: 2;
}

.card-body {
  padding: 16px 18px 18px;
  position: relative;
  z-index: 2;
}
.name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.3;
}
.meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.meta span:first-child {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: .04em;
}
.meta span:last-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .25s var(--ease);
}
.card:hover .meta span:last-child { gap: 8px; }

/* ============================================
   HERITAGE
   ============================================ */
.heritage {
  padding: 120px 0;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.heritage::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,83,.05), transparent 70%);
  pointer-events: none;
}

.heritage-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 72px;
  align-items: center;
}

.heritage-image {
  position: relative;
}
.heritage-image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.heritage-image-frame img {
  width: 100%;
  display: block;
  transition: transform .6s var(--ease);
}
.heritage-image:hover .heritage-image-frame img {
  transform: scale(1.03);
}
.heritage-year-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #0a0a0b;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 12px 40px rgba(212,168,83,.3);
}

.heritage-text .section-tag { margin-bottom: 18px; }
.heritage-text h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 28px;
}
.heritage-text p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.heritage-text strong { color: #fff; font-weight: 600; }

.heritage-signature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.sig-line {
  width: 40px; height: 1px;
  background: var(--accent);
}
.heritage-signature span {
  font-size: 14px;
  font-style: italic;
  letter-spacing: .06em;
  color: var(--text-muted);
}

/* ============================================
   FOOTER SECTION
   ============================================ */
.footer-section {
  padding: 100px 0 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}
.footer-cta-card {
  padding: 36px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: all .35s var(--ease);
}
.footer-cta-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
}

.footer-cta-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: rgba(212,168,83,.08);
  border: 1px solid rgba(212,168,83,.15);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.footer-cta-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-cta-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.footer-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hover);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
}
.footer-cta-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
  color: var(--accent);
}

.social-row {
  display: flex;
  gap: 10px;
}
.social-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all .25s var(--ease);
  text-decoration: none;
}
.social-btn:hover {
  background: rgba(212,168,83,.1);
  border-color: rgba(212,168,83,.3);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .04em;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.footer-links a {
  color: var(--text-secondary);
  transition: color .25s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 200;
}
.modal.open { display: block; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  width: min(960px, calc(100% - 32px));
  margin: 80px auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  animation: modalIn .35s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  right: 16px; top: 16px;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: all .25s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--border-hover);
}

.modal-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.modal-media {
  position: relative;
  background: rgba(255,255,255,.02);
  min-height: 360px;
}
.modal-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.modal-media-fallback {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.modal-info { padding: 32px; }
.modal-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212,168,83,.2);
  background: rgba(212,168,83,.06);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.modal-info h3 {
  font-family: var(--font-display);
  margin: 16px 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .01em;
}
.modal-code {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.modal-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.modal-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   CHATBOT WIDGET
   ============================================ */
.chatLauncher {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0a0a0b;
  font-size: 20px;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 8px 32px rgba(212,168,83,.3);
  transition: all .3s var(--ease);
  animation: chatPulse 2.5s ease-in-out infinite;
}
.chatLauncher:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(212,168,83,.4);
}
.chatLauncher.hidden { display: none; }

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(212,168,83,.3); }
  50% { box-shadow: 0 8px 32px rgba(212,168,83,.5), 0 0 0 8px rgba(212,168,83,.08); }
}

.chatPanel {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 380px; height: 520px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  z-index: 160;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.chatPanel.open {
  display: flex;
  transform: translateY(0) scale(1);
  opacity: 1;
}

.chatPanel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chatPanel__brand {
  display: flex; align-items: center; gap: 10px;
}
.chatPanel__brand h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}
.chatPanel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,.5);
}
.chatPanel__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px;
  transition: background .25s ease;
}
.chatPanel__close:hover { background: rgba(255,255,255,.06); }

.chatPanel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chatPanel__messages::-webkit-scrollbar { width: 4px; }
.chatPanel__messages::-webkit-scrollbar-track { background: transparent; }
.chatPanel__messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

.chatMsg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.55;
  word-wrap: break-word;
}
.chatMsg--bot {
  align-self: flex-start;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.chatMsg--user {
  align-self: flex-end;
  background: rgba(212,168,83,.1);
  border: 1px solid rgba(212,168,83,.18);
  color: #fff;
}

.chatTyping {
  display: flex; gap: 4px; align-items: center;
  padding: 10px 14px;
  align-self: flex-start;
}
.chatTyping span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  animation: typingDot 1.2s ease-in-out infinite;
}
.chatTyping span:nth-child(2) { animation-delay: .15s; }
.chatTyping span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chatChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 10px;
  flex-shrink: 0;
}
.chatChip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .25s ease;
}
.chatChip:hover {
  background: rgba(212,168,83,.08);
  border-color: rgba(212,168,83,.2);
  color: var(--accent);
}

.chatPanel__input {
  display: flex;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chatPanel__input input {
  flex: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #fff;
  padding: 0 14px;
  height: 40px;
  font-size: 13px;
  outline: none;
  transition: border-color .25s ease;
}
.chatPanel__input input::placeholder { color: var(--text-muted); }
.chatPanel__input input:focus { border-color: rgba(212,168,83,.3); }
.chatPanel__input button {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: #0a0a0b;
  font-size: 14px;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all .25s var(--ease);
}
.chatPanel__input button:hover {
  background: var(--accent-bright);
  transform: scale(1.06);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .heritage-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .heritage-image-frame img { max-width: 480px; margin: 0 auto; }
  .heritage-year-badge { right: auto; left: 50%; transform: translateX(-50%); bottom: -16px; }
  .heritage-text { text-align: center; }
  .heritage-signature { justify-content: center; }
}

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .hide-mobile { display: none; }

  h1 { font-size: clamp(36px, 8vw, 56px); }

  .footer-cta-grid { grid-template-columns: 1fr; }
  .stat-divider { display: none; }
  .stats-track { gap: 12px; }
  .stat-item { min-width: 140px; padding: 12px 16px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }
  .grid { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-panel { margin: 40px auto; border-radius: var(--radius-lg); }
  .heritage { padding: 80px 0; }
  .products { padding: 80px 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .chatPanel {
    width: 100%;
    bottom: 0; right: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    height: 70vh;
  }
  .chatLauncher { bottom: 16px; right: 16px; }
}

/* ---- REDUCE MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-primary, .btn-outline, .card, .chatLauncher, .chatPanel { transition: none; }
  .chatLauncher { animation: none; }
  .scroll-line { animation: none; }
  .pulse-dot { animation: none; }
}
