/* ============================================================
   Mozitou — Dark Olive Commerce Theme
   Chengdu Mozitou Trading Co., Ltd. — Computer Systems Design
   ============================================================ */

:root {
  --bg: #141510;
  --panel: #1E2018;
  --ink: #F2EFE8;
  --olive: #5A6134;
  --olive-bright: #8A9457;
  --olive-outline: #7A8450;
  --pale: #C4C79B;
  --hairline: #31351F;
  --hairline-light: #3C4028;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.22;
  font-weight: 700;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- TALLY NAV ---------------- */

.tally-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: #141510;
  border-bottom: 1px solid var(--olive);
}

.tally-nav.is-scrolled {
  border-bottom-color: var(--olive-bright);
}

.tally-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

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

.brand-mark {
  width: 16px;
  height: 16px;
  background-color: var(--olive);
  border-radius: 3px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--ink);
  line-height: 1.1;
}

.brand-caption {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--pale);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 3px;
}

.tally-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 3px;
}

.nav-link:hover {
  color: var(--pale);
}

.nav-link.is-active {
  color: var(--olive-bright);
}

/* Tally-mark glyph (small, for the nav) */
.tally-glyph {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 16px;
  flex: none;
}

.tally-glyph::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 2px;
  background-color: var(--olive-outline);
  box-shadow: 4px 0 0 var(--olive-outline), 8px 0 0 var(--olive-outline), 12px 0 0 var(--olive-outline);
}

.tally-glyph::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 14px;
  border-top: 2px solid var(--olive-outline);
  transform: rotate(-38deg);
  transform-origin: left center;
}

/* Active link: filled solid olive tally glyph */
.nav-link.is-active .tally-glyph {
  background-color: var(--olive);
  border-radius: 2px;
}

.nav-link.is-active .tally-glyph::before {
  background-color: #141510;
  box-shadow: 4px 0 0 #141510, 8px 0 0 #141510, 12px 0 0 #141510;
}

.nav-link.is-active .tally-glyph::after {
  border-top-color: #141510;
}

/* Large tally glyph (used in tally rows) */
.tally-glyph-lg {
  width: 30px;
  height: 34px;
}

.tally-glyph-lg::before {
  top: 4px;
  bottom: 4px;
  width: 3px;
  box-shadow: 9px 0 0 var(--olive-outline), 18px 0 0 var(--olive-outline), 27px 0 0 var(--olive-outline);
}

.tally-glyph-lg::after {
  top: -2px;
  bottom: -2px;
  left: -1px;
  width: 30px;
  border-top-width: 3px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- BAZAAR HERO ---------------- */

.bazaar-hero {
  background-color: #141510;
  padding: 92px 0 0;
}

.bazaar-hero-inner {
  max-width: 920px;
}

.hero-eyebrow {
  display: inline-block;
  background-color: var(--olive);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 3px;
}

.bazaar-hero h1 {
  font-size: 56px;
  line-height: 1.08;
  margin: 28px 0 22px;
  letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 19px;
  color: var(--ink);
  max-width: 720px;
  margin-bottom: 34px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background-color: #68713D;
}

.btn-outline {
  border-color: var(--olive-bright);
  color: var(--pale);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--olive);
  border-color: var(--olive);
  color: var(--ink);
}

/* Market-stall graphic */
.stall-graphic {
  margin-top: 58px;
  border-top: 2px solid var(--olive);
  padding-top: 36px;
}

.stalls {
  display: flex;
  justify-content: space-between;
  max-width: 560px;
  align-items: flex-end;
}

.stall {
  width: 132px;
  text-align: center;
}

