/* ============================================================
   Fonming Co., Ltd. — 豐洺有限公司
   Design system: "porous field" — precision instrument vernacular
   ------------------------------------------------------------
   Palette   graphite ink / sterile cool paper / deep petrol /
             brass signal (measured values & status only)
   Type      Archivo (display, Latin) · Noto Sans TC (body, CJK)
             IBM Plex Mono (data, labels, spec rails)
   Signature Aperture field — the porous wall the product is
             built around, used as hero device and divider motif
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --ink:          #16191d;
  --ink-soft:     #3b4248;
  --muted:        #6e7570;
  --paper:        #f4f6f3;
  --surface:      #ffffff;
  --petrol:       #123f45;
  --petrol-deep:  #0b2b30;
  --petrol-tint:  #e3edec;
  --brass:        #a8752a;
  --brass-glow:   #e0bb6d;
  --rule:         #d6dbd6;
  --rule-soft:    #e7ebe6;

  --f-display: "Archivo", "Noto Sans TC", system-ui, sans-serif;
  --f-body:    "Noto Sans TC", "Archivo", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 56px);
  --step: clamp(56px, 8vw, 104px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.75rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.005em; }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

/* eyebrow / label — the mono voice */
.label {
  font-family: var(--f-mono);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.9rem;
  display: block;
}
.label--quiet { color: var(--muted); }
.label--onDark { color: var(--brass-glow); }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.band { padding-block: var(--step); }
.band + .band { border-top: 1px solid var(--rule-soft); }
.band--tint { background: var(--petrol-tint); border-top: 0 !important; }
.band--white { background: var(--surface); border-top: 0 !important; }

.lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 62ch; }
.measure { max-width: 68ch; }

.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.head-split {
  display: grid; gap: clamp(18px, 4vw, 60px);
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(32px, 5vw, 52px);
}
@media (min-width: 860px) { .head-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: end; } }

/* ---------- aperture motif ---------- */
/* the porous wall, abstracted: a field of unequal apertures */
.aperture-rule {
  height: 7px;
  background-image: radial-gradient(circle at center, var(--rule) 1.4px, transparent 1.5px);
  background-size: 13px 7px;
  background-repeat: repeat-x;
  margin-block: 1.6rem;
  opacity: 0.9;
}
.aperture-rule--brass { background-image: radial-gradient(circle at center, var(--brass) 1.4px, transparent 1.5px); opacity: 0.5; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 243, 0.93);
  backdrop-filter: saturate(160%) blur(9px);
  border-bottom: 1px solid var(--rule);
}
.site-head__in {
  max-width: var(--wrap); margin-inline: auto; padding: 0 var(--gut);
  display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__zh { font-family: var(--f-display); font-weight: 700; font-size: 1.06rem; color: var(--ink); letter-spacing: 0.04em; line-height: 1; }
.brand__en { font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }

.nav { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); flex-wrap: wrap; }
.nav a {
  font-size: 0.9rem; color: var(--ink-soft); text-decoration: none;
  padding-block: 4px; border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--petrol); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); font-weight: 500; }
