/* ==========================================================================
   UnityRoot Solutions — site design system
   Self-contained: no CDN, no web fonts, no analytics. Light/dark aware.
   zh-TW primary, EN via [data-lang] blocks toggled in site.js.

   Palette is derived from the logo SVG fills (assets/unityroot-logo.svg):
     rgb(135,147,63)  #87933F  leaf olive   — the dominant foliage colour
     rgb(70,192,207)  #46C0CF  teal         — the second leaf colour
     rgb(243,173,43)  #F3AD2B  amber        — the flame leaf
     rgb(193,50,52)   #C13234  crimson      — the accent leaves
     rgb(31,30,28)    #1F1E1C  warm ink     — the tree and figures
   Tints/shades below are ramps built off those five so that text-weight
   colours clear WCAG AA while the pure logo hues stay for graphics.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- Leaf olive ramp (primary) --- */
  --leaf-900: #2F3418;
  --leaf-800: #3E4520;
  --leaf-700: #5C6630;   /* 6.2:1 on white — solid buttons, links */
  --leaf-600: #6E7A38;   /* 4.7:1 on white — headings, small text */
  --leaf-500: #87933F;   /* logo hue — graphics, borders, large type */
  --leaf-400: #A0AC5C;
  --leaf-200: #D6DCB8;
  --leaf-050: #F1F4E4;

  /* --- Teal ramp (secondary — the "tech / AI" side of the brand) --- */
  --teal-800: #12525B;
  --teal-700: #1B6E7A;   /* 6.0:1 on white */
  --teal-600: #228795;
  --teal-500: #46C0CF;   /* logo hue */
  --teal-400: #7AD3DF;
  --teal-050: #E7F7F9;

  /* --- Amber + crimson accents --- */
  --amber-500: #F3AD2B;  /* logo hue */
  --amber-700: #94620A;  /* legible amber for small text / badges */
  --amber-050: #FDF3DF;
  --crimson-500: #C13234;
  --crimson-700: #97282A;

  /* --- Neutrals (light), warmed toward the ink hue --- */
  --ink: #1F1E1C;
  --bg: #ffffff;
  --bg-soft: #F8F8F3;
  --bg-card: #ffffff;
  --border: #E6E5DB;
  --border-soft: #EFEEE6;
  --text: #1F1E1C;
  --text-soft: #4C4A44;
  --text-mute: #6D6A61;  /* 5.5:1 on white */

  --brand: var(--leaf-700);
  --brand-strong: var(--leaf-800);
  --brand-hue: var(--leaf-500);
  --accent: var(--teal-700);
  --accent-hue: var(--teal-500);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(31, 30, 28, .06), 0 2px 10px rgba(31, 30, 28, .05);
  --shadow-md: 0 8px 30px rgba(31, 30, 28, .10);
  --shadow-lg: 0 24px 60px rgba(31, 30, 28, .14);

  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC",
          "Microsoft JhengHei", system-ui, "Segoe UI", Roboto, "Helvetica Neue",
          sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131310;
    --bg-soft: #1B1B16;
    --bg-card: #1A1A15;
    --border: #2E2E26;
    --border-soft: #26261F;
    --text: #EFEDE5;
    --text-soft: #BCB9AE;
    --text-mute: #8F8C82;

    --brand: var(--leaf-400);
    --brand-strong: #B7C275;
    --accent: var(--teal-400);
    --leaf-050: #232819;
    --teal-050: #16292D;
    --amber-050: #2A2113;
    --amber-700: #E0B054;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
    --shadow-md: 0 8px 30px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 86px;   /* sticky header clearance for #anchors */
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.75;          /* generous — CJK body copy needs the air */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { display: block; }
a { color: var(--brand-strong); }

/* The inactive language block is [hidden]; nothing may override that. */
[hidden] { display: none !important; }

h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.01em; }
h1:lang(zh-Hant), h2:lang(zh-Hant) { letter-spacing: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }

/* ---------- Legacy deep-link banner (?elderly=<id>) -------------------- */
.deeplink {
  background: linear-gradient(120deg, var(--leaf-800), var(--teal-800));
  color: #fff;
}
.deeplink .wrap {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px;
  padding-top: 14px; padding-bottom: 14px;
}
.deeplink p { margin: 0; font-size: .95rem; flex: 1 1 300px; color: rgba(255,255,255,.92); }
.deeplink p b { color: #fff; }
.deeplink-links { display: flex; flex-wrap: wrap; gap: 8px; }
.deeplink-links a {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); color: #fff; text-decoration: none;
  font-size: .86rem; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
}
.deeplink-links a:hover { background: rgba(255,255,255,.24); }
.deeplink-close {
  border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; line-height: 1;
  flex: none; display: grid; place-items: center;
}
.deeplink-close:hover { background: rgba(255,255,255,.26); }

