/* Celvor Industrial — shared stylesheet  (v1.7, 2026-09-26 — article-title underline, sample FAI figure; v1.6, 2026-09-26 — .who--solo single column for the text-only home "Who makes them"; previously v1.5, 2026-09-24 — photos are colour (greyscale filter removed), hero banner 1800/1129 with height:auto (the img height attribute was overriding aspect-ratio); previously v1.4, 2026-09-20 — adds the home page v2.0 hero banner, part-family cards, big-number steps, "who" split and the underline call-to-action; everything up to v1.3.1 is unchanged)
   v1.3.1, 2026-09-13 — new green, SVG header with scroll collapse; compact nav shown whenever it fits, measured by header.js
   Source of truth: 《Celvor 文字標與配色規範》2026-09-13d ／《Celvor 圖形標規範》2026-09-13c
   Rule: three grounds only (paper / ink / grey). Text is black or white.
   One green for the whole site (Celvor green), in four places only:
   logo ring, eyebrow square, current-nav underline, footer rule. Links use the deep green. */

:root {
  --paper: #F4F4F1;
  --ink: #141614;
  --grey-700: #3A3E3A;
  --grey-500: #5E635E;
  --grey-300: #B8BCB8;
  --grey-100: #E2E4E0;
  --green: #4CBB17;       /* Celvor green (PM 2026-09-13) — ring, square, underline, footer rule; never text */
  --green-deep: #2F7A12;  /* links on paper, 4.9:1 */

  --theme: var(--green);  /* kept so old data-theme markup keeps working; every page is green */

  --sans: "IBM Plex Sans", "Archivo", "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 34rem;       /* ~65 characters at 1.05rem */
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

body[data-theme="green"]  { --theme: var(--green); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 200;
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--green-deep); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* All numbers, codes, addresses, e-mail: monospace, tabular, black or white — never the theme colour. */
.num, .mono, code {
  font-family: var(--mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: inherit;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

/* ---------- eyebrow / small caps labels ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin: 0 0 1.25rem;
}

/* theme-colour position 1: the 9×9 square before a section heading */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--theme);
  margin-right: 0.9em;
  vertical-align: 0.05em;
}

/* ---------- header: two rows (logo / nav), sticky, collapses on scroll ----------
   Markup (identical on every page; only the home page adds data-intro):
   <header class="site-header" data-intro>
     <div class="wrap">
       <div class="r1">
         <a class="logo" href="/" aria-label="Celvor Industrial — home"><img src="/assets/celvor-wordmark-small.svg" alt=""></a>
         <nav class="site-nav nav-compact" aria-hidden="true">…same list…</nav>
       </div>
       <div class="r2"><nav class="site-nav" aria-label="Main">…list…</nav></div>
     </div>
   </header>
   header.js replaces the <img> with the live SVG and drives the collapse. Without JS the header is the static B layout. */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--grey-100);
}
.site-header .r1 {
  position: relative;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 26px 0 0;
  transition: padding .45s ease;
}
.site-header .logo {
  display: block; height: 40px; max-width: 100%;
  color: var(--ink);            /* letters */
  --ring: var(--green);         /* tick ring (theme-colour position 3) */
  transition: height .45s ease;
}
.site-header .logo img, .site-header .logo svg { height: 100%; width: auto; max-width: 100%; display: block; }
.site-header .r2 { max-height: 12rem; overflow: hidden; transition: max-height .45s ease, opacity .3s ease; }  /* max-height, so a wrapped nav on phones is never clipped */
.site-header .r2 .site-nav { padding: 20px 0 14px; }
.site-header .nav-compact {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.site-header .nav-compact ul { flex-wrap: nowrap; }
/* home page only, while the loading animation plays */
.site-header.is-intro .logo { height: clamp(56px, 8.5vw, 96px); }
/* after scrolling past the collapse distance. header.js adds .nav-fits when the four
   nav items fit beside the ring (measured, not a viewport breakpoint); otherwise the
   nav row stays and only the logo shrinks (phones, narrow panels). */
.site-header.is-compact .r1 { padding: 14px 0 0; }
.site-header.is-compact .logo { height: 28px; }
.site-header.is-compact.nav-fits .r1 { padding: 14px 0 12px; }
.site-header.is-compact.nav-fits .r2 { max-height: 0; opacity: 0; }
.site-header.is-compact.nav-fits .nav-compact { opacity: 1; pointer-events: auto; }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.site-nav a {
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a:focus-visible { text-decoration: none; border-bottom-color: var(--grey-300); }
/* theme-colour position 2: underline of the current page */
.site-nav a[aria-current="page"] { border-bottom-color: var(--theme); }

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section + .section { border-top: 1px solid var(--grey-100); }

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  max-width: 22ch;
}
.hero .sub {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--grey-700);
  max-width: var(--measure);
}
.hero .sub .num { color: var(--ink); }

