/* =====================================================================
   JianRan 简然建材 — editorial restyle ("warm-stone atelier")
   Linen canvas · walnut ink · single sans · hairlines · no shadows
   ===================================================================== */

:root {
  --linen:    #f6f1eb;
  --walnut:   #403a34;
  --charcoal: #333333;
  --slate:    #555555;
  --wa:       #25d366;
  --wa-dark:  #1da851;

  --line:      #403a34;            /* full-strength hairline */
  --line-soft: rgba(64,58,52,.20); /* image frames / ledger rules */

  --sans: 'Inter', 'Noto Sans SC', ui-sans-serif, system-ui, -apple-system,
          'Segoe UI', Roboto, sans-serif;

  --maxw: 1440px;
  --pad:  clamp(20px, 5vw, 64px);
  --gap:  20px;
  --band: clamp(60px, 9vw, 120px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--linen);
  color: var(--walnut);
  font-family: var(--sans);
  font-weight: 400;
  font-feature-settings: "ss01" 1, "cv11" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Typography primitives ---------- */
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--walnut);
  margin-bottom: clamp(20px, 3vw, 34px);
}
.eyebrow-light { color: rgba(246,241,235,.92); margin-bottom: 22px; }

.display {
  font-weight: 400;
  font-size: clamp(4.5rem, 17vw, 13rem);
  line-height: .98;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.heading {
  font-weight: 500;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--walnut);
  max-width: 18ch;
}
.heading-sm {
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -.015em;
  text-transform: none;
  max-width: 22ch;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--charcoal);
  max-width: 58ch;
  margin-top: 26px;
}
.body {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--charcoal);
  max-width: 54ch;
}

/* Chinese: relax the tight Latin tracking */
html[lang="zh"] .display { letter-spacing: 0; }
html[lang="zh"] .heading,
html[lang="zh"] .heading-sm { letter-spacing: 0; }
html[lang="zh"] .eyebrow,
html[lang="zh"] .col-label { letter-spacing: .12em; }

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--linen);
}
.bar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.wordmark {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.wordmark-en {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--slate);
  margin-left: 4px;
}
.nav {
  display: flex;
  gap: clamp(16px, 2vw, 30px);
  margin-left: auto;
}
.nav a {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--walnut);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav a:hover { border-bottom-color: var(--walnut); }

.bar-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.lang-toggle .sep { margin: 0 5px; opacity: .5; }
.lang-toggle span[data-lang] { transition: color .2s; }
.lang-toggle.lang-en span[data-lang="en"],
.lang-toggle.lang-zh span[data-lang="zh"] { color: var(--walnut); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 6px 2px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span { height: 1.5px; width: 100%; background: var(--walnut); transition: .25s; }

/* ---------- Pills / buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--walnut);
  border-radius: 9999px;
  padding: 9px 18px;
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--walnut);
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.pill:hover { background: var(--walnut); color: var(--linen); }
.pill svg { display: block; }

.pill-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.pill-wa:hover { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }

.pill-ghost-light { border-color: rgba(246,241,235,.7); color: var(--linen); }
.pill-ghost-light:hover { background: var(--linen); border-color: var(--linen); color: var(--walnut); }

.pill-lg { padding: 13px 26px; font-size: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: clamp(540px, 90vh, 880px);
  overflow: hidden;
  background: #1c1611;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s ease;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28,22,17,.78) 0%, rgba(28,22,17,.12) 46%, rgba(28,22,17,0) 72%),
    linear-gradient(to right, rgba(28,22,17,.55) 0%, rgba(28,22,17,0) 58%);
}
.hero-title {
  position: absolute;
  left: var(--pad);
  bottom: clamp(28px, 5vw, 60px);
  right: var(--pad);
  max-width: 1000px;
  z-index: 2;
  color: var(--linen);
}
.hero .display { color: var(--linen); }
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.45;
  color: rgba(246,241,235,.9);
  max-width: 44ch;
  margin: 22px 0 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-thumbs {
  position: absolute;
  right: var(--pad);
  bottom: clamp(28px, 5vw, 60px);
  display: flex;
  gap: 12px;
  z-index: 2;
}
.hthumb {
  width: 118px;
  height: 76px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: .75;
  transition: opacity .2s, border-color .2s;
}
.hthumb img { width: 100%; height: 100%; object-fit: cover; }
.hthumb:hover { opacity: 1; }
.hthumb.is-active { border-color: var(--linen); opacity: 1; }

/* ---------- Bands & dividers ---------- */
.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--band) var(--pad);
}
.rule { border: none; border-top: 1px solid var(--line); width: 100%; }