/* ---------- Header / nav ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 16px; height: 68px; }

.brand {
  display: flex; align-items: center; gap: 11px; margin-right: auto;
  font-weight: 800; font-size: 1.1rem; letter-spacing: .1px;
  color: var(--text); text-decoration: none;
}
/* The logo art is warm ink on transparent, so it needs a light chip to stay
   legible against the dark theme. The chip reads as intentional in light too. */
.brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: #fff; border: 1px solid rgba(31,30,28,.10);
  padding: 3px; display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand .mark { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--text-soft); text-decoration: none; font-size: .95rem;
  font-weight: 600; padding: 8px 13px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--leaf-050); color: var(--brand-strong); }
.nav-links a.active { color: var(--brand-strong); }
.nav-cta {
  background: var(--brand); color: #fff !important; padding: 9px 17px !important;
  border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--brand-strong); color: #fff !important; }
@media (prefers-color-scheme: dark) {
  .nav-cta { color: var(--leaf-900) !important; }
  .nav-cta:hover { color: var(--leaf-900) !important; }
}

.lang-toggle { display: flex; gap: 2px; align-items: center; flex: none; }
.lang-toggle button {
  border: 0; background: none; cursor: pointer; color: var(--text-mute);
  font: inherit; font-size: .85rem; padding: 5px 10px; border-radius: 999px;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active { color: var(--text); font-weight: 800; background: var(--bg-soft); }

.nav-toggle {
  display: none; border: 0; background: none; cursor: pointer;
  padding: 8px; color: var(--text); flex: none;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 10px 14px 18px; box-shadow: var(--shadow-md); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; }
  .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
  .brand { font-size: 1rem; }
  .brand-mark { width: 34px; height: 34px; }
}

/* ---------- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .12s ease, background .15s, box-shadow .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); box-shadow: var(--shadow-md); color: #fff; }
.btn-accent { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--teal-800); box-shadow: var(--shadow-md); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand-hue); color: var(--brand-strong); background: var(--leaf-050); }
.btn-light { background: #fff; color: var(--leaf-900); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: #fff; color: var(--leaf-900); box-shadow: var(--shadow-lg); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn-primary, .btn-accent { color: var(--leaf-900); }
  .btn-primary:hover, .btn-accent:hover { color: var(--leaf-900); }
  .btn-accent { background: var(--teal-400); }
  .btn-accent:hover { background: var(--teal-500); }
}

/* ---------- Section scaffolding --------------------------------------- */
section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin: 0 auto 46px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.eyebrow.leaf { color: var(--brand); }
.eyebrow:lang(zh-Hant) { letter-spacing: .05em; }  /* .14em over-spaces Han glyphs */

.section-title { font-size: clamp(1.55rem, 3.6vw, 2.25rem); margin: 0 0 14px; }
.section-lead { color: var(--text-soft); font-size: 1.05rem; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 700; color: var(--brand-strong);
  background: var(--leaf-050); padding: 7px 15px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-hue) 26%, transparent);
}
.pill svg { width: 15px; height: 15px; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: 4px 11px; border-radius: 999px;
  background: var(--leaf-050); color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand-hue) 28%, transparent);
}
.badge.amber { background: var(--amber-050); color: var(--amber-700);
  border-color: color-mix(in srgb, var(--amber-500) 40%, transparent); }
.badge.teal { background: var(--teal-050); color: var(--teal-700);
  border-color: color-mix(in srgb, var(--teal-500) 40%, transparent); }
@media (prefers-color-scheme: dark) {
  .badge.teal { color: var(--teal-400); }
}

/* ---------- Hero ------------------------------------------------------ */
/* Pulled up under the sticky header so the foliage wash runs behind it —
   otherwise the translucent header leaves a hard seam at scroll-top. */
.hero { position: relative; overflow: hidden; margin-top: -69px; padding: 157px 0 82px; }
/* Soft foliage wash — the three logo hues scattered like the logo's leaves */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 62% at 10% -8%,  color-mix(in srgb, var(--leaf-500) 26%, transparent), transparent 68%),
    radial-gradient(52% 58% at 96% 6%,   color-mix(in srgb, var(--teal-500) 24%, transparent), transparent 70%),
    radial-gradient(42% 46% at 78% 58%,  color-mix(in srgb, var(--amber-500) 15%, transparent), transparent 74%);
}
.hero > * { position: relative; z-index: 1; }