.awning {
  width: 84px;
  height: 42px;
  margin: 0 auto;
  position: relative;
  background-color: var(--olive);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.awning::after {
  content: "";
  position: absolute;
  inset: 4px 4px 2px 4px;
  background-color: #141510;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.stall.is-filled .awning::after {
  background-color: var(--olive);
}

.counter {
  height: 48px;
  margin-top: -3px;
  border: 2px solid var(--olive);
  background-color: var(--panel);
  border-radius: 2px;
}

.stall.is-filled .counter {
  background-color: var(--olive);
  border-color: var(--olive);
}

.stall-baseline {
  height: 2px;
  background-color: var(--olive);
  max-width: 560px;
  margin-top: -2px;
}

.stall-captions {
  display: flex;
  justify-content: space-between;
  max-width: 560px;
  margin-top: 14px;
}

.stall-captions span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pale);
}

/* ---------------- SECTION HEADINGS ---------------- */

.section-heading {
  margin-bottom: 44px;
}

.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--pale);
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 38px;
  margin-bottom: 14px;
}

.section-intro {
  max-width: 720px;
  color: var(--ink);
  font-size: 17px;
}

/* ---------------- TALLY ROWS ---------------- */

.tally-rows {
  padding: 96px 0 76px;
}

.tally-row {
  display: grid;
  grid-template-columns: 64px 230px 1fr 170px;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--hairline);
}

.tally-row:first-of-type {
  border-top: 1px solid var(--hairline);
}

.tally-row .tally-glyph {
  justify-self: center;
}

.tally-row h3 {
  font-size: 24px;
}

.tally-row p {
  color: var(--ink);
}

.row-chip {
  justify-self: end;
  background-color: var(--olive);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------------- LOT STRIP ---------------- */

.lot-strip {
  padding: 96px 0 92px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.lot-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.lot-tile {
  background-color: var(--panel);
  border: 1px solid var(--hairline-light);
  border-radius: 10px;
  padding: 30px 26px;
}

.lot-square {
  width: 54px;
  height: 54px;
  border: 2px solid var(--olive);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.lot-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--pale);
  line-height: 1;
}

.lot-tile h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.lot-tile p {
  color: var(--ink);
  font-size: 15px;
}

/* ---------------- FAIR ROWS ---------------- */

.fair-rows {
  padding: 100px 0 88px;
}

.fair-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 40px;
  padding: 38px 0;
  border-top: 1px dashed var(--hairline-light);
}

.fair-row:last-child {
  border-bottom: 1px dashed var(--hairline-light);
}

.fair-index {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--pale);
  letter-spacing: 1px;
  line-height: 1;
}

.fair-body h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.fair-body p {
  color: var(--ink);
}

.fair-tags {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fair-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pale);
  border: 1px solid var(--olive-outline);
  padding: 5px 11px;
  border-radius: 2px;
}

/* ---------------- BAZAAR FOOTER ---------------- */

.bazaar-footer {
  border-top: 1px solid var(--olive);
  background-color: #141510;
}

.footer-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 38px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 6px 10px;
}

.footer-links a:hover {
  color: var(--pale);
}

.footer-contact {
  color: var(--pale);
  font-size: 14px;
}

.footer-row2 {
  border-top: 1px solid var(--hairline);
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-legal {
  text-align: center;
  flex: 1;
  font-size: 12.5px;
  color: var(--ink);
}

.footer-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--olive);
  text-underline-offset: 3px;
}

.footer-legal a:hover {
  color: var(--pale);
}

/* ---------------- PAGE HERO (secondary pages) ---------------- */

.page-hero {
  background-color: #141510;
  border-bottom: 1px solid var(--hairline);
  padding: 96px 0 80px;
}

.page-hero-inner {
  max-width: 860px;
}

.page-hero h1 {
  font-size: 46px;
  margin: 20px 0 18px;
}

.page-hero .hero-sub {
  font-size: 18px;
  color: var(--ink);
  max-width: 720px;
  margin: 0;
}

/* ---------------- SERVICES ---------------- */

.service-list {
  padding: 88px 0;
}

.service-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 36px;
  padding: 42px 0;
  border-bottom: 1px solid var(--hairline);
}

