/* ============================================================
   博盛佳國際有限公司 — V2「光譜」深色技術研發風
   Foresta International Ltd. — Spectrum / dark R&D spec-sheet
   ============================================================ */

:root {
  --bg: #0C1B18;
  --surface: #132821;
  --surface-2: #0F211C;
  --line: rgba(215, 228, 221, 0.12);
  --line-strong: rgba(215, 228, 221, 0.24);
  --text: #C9D8D0;
  --text-dim: #8FA79D;
  --heading: #EEF4F0;
  --jade: #3EA382;
  --jade-soft: rgba(62, 163, 130, 0.14);
  --copper: #D96E48;
  --copper-soft: rgba(217, 110, 72, 0.14);
  --radius: 5px;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-latin: "Space Grotesk", "Noto Sans TC", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* faint engineering grid across the whole page */
  background-image:
    linear-gradient(rgba(215, 228, 221, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 228, 221, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
}

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

a { color: var(--jade); text-decoration: none; }
a:hover { color: var(--heading); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--jade); color: #06110E; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.en { font-family: var(--font-latin); }
.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--jade);
  color: #06110E;
  padding: 8px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus-visible { left: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 27, 24, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  background: #F4F7F5;           /* light card so the green logo reads on dark bg */
  border-radius: var(--radius);
  padding: 4px;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }

.brand-text { line-height: 1.25; }
.brand-text .zh {
  color: var(--heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand-text .latin {
  font-family: var(--font-latin);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-menu a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.nav-menu a:hover { color: var(--heading); border-color: var(--line); }
.nav-menu a[aria-current="page"] {
  color: var(--jade);
  border-color: rgba(62, 163, 130, 0.4);
  background: var(--jade-soft);
}
.nav-menu .nav-cta a {
  background: var(--jade);
  color: #06110E;
  font-weight: 700;
  border-color: var(--jade);
}
.nav-menu .nav-cta a:hover { background: #4BB893; border-color: #4BB893; color: #06110E; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--jade); color: #06110E; border-color: var(--jade); }
.btn-primary:hover { background: #4BB893; border-color: #4BB893; color: #06110E; }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--copper); color: var(--copper); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
  padding: 88px 0 96px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--jade);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: "// ";
  color: var(--copper);
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.hero h1 .x-mark {
  font-family: var(--font-latin);
  color: var(--copper);
  padding: 0 2px;
}

.hero-sub {
  font-size: 1.02rem;
  color: var(--text);
  max-width: 34em;
  margin-bottom: 32px;
}
.hero-sub strong { color: var(--heading); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-figure { min-width: 0; }
.hero-figure svg { width: 100%; height: auto; display: block; }

.hero-specline {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.hero-specline b { color: var(--copper); font-weight: 500; }

/* wave flow animation */
.wave-flow {
  stroke-dasharray: 6 10;
  animation: waveflow 2.6s linear infinite;
}
@keyframes waveflow {
  to { stroke-dashoffset: -32; }
}

/* ---------- section scaffolding ---------- */
.section { padding: 76px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }

.section-head { margin-bottom: 40px; max-width: 46em; }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 12px;
}
.section-label .wave-mark { flex-shrink: 0; }
.wave-mark { display: inline-block; }

.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 12px; }
.section-head p { color: var(--text-dim); }

/* ---------- spec tables ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  background: rgba(19, 40, 33, 0.55);
}
.spec-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 10px;
}
.spec-table th, .spec-table td {
  border: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}
.spec-table thead th {
  background: var(--surface);
  color: var(--heading);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
}
.spec-table tbody th {
  color: var(--heading);
  font-weight: 700;
  background: rgba(19, 40, 33, 0.8);
  white-space: nowrap;
}
.spec-table .num { font-family: var(--font-mono); color: var(--copper); font-size: 0.86rem; }
.spec-table .unit { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.82rem; }

.table-scroll { overflow-x: auto; }
.table-scroll .spec-table { min-width: 640px; }

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.25s ease;
  position: relative;
}
.card:hover { border-color: var(--jade); }
.card:hover .card-index { color: var(--copper); }

.card-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 14px;
  transition: color 0.25s ease;
}
.card h3 { font-size: 1.06rem; margin-bottom: 10px; }
.card p { font-size: 0.92rem; color: var(--text-dim); }
.card .card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.86rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.card .card-link::after { content: " →"; }

/* ---------- product placeholders ---------- */
.product-card { padding: 0; overflow: hidden; }
.product-figure {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(150deg, #17342A 0%, #0E211B 55%, #0A1714 100%);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-figure svg { width: 58%; height: auto; }
.product-figure .ph-tag {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(201, 216, 208, 0.5);
  text-transform: uppercase;
}
.product-body { padding: 22px 24px 26px; }
.product-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.product-body .series-en {
  font-family: var(--font-latin);
  font-size: 0.74rem;
  color: var(--jade);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.product-body p { font-size: 0.9rem; color: var(--text-dim); }
.product-body ul { margin: 12px 0 0; padding-left: 1.2em; font-size: 0.88rem; color: var(--text); }
.product-body li { margin-bottom: 4px; }
.product-body li::marker { color: var(--copper); }

/* ---------- data strip ---------- */
.data-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.data-cell {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}
.data-cell:last-child { border-right: none; }
.data-cell .dc-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--copper);
  line-height: 1.2;
}
.data-cell .dc-value small { font-size: 0.85rem; color: var(--text-dim); }
.data-cell .dc-label {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ---------- two-column blocks ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.split h3 { font-size: 1.15rem; margin-bottom: 12px; }
.split p + p { margin-top: 12px; }

.figure-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.figure-panel svg { width: 100%; height: auto; display: block; }
.figure-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
}
.figure-caption b { color: var(--copper); font-weight: 500; }

/* ---------- definition rows (spec list) ---------- */
.spec-rows { border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--jade);
  text-transform: uppercase;
  padding-top: 3px;
}
.spec-row dd h3 { font-size: 1.05rem; margin-bottom: 6px; }
.spec-row dd p { font-size: 0.94rem; color: var(--text); }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 14px; }
.page-hero .lede { max-width: 40em; color: var(--text); font-size: 1.02rem; }
.page-hero .hero-eyebrow { margin-bottom: 14px; }
.page-hero-wave {
  position: absolute;
  right: -40px;
  bottom: -8px;
  width: 420px;
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- callout ---------- */
.callout {
  background: linear-gradient(120deg, rgba(62,163,130,0.1), rgba(217,110,72,0.07));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.callout h2 { font-size: 1.35rem; margin-bottom: 8px; }
.callout p { color: var(--text-dim); max-width: 34em; }
.callout .btn { flex-shrink: 0; }

/* ---------- process steps ---------- */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.step {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}
.step:last-child { border-right: none; }
.step .step-no {
  font-family: var(--font-mono);
  color: var(--copper);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}
.step h3 { font-size: 0.98rem; margin-bottom: 8px; }
.step p { font-size: 0.86rem; color: var(--text-dim); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.contact-info-card h2 { font-size: 1.2rem; margin-bottom: 20px; }
.contact-list { list-style: none; }
.contact-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 0.94rem;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .k {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: var(--jade);
  text-transform: uppercase;
  padding-top: 3px;
}
.contact-list .v a { color: var(--text); }
.contact-list .v a:hover { color: var(--jade); }

/* form */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
}
.form-panel h2 { font-size: 1.2rem; margin-bottom: 6px; }
.form-panel .form-note { font-size: 0.86rem; color: var(--text-dim); margin-bottom: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  display: block;
  font-size: 0.84rem;
  color: var(--heading);
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
.form-field label .req { color: var(--copper); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--heading);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  padding: 11px 13px;
  transition: border-color 0.2s ease;
}
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--jade) 50%), linear-gradient(135deg, var(--jade) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: var(--jade); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(62, 163, 130, 0.22);
}
.form-field ::placeholder { color: rgba(143, 167, 157, 0.6); }
.form-actions { grid-column: 1 / -1; margin-top: 6px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-actions .hint { font-size: 0.8rem; color: var(--text-dim); font-family: var(--font-mono); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 56px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand .brand-logo { width: 52px; height: 52px; }
.footer-brand-text .zh { color: var(--heading); font-weight: 700; letter-spacing: 0.06em; }
.footer-brand-text .latin { font-family: var(--font-latin); font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.14em; text-transform: uppercase; }
.footer-brand-text .slogan { margin-top: 10px; font-size: 0.86rem; color: var(--text-dim); }

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; font-size: 0.9rem; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--jade); }

.footer-contact li { display: flex; gap: 10px; align-items: baseline; }
.footer-contact .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  min-width: 52px;
  text-transform: uppercase;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ---------- utility ---------- */
.text-copper { color: var(--copper); }
.text-jade { color: var(--jade); }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }

/* ============================================================
   RWD
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0 72px; gap: 40px; }
  .hero-figure { max-width: 640px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: none; }
  .step { border-bottom: 1px solid var(--line); }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }

  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    gap: 6px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 12px 14px; border: 1px solid var(--line); }

  .spec-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .step-grid { grid-template-columns: 1fr; }
  .step { border-right: none; }
  .data-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .data-cell:last-child { border-bottom: none; }
  .contact-list li { grid-template-columns: 80px 1fr; }
  .page-hero-wave { display: none; }
  .callout { padding: 30px 24px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .wave-flow { animation: none; stroke-dasharray: none; }
}