.lang {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--rule); padding: 5px 11px; border-radius: 2px;
  text-decoration: none; color: var(--muted); background: var(--surface);
}
.lang:hover { border-color: var(--petrol); color: var(--petrol); }
@media (max-width: 700px) {
  .site-head__in { padding-block: 12px; }
  .nav { width: 100%; gap: 14px; order: 3; font-size: 0.85rem; }
  .nav a { font-size: 0.85rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--petrol-deep); color: #dbe6e4; overflow: hidden; isolation: isolate; }
.hero__field { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.hero__field svg { width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, var(--petrol-deep) 12%, rgba(11,43,48,0.82) 46%, rgba(11,43,48,0.35) 100%);
}
.hero__in { position: relative; z-index: 2; padding-block: clamp(72px, 13vw, 148px); }
.hero h1 { color: #f2f7f5; max-width: 17ch; }
.hero__sub { margin-top: 1.4rem; max-width: 54ch; color: #b6c8c6; font-size: clamp(1rem, 1.5vw, 1.14rem); }

/* fact rail — verifiable, instrument-readout styling */
.factrail {
  margin-top: clamp(32px, 5vw, 52px); padding-top: 22px;
  border-top: 1px solid rgba(224, 187, 109, 0.28);
  display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 4vw, 48px);
}
.factrail div { font-family: var(--f-mono); font-size: 0.775rem; letter-spacing: 0.02em; color: #9fb3b1; }
.factrail b { display: block; font-weight: 500; color: var(--brass-glow); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.63rem; margin-bottom: 3px; }

/* page banner (interior pages) */
.pagehead { background: var(--petrol); color: #dceae8; padding-block: clamp(48px, 7vw, 78px); }
.pagehead h1 { color: #f2f7f5; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.pagehead p { margin-top: 1rem; max-width: 56ch; color: #a8c0bd; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 3px; padding: clamp(22px, 2.6vw, 30px);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.955rem; color: var(--ink-soft); }
.card__foot { margin-top: auto; padding-top: 18px; }

/* spec rail — the recurring structural device: real measured values */
.spec { border-top: 1px solid var(--rule); margin-top: 20px; padding-top: 14px; }
.spec dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; }
.spec dt { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.03em; }
.spec dd { margin: 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--brass); font-weight: 500; text-align: right; white-space: nowrap; }
.spec__note { font-family: var(--f-mono); font-size: 0.68rem; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* status chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--rule); background: var(--paper);
  padding: 4px 10px; border-radius: 100px; color: var(--ink-soft);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); flex: none; }

/* ---------- verify list (anti-shell: invite checking) ---------- */
.verify { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.verify__row {
  display: grid; gap: 4px 28px; padding-block: 20px; border-bottom: 1px solid var(--rule);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) { .verify__row { grid-template-columns: 190px minmax(0, 1fr) auto; align-items: baseline; } }
.verify__k { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.verify__v { font-size: 0.98rem; color: var(--ink); }
.verify__v strong { font-family: var(--f-mono); font-weight: 500; color: var(--petrol); letter-spacing: 0.02em; }
.verify__a { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.05em; white-space: nowrap; }

/* ---------- pipeline ---------- */
.prog { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.prog__top { padding: clamp(22px, 2.6vw, 30px); }
.prog__top h3 { font-size: 1.22rem; margin-bottom: 0.7rem; }
.prog__meta { background: var(--paper); border-top: 1px solid var(--rule); padding: 18px clamp(22px, 2.6vw, 30px); display: grid; gap: 14px 30px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.prog__meta div { font-family: var(--f-mono); font-size: 0.775rem; color: var(--ink-soft); }
.prog__meta b { display: block; font-size: 0.63rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 4px; }

/* stage bar */
.stages { display: flex; gap: 4px; margin-top: 16px; }
.stages span { flex: 1; height: 3px; background: var(--rule); border-radius: 2px; }
.stages span.on { background: var(--brass); }
.stages__cap { font-family: var(--f-mono); font-size: 0.68rem; color: var(--muted); margin-top: 8px; display: block; letter-spacing: 0.04em; }

/* ---------- notice / disclaimer ---------- */
.notice {
  border: 1px solid var(--rule); border-left: 3px solid var(--brass);
  background: var(--surface); padding: 20px 24px; border-radius: 2px;
}
.notice p { font-size: 0.9rem; color: var(--ink-soft); }
.notice .label { margin-bottom: 0.55rem; }

/* ---------- checklist ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.checks li { position: relative; padding-left: 20px; font-size: 0.94rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border: 1.5px solid var(--brass); border-radius: 50%;
}
.checks code { font-family: var(--f-mono); font-size: 0.85em; color: var(--petrol); background: var(--petrol-tint); padding: 1px 5px; border-radius: 2px; }

/* ---------- image placeholders ---------- */
.ph {
  position: relative; background: var(--petrol-tint);
  border: 1px dashed #a9c1bd; border-radius: 3px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 26px 20px; gap: 7px; min-height: 190px;
}
.ph[data-ratio="wide"]  { aspect-ratio: 16 / 9; }
.ph[data-ratio="square"]{ aspect-ratio: 1 / 1; }
.ph[data-ratio="port"]  { aspect-ratio: 3 / 4; }
.ph__tag { font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--petrol); }
.ph__what { font-size: 0.9rem; color: var(--ink); font-weight: 500; max-width: 30ch; line-height: 1.5; }
.ph__spec { font-family: var(--f-mono); font-size: 0.66rem; color: #5e7c78; }
/* crop marks */
.ph::before, .ph::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid #8fada9;
}
.ph::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.ph::after  { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 2px; text-decoration: none;
  background: var(--petrol); color: #eaf3f1; border: 1px solid var(--petrol);
  transition: background 0.16s ease, color 0.16s ease;
}
.btn:hover { background: var(--petrol-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--petrol); }
.btn--ghost:hover { background: var(--petrol); color: #fff; }
.btn--onDark { background: var(--brass); border-color: var(--brass); color: #1c1405; }
.btn--onDark:hover { background: var(--brass-glow); color: #1c1405; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3vw, 34px); }

/* ---------- contact ---------- */
.mailbox { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.mailbox__row { display: grid; gap: 3px 24px; padding-block: 18px; border-bottom: 1px solid var(--rule); grid-template-columns: minmax(0,1fr); }
@media (min-width: 700px) { .mailbox__row { grid-template-columns: 260px minmax(0, 1fr); align-items: baseline; } }
.mailbox__a { font-family: var(--f-mono); font-size: 0.86rem; color: var(--petrol); font-weight: 500; }
.mailbox__d { font-size: 0.92rem; color: var(--muted); }

.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--f-body); font-size: 0.95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  padding: 11px 13px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px rgba(18,63,69,0.09); }
.field textarea { min-height: 132px; resize: vertical; }

/* ---------- CTA band ---------- */
.cta { background: var(--petrol); color: #d5e6e3; }
.cta h2 { color: #f2f7f5; }
.cta p { color: #a8c0bd; }

/* ---------- footer ---------- */
.site-foot { background: var(--petrol-deep); color: #8ba4a2; padding-block: clamp(40px, 6vw, 60px); font-size: 0.88rem; }
.site-foot a { color: #b9cecb; }
.site-foot a:hover { color: var(--brass-glow); }
.foot-grid { display: grid; gap: 30px clamp(24px, 4vw, 60px); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot-grid h4 { font-family: var(--f-mono); font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-glow); font-weight: 500; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot-grid ul a { text-decoration: none; }
.foot-grid ul a:hover { text-decoration: underline; }
.foot-legal {
  margin-top: clamp(32px, 5vw, 48px); padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--f-mono); font-size: 0.7rem; line-height: 1.85; color: #74908d;
  display: grid; gap: 10px;
}

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px, -26px, 0); } }
.hero__field svg g { animation: drift 46s linear infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__field svg g { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- utilities ---------- */
.stack-sm > * + * { margin-top: 14px; }
.stack   > * + * { margin-top: clamp(20px, 3vw, 30px); }
.mt-l { margin-top: clamp(30px, 4.5vw, 46px); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brass); color: #1c1405;
  padding: 10px 16px; z-index: 100; font-family: var(--f-mono); font-size: 0.8rem;
}
.skip:focus { left: 8px; top: 8px; }
