/* plantchosen.com — page styles on top of CIS v1.3.0 corporate tokens
   (cis/corporate.css, copied from plantchosen/cis; do not edit that file here).
   Every colour, radius, shadow and ease comes from a --pc-* token. */

/* 台灣圓體 TaiwanPearl, SIL OFL 1.1 (fonts/OFL.txt). Subset to these pages by
   tools/subset-fonts.py. SemiBold is the heaviest cut, so it answers every
   weight from 600 up rather than letting the browser fake a bold. */
@font-face { font-family: "Taiwan Pearl"; src: url("/fonts/pearl-regular.woff2") format("woff2"); font-weight: 100 400; font-display: swap; }
@font-face { font-family: "Taiwan Pearl"; src: url("/fonts/pearl-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Taiwan Pearl"; src: url("/fonts/pearl-semibold.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }

:root {
  --text-hero: clamp(2.5rem, 1.2rem + 5.6vw, 5.6rem);
  --text-h2: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --gutter: clamp(1rem, .4rem + 3vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pc-paper);
  color: var(--pc-ink);
  font-family: var(--pc-font-sans);
  font-size: clamp(1rem, .95rem + .25vw, 1.0625rem);
  line-height: 1.85;
  letter-spacing: .02em;
  overflow-x: hidden;
}
/* Paper grain, drawn once as an SVG noise tile. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--pc-leaf-text);
}
:focus-visible { outline: 2px solid var(--pc-clay); outline-offset: 4px; border-radius: 2px; }

/* ── header ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--pc-paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pc-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 900; font-size: 1.3rem; letter-spacing: .08em; line-height: 1; }
.brand-en { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .06em; color: var(--pc-muted); margin-top: .3rem; }
.nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2rem); }
.nav a { text-decoration: none; font-size: .95rem; position: relative; }
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--pc-duration-normal) var(--pc-ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

/* One primary button per screen (strong); the rest are ghost. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: var(--pc-touch-target);
  padding: .6rem 1.4rem;
  border-radius: var(--pc-radius-pill);
  background: var(--pc-strong);
  color: var(--pc-on-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--pc-strong);
  transition: transform var(--pc-duration-fast) var(--pc-ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--pc-ink); }
.btn.ghost:hover { background: var(--pc-strong); color: var(--pc-on-strong); }
.btn .arrow { transition: transform var(--pc-duration-fast) var(--pc-ease); }
.btn:hover .arrow { transform: translateX(3px); }
.nav .btn { padding-inline: 1.1rem; white-space: nowrap; }

/* ── hero ───────────────────────────────────────── */
.hero { position: relative; isolation: isolate; padding-block: clamp(4rem, 2rem + 8vw, 8.5rem) clamp(3.5rem, 2rem + 5vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: var(--gutter); align-items: end; }
.hero h1 {
  font-weight: 900;
  font-size: var(--text-hero);
  line-height: 1.12;
  letter-spacing: .04em;
  margin: 1.2rem 0 0;
}
.hero h1 .nw { display: inline-block; }
/* Highlighter: leaf-text on the lower 38% of a mark band. */
.hero h1 em {
  font-style: normal;
  color: var(--pc-leaf-text);
  white-space: nowrap;
  background: linear-gradient(transparent 62%, var(--pc-mark) 0);
}
.hero-lede { max-width: 30em; margin: 2rem 0 2.4rem; color: var(--pc-muted); font-size: 1.08em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-side { border-left: 1px solid var(--pc-line); padding-left: 1.6rem; font-size: .92rem; color: var(--pc-muted); }
.hero-side dt { font-size: .75rem; letter-spacing: .2em; color: var(--pc-leaf-text); font-weight: 700; }
.hero-side dd { margin: .2rem 0 1.3rem; color: var(--pc-ink); }
.hero-art {
  position: absolute;
  right: -4%;
  top: -6%;
  width: min(52vw, 640px);
  color: var(--pc-leaf);
  opacity: .22;
  pointer-events: none;
  z-index: -1;
}
.hero-art path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: grow 3.2s var(--pc-ease) .2s forwards; }
@keyframes grow { to { stroke-dashoffset: 0; } }

/* ── section shell ──────────────────────────────── */
section { padding-block: var(--space-section); }
.section-head { display: grid; grid-template-columns: minmax(0, .4fr) minmax(0, 1fr); gap: var(--gutter); margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section-head h2 { font-weight: 900; font-size: var(--text-h2); line-height: 1.25; margin: 0; letter-spacing: .04em; }
.section-head p { margin: .6rem 0 0; color: var(--pc-muted); max-width: 34em; }

/* ── services ───────────────────────────────────── */
.services { border-top: 1px solid var(--pc-line); }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pc-ink); isolation: isolate; }
.service {
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--gutter);
  padding-block: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  border-bottom: 1px solid var(--pc-line);
}
/* Hover wash fades in on opacity rather than animating background/padding. */
.service::before {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  z-index: -1;
  border-radius: var(--pc-radius-sm);
  background: var(--pc-paper-deep);
  opacity: 0;
  transition: opacity var(--pc-duration-normal) var(--pc-ease);
}
@media (hover: hover) { .service:hover::before { opacity: 1; } }
.service-no { font-size: 1rem; color: var(--pc-clay-text); font-weight: 700; padding-top: .5rem; }
.service h3 { font-weight: 700; font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.1rem); margin: 0; line-height: 1.4; }
.service h3 small { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .18em; color: var(--pc-muted); margin-top: .3rem; }
.service p { margin: 0; color: var(--pc-muted); }
.service .tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; padding: 0; list-style: none; }
.service .tags li { font-size: .78rem; padding: .18rem .7rem; border: 1px solid var(--pc-line); border-radius: var(--pc-radius-pill); color: var(--pc-ink); }

