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

:root {
  --background: #faf9f7;
  --foreground: #1a1a2e;
  --card: #ffffff;
  --card-foreground: #1a1a2e;
  --primary: #1a1a2e;
  --primary-foreground: #fafafa;
  --secondary: #f3f2ef;
  --secondary-foreground: #1a1a2e;
  --muted: #ebe9e4;
  --muted-foreground: #6b6b7b;
  --accent: #0d9488;
  --accent-foreground: #ffffff;
  --border: #e5e4df;
  --input: #eae9e4;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =============================================
   Bootstrap Overrides — restore our design tokens
   ============================================= */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: var(--background) !important;
  color: var(--foreground) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--foreground);
}

a {
  color: var(--accent);
}

/* Override Bootstrap .btn so our custom buttons stay intact */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2a2a3e !important;
  border-color: #2a2a3e !important;
  color: var(--primary-foreground) !important;
}

.btn-accent {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-foreground) !important;
}

.btn-accent:hover:not(:disabled) {
  background-color: #0f766e !important;
  border-color: #0f766e !important;
  color: var(--accent-foreground) !important;
}

.btn:disabled {
  opacity: 0.5 !important;
}


/* Bootstrap form controls inherit our design */
.form-control,
.form-select {
  font-family: inherit;
  border-color: var(--border);
  border-radius: var(--radius);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

.input-group-text {
  border-color: var(--border);
  background: var(--secondary);
  color: var(--muted-foreground);
}

/* CJK font overrides */
html[lang="ko"] body { font-family: 'Noto Sans KR', 'Inter', sans-serif !important; line-height: 1.75; }
html[lang="ja"] body { font-family: 'Noto Sans JP', 'Inter', sans-serif !important; line-height: 1.75; }
html[lang="zh-CN"] body { font-family: 'Noto Sans SC', 'Inter', sans-serif !important; line-height: 1.75; }
html[lang="zh-TW"] body { font-family: 'Noto Sans TC', 'Inter', sans-serif !important; line-height: 1.75; }

/* Header login link */
.header-login {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}
.header-login:hover {
  color: var(--foreground);
}

/* Language Switcher */
.lang-switcher {
  appearance: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.lang-switcher:focus {
  outline: none;
  border-color: var(--accent);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
  background-color: #2a2a3e;
}

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-accent:hover:not(:disabled) {
  background-color: #0f766e;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.logo-group {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.2;
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--foreground);
}

.header-cta {
  display: none;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

.mobile-menu {
  display: none;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav a {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.5rem 0;
}

.mobile-menu-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  
  .header-cta {
    display: block;
  }
  
  .mobile-menu-btn {
    display: none;
  }
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
}

.hero-container {
  display: grid;
  gap: 3rem;
}

.hero .badge {
  display: inline-block !important;
  padding: 0.375rem 0.875rem !important;
  background: var(--accent) !important;
  color: var(--accent-foreground) !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  max-width: 600px;
}

.hero p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 540px;
}

.hero .hero-affiliate {
  margin-top: 1.25rem;
  font-size: 1.875rem !important;
  font-weight: 600 !important;
  color: var(--foreground) !important;
  line-height: 1.3;
  max-width: 600px;
}

.hero-cta {
  margin-top: 2rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.dashboard-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 10px 15px -3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge {
  padding: 0.25rem 0.625rem;
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.dashboard-content {
  padding: 1rem 1.25rem;
}

.dashboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-row:last-child {
  border-bottom: none;
}

.dashboard-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.dashboard-value {
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-value.accent {
  color: var(--accent);
  font-size: 1.25rem;
}

.dashboard-footer {
  padding: 1rem 1.25rem;
  background: var(--secondary);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-success .fa-circle {
  color: var(--accent);
  margin-top: 0.25rem;
}

.status-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.status-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

@media (min-width: 1024px) {
  .hero {
    padding: 6rem 0 7rem;
  }
  
  .hero-container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
  }
}

/* Trust Bar */
.trust-bar {
  padding: 2rem 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.trust-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

@media (min-width: 768px) {
  .trust-items {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Problem Solution */
.problem-solution {
  padding: 5rem 0;
}

.ps-grid {
  display: grid;
  gap: 2rem;
}

.ps-card {
  padding: 2rem;
  border-radius: var(--radius);
}

.ps-card.problem {
  background: var(--secondary);
}

.ps-card.solution {
  background: var(--primary);
  color: var(--primary-foreground);
}

.ps-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.ps-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ps-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.ps-card li svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.problem li svg {
  color: #dc2626;
}

.solution li svg {
  color: var(--accent);
}

@media (min-width: 768px) {
  .ps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-header p {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

/* How It Works */
.how-it-works {
  padding: 5rem 0;
  background: var(--card);
}

.steps-grid {
  display: grid;
  gap: 2rem;
}

.step-card {
  position: relative;
  padding: 2rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-number {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
}

.step-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--accent);
}

.step-card h3 {
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Benefits */
.benefits {
  padding: 5rem 0;
}

.benefits-grid {
  display: grid;
  gap: 1.5rem;
}

.benefit-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}

.benefit-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.1);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--accent);
}

.benefit-card h3 {
  margin-bottom: 0.5rem;
}

.benefit-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Eligibility Section */
.eligibility-section {
  padding: 5rem 0;
  background: var(--primary);
  color: var(--primary-foreground);
}

.eligibility-content {
  max-width: 600px;
}

.eligibility-content h2 {
  margin-bottom: 1rem;
}

.eligibility-content > p {
  color: rgba(255,255,255,0.8);
  font-size: 1.0625rem;
}

.eligibility-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eligibility-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.eligibility-list svg {
  color: var(--accent);
  flex-shrink: 0;
}

.eligibility-cta {
  margin-top: 2rem;
}

/* Calculator */
.calculator {
  padding: 5rem 0;
  background: var(--card);
}

.calculator-grid {
  display: grid;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.calculator-inputs {
  padding: 2rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input[type="range"] {
  width: 100%;
  height: 0.5rem;
  background: var(--border);
  border-radius: 9999px;
  appearance: none;
  cursor: pointer;
}

.form-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.range-labels span:nth-child(2) {
  font-weight: 600;
  color: var(--foreground);
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.calculator-results {
  padding: 2rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.calculator-results h3 {
  margin-bottom: 1.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.result-row:last-of-type {
  border-bottom: none;
}

.result-row.highlight {
  padding-top: 1rem;
}

.result-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.result-row.highlight .result-label {
  font-weight: 500;
  color: var(--foreground);
}

.result-value {
  font-size: 1rem;
  font-weight: 600;
}

.result-value.accent {
  color: var(--accent);
  font-size: 1.375rem;
}

.result-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

.result-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 0.5rem 0 1.5rem;
}

@media (min-width: 768px) {
  .calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* FAQ */
.faq {
  padding: 5rem 0;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--foreground);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--muted-foreground);
}

.faq-question.active svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
}

.faq-answer.active {
  display: block;
}

.faq-answer p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Final CTA */
.final-cta {
  padding: 5rem 0;
  background: var(--secondary);
  text-align: center;
}

.final-cta h2 {
  margin-bottom: 1rem;
}

.final-cta p {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 280px;
}

.footer-links {
  display: grid;
  /* Product gets natural width; Company takes the rest so links like
     "Contact Lisa Ragan Customs Brokerage" don't wrap. */
  grid-template-columns: auto 1fr;
  gap: 2rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--foreground);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.footer-bottom .disclaimer {
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 2fr;
  }
}

/* Modal — Bootstrap handles structure; we just theme it */
#eligibilityModal .modal-content,
#successModal .modal-content {
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

#eligibilityModal .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-fields .form-group {
  margin-bottom: 0;
}

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1rem;
}

/* Success Modal */
#successModal {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 50%;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

#successModal h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

#successModal p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Honeypot: hidden off-screen for sighted users and screen readers
 * (aria-hidden on the wrapper). Bots that parse the DOM and auto-fill
 * every text input still see it. */
.tc-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
