/* ============================================================
   HUAIRUI — Xian Trading & Systems Integration
   Dark espresso-cocoa theme: #171210 body / #F4EBDF cream text
   Accent #8F5B38 espresso-cocoa · Secondary #C89B6C tan
   Panel #221913 coffee-panel
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #F4EBDF;
  background-color: #171210;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #C89B6C;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #F4EBDF;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: #8F5B38;
  color: #F4EBDF;
}

.btn-primary:hover {
  background-color: #A06A44;
  color: #F4EBDF;
}

.btn-outline {
  border-color: #C89B6C;
  color: #C89B6C;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: #C89B6C;
  color: #171210;
}

.btn-cream {
  background-color: #F4EBDF;
  color: #8F5B38;
}

.btn-cream:hover {
  background-color: #C89B6C;
  color: #171210;
}

/* ============================================================
   CARTON NAV — slim sticky top strip
   ============================================================ */

.carton-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #171210;
  border-bottom: 1px solid #C89B6C;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-glyph {
  width: 34px;
  height: 34px;
  background-color: #8F5B38;
  flex: 0 0 auto;
}

.brand-word {
  display: block;
  color: #F4EBDF;
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 18px;
  line-height: 1.1;
}

.brand-caption {
  display: block;
  color: #C89B6C;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.3;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carton-link {
  position: relative;
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid #C89B6C;
  color: #F4EBDF;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.carton-link::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 0;
  height: 0;
  border-top: 9px solid #171210;
  border-left: 9px solid transparent;
  pointer-events: none;
}

.carton-link:hover {
  background-color: #221913;
  color: #F4EBDF;
}

.carton-link.active {
  background-color: #8F5B38;
  color: #F4EBDF;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #C89B6C;
  width: 44px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #C89B6C;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   TRAIL HERO
   ============================================================ */

.trail-hero {
  background-color: #171210;
  border-bottom: 1px solid #221913;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 24px 20px;
}

.eyebrow {
  display: inline-block;
  background-color: #8F5B38;
  color: #F4EBDF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  margin-bottom: 26px;
}

.hero-inner h1 {
  font-size: 56px;
  color: #F4EBDF;
  max-width: 820px;
  margin-bottom: 26px;
}

.hero-sub {
  max-width: 720px;
  font-size: 18px;
  color: #F4EBDF;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.trail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 46px 24px 56px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px dashed #C89B6C;
}

.waypoint {
  text-align: center;
}

.waypoint-label {
  color: #F4EBDF;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.waypoint-label .num {
  color: #C89B6C;
  display: block;
  font-size: 15px;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.waypoint-mark {
  display: block;
  width: 14px;
  height: 14px;
  background-color: #C89B6C;
  margin: 0 auto;
}

/* ============================================================
   SECTIONS — shared structure
   ============================================================ */

.section {
  padding: 84px 0;
}

.section-head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  margin-bottom: 46px;
}

.section-head h2 {
  font-size: 40px;
  color: #F4EBDF;
  margin-bottom: 18px;
}

.section-intro {
  max-width: 780px;
  color: #F4EBDF;
  font-size: 17px;
}

/* Tier bands */
.tiers {
  background-color: #171210;
  border-bottom: 1px solid #221913;
}

.tier-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tier-band {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 32px;
  align-items: center;
  background-color: #221913;
  border-left: 4px solid #C89B6C;
  padding: 28px 32px;
}

.tier-name {
  font-size: 22px;
  color: #F4EBDF;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tier-desc {
  color: #F4EBDF;
  font-size: 16px;
  margin: 0;
}

.tier-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-block;
  border: 1px solid #C89B6C;
  color: #C89B6C;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  white-space: nowrap;
}

/* Invoice panel */
.invoice {
  background-color: #171210;
  border-bottom: 1px solid #221913;
}

.invoice-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.invoice-body {
  background-color: #221913;
  border: 1px solid #C89B6C;
}

.invoice-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px 32px;
  border-bottom: 1px solid #C89B6C;
}

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

.inv-label {
  color: #C89B6C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.inv-value {
  color: #F4EBDF;
  font-size: 16px;
}

/* Numeral tiles */
.numerals {
  background-color: #171210;
  border-bottom: 1px solid #221913;
}

.tile-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.numeral-tile {
  background-color: #221913;
  border: 1px solid #C89B6C;
  padding: 34px 20px;
  text-align: center;
}

.numeral {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 700;
  color: #F4EBDF;
  line-height: 1.1;
  margin-bottom: 12px;
}

