/* ============================================================
   Han Ming Home Essentials  shared styles
   Palette drawn from the brand mark: brick maroon + warm gold
   on unbleached cream, with a "shipping manifest" layout motif
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --cream: #ffffff;
  --paper: #f0f8ff;
  --white: #ffffff;
  --maroon: #b3202f;
  --maroon-dark: #8e1824;
  --gold: #c8963c;
  --gold-soft: #e4c98a;
  --red: #d33c3c;
  --red-dark: #b32c2c;
  --ink: #262b33;
  --ink-soft: #5c6672;
  --line: rgba(38, 43, 51, 0.13);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1600px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--maroon);
}

p { margin: 0 0 1em; max-width: 62ch; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 72px);
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(38, 43, 51, 0.1);
  border-bottom-color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4.5vw, 72px);
  max-width: var(--max);
  margin: 0 auto;
  transition: padding 0.35s ease;
}

.site-header.is-scrolled .nav {
  padding-top: 11px;
  padding-bottom: 11px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--maroon);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transition: width 0.35s ease, height 0.35s ease;
}

.site-header.is-scrolled .brand-mark {
  width: 28px;
  height: 28px;
}

.brand-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.05;
  color: var(--maroon);
}

.brand-text small {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--maroon);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--sans);
  color: var(--maroon);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-right { display: contents; }
  .nav-links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .site-header.is-scrolled .nav-links { background: var(--white); }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 14px 28px; }
  .nav-cta { padding: 9px 16px; font-size: 0.85rem; }
}

/* ---------- Nav CTA ---------- */
.nav-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--white);
  background: var(--red);
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(211, 60, 60, 0.55);
  animation: nav-cta-pulse 2.6s ease-in-out infinite;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

@keyframes nav-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 60, 60, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(211, 60, 60, 0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--maroon);
  color: var(--paper);
}
.btn-primary:hover { background: var(--maroon-dark); }

.btn-outline {
  border-color: var(--maroon);
  color: var(--maroon);
  background: transparent;
}
.btn-outline:hover { background: var(--maroon); color: var(--paper); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--maroon);
  border: 1px dashed var(--maroon);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.eyebrow-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  max-width: 17ch;
}

.hero .lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

.hero-trust {
  list-style: none;
  margin: 34px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.hero-trust svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  color: var(--maroon);
  background: rgba(142, 36, 48, 0.09);
}

.hero-mini-stats {
  display: flex;
  gap: 36px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-mini-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.hero-mini-stats span {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--maroon);
  line-height: 1;
}

.hero-photo {
  position: relative;
  border: 1px solid var(--line);
  padding: 10px;
  background: var(--paper);
}

.hero-photo-frame {
  position: relative;
}

.hero-photo-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
  border-radius: 2px;
}

.hero-photo-accent {
  position: absolute;
  right: -22px;
  bottom: 46px;
  width: 42%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 5px solid var(--white);
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(38, 43, 51, 0.22);
}

.hero-photo figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding-top: 8px;
  text-align: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 420px; margin: 0 auto 34px; }
  .hero-photo-accent { width: 46%; right: -14px; bottom: 34px; border-width: 4px; }
}

/* ---------- Route strip (warehouse network) ---------- */
.route {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.route-line {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.route-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 108px;
}

.route-stop .pin {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--maroon);
  margin-bottom: 8px;
}

.route-stop.origin .pin { background: var(--maroon); }

.route-stop span {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
}

.route-stop small { color: var(--ink-soft); font-size: 0.74rem; }

.route-seg {
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--gold);
  min-width: 28px;
}

/* ---------- Section headings ---------- */
.section { padding: 64px 0; }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--ink-soft); }

.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-white { background: var(--white); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Stats band ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; } }

.stat-item .stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--maroon);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-item .stat-label {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Spotlight products ---------- */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .spotlight-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .spotlight-grid { grid-template-columns: 1fr; } }