/* ── works ──────────────────────────────────────── */
.works { border-top: 1px solid var(--pc-line); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; }
.work {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 1rem + 2.5vw, 2.8rem);
  border-radius: var(--pc-radius-md);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--pc-shadow-lift);
  transition: transform var(--pc-duration-normal) var(--pc-ease);
}
.work:hover { transform: translateY(-4px); }
.work-invoice { background: var(--pc-strong); color: var(--pc-on-strong); }
.work-invoice .ledger { background: color-mix(in srgb, var(--pc-on-strong) 8%, transparent); }
.work-invoice .ledger .tot { border-top-color: color-mix(in srgb, var(--pc-on-strong) 22%, transparent); }
.work-finance { background: var(--pc-paper-deep); color: var(--pc-ink); border: 1px solid var(--pc-line); }
.work-finance .work-lede, .work-finance h3 small { color: var(--pc-muted); }
.work-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .78rem; letter-spacing: .16em; font-weight: 700; }
.work-meta .live { display: inline-flex; align-items: center; gap: .45rem; }
.work-meta .live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--pc-sprout); }
.work-finance .work-meta .live::before { background: var(--pc-leaf); }
.work-wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); color: var(--pc-ink); border: 1px solid var(--pc-line); }
.work-wide .work-lede, .work-wide h3 small { color: var(--pc-muted); }
.work-wide .work-meta .live::before { background: var(--pc-leaf); }
.work-wide .work-col { display: flex; flex-direction: column; min-width: 0; }
.work-wide .work-col:last-child { justify-content: flex-end; }
.work-wide .work-col:last-child .work-points { margin-bottom: 0; }
.work-trip { background: var(--pc-paper); }
.work-trip .ledger { background: var(--pc-paper-deep); }
.work-quotation { background: var(--pc-paper-deep); }
.work-quotation .ledger { background: var(--pc-paper); }
.work h3 { font-weight: 900; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); line-height: 1.25; margin: 1.6rem 0 .4rem; letter-spacing: .04em; }
.work h3 small { font-weight: 500; font-size: .45em; letter-spacing: .12em; margin-left: .4em; }
.work-lede { margin: 0 0 1.6rem; }
.work-points { list-style: none; margin: 0 0 2rem; padding: 0; font-size: .92rem; }
.work-points li { padding: .55rem 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.work-link { margin-top: auto; font-weight: 500; font-size: .95rem; display: inline-flex; gap: .5rem; align-items: center; }
.work-link .arrow { transition: transform var(--pc-duration-fast) var(--pc-ease); }
.work:hover .work-link .arrow { transform: translate(3px, -3px); }
.ledger { display: grid; grid-template-columns: 1fr auto; gap: .2rem 0; font-variant-numeric: tabular-nums; font-size: .88rem; margin: 0 0 1.8rem; padding: 1rem 1.1rem; border-radius: var(--pc-radius-sm); background: var(--pc-paper); }
.ledger span:nth-child(even) { text-align: right; font-weight: 700; }
.ledger .neg { color: var(--pc-clay-text); }
.ledger .tot { border-top: 1px solid var(--pc-line); padding-top: .4rem; margin-top: .2rem; }

/* ── about ──────────────────────────────────────── */
.about { background: var(--pc-paper-deep); }
.glyphs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--pc-ink); }
.glyph { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2.5rem); align-items: start; padding: clamp(2rem, 1rem + 3vw, 3.5rem) clamp(0rem, 2vw, 2rem) 0 0; }
.glyph + .glyph { border-left: 1px solid var(--pc-line); padding-left: clamp(1rem, 3vw, 3rem); }
.glyph b { font-weight: 900; font-size: clamp(5rem, 3rem + 7vw, 9.5rem); line-height: .9; color: var(--pc-ink); }
.glyph:last-child b { color: var(--pc-leaf-text); }
.glyph h3 { font-size: 1.35rem; margin: .4rem 0 .6rem; }
.glyph p { margin: 0; color: var(--pc-muted); }