/* photo (greyscale close-up only) */
.photo { margin: 0; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
}
.photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--grey-500);
}
.photo-placeholder {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: var(--grey-100);
  display: grid;
  place-items: center;
  color: var(--grey-500);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* three-row definition list */
.facts {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--grey-100);
}
.facts > div {
  display: contents;
}
.facts dt, .facts dd {
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--grey-100);
  margin: 0;
}
.facts dt {
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey-500);
  padding-top: 1.35rem;
}
.facts dd { color: var(--grey-700); max-width: var(--measure); }
.facts dd .num { color: var(--ink); }

/* ink panel (near-black) — theme-colour position 3: its small label only.
   Kept for the Capabilities page data panel; the home page does not use it. */
.panel {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem);
}
.panel .eyebrow { color: var(--theme); }
.panel .eyebrow::before { display: none; }
.panel p { color: var(--grey-300); }
.panel h2 { color: var(--paper); }
.panel .num { color: var(--paper); }
.panel a { color: var(--paper); }

/* four steps on paper: each column opens with a thin ink rule and a mono index */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2.5rem 2.5rem;
}
.steps li {
  counter-increment: step;
  color: var(--grey-700);
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--grey-500);
  margin-bottom: 1.5rem;
}
.steps strong {
  display: block;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

/* article teaser */
.teaser h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); max-width: 28ch; }
.teaser h2 a { color: var(--ink); }
.teaser .byline { margin-top: 1rem; font-size: 0.85rem; color: var(--grey-500); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 2px solid var(--green);   /* brand anchor: green on every page, never re-themed */
  padding-block: 2rem 3rem;
  font-size: 0.8rem;
  color: var(--grey-500);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
}
.site-footer li::after { content: "·"; margin-left: 1.5rem; color: var(--grey-300); }
.site-footer li:last-child::after { content: none; }
.site-footer a { color: var(--green-deep); }

/* ---------- small screens ---------- */
@media (max-width: 40rem) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0.25rem; border-bottom: 0; }
  .facts dd { padding-top: 0; }
  .site-footer li::after { content: none; }
  .site-footer ul { flex-direction: column; gap: 0.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .r1, .site-header .logo, .site-header .r2, .site-header .nav-compact { transition: none; }
}

/* ========== Capabilities page additions (since v1.2, 2026-09-12) ========== */

/* materials table: grades in mono, black; no colour */
.mat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
}
.mat-table th, .mat-table td {
  text-align: left;
  vertical-align: top;
  padding: 1rem 1.5rem 1rem 0;
  border-bottom: 1px solid var(--grey-100);
}
.mat-table thead th {
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey-500);
  border-bottom: 1px solid var(--ink);
  padding-top: 0;
}
.mat-table td { color: var(--grey-700); }
.mat-table td.num { color: var(--ink); white-space: nowrap; }
.mat-table td:last-child { padding-right: 0; }
.table-scroll { overflow-x: auto; }
.facts.also { margin-top: 2rem; border-top: 0; }

/* data figures inside a panel (ink or paper): three columns, mono values, never coloured */
.figures {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem 3rem;
}
.figures li { border-top: 1px solid var(--grey-700); padding-top: 1rem; }
.figures .fig-label {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-300);
  margin-bottom: 0.9rem;
}
.figures .fig-value {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  color: var(--paper);
}
.figures .fig-note {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--grey-300);
}
.panel .disclaimer {
  margin: 2.5rem 0 0;
  font-size: 0.85rem;
  color: var(--grey-300);
  max-width: var(--measure);
}