.spotlight-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spotlight-card .icon { width: 38px; height: 38px; color: var(--maroon); margin-bottom: 10px; }
.spotlight-card h3 { font-size: 1.1rem; margin-bottom: 2px; }
.spotlight-card p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 14px; }
.spotlight-card .spotlight-cta {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.spotlight-card .spotlight-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px 24px;
}
.testimonial-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; display: block; }
.testimonial-card p { color: var(--ink); font-size: 0.96rem; margin-bottom: 16px; }
.testimonial-card .who { font-size: 0.85rem; color: var(--ink-soft); }
.testimonial-card .who strong { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 6px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  padding: 16px 30px 16px 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 1.3rem;
  color: var(--maroon);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-soft); font-size: 0.94rem; padding: 0 0 18px; margin: 0; max-width: 68ch; }

/* ---------- Category / stencil cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.stencil-card {
  border: 1.5px dashed var(--maroon);
  background: var(--paper);
  padding: 26px 22px;
  position: relative;
}

.stencil-card .corner {
  position: absolute;
  top: -1px; right: -1px;
  width: 22px; height: 22px;
  background: var(--gold);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.stencil-card .icon {
  width: 40px; height: 40px;
  margin-bottom: 16px;
  color: var(--maroon);
}

.stencil-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.stencil-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

.stencil-card .code {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Value props ---------- */
.value-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 760px) { .value-list { grid-template-columns: 1fr; } }

.value-item h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.value-item h3 .idx {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
}
.value-item p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--maroon);
  color: var(--paper);
  padding: 46px 0;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: var(--gold-soft); }
.cta-band .btn-outline { border-color: var(--paper); color: var(--paper); }
.cta-band .btn-outline:hover { background: var(--paper); color: var(--maroon); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--maroon); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.social-row { display: flex; gap: 14px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--maroon);
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  padding: 48px 0 20px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); max-width: 20ch; }
.page-head p { color: var(--ink-soft); max-width: 55ch; }

/* ---------- Product cards (products page) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
}
.product-card .icon { width: 38px; height: 38px; color: var(--maroon); margin-bottom: 14px; }
.product-card h3 { font-size: 1.12rem; margin-bottom: 4px; }
.product-card .tagline { color: var(--maroon); font-weight: 600; font-size: 0.86rem; margin-bottom: 12px; }
.product-card .desc { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 16px; }
.product-card .tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.spec-tag {
  font-size: 0.72rem;
  border: 1px solid rgba(179, 32, 47, 0.25);
  background: var(--white);
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--maroon);
}

/* ---------- Two column text (about/careers) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.figure-frame {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px;
}
.figure-frame img { width: 100%; }
.figure-frame figcaption { font-size: 0.78rem; color: var(--ink-soft); padding-top: 8px; }

/* ---------- Warehouse list ---------- */
.wh-list { list-style: none; margin: 0; padding: 0; }
.wh-list li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.wh-list li:last-child { border-bottom: 1px solid var(--line); }
.wh-list .role { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Job cards (careers) ---------- */
.job-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 28px;
  margin-bottom: 20px;
}
.job-card .job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.job-card h3 { margin-bottom: 4px; font-size: 1.2rem; }
.job-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.job-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--maroon-dark);
  background: rgba(200,150,60,0.14);
}
.job-card ul { margin: 0 0 16px; padding-left: 18px; color: var(--ink-soft); font-size: 0.93rem; }
.job-card li { margin-bottom: 5px; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 52px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contact-info-item:last-child { border-bottom: 1px solid var(--line); }
.contact-info-item .icon { width: 22px; height: 22px; color: var(--maroon); flex-shrink: 0; margin-top: 2px; }
.contact-info-item h4 { font-family: var(--sans); font-weight: 600; font-size: 0.92rem; margin: 0 0 3px; color: var(--ink); }
.contact-info-item p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.contact-info-item a { text-decoration: none; color: var(--ink-soft); }
.contact-info-item a:hover { color: var(--maroon); }

.form-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 32px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--cream);
  padding: 12px 13px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 3px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--maroon);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

#form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
  padding: 12px 14px;
  border-radius: 3px;
}
#form-status.show { display: block; }
#form-status.ok { background: rgba(200,150,60,0.16); color: var(--maroon-dark); }
