/* Frame shop site — warm paper, serif headings, industrial restraint. */

:root {
  --paper: #f7f5f1;
  --paper-2: #efeae1;
  --card: #fffdfa;
  --ink: #1b1917;
  --ink-2: #423c33;
  --muted: #635c4e;
  --line: #ded6c7;
  --line-soft: #e8e2d7;
  --accent: #96601a;
  --accent-bright: #b8860b;
  --char: #23201c;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Noto Sans", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --t: 150ms ease;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

section[id] { scroll-margin-top: 74px; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

h1 {
  text-wrap: balance;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  text-wrap: pretty;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-block: 14px;   /* vertical only: .wrap supplies the side gutter */
}

.brand {
  font-family: var(--serif);
  font-size: 1.14rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
  font-size: 0.78em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 3px;
}

/* Chinese takes no Latin-style tracking: space inside the phrase reads as gaps */
[lang="zh-Hans"] .brand span {
  font-size: 0.8em;
  letter-spacing: 0;
  margin-left: 5px;
}

.nav {
  order: 3;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 0.87rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

.nav a {
  color: var(--ink-2);
  padding: 4px 0;
  transition: color var(--t);
}
.nav a:hover { color: var(--accent); }

.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.langs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  font-size: 0.85rem;
}

.langs a {
  padding: 5px 9px;
  color: var(--muted);
  transition: background var(--t), color var(--t);
  line-height: 1.3;
}
.langs a + a { border-left: 1px solid var(--line); }
.langs a:hover { background: var(--paper-2); color: var(--ink); }
.langs a[aria-current="true"] { background: var(--char); color: #f6f2ea; }

.head-cta {
  display: none;
  background: var(--char);
  color: #f7f3ea;
  font-size: 0.92rem;
  padding: 8px 15px;
  border-radius: 4px;
  transition: background var(--t);
}
.head-cta:hover { background: #3a342c; }

/* ---------- hero ---------- */

.hero { padding: 44px 0 40px; }

.hero-grid { display: grid; gap: 34px; }

.hero h1 {
  font-size: 2.15rem;
  max-width: 15em;
}

.hero-sub {
  margin-top: 18px;
  color: var(--ink-2);
  max-width: 34em;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 0.98rem;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn-primary { background: var(--char); color: #f7f3ea; }
.btn-primary:hover { background: #3a342c; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.drawing {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 12px 10px;
}
.drawing svg { width: 100%; height: auto; display: block; }
.drawing figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
}

/* ---------- texture band ---------- */

.band {
  height: 132px;
  background-image: linear-gradient(rgba(35, 32, 28, 0.42), rgba(35, 32, 28, 0.42)), url("img/edge.jpg");
  background-size: cover;
  background-position: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- sections ---------- */

.section { padding: 58px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

.section.head-only { padding-bottom: 0; }

.sec-title { font-size: 1.5rem; }

.sec-intro {
  color: var(--ink-2);
  margin-top: 14px;
  max-width: 40em;
  font-size: 1rem;
}

/* cards */

.cards {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 20px 18px;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--line); }

.card svg { color: var(--accent); margin-bottom: 12px; }

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

.card p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

/* two panels */

.panels { display: grid; gap: 16px; margin-top: 28px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 22px 20px;
}

.panel h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.ticks li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 10px;
  line-height: 1.55;
}
.ticks li:last-child { margin-bottom: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 1px;
  background: var(--accent-bright);
}

/* spec strip */

.specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  margin-top: 18px;
  overflow: hidden;
}

.spec {
  background: var(--card);
  padding: 16px 14px;
}
.spec b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}
.spec span {
  font-size: 0.92rem;
  color: var(--muted);
}

/* steps */

.steps {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step-n {
  font-family: var(--serif);
  color: var(--accent-bright);
  font-size: 0.95rem;
  line-height: 1.75;
}

.step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step p { font-size: 1rem; color: var(--muted); line-height: 1.55; }

/* table */

.tbl-wrap { margin-top: 24px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}

thead th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--ink); }

.note {
  margin-top: 14px;
  font-size: 0.94rem;
  color: var(--muted);
  max-width: 44em;
}

/* split block: quality + clients */

.split { display: grid; gap: 34px; }

.sub-head {
  font-size: 1.1rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

/* contact */

.contact {
  background: var(--char);
  color: #f2ece1;
  border-radius: 6px;
  padding: 30px 22px 32px;
  margin: 0 0 0;
}

.section.contact-sec { padding-top: 58px; }

.contact h2 { color: #f7f3ea; font-size: 1.6rem; }
.contact .lead {
  color: #cdc4b4;
  margin-top: 14px;
  font-size: 1rem;
  max-width: 34em;
}

.contact-main { display: grid; gap: 26px; }
.contact-left { min-width: 0; }
.contact-left h2 { margin-bottom: 12px; }
.contact-left .facts { margin-top: 26px; }
.contact-right { display: grid; gap: 22px; align-content: start; }

.facts { border-top: 1px solid rgba(246, 242, 234, 0.18); }
.fact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(246, 242, 234, 0.18);
  font-size: 0.98rem;
}
.fact dt {
  min-width: 128px;
  color: #a99e8b;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  padding-top: 2px;
}
.fact dd { margin: 0; color: #f4efe5; }
.fact dd a { border-bottom: 1px solid rgba(244, 239, 229, 0.35); }
.fact dd a:hover { border-color: var(--accent-bright); color: #fff; }

.pending { color: #a99e8b; font-style: italic; }

.checklist {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(246, 242, 234, 0.16);
  border-radius: 5px;
  padding: 20px 18px;
}
.checklist li:last-child { margin-bottom: 0; }

.checklist h3 {
  font-size: 1rem;
  color: #f7f3ea;
  margin-bottom: 12px;
}
.checklist li {
  position: relative;
  padding-left: 18px;
  font-size: 0.98rem;
  color: #cdc4b4;
  margin-bottom: 9px;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 7px;
  height: 1px;
  background: var(--accent-bright);
}

/* footer */

.site-foot {
  padding: 30px 0 44px;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.foot-inner .langs { border-color: var(--line); font-size: 0.82rem; }


/* ---------- work gallery ---------- */

.gallery {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.g-item {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}

.g-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.g-item figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 10px 12px 12px;
  line-height: 1.45;
  border-top: 1px solid var(--line-soft);
}

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

@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .g-item:first-child { grid-column: span 2; }
  .g-item:first-child img { aspect-ratio: 16 / 9; }
}


/* ---------- machine photographs ---------- */

.machine-row {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.m-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}

.m-item figcaption { flex: 1; }

.m-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.m-item figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 10px 12px 12px;
  line-height: 1.45;
  border-top: 1px solid var(--line-soft);
}

.pcred {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.pcred a { border-bottom: 1px solid var(--line); }
.pcred a:hover { color: var(--accent); border-color: var(--accent); }

@media (min-width: 760px) {
  .machine-row { grid-template-columns: 1fr 1fr; gap: 14px; }
}


/* ---------- static location map (own section, beside a short location note) ---------- */

.map-row { display: grid; gap: 26px; align-items: center; }

@media (min-width: 820px) {
  .map-row {
    grid-template-columns: minmax(0, 1fr) 27rem;
    gap: 40px;
    align-items: center;
  }
}

.map-copy h2 {
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.map-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-copy .coords {
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.map-actions { margin-top: 16px; }

.map-credit {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--muted);
}

.map-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
  border-bottom: 0;
}

.map-credit a:hover { color: var(--accent); }

.map { margin: 0; }

.map-link {
  display: block;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.map img {
  display: block;
  width: 100%;
  height: clamp(200px, 22vw, 262px);
  object-fit: cover;
  object-position: center;
}

.map-link:hover img { opacity: 0.93; }

/* ---------- Zalo / WhatsApp channel buttons ---------- */

.ch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn-ch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-ch svg { flex: none; opacity: 0.95; }

.btn-ch.zalo {
  background: #0068ff;
  border-color: #0068ff;
  color: #fff;
}

.btn-ch.wa {
  background: #25d366;
  border-color: #25d366;
  color: #08331c;
}

.btn-ch:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* Placeholder state: neutral frame for both, brand colour only in the glyph, so the
   pair reads as one deliberate pair rather than one live and one broken. */
.btn-ch.is-dummy {
  background: var(--card);
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.btn-ch.zalo.is-dummy svg { color: #0068ff; opacity: 0.6; }
.btn-ch.wa.is-dummy svg { color: #1c8f47; opacity: 0.65; }

/* the chip is what marks the button as not yet live */
.btn-ch .soon {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: #6d6557;
  margin-left: 3px;
  flex: none;
}

.btn-ch.lg {
  padding: 10px 14px;
  font-size: 0.9rem;
  gap: 7px;
}

.hero-ch {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

.hero-ch a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero-ch a:hover { color: var(--accent); border-color: var(--accent); }

.ch-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

.contact .ch-row { margin-top: 18px; }
.contact .hero-ch {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

.hero-ch a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero-ch a:hover { color: var(--accent); border-color: var(--accent); }

.ch-note { color: var(--muted); }

@media (max-width: 420px) {
  .ch-row { gap: 8px; }
  .btn-ch { flex: 1 1 auto; justify-content: center; }
  .btn-ch.lg { width: 100%; justify-content: center; }
  .btn-ch.lg .soon { margin-left: auto; }
}

/* ---------- larger screens ---------- */

@media (min-width: 640px) {
  .hero h1 { font-size: 2.5rem; }
  .sec-title { font-size: 1.68rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: repeat(4, 1fr); }
  .hero-sub { font-size: 1.06rem; }
  .band { height: 168px; }
  .contact { padding: 38px 32px; }
}

/* Chinese: serif fallback and tighter headline so words do not break apart */
[lang="zh-Hans"] h1,
[lang="zh-Hans"] h2,
[lang="zh-Hans"] h3 {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  letter-spacing: 0;
}
[lang="zh-Hans"] .hero h1 { font-size: 1.92rem; line-height: 1.3; }
[lang="zh-Hans"] .sec-title { font-size: 1.4rem; }

@media (min-width: 640px) {
  [lang="zh-Hans"] .hero h1 { font-size: 2.2rem; }
  [lang="zh-Hans"] .sec-title { font-size: 1.55rem; }
}

@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  [lang="zh-Hans"] .hero h1 { font-size: 2.5rem; }
  .head-inner { flex-wrap: nowrap; padding-block: 16px; }
  .nav {
    order: 0;
    width: auto;
    border-top: 0;
    padding-top: 0;
    gap: 22px;
    margin-left: 16px;
  }
  .head-cta { display: inline-block; }
  .hero { padding: 68px 0 56px; }
  .hero-grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 48px;
    align-items: center;
  }
  .hero h1 { font-size: 2.75rem; }
  .section { padding: 78px 0; }
  .section.head-only { padding-bottom: 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .panels { grid-template-columns: 1fr 1fr; gap: 20px; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .step { grid-template-columns: 40px 1fr; }
  .split { grid-template-columns: 1fr 1fr; gap: 52px; }
  .contact-main {
    grid-template-columns: minmax(0, 1fr) 20.5rem;
    gap: 44px;
    align-items: start;
  }
  .contact h2 { font-size: 1.85rem; }
}

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

/* ---------- small screens: table becomes cards ---------- */

@media (max-width: 700px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  table { border: 0; background: transparent; }
  tbody tr {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 4px 0;
  }
  tbody td {
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 14px 12px;
    display: grid;
    gap: 2px;
  }
  tbody tr td:last-child { border-bottom: 0; }
  tbody td::before {
    content: attr(data-label);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    color: var(--muted);
  }
  tbody td:first-child { font-size: 1.02rem; }
}

/* product cards: stacked on phones, two across, then three across when wide */
@media (min-width: 700px) {
  #what .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  #what .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 430px) {
  .nav { font-size: 0.8rem; gap: 2px 12px; }
}

/* English labels are the longest of the three; buy them the last few pixels */
@media (max-width: 400px) {
  .nav { font-size: 0.78rem; gap: 2px 10px; }
}

@media (max-width: 380px) {
  body { font-size: 17px; }
  .nav { font-size: 0.81rem; gap: 2px 9px; }
  .hero h1 { font-size: 1.95rem; }
}
