/**
 * HANZO Design System - Premium B2B Trade Platform
 * Navy + Gold, enterprise-ready components
 */

:root {
  --hanzo-section-pad: 1.75rem;
  --hanzo-card-pad: 1.5rem;
}

/* ========== Buttons ========== */
.btn-hanzo-primary {
  background: linear-gradient(135deg, #F0B64D 0%, #D89B2B 100%) !important;
  border: none !important;
  color: #0B1F3A !important;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.6rem 1.5rem;
  box-shadow: 0 2px 12px rgba(216, 155, 43, 0.35);
  transition: all 0.2s;
}
.btn-hanzo-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(216, 155, 43, 0.4);
  color: #0B1F3A !important;
}
.btn-hanzo-secondary {
  border: 2px solid #0B1F3A;
  color: #0B1F3A;
  background: transparent;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.6rem 1.5rem;
  transition: all 0.2s;
}
.btn-hanzo-secondary:hover {
  background: rgba(11, 31, 58, 0.06);
  border-color: #123A6D;
  color: #123A6D;
}
.btn-hanzo-muted {
  background: rgba(107, 114, 128, 0.1);
  color: #6B7280;
  border: 1px solid #E5E7EB;
  font-weight: 500;
  border-radius: 12px;
}
.btn-hanzo-muted:hover {
  background: rgba(107, 114, 128, 0.15);
  color: #1F2937;
}