/* light variants of the panel. PM 09-12: capabilities page uses .panel--grey */
.panel--paper {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
}
.panel--grey {
  background: var(--grey-100);
  color: var(--ink);
}
.panel--grey .eyebrow { color: var(--grey-500); }
.panel--grey .eyebrow::before { display: inline-block; }
.panel--grey .figures li { border-top-color: var(--ink); }
.panel--grey .figures .fig-label { color: var(--grey-500); }
.panel--grey .figures .fig-value { color: var(--ink); }
.panel--grey .figures .fig-note,
.panel--grey .disclaimer,
.panel--grey p { color: var(--grey-700); }
.panel--paper .eyebrow { color: var(--grey-500); }
.panel--paper .eyebrow::before { display: inline-block; }
.panel--paper .figures li { border-top-color: var(--ink); }
.panel--paper .figures .fig-label { color: var(--grey-500); }
.panel--paper .figures .fig-value { color: var(--ink); }
.panel--paper .figures .fig-note,
.panel--paper .disclaimer,
.panel--paper p { color: var(--grey-700); }

/* positioning sentence, set large but light */
.statement a { color: var(--green-deep); }
.statement {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 200;
  line-height: 1.4;
  max-width: 34ch;
  margin: 0;
  color: var(--ink);
}

/* "what we don't claim": short rows opening with an ink rule */
.claims {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 2.5rem;
  max-width: 44rem;
}
.claims li {
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
  color: var(--grey-700);
  font-size: 1rem;
}

/* small pointer line to the contact page */
.next { margin-top: 2.5rem; font-size: 0.95rem; color: var(--grey-700); }

@media (max-width: 40rem) {
  .mat-table th, .mat-table td { padding-right: 1rem; }
}

/* ========== v1.4 additions (2026-09-20 — home page v2.0 and capabilities page v1.5) ==========
   Decisions: 《網站 v1.5 改版決策_2026-09-20》. Fixed column counts (never 3 + 1): twelve cards 4 / 3 / 2,
   groups of four 4 / 2. Green stays in its four places; the green rule on a hovered card is an interaction
   state, not a fifth place. No scroll-reveal, no counting numbers, no parallax. */

/* underline call-to-action (動態 4 右): ink underline, turns green on hover, arrow moves right */
.act { margin: 1.75rem 0 0; }
.cta {
  display: inline-flex; align-items: center; gap: .6em;
  color: var(--ink); text-decoration: none;
  font-weight: 400; font-size: .95rem;
  border-bottom: 1px solid var(--ink); padding-bottom: .25rem;
  white-space: nowrap;
}
.cta .ar { display: inline-block; transition: transform .3s ease; }
.cta:hover, .cta:focus-visible { text-decoration: none; border-bottom-color: var(--green); }
.cta:hover .ar, .cta:focus-visible .ar { transform: translateX(6px); }

/* home hero, layout 案三: headline full width, sub left + button right, 21:9 banner below */
.hero--banner h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); max-width: none; line-height: 1.05; text-wrap: balance; }
.hero--banner .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem 3rem; flex-wrap: wrap; }
.hero--banner .row .sub { margin-top: 1.5rem; max-width: 34rem; flex: 1 1 22rem; }
.hero--banner .row .act { margin: 0 0 1.1rem; flex: 0 0 auto; }
.hero--banner .banner { position: relative; margin: 2.5rem 0 0; border-top: 1px solid var(--ink); padding-top: 1px; }
.hero--banner .banner img, .hero--banner .banner-placeholder {
  display: block; width: 100%; height: auto; aspect-ratio: 1800 / 1129; object-fit: cover;
}
.hero--banner .banner-placeholder {
  background: var(--grey-100); display: grid; place-items: center;
  color: var(--grey-500); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; text-align: center; padding: 1rem;
}
.hero--banner .banner .tag {
  position: absolute; right: 1rem; bottom: 1rem;
  background: var(--paper); color: var(--grey-700);
  font-size: .78rem; line-height: 1.4; padding: .55rem .85rem;
  box-shadow: 0 6px 18px rgba(20, 22, 20, .12);
  max-width: min(60%, 22rem);
}
@media (max-width: 40rem) {
  .hero--banner .banner img, .hero--banner .banner-placeholder { aspect-ratio: 16 / 10; }
  .hero--banner .banner .tag { right: .6rem; bottom: .6rem; font-size: .72rem; padding: .45rem .65rem; }
}

