/* ============================================================
   CHENG CHANG GIFTWARE — demo site
   Layout per client refs (jcscrew.com.tw / anvil.tw): diagonal
   slices, dark industrial blocks, chevron process flow.
   Palette from CClogo.ai: forest green #213e2e × sage gold #b5b271.
   NOTE: var names --blue/--amber kept from v1 to avoid churn —
   --blue = brand green, --amber = brand gold.
   ============================================================ */

:root {
  --blue: #2c6a49;
  --blue-deep: #1e4a33;
  --blue-pale: #e9f2ec;
  --ink: #0d1912;
  --ink-2: #142a1d;
  --steel: #f2f6f2;
  --line: #d8e4da;
  --amber: #c9b96a;
  --white: #ffffff;
  --txt: #24312a;
  --txt-dim: #5c6e62;

  --font-display: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --font-body: "Barlow", "Noto Sans TC", sans-serif;

  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* slim industrial scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--blue), var(--blue-deep)); border: 2px solid var(--ink); border-radius: 6px; }
html { scrollbar-color: var(--blue) var(--ink); scrollbar-width: thin; }
body {
  font-family: var(--font-body);
  color: var(--txt);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- film grain for dark sections ---------- */
.grain { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress bar (element injected by main.js) ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 99;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--amber));
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 15, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: stretch; gap: 2rem;
  padding: 0 var(--pad);
}
.brand { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; }
.brand-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--white); background: var(--blue);
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 0 100%);
}
.brand-logo {
  width: 2.7rem; height: 2.7rem; object-fit: cover;
  outline: 1px solid rgba(255,255,255,.14);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.18rem; letter-spacing: .06em; color: var(--white); }