.statement .heading { max-width: 20ch; }

/* ---------- Sourcing ---------- */
.source-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(40px, 6vw, 68px);
}
.col-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--walnut);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.hlist li {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--walnut);
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- Image grids ---------- */
.grid { display: grid; gap: var(--gap); margin-top: clamp(34px, 5vw, 56px); }
.grid-work { grid-template-columns: repeat(4, 1fr); }
.grid-designs { grid-template-columns: repeat(3, 1fr); }

.design-group { margin-top: clamp(40px, 6vw, 64px); }
.design-group:first-of-type { margin-top: clamp(34px, 5vw, 56px); }
.design-group .grid { margin-top: 22px; }

.ph {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--walnut);
  background: var(--linen);
  cursor: pointer;
}
.grid-work .ph    { aspect-ratio: 4 / 5; }
.grid-designs .ph { aspect-ratio: 3 / 2; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ph::after {
  content: attr(data-cap);
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--linen);
  background: rgba(40,34,27,.86);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.ph:hover img { transform: scale(1.05); }
.ph:hover::after { opacity: 1; transform: translateY(0); }

/* ---------- Process / Why (ledgers) ---------- */
.steps, .why { margin-top: clamp(34px, 5vw, 56px); border-top: 1px solid var(--line); }
.step, .why li {
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(20px, 3vw, 30px) 0;
  border-bottom: 1px solid var(--line-soft);
}
.step-num {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -.03em;
  color: var(--walnut);
  min-width: 1.8em;
}
.step-text {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  color: var(--charcoal);
  align-self: center;
}
.why-no {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--slate);
  min-width: 2.4em;
}
.why li span:last-child {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--walnut);
}

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
}
.split-label { text-align: right; }
.split-label .eyebrow { margin-bottom: 14px; }
.split-head {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--walnut);
}

/* ---------- Contact ---------- */
.contact .lead { margin-bottom: clamp(34px, 5vw, 52px); }
.channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.channel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--walnut);
  transition: background .25s, color .25s;
}
.channel-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.channel-val {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--walnut);
}
.channel-go {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate);
  margin-top: 4px;
}
a.channel-wa:hover { background: var(--wa); border-color: var(--wa); color: #fff; }
a.channel-wa:hover .channel-val,
a.channel-wa:hover .channel-go { color: #fff; }
.channel.is-placeholder { opacity: .6; cursor: default; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(26px, 4vw, 40px) var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-mark { font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.foot-meta { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--slate); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28,22,17,.92);
  padding: 5vw;
}
.lightbox.open { display: flex; }
.lb-figure { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; gap: 14px; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border: 1px solid rgba(246,241,235,.3); }
.lb-figure figcaption {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--linen);
}
.lb-close, .lb-nav {
  position: fixed;
  background: none;
  border: none;
  color: var(--linen);
  cursor: pointer;
  line-height: 1;
}
.lb-close { top: 22px; right: 26px; font-size: 34px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 48px; padding: 12px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
  .grid-work { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--linen);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    z-index: 50;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 14px var(--pad);
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px;
  }
  .hero-thumbs { display: none; }
  .grid-designs { grid-template-columns: repeat(2, 1fr); }
  .source-cols { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 18px; }
  .split-label { text-align: left; }
  .channels { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .grid-work { grid-template-columns: repeat(2, 1fr); }
  .heading { max-width: none; }
  .heading-sm { max-width: none; }
}

@media (max-width: 560px) {
  .bar-inner { gap: 12px; height: 60px; }
  .bar-actions .pill-wa { display: none; }
  .grid { gap: 10px; }
  .grid-work, .grid-designs { grid-template-columns: repeat(2, 1fr); }
  .step-num { min-width: 1.4em; }
  .lb-nav { font-size: 36px; }
}