/* part-family cards (案一, light): white card, thin grey frame, 14 px corners, line icon, title + one line, arrow.
   hover: icon redraws (0.9 s), card lifts 4 px with a soft shadow, a 2 px green rule runs along the bottom,
   the arrow moves right and the sketch fades in on the right (swap the sketch for a greyscale photo later, same structure). */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 60rem) { .parts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 40rem) { .parts { grid-template-columns: repeat(2, 1fr); gap: .8rem; } }
.statement + .parts { margin-top: 2rem; }
.parts--4 { grid-template-columns: repeat(4, 1fr); }                       /* four items: 4 or 2 columns, never 3 + 1 */
@media (max-width: 60rem) { .parts--4 { grid-template-columns: repeat(2, 1fr); } }
.parts a {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--grey-100); border-radius: 14px;
  padding: 1.4rem 1.3rem 1.2rem; min-height: 11rem; overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.parts a:hover, .parts a:focus-visible { transform: translateY(-4px); border-color: var(--grey-300); box-shadow: 0 10px 30px rgba(20, 22, 20, .08); text-decoration: none; }
.parts svg.ic { display: block; width: 34px; height: 34px; margin-bottom: 1.4rem; color: var(--ink); }
.parts svg.ic path, .parts svg.ic circle, .parts svg.ic rect { stroke-dasharray: 130; stroke-dashoffset: 0; }
.parts a:hover svg.ic path, .parts a:hover svg.ic circle, .parts a:hover svg.ic rect { animation: celvor-draw .9s ease; }
@keyframes celvor-draw { from { stroke-dashoffset: 130; } to { stroke-dashoffset: 0; } }
.parts strong { display: block; font-weight: 400; font-size: 1rem; color: var(--ink); margin-bottom: .2rem; }
.parts small { display: block; font-size: .82rem; line-height: 1.4; color: var(--grey-500); max-width: 12rem; }
.parts .ar { position: absolute; right: 1.2rem; bottom: 1rem; font-size: 1.1rem; transition: transform .3s ease; }
.parts a:hover .ar { transform: translateX(5px); }
.parts a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--green); transition: width .45s ease; }
.parts a:hover::after, .parts a:focus-visible::after { width: 100%; }
.parts .pic { position: absolute; right: -8px; top: 50%; transform: translate(30px, -50%); opacity: 0; width: 44%; color: var(--grey-300); pointer-events: none; transition: opacity .4s ease, transform .4s ease; }
.parts a:hover .pic { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 40rem) {
  .parts a { padding: 1.1rem 1rem 1rem; min-height: 9.5rem; }
  .parts .pic { display: none; }
}

/* steps with large light numbers (流程圖示四案 C): fixed 4 columns, 2 on phones */
.steps--big { grid-template-columns: repeat(4, 1fr); gap: 2.5rem 2rem; }
@media (max-width: 48rem) { .steps--big { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; } }
.steps--big li::before {
  content: "0" counter(step);
  font-family: var(--sans); font-weight: 200; font-size: 2.6rem; line-height: 1;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 1.25rem;
}

/* "who makes them": sentence left, measuring-stage photo right; one column on phones */
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 50rem) { .who { grid-template-columns: 1fr; gap: 2rem; } }
.who--solo { grid-template-columns: 1fr; }
.who .statement { max-width: 30ch; }
.who .photo img { aspect-ratio: 1400 / 877; object-fit: cover; background: var(--grey-100); }

/* article teaser: one line where it fits (PM 09-20); balanced when it has to wrap on narrow screens */
.teaser h2 { max-width: none; text-wrap: balance; }

/* v1.7 (2026-09-26, D-1): article titles read as links — near-black text, 1 px underline that turns Celvor green on hover
   (interaction state, not a fifth green position; 09-20 item 17). Sample FAI figure on the Capabilities page. */
.teaser h2 a, .article-list h2 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--ink);
  transition: text-decoration-color .2s ease;
}
.teaser h2 a:hover, .teaser h2 a:focus-visible,
.article-list h2 a:hover, .article-list h2 a:focus-visible { color: var(--ink); text-decoration-color: var(--green); }
.facts + .photo.sample { margin-top: 2.5rem; }
.photo.sample img { border: 1px solid var(--grey-100); background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .teaser h2 a, .article-list h2 a { transition: none; }
  .parts a, .parts .ar, .parts .pic, .parts a::after, .cta .ar { transition: none; }
  .parts a:hover svg.ic path, .parts a:hover svg.ic circle, .parts a:hover svg.ic rect { animation: none; }
}