.brand-text small { font-size: .62rem; letter-spacing: .34em; color: #9fb8a9; }

.nav-links { display: flex; margin-left: auto; }
.nav-links a {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 0 1.1rem; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem; letter-spacing: .08em;
  color: #dbe8de; border-left: 1px solid rgba(255,255,255,.06);
  transition: color .2s, background .2s;
}
.nav-links a small { font-family: var(--font-body); font-size: .66rem; font-weight: 400; color: #87a291; letter-spacing: .18em; }
.nav-links a:hover { color: var(--white); background: rgba(44,106,73,.22); }
.nav-links a::after {
  content: ""; position: absolute; bottom: .85rem; left: 50%;
  width: 0; height: 2px; background: var(--amber);
  transform: translateX(-50%); transition: width .28s ease;
}
.nav-links a { position: relative; }
.nav-links a:hover::after { width: 46%; }

.nav-lang {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .1em;
  padding: 0 1.1rem; border-left: 1px solid rgba(255,255,255,.06);
}
.nav-lang a { color: #87a291; transition: color .2s; }
.nav-lang a:hover { color: var(--white); }
.nav-lang a.on { color: var(--amber); }
.nav-lang i { color: #46584c; font-style: normal; }

.nav-cta {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: var(--blue); color: var(--white);
  font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; font-size: 1rem;
  padding: 0 1.6rem; transition: background .2s;
}
.nav-cta small { font-family: var(--font-body); font-size: .66rem; font-weight: 400; letter-spacing: .22em; opacity: .75; }
.nav-cta:hover { background: var(--blue-deep); }
.nav-burger { display: none; }

/* ============ HERO ============ */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: 72% 58%;
  animation: kenburns 24s ease-out both;
}
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 105% at 50% 42%, transparent 55%, rgba(8,18,12,.6) 100%),
    linear-gradient(78deg, rgba(8,18,12,.96) 30%, rgba(8,18,12,.72) 55%, rgba(8,18,12,.18) 100%);
}
.hero-slash {
  position: absolute; right: -6vw; top: 0; bottom: 0; width: 38vw;
  background: linear-gradient(180deg, rgba(53,124,86,.36), rgba(53,124,86,.06));
  clip-path: polygon(38% 0, 100% 0, 62% 100%, 0 100%);
  mix-blend-mode: screen; pointer-events: none;
  animation: slashIn 1.2s .5s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes slashIn { from { opacity: 0; transform: translateX(18%); } to { opacity: 1; transform: none; } }

/* hero entrance orchestration */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero-kicker { animation: rise .7s .15s ease both; }
.hero h1 { animation: rise .85s .3s cubic-bezier(.22,.9,.3,1) both; }
.hero-sub { animation: rise .7s .55s ease both; }
.hero-actions { animation: rise .7s .72s ease both; }

/* candle-flame flicker on the stroked word */
.hero h1 em { animation: flicker 4.6s 1.6s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { text-shadow: 0 0 16px rgba(206,185,110,.45), 0 0 44px rgba(206,185,110,.20); }
  42%      { text-shadow: 0 0 10px rgba(206,185,110,.28), 0 0 28px rgba(206,185,110,.12); }
  47%      { text-shadow: 0 0 20px rgba(206,185,110,.58), 0 0 60px rgba(206,185,110,.28); }
  54%      { text-shadow: 0 0 12px rgba(206,185,110,.32), 0 0 32px rgba(206,185,110,.14); }
  70%      { text-shadow: 0 0 18px rgba(206,185,110,.50), 0 0 52px rgba(206,185,110,.24); }
}
.hero-inner {
  position: relative; max-width: 1280px; margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8.5rem) var(--pad) clamp(7rem, 12vw, 10rem);
}
.hero-kicker {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .3em; font-size: .95rem;
  color: var(--amber); margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 7.2rem); line-height: .94; letter-spacing: .015em;
}
.hero h1 em {
  font-style: normal; color: transparent;
  -webkit-text-stroke: 2px var(--amber);
}
.hero-sub { max-width: 34rem; margin: 1.6rem 0 2.4rem; color: #c4d6c9; font-size: 1.06rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; font-size: 1.02rem;
  padding: .85rem 1.9rem; display: inline-block; transition: all .2s;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 92% 100%, 0 100%);
  position: relative; overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.35) 50%, transparent 62%);
  transform: translateX(-130%); transition: transform .55s ease;
  pointer-events: none;
}
.btn:hover::before { transform: translateX(130%); }
.btn-solid { background: var(--blue); color: var(--white); }
.btn-solid:hover { background: var(--blue-deep); }
.btn-line { border: 2px solid rgba(255,255,255,.5); color: var(--white); clip-path: none; }
.btn-line:hover { border-color: var(--amber); color: var(--amber); }