.hero-grid { display: grid; grid-template-columns: 1.16fr .84fr; gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(1.7rem, 4.4vw, 2.8rem); margin: 18px 0 20px; }
/* Latin glyphs are wider per character than Han, so EN headlines run smaller. */
.hero h1[data-lang="en"] { font-size: clamp(1.5rem, 3.9vw, 2.35rem); }
.hero h1 .hl {
  color: var(--brand-strong);
  background: linear-gradient(transparent 66%, color-mix(in srgb, var(--leaf-500) 34%, transparent) 66%);
  /* If the highlight ever wraps, each fragment keeps its own underline
     instead of one stretched band with a stray character on it. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero p.lead { font-size: 1.14rem; color: var(--text-soft); margin: 0 0 30px; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; }
.hero-note { font-size: .9rem; color: var(--text-mute); margin: 0; }

/* Logo canvas. Stays a light "paper" card in both themes: the logo art is
   warm ink and would vanish on a dark plate. */
.hero-art {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #FFFFFF 0%, var(--leaf-050) 52%, #E4EDD9 100%);
  border: 1px solid color-mix(in srgb, var(--leaf-500) 30%, var(--border));
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 26px;
}
@media (prefers-color-scheme: dark) {
  .hero-art {
    background: radial-gradient(120% 100% at 50% 0%, #F6F5EC 0%, #E9EEDC 55%, #DCE6CE 100%);
    border-color: #3A4429;
  }
}
.hero-art img.logo { width: 78%; max-width: 330px; margin: 0 auto; }
.hero-art .art-caption {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(31,30,28,.10);
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.hero-art .art-caption img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 2px 6px rgba(31,30,28,.18); }
.hero-art .art-caption span { font-size: .82rem; color: #5A5850; font-weight: 600; line-height: 1.4; }

/* Hero side panel (consulting.html) — proof sits next to the promise. */
.hero-panel {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 28px; box-shadow: var(--shadow-md);
}
.hero-panel .eyebrow { margin-bottom: 16px; }
.hero-panel > p { margin: 20px 0 0; font-size: .93rem; color: var(--text-mute); }
.proof-list { list-style: none; margin: 0; padding: 0; }
.proof-list li {
  display: flex; gap: 14px; align-items: center;
  padding: 15px 0; border-top: 1px solid var(--border-soft);
}
.proof-list li:first-child { border-top: 0; padding-top: 0; }
.proof-list img { width: 46px; height: 46px; flex: none; border-radius: 12px; box-shadow: var(--shadow-sm); }
.proof-list b { display: block; font-size: .99rem; }
.proof-list small { display: block; font-size: .85rem; color: var(--text-mute); margin-top: 2px; }

/* Floating leaf confetti, echoing the logo. Purely decorative. */
.leaf-float { position: absolute; opacity: .5; animation: drift 9s ease-in-out infinite; }
.leaf-float.l1 { width: 26px; top: 8%;  left: 6%;  animation-delay: 0s;    color: var(--leaf-500); }
.leaf-float.l2 { width: 18px; top: 22%; right: 9%; animation-delay: -2.5s; color: var(--teal-500); }
.leaf-float.l3 { width: 22px; bottom: 16%; left: 12%; animation-delay: -5s; color: var(--amber-500); }
.leaf-float.l4 { width: 15px; bottom: 26%; right: 16%; animation-delay: -7s; color: var(--crimson-500); }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-14px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) { .leaf-float { animation: none; } }

@media (max-width: 900px) {
  .hero { padding: 122px 0 62px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .hero p.lead { max-width: none; }
  .leaf-float { display: none; }
}

/* ---------- Generic grids / cards ------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s, border-color .16s;
}
.card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand-hue) 45%, var(--border));
}
.card .ico {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--leaf-050); color: var(--brand-strong); margin-bottom: 18px;
}
.card .ico.teal { background: var(--teal-050); color: var(--teal-700); }
.card .ico.amber { background: var(--amber-050); color: var(--amber-700); }
@media (prefers-color-scheme: dark) { .card .ico.teal { color: var(--teal-400); } }
.card .ico svg { width: 25px; height: 25px; }
.card h3 { font-size: 1.12rem; margin: 0 0 9px; }
.card p { color: var(--text-soft); margin: 0; font-size: .97rem; }

/* ---------- App showcase ---------------------------------------------- */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 940px) { .apps { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; } }

.app-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px 26px;
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .16s ease, box-shadow .16s, border-color .16s;
}
.app-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--leaf-500), var(--teal-500));
  opacity: 0; transition: opacity .18s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.app-card:hover::before { opacity: 1; }