.service-item:first-of-type {
  border-top: 1px solid var(--hairline);
}

.service-no {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--pale);
  line-height: 1;
}

.service-item h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.service-item p {
  color: var(--ink);
  margin-bottom: 12px;
}

.service-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.service-features li {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pale);
  border: 1px solid var(--olive-outline);
  padding: 6px 12px;
  border-radius: 2px;
}

/* Process overview */
.process-overview {
  padding: 96px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

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

.process-step {
  border-top: 3px solid var(--olive);
  padding-top: 20px;
}

.step-no {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--pale);
}

.process-step h3 {
  font-size: 19px;
  margin: 8px 0 8px;
}

.process-step p {
  font-size: 14.5px;
  color: var(--ink);
}

/* CTA band */
.cta-band {
  background-color: var(--olive);
  padding: 76px 0;
}

.cta-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.cta-band h2 {
  color: var(--ink);
  font-size: 34px;
  margin-bottom: 14px;
}

.cta-band p {
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 30px;
}

.btn-cta {
  background-color: #141510;
  color: var(--ink);
  border-color: #141510;
}

.btn-cta:hover {
  background-color: #0C0D0A;
  border-color: #0C0D0A;
}

/* ---------------- CONTACT ---------------- */

.contact-section {
  padding: 92px 0 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-detail {
  margin-bottom: 28px;
}

.contact-detail h3 {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pale);
  margin-bottom: 6px;
}

.contact-detail p {
  color: var(--ink);
  font-size: 16px;
}

.contact-detail a {
  color: var(--ink);
}

.contact-form-card {
  background-color: var(--panel);
  border: 1px solid var(--hairline-light);
  border-radius: 10px;
  padding: 36px;
}

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

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pale);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background-color: #141510;
  border: 1px solid var(--olive-outline);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border-radius: 3px;
}

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

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--pale);
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  color: var(--pale);
  min-height: 22px;
}

/* FAQ */
.faq-section {
  padding: 0 0 96px;
}

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

.faq-item:first-of-type {
  border-top: 1px solid var(--hairline);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  padding: 22px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question::after {
  content: "+";
  color: var(--pale);
  font-size: 24px;
  line-height: 1;
}

.faq-item.is-open .faq-question::after {
  content: "\2013";
}

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

.faq-body p {
  color: var(--ink);
  padding-bottom: 22px;
}

/* ---------------- SCROLL REVEAL ---------------- */

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .faq-body { transition: none; }
  .nav-toggle span { transition: none; }
}

/* ---------------- RESPONSIVE ---------------- */

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

  .tally-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #141510;
    border-bottom: 1px solid var(--olive);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 24px 22px;
    display: none;
  }

  .tally-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 14px 4px;
    font-size: 13px;
    border-bottom: 1px solid var(--hairline);
  }

  .bazaar-hero h1 {
    font-size: 42px;
  }

  .tally-row {
    grid-template-columns: 44px 1fr;
    gap: 16px 20px;
  }

  .tally-row .tally-glyph {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-top: 6px;
  }

  .tally-row h3 {
    grid-column: 2;
    grid-row: 1;
  }

  .tally-row p {
    grid-column: 1 / -1;
  }

  .row-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .lot-strip-inner {
    grid-template-columns: 1fr 1fr;
  }

  .fair-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

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

  .service-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-row1 {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .bazaar-hero h1 {
    font-size: 34px;
  }

  .hero-sub {
    font-size: 17px;
  }

  .lot-strip-inner {
    grid-template-columns: 1fr;
  }

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

  .stalls {
    max-width: 100%;
  }

  .stall {
    width: 92px;
  }

  .awning {
    width: 64px;
    height: 34px;
  }

  .stall-baseline,
  .stall-captions {
    max-width: 100%;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .footer-row2 {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .contact-form-card {
    padding: 24px;
  }
}