.hero-stats {
  position: relative; z-index: 2;
  max-width: 1120px; margin: -4.4rem auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); color: var(--ink);
  box-shadow: 0 24px 60px rgba(8,18,12,.28);
  clip-path: polygon(0 0, 98.5% 0, 100% 18%, 100% 100%, 1.5% 100%, 0 82%);
}
.stat {
  padding: 1.7rem 1.4rem; display: flex; flex-direction: column; gap: .15rem;
  border-left: 1px solid var(--line); text-align: left;
}
.stat:first-child { border-left: none; }
.hero-stats::before {
  content: ""; position: absolute; top: 0; left: 0; z-index: 1;
  width: 130px; height: 4px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
.stat strong {
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: var(--blue); font-variant-numeric: tabular-nums;
}
.stat span { font-size: .72rem; letter-spacing: .14em; color: var(--txt-dim); line-height: 1.5; }

/* ============ BRANDS ============ */
.brands { padding: 3.2rem var(--pad) 2.6rem; text-align: center; }
.brands::after {
  content: ""; display: block; margin: 2.4rem auto 0;
  width: min(560px, 70%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.brands li + li::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  background: var(--amber); opacity: .45; transform: rotate(45deg);
  margin-right: clamp(1.4rem, 4vw, 3.4rem); vertical-align: middle;
}
.brands-label { font-size: .72rem; letter-spacing: .3em; color: var(--txt-dim); margin-bottom: 1.1rem; }
.brands ul { display: flex; justify-content: center; gap: clamp(1.4rem, 4vw, 3.4rem); flex-wrap: wrap; }
.brands li {
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: .12em;
  color: #93a99b; transition: color .25s ease;
}
.brands li:hover { color: var(--blue); }

/* ============ SECTIONS ============ */
.section { padding: clamp(3.6rem, 7vw, 6rem) var(--pad); }
.section-head { text-align: center; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); position: relative; }
/* huge ghost index number behind each section heading */
.section-head[data-num]::before {
  content: attr(data-num); position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -56%);
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(6.5rem, 15vw, 11rem);
  color: transparent; -webkit-text-stroke: 1.5px rgba(44, 106, 73, .16);
  z-index: -1; pointer-events: none; user-select: none;
}
.section-head.dark[data-num]::before,
.products .section-head[data-num]::before { -webkit-text-stroke-color: rgba(255,255,255,.11); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: .05em; color: var(--blue);
}
.section-head .zh { font-size: .95rem; letter-spacing: .5em; color: var(--txt-dim); margin-top: .2rem; }
.section-head::after {
  content: ""; display: block; width: 54px; height: 4px; background: var(--amber);
  margin: 1rem auto 0; transform: skewX(-24deg);
}
/* amber rule draws in after the heading reveals */
.section-head.reveal::after { transform: skewX(-24deg) scaleX(0); transition: transform .6s .4s ease; }
.section-head.reveal.in::after { transform: skewX(-24deg) scaleX(1); }
.section-head.dark h2 { color: var(--white); }

/* ---------- ABOUT ---------- */
.about { position: relative; }
.about::before {
  /* diagonal steel slice, jcscrew-style */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom right, var(--white) 49.6%, var(--steel) 50%);
}
.about-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-copy h3 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25; color: var(--ink); margin-bottom: 1.1rem;
}
.about-copy p { color: var(--txt-dim); margin-bottom: 1rem; max-width: 56ch; }
.about-copy strong { color: var(--txt); }
.about-points { margin-top: 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.6rem; }
.about-points li { display: flex; gap: .7rem; align-items: baseline; font-size: .93rem; font-weight: 500; }
.about-points i {
  font-family: var(--font-display); font-style: normal; font-weight: 700; color: var(--blue);
  font-size: 1.15rem;
}
.about-photo { position: relative; }
/* amber corner bracket — drafting mark */
.about-photo::before {
  content: ""; position: absolute; top: -12px; left: -12px; z-index: 1;
  width: 40px; height: 40px;
  border-top: 3px solid var(--amber); border-left: 3px solid var(--amber);
}
.about-photo img {
  aspect-ratio: 4 / 4.6; object-fit: cover; width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 88% 100%, 0 100%);
  box-shadow: 18px 18px 0 var(--blue-pale);
}
.about-photo figcaption { margin-top: 1.4rem; font-size: .8rem; letter-spacing: .06em; color: var(--txt-dim); }