.app-card.soon { border-style: dashed; }
.app-card.soon::before { background: linear-gradient(90deg, var(--amber-500), var(--crimson-500)); }

.app-head { display: flex; align-items: center; gap: 15px; margin-bottom: 16px; }
.app-icon {
  width: 62px; height: 62px; flex: none; border-radius: 15px;
  box-shadow: 0 3px 10px rgba(31,30,28,.16); background: var(--bg-soft);
}
.app-icon.placeholder {
  display: grid; place-items: center; color: var(--amber-700);
  background: var(--amber-050); border: 1px solid color-mix(in srgb, var(--amber-500) 35%, transparent);
  box-shadow: none;
}
.app-icon.placeholder svg { width: 30px; height: 30px; }
.app-title { min-width: 0; }
.app-title h3 { margin: 0 0 4px; font-size: 1.14rem; }
.app-title .sub { display: block; font-size: .84rem; color: var(--text-mute); font-weight: 600; }
.app-card p { color: var(--text-soft); margin: 0 0 20px; font-size: .97rem; flex: 1; }

.app-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.applink {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: .84rem; font-weight: 700; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px;
  background: var(--bg); transition: border-color .15s, color .15s, background .15s;
}
.applink:hover { border-color: var(--brand-hue); color: var(--brand-strong); background: var(--leaf-050); }
.applink svg { width: 15px; height: 15px; flex: none; }
.app-soon-note { font-size: .86rem; font-weight: 700; color: var(--amber-700); margin-top: auto; }

/* ---------- Consulting teaser band ------------------------------------ */
.teaser {
  border-radius: var(--radius-lg); padding: 52px 46px;
  background: linear-gradient(135deg, var(--leaf-900) 0%, var(--leaf-800) 42%, var(--teal-800) 100%);
  color: #fff; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.teaser::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -160px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(70,192,207,.30), transparent);
  pointer-events: none;
}
.teaser > * { position: relative; z-index: 1; }
.teaser .eyebrow { color: var(--teal-400); }
.teaser h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 12px; color: #fff; }
.teaser > p { color: rgba(255,255,255,.86); margin: 0 auto 34px; max-width: 60ch; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 34px; text-align: left; }
@media (max-width: 820px) { .teaser { padding: 40px 26px; } .teaser-grid { grid-template-columns: 1fr; } }
.teaser-item {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 22px 20px;
}
.teaser-item h3 { margin: 0 0 8px; font-size: 1.03rem; color: #fff; }
.teaser-item p { margin: 0; font-size: .92rem; color: rgba(255,255,255,.8); }
.teaser-item .n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.14); color: var(--teal-400); margin-bottom: 13px;
}
.teaser-item .n svg { width: 17px; height: 17px; }

/* ---------- Packages (consulting.html) -------------------------------- */
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 1000px) { .packages { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; } }

.pkg {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px 30px; box-shadow: var(--shadow-sm);
}
.pkg.featured {
  border-color: color-mix(in srgb, var(--brand-hue) 60%, var(--border));
  box-shadow: var(--shadow-md);
}
.pkg.featured::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--leaf-500), var(--teal-500), var(--amber-500));
}
.pkg-tag {
  position: absolute; top: -13px; left: 28px;
  background: var(--brand); color: #fff; font-size: .74rem; font-weight: 800;
  padding: 5px 14px; border-radius: 999px; letter-spacing: .03em;
}
@media (prefers-color-scheme: dark) { .pkg-tag { color: var(--leaf-900); } }
.pkg h3 { font-size: 1.28rem; margin: 6px 0 10px; }
.pkg .pkg-lead { color: var(--text-soft); margin: 0 0 22px; font-size: .98rem; }
.pkg h4 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-mute); margin: 22px 0 10px; font-weight: 800;
}
.pkg h4:lang(zh-Hant) { letter-spacing: .06em; }
.pkg ul { list-style: none; margin: 0; padding: 0; }
.pkg li {
  display: flex; gap: 10px; align-items: flex-start; padding: 5px 0;
  color: var(--text-soft); font-size: .95rem; line-height: 1.6;
}
.pkg li svg { width: 17px; height: 17px; flex: none; margin-top: 5px; color: var(--brand); }
.pkg .pkg-meta {
  margin: 24px 0 0; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  font-size: .89rem; color: var(--text-soft);
}
.pkg .pkg-meta b { color: var(--text); }
.pkg .pkg-cta { margin-top: 24px; }
.pkg .pkg-cta .btn { width: 100%; }
.pkg-spacer { flex: 1; }