/* ── contact ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--gutter); align-items: stretch; }
.contact-list { margin: 0; border-top: 1px solid var(--pc-ink); }
.contact-list div { padding-block: 1.3rem; border-bottom: 1px solid var(--pc-line); }
.contact-list dt { font-size: .75rem; letter-spacing: .22em; font-weight: 700; color: var(--pc-leaf-text); }
.contact-list dd { margin: .3rem 0 0; font-size: 1.1rem; }
.contact-list address { font-style: normal; }
.contact-list a { text-decoration-color: var(--pc-sprout); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.contact-list a:hover { color: var(--pc-leaf-text); }
.social {
  display: grid;
  align-content: space-between;
  gap: 1.4rem;
  padding: clamp(1.4rem, 1rem + 2vw, 2.4rem);
  border-radius: var(--pc-radius-md);
  background: var(--pc-paper-deep);
  box-shadow: var(--pc-shadow-lift);
}
.social-line { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2rem); align-items: center; }
/* CIS: QR stays black-on-white in both themes so scanners can read it; the
   square fade mask blends that white into the card. CIS allows only these literals. */
.social-line .qr {
  --fade: 18px;
  width: 196px;
  height: auto;
  padding: var(--fade);
  background: white;
  mask:
    linear-gradient(90deg, transparent, black var(--fade) calc(100% - var(--fade)), transparent),
    linear-gradient(transparent, black var(--fade) calc(100% - var(--fade)), transparent);
  mask-composite: intersect;
}
.social-line h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; margin: 0 0 .3rem; }
.social-line h3 svg { color: var(--pc-leaf-text); }
.social-line p { margin: 0 0 1rem; color: var(--pc-muted); text-wrap: pretty; }
.social-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pc-ink); }
.social-links li + li { border-top: 1px solid var(--pc-line); }
.social-links a { display: flex; align-items: center; gap: 1rem; min-height: var(--pc-touch-target); padding-block: 1rem; text-decoration: none; }
.social-links span { display: grid; flex: 1; line-height: 1.4; }
.social-links b { font-weight: 600; font-size: 1.1rem; }
.social-links small { color: var(--pc-muted); }
.social-links svg { flex: none; color: var(--pc-leaf-text); }
.social-links .out { transition: transform var(--pc-duration-fast) var(--pc-ease); }
.social-links a:hover b { color: var(--pc-leaf-text); }
.social-links a:hover .out { transform: translate(2px, -2px); }

/* ── legal pages ────────────────────────────────── */
.legal { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) var(--space-section); }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-weight: 900; font-size: var(--text-h2); line-height: 1.25; letter-spacing: .04em; margin: 1rem 0 .4rem; }
.legal .updated { color: var(--pc-muted); font-size: .9rem; margin: 0 0 2.4rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; margin: 2.6rem 0 .6rem; padding-top: 1.4rem; border-top: 1px solid var(--pc-line); }
.legal p, .legal li { max-width: 35em; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: .35rem; }
.legal a { text-decoration-color: var(--pc-sprout); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.legal a:hover { color: var(--pc-leaf-text); }
.legal .note { background: var(--pc-paper-deep); border-radius: var(--pc-radius-sm); padding: .9rem 1.1rem; font-size: .92rem; }

/* ── footer ─────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--pc-line); color: var(--pc-muted); padding-block: 2.2rem; font-size: .8125rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 2rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: var(--pc-touch-target); text-underline-offset: 4px; }
.site-footer nav a:hover { color: var(--pc-ink); }

/* ── reveal on load ─────────────────────────────── */
.rise { animation: rise 1s var(--pc-ease) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-art path { stroke-dashoffset: 0; }
}

/* ── responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid, .contact-grid, .section-head { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--pc-line); padding-top: 1.4rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
  .hero-art { width: 90vw; right: -30%; }
  .service { grid-template-columns: 3rem 1fr; }
  .service p, .service .tags { grid-column: 2; }
  .service > div:last-child { grid-column: 2; }
  .work-grid { grid-template-columns: 1fr; }
  .work-wide { display: flex; flex-direction: column; }
  .work-wide .work-col { display: contents; }
  .work-wide .work-link { order: 1; }
  .work-wide .work-col:last-child .work-points { margin-bottom: 2rem; }
  .glyphs { grid-template-columns: 1fr; }
  .glyph + .glyph { border-left: 0; border-top: 1px solid var(--pc-line); padding-left: 0; margin-top: 2rem; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .brand-en { display: none; }
  .brand-name { font-size: clamp(.95rem, 4.4vw, 1.3rem); letter-spacing: .04em; white-space: nowrap; }
  .hero-side { grid-template-columns: 1fr; }
  .social-line { grid-template-columns: 1fr; justify-items: start; }
}