/* ---------- PRODUCTS ---------- */
.products { background: var(--ink); }
.products .section-head h2 { color: var(--white); }
.products .section-head .zh { color: #8fa89a; }
.product-grid {
  max-width: 1220px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.product-grid { counter-reset: pc; }
.p-card { background: var(--ink-2); overflow: hidden; position: relative; counter-increment: pc; border: 1px solid rgba(255,255,255,.07); }
/* catalog index chip on each product photo */
.p-card::before {
  content: "0" counter(pc); position: absolute; top: .75rem; left: .85rem; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; letter-spacing: .14em;
  color: var(--white); background: rgba(10,25,17,.55); backdrop-filter: blur(4px);
  padding: .18rem .55rem; border-left: 2px solid var(--amber);
  pointer-events: none;
}
.p-img { overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.p-card:hover .p-img img { transform: scale(1.06); }
/* warm candlelight wash on hover */
.p-img::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 62%, rgba(206,185,110,.22), transparent 62%);
  opacity: 0; transition: opacity .45s ease; pointer-events: none;
}
.p-card:hover .p-img::after { opacity: 1; }
/* stagger cards as the grid reveals */
.product-grid .reveal:nth-child(2) { transition-delay: .08s; }
.product-grid .reveal:nth-child(3) { transition-delay: .16s; }
.product-grid .reveal:nth-child(4) { transition-delay: .24s; }
.product-grid .reveal:nth-child(5) { transition-delay: .32s; }
.product-grid .reveal:nth-child(6) { transition-delay: .40s; }
.p-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.1rem;
  border-top: 3px solid var(--blue);
}
.p-label strong { font-family: var(--font-display); font-weight: 600; letter-spacing: .1em; font-size: 1.06rem; color: var(--white); }
.p-label span { font-size: .74rem; letter-spacing: .3em; color: #8fa89a; }
.p-card:hover .p-label { border-top-color: var(--amber); }
.products-note { text-align: center; margin-top: 2.2rem; color: #a9c0b2; font-size: .95rem; }
.products-note strong { color: var(--white); }

/* ---------- PROCESS ---------- */
.process {
  background:
    radial-gradient(rgba(44,106,73,.10) 1px, transparent 1.5px) 0 0 / 26px 26px,
    var(--white);
}
.flow {
  max-width: 1220px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem;
}
.flow-step {
  --cut: 16px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white); text-align: center;
  padding: 1.4rem .6rem 1.2rem;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, 0 100%, var(--cut) 50%);
  transition: transform .25s ease, filter .25s ease;
}
.flow-step:first-child { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, 0 100%); }
.flow-step:hover { transform: translateY(-6px); filter: brightness(1.15); }
/* steps power on left-to-right once the flow reveals */
.flow.reveal { transform: none; }
.flow.reveal .flow-step { opacity: 0; }
.flow.reveal.in .flow-step { animation: stepIn .5s ease both; }
.flow.reveal.in .flow-step:nth-child(1) { animation-delay: .05s; }
.flow.reveal.in .flow-step:nth-child(2) { animation-delay: .17s; }
.flow.reveal.in .flow-step:nth-child(3) { animation-delay: .29s; }
.flow.reveal.in .flow-step:nth-child(4) { animation-delay: .41s; }
.flow.reveal.in .flow-step:nth-child(5) { animation-delay: .53s; }
.flow.reveal.in .flow-step:nth-child(6) { animation-delay: .65s; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.flow-step em { display: block; font-style: normal; font-size: .62rem; letter-spacing: .26em; opacity: .75; margin-bottom: .4rem; }
.flow-step strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: .06em; line-height: 1.1; min-height: 2.3em; }
.flow-step span { display: block; font-size: .7rem; letter-spacing: .3em; opacity: .8; margin-top: .35rem; }
.process-banner {
  max-width: 860px; margin: 2.6rem auto 0; text-align: center;
  padding: 1.4rem 2rem; background: var(--blue-pale);
  clip-path: polygon(1.5% 0, 100% 0, 98.5% 100%, 0 100%);
}
.process-banner p { color: var(--txt-dim); font-size: 1.02rem; }
.process-banner strong { color: var(--blue-deep); }

