/* ============ Chengda · Porcelain shared stylesheet ============ */
:root {
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --bg-3: #ebedf0;
  --line: #e6e8ec;
  --line-2: #ccd0d6;
  --ink: #14171b;
  --ink-2: #2c3138;
  --muted: #7a8088;
  --accent: #2563a8;
  --max: 1600px;
  --pad: clamp(20px, 4vw, 64px);
  --t: cubic-bezier(.4,.0,.2,1);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;
  --font: 'Inter', 'Noto Sans TC', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--t);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 48px;
}
.brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-menu {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-menu a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s var(--t);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s var(--t);
}
.nav-cta:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-burger {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}
.nav-burger span { height: 1.5px; background: var(--ink); }
@media (max-width: 800px) {
  .nav-menu, .nav-cta { display: none; }
  .nav-burger { display: flex; }
}
.nav-drawer {
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 24px var(--pad);
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 49;
}
.nav-drawer.open { display: flex; }
.nav-drawer a { font-size: 18px; font-weight: 500; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s var(--t);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-2); border-color: var(--ink); }
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn.primary:hover { background: #000; border-color: #000; }
.btn .arr {
  width: 14px; height: 1.5px;
  background: currentColor;
  position: relative;
}
.btn .arr::after {
  content: '';
  position: absolute;
  right: -1px; top: -3px;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats .cell {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--line);
}
.stats .cell:first-child { padding-left: 0; }
.stats .cell:last-child { border-right: 0; padding-right: 0; }
.stats .cell + .cell { padding-left: 24px; }
.stats .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.stats .v {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stats .v sup { font-size: 0.4em; font-weight: 400; color: var(--muted); margin-left: 6px; vertical-align: 0.6em; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .cell:nth-child(2) { border-right: 0; padding-right: 0; }
  .stats .cell:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); margin-top: 0; }
  .stats .cell:nth-child(3), .stats .cell:nth-child(4) { padding-top: 32px; }
}

/* ============ Sections ============ */
.section { padding: clamp(60px, 8vh, 100px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vh, 64px); }
.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.section-head h2 .soft { color: var(--muted); font-style: italic; font-weight: 400; }
.section-head p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

/* ============ Subpage hero ============ */
.subpage-hero {
  padding: 128px 0 48px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-2) 100%);
}
.subpage-hero h1 {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 18px;
}
.subpage-hero h1 .soft { color: var(--muted); font-style: italic; font-weight: 400; }
.subpage-hero .crumbs {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.subpage-hero .crumbs a { color: var(--muted); }
.subpage-hero .crumbs a:hover { color: var(--ink); }
.subpage-hero .crumbs .sep { color: var(--line-2); }
.subpage-hero .sub {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-top: 8px;
}

/* ============ Product card grid (homepage) ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .card-grid { grid-template-columns: 1fr; } }
.p-card {
  background: var(--bg-2);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.4s var(--t), box-shadow 0.4s var(--t);
  overflow: hidden;
}
.p-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(20,23,27,0.18);
}
.p-card .img {
  aspect-ratio: 4 / 5;
  background: radial-gradient(circle at 50% 38%, #fff 0%, #f0f2f5 70%, #e5e8ec 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.p-card .img::before {
  content: '';
  position: absolute;
  top: 8%; left: 12%;
  width: 35%; height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.7) 0%, transparent 65%);
  filter: blur(12px);
  pointer-events: none;
}
.p-card .img svg {
  width: 70%; height: 70%;
  opacity: 0.85;
  transition: transform 0.6s var(--t), opacity 0.3s var(--t);
}
.p-card:hover .img svg { transform: scale(1.04); opacity: 1; }
.p-card .meta {
  padding: 22px 26px 26px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.p-card .name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.p-card .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ============ Porcelain frame (hero / product detail image) ============ */
.porcelain-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: radial-gradient(circle at 50% 38%, #ffffff 0%, #f0f2f5 65%, #e3e6ea 100%);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 30px 60px -32px rgba(20,23,27,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}
.porcelain-frame::before {
  content: '';
  position: absolute;
  top: 8%; left: 12%;
  width: 35%; height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.85) 0%, transparent 65%);
  filter: blur(14px);
  pointer-events: none;
}
.porcelain-frame svg {
  width: 70%; height: 70%;
  opacity: 0.9;
}
.porcelain-frame .badge {
  position: absolute; top: 20px; left: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 10px; color: var(--ink-2);
  border: 1px solid var(--line);
}
.porcelain-frame .badge .dot {
  width: 6px; height: 6px;
  background: #2db467; border-radius: 50%;
  box-shadow: 0 0 6px #2db467;
}
.porcelain-frame .tag {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  border: 1px solid var(--line);
}
.porcelain-frame .tag .v { color: var(--ink-2); }

/* ============ Data rows (specs, contact info) ============ */
.data-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.data-row:last-child { border-bottom: 0; }
.data-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-row .v {
  font-size: 15px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.data-row .v .small { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) {
  .data-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ============ Form ============ */
.form-card {
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 32px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid label {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.form-grid input, .form-grid select, .form-grid textarea {
  font: 400 15px/1.5 var(--font);
  letter-spacing: 0; text-transform: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s var(--t), box-shadow .2s var(--t);
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(20,23,27,0.06);
}
.form-grid textarea { resize: vertical; min-height: 120px; }
.submit-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-top: 8px;
}
.submit-row .note {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; }
.footer-tag { font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 32ch; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px; color: var(--ink-2);
  padding: 6px 0;
  transition: color .15s var(--t);
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