/* ========== Cards ========== */
.hanzo-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
  overflow: hidden;
  transition: all 0.25s ease;
}
.hanzo-card:hover {
  box-shadow: 0 8px 30px rgba(11, 31, 58, 0.08);
}
.hanzo-card-header {
  padding: var(--hanzo-card-pad);
  border-bottom: 1px solid #E5E7EB;
  font-weight: 600;
  color: #1F2937;
  font-size: 1rem;
}
.hanzo-card-body { padding: var(--hanzo-card-pad); }
.hanzo-metric {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
}
.hanzo-metric-label {
  font-size: 0.75rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hanzo-table { width: 100%; border-collapse: collapse; }
.hanzo-table th, .hanzo-table td { padding: 0.875rem 1.25rem; text-align: left; border-bottom: 1px solid #E5E7EB; }
.hanzo-table th { font-weight: 600; color: #0B1F3A; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hanzo-table tbody tr:hover { background: rgba(216, 155, 43, 0.04); }

/* ========== Status Badges ========== */
.hanzo-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}
.hanzo-badge-new, .hanzo-badge-assigned { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.hanzo-badge-quoted, .hanzo-badge-pending { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.hanzo-badge-accepted, .hanzo-badge-approved, .hanzo-badge-delivered { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.hanzo-badge-in_production, .hanzo-badge-shipped { background: rgba(18, 58, 109, 0.12); color: #123A6D; }
.hanzo-badge-rejected, .hanzo-badge-suspended { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

/* ========== Stepper / Milestone Tracker ========== */
.hanzo-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.hanzo-stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.hanzo-stepper .step-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: #E5E7EB;
  color: #6B7280;
  transition: all 0.2s;
}
.hanzo-stepper .step.completed .step-circle {
  background: var(--hanzo-success);
  color: #fff;
}
.hanzo-stepper .step.active .step-circle {
  background: linear-gradient(135deg, #F0B64D 0%, #D89B2B 100%);
  color: #0B1F3A;
  box-shadow: 0 0 0 3px rgba(216, 155, 43, 0.25);
}

/* ========== Stat boxes ========== */
.hanzo-stat-box {
  border-radius: 12px;
  padding: 1.25rem !important;
  transition: all 0.3s ease;
}
.hanzo-stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(11, 31, 58, 0.1);
}

/* ========== Hero overlay ========== */
.hanzo-hero-overlay {
  background: linear-gradient(90deg, rgba(9, 22, 43, 0.92) 0%, rgba(11, 31, 58, 0.78) 45%, rgba(11, 31, 58, 0.45) 100%);
}

/* ========== Public layout ========== */
body.hanzo-public {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1F2937;
  background: #F7F8FA;
}

/* ========== Landing page ========== */
.hanzo-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(216, 155, 43, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hanzo-hero-title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
  animation: hanzo-fadeUp 0.6s ease-out;
}
.hanzo-hero-sub {
  animation: hanzo-fadeUp 0.6s ease-out 0.1s both;
}
@keyframes hanzo-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Category section - navy */
.hanzo-section-categories {
  background: linear-gradient(180deg, #09162B 0%, #0B1F3A 50%, #123A6D 100%);
}
.hanzo-section-title {
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hanzo-section-title-dark {
  color: var(--hanzo-text-dark) !important;
}
.hanzo-category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(180deg, rgba(18, 58, 109, 0.95) 0%, rgba(11, 31, 58, 0.98) 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.hanzo-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.hanzo-category-img {
  transition: transform 0.5s ease;
}
.hanzo-category-card:hover .hanzo-category-img {
  transform: scale(1.04);
}
.hanzo-category-icon {
  color: #F0B64D !important;
  transition: transform 0.3s, color 0.3s;
}
.hanzo-category-card:hover .hanzo-category-icon {
  transform: scale(1.1);
  color: #F0B64D !important;
}
.hanzo-category-title {
  color: #FFFFFF !important;
  font-weight: 600;
}
.hanzo-category-card small,
.hanzo-category-card .text-muted {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* How it works - step cards */
.hanzo-section-steps {
  background: #F7F8FA;
}
.hanzo-step-card {
  position: relative;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}
.hanzo-step-card:hover {
  border-left-color: #D89B2B;
  box-shadow: 0 12px 32px rgba(11, 31, 58, 0.1);
}
.hanzo-step-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #F0B64D 0%, #D89B2B 100%);
  color: #0B1F3A;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hanzo-step-icon {
  color: #D89B2B !important;
  transition: color 0.3s, transform 0.3s;
}
.hanzo-step-card:hover .hanzo-step-icon {
  color: #0B1F3A;
}
.hanzo-step-title {
  color: #1F2937;
}

/* Estimate section */
.hanzo-section-estimate {
  background: linear-gradient(180deg, #F7F8FA 0%, #E5E7EB 100%);
}
.hanzo-section-estimate .hanzo-card {
  border: 1px solid #E5E7EB;
}

/* About + Contact merged page */
.hanzo-about-contact .hanzo-card {
  border: 1px solid var(--hanzo-border);
  box-shadow: var(--hanzo-shadow);
}

/* Trust section */
.hanzo-section-trust {
  background: linear-gradient(135deg, #09162B 0%, #0B1F3A 50%), url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?w=1200') center/cover no-repeat;
}

/* ========== Mobile optimizations ========== */
/* Hero responsive - full viewport height */
.hanzo-hero-responsive {
  margin-top: 56px;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px); /* Dynamic viewport for mobile browsers */
  background: linear-gradient(90deg, rgba(9,22,43,0.92) 0%, rgba(11,31,58,0.78) 45%, rgba(11,31,58,0.45) 100%), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?w=1600') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hanzo-hero-title-responsive { font-size: 1.75rem; }
@media (min-width: 576px) { .hanzo-hero-title-responsive { font-size: 2rem; } }
@media (min-width: 768px) { .hanzo-hero-title-responsive { font-size: 2.5rem; } }
@media (min-width: 992px) { .hanzo-hero-title-responsive { font-size: 2.5rem; } }

.hanzo-hero-sub-responsive { font-size: 1rem; }
@media (min-width: 576px) { .hanzo-hero-sub-responsive { font-size: 1.1rem; } }
@media (min-width: 768px) { .hanzo-hero-sub-responsive { font-size: 1.25rem; } }

/* Touch-friendly buttons (min 44px) */
.hanzo-btn-touch,
.hanzo-hero-btns .btn {
  min-height: 44px;
  padding: 0.65rem 1.25rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Stepper vertical on small screens */
@media (max-width: 575.98px) {
  .hanzo-stepper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .hanzo-stepper .step {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
  }
  .hanzo-stepper .step-circle {
    flex-shrink: 0;
  }
}

/* Category cards: better tap targets on mobile */
@media (max-width: 767.98px) {
  .hanzo-category-card {
    min-height: 120px;
  }
  .hanzo-category-img {
    height: 100px !important;
  }
  .hanzo-section-title {
    font-size: 1.5rem;
  }
}

/* Step cards: stack 2x2 on mobile, full width on very small */
@media (max-width: 575.98px) {
  .hanzo-step-card {
    padding: 1rem !important;
  }
  .hanzo-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .hanzo-step-title {
    font-size: 1rem;
  }
}

/* Form controls: larger tap targets */
@media (max-width: 767.98px) {
  .form-control,
  .form-select {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  .btn-hanzo-primary,
  .btn-hanzo-secondary {
    min-height: 44px;
    padding: 0.75rem 1.25rem !important;
  }
}

/* Estimate form on mobile */
@media (max-width: 767.98px) {
  .hanzo-estimate-card .row.g-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
  .hanzo-estimate-card .btn-hanzo-primary {
    width: 100%;
  }
}

/* Prevent horizontal overflow */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Improve tap response */
a, button, [role="button"] {
  -webkit-tap-highlight-color: rgba(216, 155, 43, 0.2);
}

/* Page top padding for fixed nav (mobile) */
.hanzo-page-top {
  padding-top: 5rem;
}
@media (min-width: 768px) {
  .hanzo-page-top { padding-top: 5.5rem; }
}

/* About hero responsive height */
.hanzo-about-hero-responsive {
  min-height: 140px;
}
@media (min-width: 576px) {
  .hanzo-about-hero-responsive { height: 180px !important; }
}
@media (min-width: 768px) {
  .hanzo-about-hero-responsive { height: 200px !important; }
}