/* ---------- Engagement steps ------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 6px; }
.step .n {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--leaf-700), var(--teal-700));
  color: #fff; font-weight: 800; font-size: 1.02rem; margin-bottom: 15px;
}
.step h3 { font-size: 1.03rem; margin: 0 0 7px; }
.step p { margin: 0; color: var(--text-soft); font-size: .94rem; }
/* connector rail between steps on wide layouts */
.step::after {
  content: ""; position: absolute; top: 27px; left: 54px; right: -22px; height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.step:last-child::after { display: none; }
@media (max-width: 900px) { .step::after { display: none; } }

/* ---------- Capability tags ------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  font-size: .87rem; font-weight: 600; color: var(--text-soft);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px;
}

/* ---------- Personas / plain list cards ------------------------------- */
.persona {
  display: flex; gap: 15px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.persona .ico {
  width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-050); color: var(--teal-700);
}
@media (prefers-color-scheme: dark) { .persona .ico { color: var(--teal-400); } }
.persona .ico svg { width: 22px; height: 22px; }
.persona p { margin: 0; color: var(--text-soft); font-size: .97rem; }
.persona p b { color: var(--text); display: block; margin-bottom: 3px; font-size: 1.01rem; }

/* ---------- About ----------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 34px; } }
.about-grid p { color: var(--text-soft); font-size: 1.03rem; }
.team-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
}
.team-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.team-card .team-note { color: var(--text-mute); font-size: .88rem; margin: 0 0 18px; }
.team-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.team-list li {
  display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .96rem;
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 7px 16px 7px 8px;
}
.team-list .avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--leaf-500), var(--teal-500));
  color: #fff; font-size: .8rem; font-weight: 800;
}
.facts { list-style: none; margin: 24px 0 0; padding: 0; }
.facts li {
  display: flex; gap: 11px; align-items: flex-start; padding: 7px 0;
  color: var(--text-soft); font-size: .96rem;
}
.facts li svg { width: 18px; height: 18px; flex: none; margin-top: 5px; color: var(--brand); }

/* ---------- Contact --------------------------------------------------- */
.contact-card {
  border-radius: var(--radius-lg); padding: 52px 44px; text-align: center;
  background: linear-gradient(135deg, var(--leaf-900), var(--teal-800));
  color: #fff; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.contact-card::after {
  content: ""; position: absolute; width: 380px; height: 380px; left: -130px; bottom: -190px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(135,147,63,.42), transparent);
  pointer-events: none;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card h2 { color: #fff; font-size: clamp(1.45rem, 3.1vw, 2.05rem); margin: 0 0 12px; }
.contact-card p { color: rgba(255,255,255,.86); margin: 0 auto 30px; max-width: 52ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
@media (max-width: 620px) { .contact-card { padding: 38px 24px; } }

/* ---------- FAQ ------------------------------------------------------- */
.faq-list { max-width: 760px; margin: 0 auto; }
details.faq {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); margin-bottom: 12px; overflow: hidden;
}
details.faq[open] { border-color: color-mix(in srgb, var(--brand-hue) 50%, var(--border)); }
details.faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; position: relative;
  font-weight: 700; font-size: 1.02rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.45rem; font-weight: 400; color: var(--brand); line-height: 1;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq .body { padding: 0 22px 20px; color: var(--text-soft); font-size: .97rem; }
details.faq .body p { margin: 0; }

/* ---------- Note / callout -------------------------------------------- */
.note {
  border-left: 4px solid var(--brand-hue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 20px 24px; max-width: 760px; margin: 0 auto;
}
.note p { margin: 0; color: var(--text-soft); font-size: .97rem; }
.note b { color: var(--text); }

/* ---------- Footer ---------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 54px 0 40px;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 44px; justify-content: space-between; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-mute); font-size: .92rem; margin: 0; }
.footer-col h4 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute); margin: 0 0 13px; font-weight: 800;
}
.footer-col h4:lang(zh-Hant) { letter-spacing: .05em; }
.footer-col a {
  display: block; color: var(--text-soft); text-decoration: none;
  font-size: .94rem; padding: 5px 0;
}
.footer-col a:hover { color: var(--brand-strong); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 40px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--text-mute); font-size: .88rem;
}

/* ---------- Scroll reveal (only when JS is running) ------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.61,.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Focus visibility ------------------------------------------ */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-hue); outline-offset: 2px; border-radius: 6px;
}

/* Skip link — visible only when keyboard-focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--leaf-700, #5C6630);
  color: #fff;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Industry-background note under the consulting personas */
.industry-note {
  max-width: 720px;
  margin: 34px auto 0;
  padding: 18px 22px;
  text-align: center;
  color: var(--text-soft);
  font-size: .95rem;
  line-height: 1.75;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