.tile-label {
  color: #C89B6C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* CTA band */
.cta-band {
  background-color: #8F5B38;
  padding: 84px 24px;
  text-align: center;
}

.cta-band h2 {
  color: #F4EBDF;
  font-size: 40px;
  margin-bottom: 18px;
}

.cta-band p {
  color: #F4EBDF;
  max-width: 680px;
  margin: 0 auto 30px;
  font-size: 17px;
}

/* ============================================================
   SECONDARY PAGES — page hero, services, contact, FAQ
   ============================================================ */

.page-hero {
  background-color: #171210;
  border-bottom: 1px solid #221913;
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 76px 24px 60px;
}

.page-hero h1 {
  font-size: 48px;
  color: #F4EBDF;
  margin-bottom: 18px;
}

.page-hero p {
  max-width: 720px;
  color: #F4EBDF;
  font-size: 17px;
  margin: 0;
}

.service-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  border-bottom: 1px solid #221913;
  padding-top: 56px;
  padding-bottom: 56px;
}

.service-block h2 {
  font-size: 26px;
  color: #C89B6C;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-block p {
  color: #F4EBDF;
  font-size: 16px;
}

.service-block p:last-child {
  margin-bottom: 0;
}

.process-band {
  background-color: #221913;
  border-top: 4px solid #C89B6C;
  border-bottom: 1px solid #221913;
}

.process-band-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 84px 24px;
}

.process-band h2 {
  font-size: 36px;
  color: #F4EBDF;
  margin-bottom: 16px;
}

.process-band > .process-band-inner > p {
  color: #F4EBDF;
  max-width: 780px;
  margin-bottom: 34px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  border-left: 3px solid #C89B6C;
  padding: 20px 18px;
  background-color: #171210;
}

.step-num {
  display: block;
  color: #C89B6C;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.step h3 {
  color: #F4EBDF;
  font-size: 18px;
  margin-bottom: 8px;
}

.step p {
  color: #F4EBDF;
  font-size: 14px;
  margin: 0;
}

/* Contact page */
.contact-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-panel h2 {
  font-size: 28px;
  color: #C89B6C;
  margin-bottom: 16px;
}

.contact-panel p {
  color: #F4EBDF;
  font-size: 16px;
}

.contact-detail {
  border-top: 1px solid #221913;
  padding: 20px 0;
}

.contact-detail .inv-label {
  display: block;
  margin-bottom: 6px;
}

.contact-detail .inv-value {
  font-size: 16px;
}

.contact-form {
  background-color: #221913;
  border: 1px solid #C89B6C;
  padding: 34px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  color: #C89B6C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background-color: #171210;
  border: 1px solid #C89B6C;
  color: #F4EBDF;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #8F5B38;
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  color: #C89B6C;
  font-size: 14px;
  margin-top: 14px;
}

.form-status {
  color: #F4EBDF;
  background-color: #8F5B38;
  padding: 14px;
  margin-top: 16px;
  font-size: 14px;
  display: none;
}

/* FAQ accordion */
.faq-band {
  background-color: #171210;
  border-top: 1px solid #221913;
}

.faq-band-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 24px;
}

.faq-band h2 {
  font-size: 32px;
  color: #F4EBDF;
  margin-bottom: 30px;
}

.faq-item {
  border: 1px solid #221913;
  margin-bottom: 14px;
  background-color: #171210;
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #C89B6C;
  font-size: 17px;
  font-weight: 600;
  padding: 18px 20px;
  cursor: pointer;
}

.faq-q .faq-icon {
  color: #C89B6C;
  font-size: 22px;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a-inner {
  padding: 0 20px 20px;
  color: #F4EBDF;
  font-size: 15px;
}

.faq-a-inner p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   CRATE FOOTER
   ============================================================ */

.crate-footer {
  background-color: #171210;
}

.crate-lattice {
  height: 12px;
  background-image: linear-gradient(90deg, transparent 0 3px, #C89B6C 3px 4px, transparent 4px 100%),
    linear-gradient(0deg, transparent 0 3px, #C89B6C 3px 4px, transparent 4px 100%);
  background-size: 12px 12px;
  border-top: 1px solid #221913;
  border-bottom: 1px solid #221913;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: #F4EBDF;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: #C89B6C;
}

.footer-contact {
  color: #C89B6C;
  font-size: 14px;
  text-align: right;
  margin: 0;
}

.footer-legal {
  margin-top: 26px;
  border-top: 1px solid #C89B6C;
  padding-top: 20px;
  text-align: center;
}

.footer-legal p {
  color: #F4EBDF;
  font-size: 13px;
  margin: 0;
}

.footer-legal a {
  color: #C89B6C;
}

.footer-legal a:hover {
  color: #F4EBDF;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.fade-up {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .tier-band {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tier-chips {
    justify-content: flex-start;
  }

  .invoice-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .service-block {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-inner {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .carton-link {
    text-align: center;
  }

  .hero-inner h1 {
    font-size: 36px;
  }

  .hero-inner {
    padding-top: 60px;
  }

  .trail {
    flex-direction: column;
    gap: 30px;
  }

  .footer-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-contact {
    text-align: left;
  }

  .section-head h2,
  .cta-band h2,
  .page-hero h1 {
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}