/* ---------- FACILITIES ---------- */
.facilities { background: var(--steel); position: relative; overflow: hidden; }
.facilities::before {
  content: ""; position: absolute; top: 0; right: 0; width: 46%; height: 100%;
  background: linear-gradient(to bottom left, var(--white) 49.6%, transparent 50%);
  pointer-events: none; z-index: 0;
}
.facilities .section-head { position: relative; z-index: 1; }
.facilities .section-head h2 { color: var(--blue); }
.fac-grid {
  position: relative;
  max-width: 1220px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.fac-grid { counter-reset: fc; }
.f-card {
  background: var(--white); box-shadow: 0 10px 30px rgba(10,25,17,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  overflow: hidden; position: relative; counter-increment: fc;
  border: 1px solid rgba(10,25,17,.06);
}
.f-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(10,25,17,.16); }
.f-card:not(.f-card-cert)::before {
  content: "0" counter(fc); position: absolute; top: .75rem; left: .85rem; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; letter-spacing: .14em;
  color: var(--white); background: rgba(10,25,17,.55); backdrop-filter: blur(4px);
  padding: .18rem .55rem; border-left: 2px solid var(--amber);
  pointer-events: none;
}
.f-card img { transition: transform .5s ease; }
.f-card:hover img { transform: scale(1.045); }
/* stagger facility cards */
.fac-grid .reveal:nth-child(2) { transition-delay: .08s; }
.fac-grid .reveal:nth-child(3) { transition-delay: .16s; }
.fac-grid .reveal:nth-child(4) { transition-delay: .24s; }
.fac-grid .reveal:nth-child(5) { transition-delay: .32s; }
.fac-grid .reveal:nth-child(6) { transition-delay: .40s; }
.f-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.f-label { padding: .95rem 1.15rem; display: flex; align-items: center; justify-content: space-between; }
.f-label strong { font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; font-size: 1.02rem; color: var(--ink); }
.f-label span { font-size: .72rem; letter-spacing: .26em; color: var(--txt-dim); }
.f-card-cert { background: var(--blue); display: grid; place-items: center; }
.cert-wrap { text-align: center; color: var(--white); padding: 1.6rem; }
.cert-wrap p { font-family: var(--font-display); font-weight: 600; letter-spacing: .24em; font-size: .92rem; opacity: .85; margin-bottom: 1rem; }
.cert-wrap ul { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.cert-wrap li {
  border: 1px solid rgba(255,255,255,.45); padding: .38rem .9rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .12em; font-size: .95rem;
  transition: background .25s ease, border-color .25s ease;
}
.cert-wrap li:hover { background: rgba(255,255,255,.14); border-color: var(--white); }

/* ---------- HISTORY ---------- */
.history { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--white); }
.history .section-head .zh { color: #8fa89a; }
.timeline {
  max-width: 1220px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem;
  position: relative; padding-top: 1.2rem;
}
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--amber));
}
/* line draws across once the first year reveals (progressive: no :has → line just stays visible) */
@supports selector(:has(*)) {
  .timeline::before { transform: scaleX(0); transform-origin: left; transition: transform 1.4s ease .15s; }
  .timeline:has(li.in)::before { transform: scaleX(1); }
}
.timeline li { position: relative; padding-top: 1.1rem; }
.timeline li::before {
  content: ""; position: absolute; top: -6px; left: 0;
  width: 12px; height: 12px; background: var(--amber); transform: rotate(45deg);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1) .3s;
}
.timeline li.reveal::before { transform: rotate(45deg) scale(0); }
.timeline li.reveal.in::before { transform: rotate(45deg) scale(1); }
/* stagger the years */
.timeline li.reveal:nth-child(2) { transition-delay: .12s; }
.timeline li.reveal:nth-child(3) { transition-delay: .24s; }
.timeline li.reveal:nth-child(4) { transition-delay: .36s; }
.timeline li.reveal:nth-child(5) { transition-delay: .48s; }
.timeline li.reveal:nth-child(6) { transition-delay: .60s; }
.timeline li.reveal:nth-child(2)::before { transition-delay: .42s; }
.timeline li.reveal:nth-child(3)::before { transition-delay: .54s; }
.timeline li.reveal:nth-child(4)::before { transition-delay: .66s; }
.timeline li.reveal:nth-child(5)::before { transition-delay: .78s; }
.timeline li.reveal:nth-child(6)::before { transition-delay: .90s; }
.timeline em {
  font-family: var(--font-display); font-style: normal; font-weight: 700;
  font-size: 2rem; color: var(--amber); display: block; line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(206,185,110,.38);
}
.timeline p { font-size: .84rem; color: #b6cabc; margin-top: .5rem; line-height: 1.55; }
.future {
  max-width: 1220px; margin: 3rem auto 0; padding: 1.6rem 2rem;
  border: 1px solid rgba(255,255,255,.16);
  display: flex; gap: 2.4rem; align-items: center; flex-wrap: wrap;
}
.future-label {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .2em; font-size: 1.05rem;
  color: var(--amber); white-space: nowrap;
}
.future ul { display: flex; gap: 2rem; flex-wrap: wrap; }
.future li { font-size: .9rem; color: #c4d6c9; position: relative; padding-left: 1.1rem; }
.future li::before { content: "▸"; position: absolute; left: 0; color: var(--blue); }

/* ---------- CONTACT ---------- */
.contact {
  background:
    linear-gradient(100deg, rgba(24,58,42,.95) 0%, rgba(44,106,73,.86) 58%, rgba(13,25,18,.62) 100%),
    url("assets/img/product-lantern-palm.jpg") center 62% / cover no-repeat;
  color: var(--white);
  padding: clamp(3.6rem, 8vw, 6.4rem) var(--pad);
}
.contact-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.contact-copy h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: .03em;
  margin-bottom: 1.2rem;
}
.contact-copy p { color: #d7e6da; max-width: 46ch; }
.contact-card {
  background: var(--white); color: var(--ink);
  padding: 2.2rem 2rem;
  border-top: 4px solid var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 94% 100%, 0 100%);
  display: flex; flex-direction: column; gap: .45rem; align-items: flex-start;
}
.contact-role { font-size: .68rem; letter-spacing: .3em; color: var(--txt-dim); }
.contact-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.contact-mail {
  color: var(--blue); font-weight: 600; font-size: 1.05rem;
  background: linear-gradient(var(--blue), var(--blue)) left 100% / 0 2px no-repeat;
  transition: background-size .3s ease; padding-bottom: 2px;
}
.contact-mail:hover { background-size: 100% 2px; }
.contact-tel, .contact-addr { font-size: .9rem; color: var(--txt-dim); }
.contact-card .btn { margin-top: 1.1rem; }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); color: #8fa89a; text-align: center; padding: 2.2rem var(--pad); position: relative; }
.footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--amber) 55%, transparent);
}
.footer strong { font-family: var(--font-display); letter-spacing: .1em; color: var(--white); font-weight: 600; }
.footer-fine { font-size: .74rem; margin-top: .5rem; }
.demo-tag {
  display: inline-block; margin-left: .6rem; padding: .1rem .55rem;
  border: 1px solid var(--amber); color: var(--amber);
  font-size: .64rem; letter-spacing: .2em;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .reveal, .flow.reveal .flow-step { opacity: 1; transform: none; }
}

/* ============ ZH PAGE TWEAKS ============ */
body.zh .hero h1 { font-size: clamp(2.7rem, 7.2vw, 5.6rem); letter-spacing: .08em; line-height: 1.12; }
body.zh .hero h1 em { -webkit-text-stroke: 0; color: var(--amber); }
body.zh .section-head h2 { letter-spacing: .18em; }
body.zh .about-copy h3 { line-height: 1.45; letter-spacing: .04em; }
body.zh .contact-copy h2 { letter-spacing: .1em; line-height: 1.25; }
body.zh .flow-step strong { letter-spacing: .16em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .nav-links a { padding: 0 .7rem; }
  .product-grid, .fac-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 2.2rem; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; padding: .8rem 1.2rem; }
  .nav-burger { display: none; } /* demo: anchor nav via CTA only on mobile */
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin: -2.5rem 1rem 0; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .about-grid, .contact-inner { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: 1fr; }
  .product-grid, .fac-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr 1fr; }
  .future { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
