/* ============================================================
   Jeffery Sha — Portfolio (static build)
   styles.css — all layout, type, colour and motion rules.
   Base rules describe the DESKTOP design; media queries at the
   bottom adapt tablet (<=999px) and mobile (<=679px).
   ============================================================ */

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #ffffff; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 120px;
}
body { overflow-x: hidden; }
img { max-width: 100%; }

a { color: #292a2c; text-decoration: none; }
a:hover { color: var(--color-muted); }
a, button { touch-action: manipulation; }

/* ---------- root shell ---------- */
.root {
  --color-bg: #ffffff;
  --color-primary: #292a2c;
  --color-muted: #686a6e;
  --color-faint: #74767a;
  --color-rule: #dcdedc;
  --color-rule-soft: #eceeec;
  --color-surface: #f5f6f3;
  background: var(--color-bg);
  color: var(--color-primary);
  font-family: 'Hanken Grotesk', 'Noto Sans TC', system-ui, -apple-system, "PingFang TC",
               "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
}

/* Visible only to keyboard and assistive-technology users. */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 11px 14px; border: 1px solid currentColor; border-radius: 2px;
  background: var(--color-bg); color: var(--color-primary);
  font-size: 14px; font-weight: 700;
  transform: translateY(calc(-100% - 20px));
  transition: transform .18s ease;
}
.skip-link:focus-visible { transform: translateY(0); outline: 2px solid currentColor; outline-offset: 3px; }

/* shared inner container: keeps content centred + safe margins */
.container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* colour tokens ---------------------------------------------- */
.c-primary { color: var(--color-primary); }
.c-muted   { color: var(--color-muted); }
.c-faint   { color: var(--color-faint); }

/* shared eyebrow / kicker label */
.eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-faint);
  font-weight: 600;
}

/* colour fade for theme switching */
[data-root], [data-root] .c-primary, [data-root] .c-muted, [data-root] .c-faint,
[data-root] .browser, [data-root] .toggle-icon {
  transition: background-color .56s ease, color .56s ease, border-color .56s ease;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 34px clamp(24px, 5vw, 96px);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transform: translateY(0);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-left: -2px;
  border-radius: 6px;
  outline-offset: 4px;
  transition: opacity .2s ease, transform .2s ease;
}
.home-link:hover, .home-link:focus-visible { opacity: .82; transform: scale(1.03); }
.memoji { position: relative; display: inline-block; width: 40px; height: 40px; flex-shrink: 0; }
.memoji img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; transition: opacity .18s ease;
}
.memoji .memoji-hover { opacity: 0; }
.memoji:hover img:first-child { opacity: 0; }
.memoji:hover .memoji-hover { opacity: 1; }
.brand-name { color: #292a2c; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  color: #292a2c;
}
.nav-link:hover { color: var(--color-muted); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; opacity: .72;
  transition: transform .2s ease;
}
.nav-link[aria-current]::after { transform: scaleX(1); }
.nav-link.is-contact { display: inline-flex; align-items: center; min-height: 44px; }

.theme-btn {
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border: none; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #292a2c;
}
.theme-btn:active, .menu-btn:active, a:active { opacity: .68; }
.toggle-icon { display: block; color: #292a2c; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border: 0; background: transparent; color: #292a2c;
  align-items: center; justify-content: center;
  cursor: pointer; border-radius: 2px;
}
.menu-icon { width: 20px; height: 14px; position: relative; display: block; }
.menu-icon span {
  position: absolute; left: 0; width: 20px; height: 1.5px;
  background: currentColor;
  transition: transform .22s ease, top .22s ease;
}
.menu-icon span:first-child { top: 3px; }
.menu-icon span:last-child { top: 10px; }
.nav.is-menu-open .menu-icon span:first-child { top: 6px; transform: rotate(45deg); }
.nav.is-menu-open .menu-icon span:last-child { top: 6px; transform: rotate(-45deg); }

/* toggle icon entrance */
@keyframes jsha-spin {
  from { transform: rotate(-90deg) scale(.55); opacity: 0; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}
.toggle-icon { animation: jsha-spin 460ms cubic-bezier(.34, 1.4, .5, 1) both; }

/* ============================================================
   PAGE ROUTING (home / contact)
   ============================================================ */
.page { display: none; }
.page.is-active { display: block; }

/* ============================================================
   HERO  (asymmetric — do NOT centre)
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}
.hero-inner { margin-left: 16.5%; max-width: 760px; }
.h1 {
  margin: 0;
  font-weight: 800;
  color: #292a2c;
  font-size: 80px;
  line-height: 1.0;
  word-break: keep-all;
  overflow-wrap: normal;
}
.sub {
  margin: 25px 0 0;
  font-size: 18px;
  line-height: 30px;
  color: var(--color-muted);
  max-width: 470px;
  text-wrap: pretty;
}

/* scroll reveals — pure CSS */
@keyframes jsha-reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero { animation: jsha-reveal .7s cubic-bezier(.22, .61, .36, 1) both; }
@supports (animation-timeline: view()) {
  [data-reveal] {
    opacity: 0;
    animation: jsha-reveal .6s cubic-bezier(.22, .61, .36, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  [data-reveal][data-delay="140"] { animation-range: entry 8% entry 52%; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  border-top: 1px solid #eeeeee;
  padding: 130px clamp(24px, 5vw, 96px);
  box-sizing: border-box;
}
.about-copy { max-width: 760px; }
.h2 {
  margin: 22px 0 0;
  font-size: 50px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #292a2c;
}
.about .h2 { max-width: 14ch; word-break: keep-all; }
.about-lead {
  margin: 26px 0 0;
  font-size: 18px; line-height: 32px;
  color: #292a2c; max-width: 640px; text-wrap: pretty;
}
.about-sub {
  margin: 22px 0 0;
  font-size: 16px; line-height: 30px;
  color: var(--color-muted); max-width: 640px; text-wrap: pretty;
}

/* ============================================================
   SELECTED WORK
   ============================================================ */
.work {
  box-sizing: border-box;
  padding: 130px clamp(24px, 5vw, 96px);
  min-height: max(900px, 100svh);
  display: flex;
  align-items: center;
}
.workwrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 56px;
  position: relative;
}
.textcol {
  width: 30%;
  max-width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.work .h2 { line-height: 1.04; }
.work-title-link { display: inline-flex; align-items: center; min-height: 44px; color: inherit; outline-offset: 4px; }
.work-title-link:hover { color: var(--color-muted); }
.work-sub {
  margin-top: 10px;
  font-size: 17px; font-weight: 500;
  color: #292a2c; line-height: 1.5; word-break: keep-all;
}
.work-meta {
  margin-top: 20px;
  font-size: 14px; letter-spacing: 0.3px;
  color: var(--color-muted); word-break: keep-all;
}
.work-desc {
  margin: 24px 0 0;
  font-size: 18px; line-height: 30px;
  color: #292a2c; max-width: 360px; text-wrap: pretty;
}
.visit-wrap { margin-top: 16px; }
.visit-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; font-size: 15px; font-weight: 600;
  color: #292a2c; outline-offset: 4px;
}
.visit-link:hover { color: var(--color-muted); }
.visit-link span { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.tech { margin-top: 28px; }
.tech-label {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--color-faint); font-weight: 600; margin-bottom: 8px;
}
.tech-list { font-size: 14px; line-height: 22px; color: var(--color-muted); max-width: 340px; }

.devicecol { position: relative; flex: 1; min-width: 0; }
.browser {
  width: 100%; max-width: 820px;
  border-radius: 14px; overflow: hidden;
  background: #ffffff; border: 1px solid #ececec;
  box-shadow: rgba(0,0,0,0.10) 0px 24px 60px -24px, rgba(0,0,0,0.05) 0px 8px 24px;
}
.browser-bar {
  height: 38px; background: #f5f5f5; border-bottom: 1px solid #ececec;
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: block; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.browser-url {
  flex: 1; height: 20px; margin-left: 10px; max-width: 58%;
  background: #ffffff; border: 1px solid #eaeaea; border-radius: 6px; display: block;
}
.linkwrap { display: block; outline-offset: 4px; transition: opacity .2s ease; }
.linkwrap:hover { opacity: .86; }
.viewport { overflow: hidden; position: relative; background: #fff; }
.viewport[data-proj="yc"]   { aspect-ratio: 3004 / 1586; }
.viewport[data-proj="be"]   { aspect-ratio: 1440 / 1080; }
.viewport[data-proj="keng"] { aspect-ratio: 1440 / 920; }
.viewport picture, .phone-vp picture { display: block; }
.shot { width: 100%; height: auto; display: block; object-position: top; }

.phonepos {
  position: absolute; right: 6px; bottom: -52px; top: auto; left: auto;
  transform: none; width: 212px; z-index: 3;
}
.phone {
  border-radius: 34px; padding: 7px; background: #1c1c1e;
  box-shadow: rgba(0,0,0,0.20) 0px 26px 50px -18px;
}
.phone-vp { border-radius: 27px; overflow: hidden; position: relative; background: #fff; }
.phone-vp[data-proj="yc"]   { height: 420px; }
.phone-vp[data-proj="be"]   { height: 420px; }
.phone-vp[data-proj="keng"] { height: 430px; }

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  border-top: 1px solid #eeeeee;
  padding: 130px clamp(24px, 5vw, 96px);
  box-sizing: border-box;
}
.services .h2 {
  max-width: 12ch;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.services .services-title {
  max-width: none;
  margin-inline: auto;
  text-align: center;
  white-space: nowrap;
  text-wrap: nowrap;
}

.plans {
  margin-top: 54px;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--color-faint) transparent;
  -webkit-overflow-scrolling: touch;
}
.plans::-webkit-scrollbar { height: 7px; }
.plans::-webkit-scrollbar-track { background: transparent; }
.plans::-webkit-scrollbar-thumb {
  background: var(--color-faint);
  border-radius: 0;
}
.plans:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
}
.plans-scroll-hint {
  display: none;
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  font-weight: 650;
  letter-spacing: .3px;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 34px clamp(22px, 2.3vw, 30px) 28px;
  border: 1px solid var(--color-rule);
  border-radius: 2px;
  scroll-snap-align: start;
}
.plan--featured {
  border-color: var(--color-primary);
}
.plan-overview { min-width: 0; }
.plan-index {
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 1.4px;
  font-variant-numeric: tabular-nums;
}
.plan-name {
  margin: 10px 0 0;
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.45px;
  color: #292a2c;
}
.plan-desc {
  margin: 15px 0 0;
  max-width: 31ch;
  min-height: 69px;
  font-size: 14px;
  line-height: 23px;
  color: var(--color-muted);
  text-wrap: pretty;
}
.plan-price {
  margin-top: 25px;
  font-size: clamp(30px, 2.7vw, 38px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: #292a2c;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.plan-price .suffix {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--color-muted);
}
.plan-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.plan-facts {
  display: grid;
  grid-template-columns: 1fr;
  margin: 31px 0 0;
  padding: 0;
  border-top: 1px solid var(--color-rule-soft);
}
.plan-fact {
  min-width: 0;
  margin: 0;
  padding: 15px 0 14px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  border-bottom: 1px solid var(--color-rule-soft);
}
.plan-fact:nth-child(1) { min-height: 72px; }
.plan-fact:nth-child(2) { min-height: 102px; }
.plan-fact:nth-child(3) { min-height: 92px; }
.plan-fact:nth-child(4) { min-height: 72px; }
.plan-fact:nth-child(5) { min-height: 94px; }
.plan-fact dt {
  margin: 0;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: .8px;
}
.plan-fact dd {
  margin: 0;
  font-size: 13px;
  line-height: 21px;
  font-weight: 550;
  text-wrap: pretty;
}
.plan-details {
  margin-top: 0;
}
.plan-details summary {
  min-height: 62px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  outline-offset: 4px;
  user-select: none;
}
.plan-details summary::-webkit-details-marker { display: none; }
.plan-details summary::marker { content: ""; }
.plan-details summary:hover { color: var(--color-muted); }
.plan-details summary:focus-visible {
  outline: 2px solid currentColor;
  border-radius: 2px;
}
.plan-toggle {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.plan-toggle::before,
.plan-toggle::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: transform .22s ease;
}
.plan-toggle::after { transform: rotate(90deg); }
.plan-details[open] .plan-toggle::after { transform: rotate(0); }
.plan-details-content {
  padding: 7px 0 5px;
  animation: plan-details-in .28s ease both;
}
@keyframes plan-details-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.plan-detail-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 27px;
  padding-top: 17px;
}
.plan-include {
  margin-bottom: 13px;
  font-size: 11px;
  line-height: 18px;
  color: var(--color-faint);
  font-weight: 700;
  letter-spacing: .8px;
}
.plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-muted);
}
.plan-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 5px;
}
.plan-list li::before {
  content: "";
  width: 5px;
  height: 1px;
  margin-top: 10px;
  background: currentColor;
  opacity: .72;
}
.plan-list .ga-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 19px;
  color: var(--color-muted);
  text-wrap: pretty;
}
.plan-foot {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-rule-soft);
  font-size: 12px;
  line-height: 20px;
  color: var(--color-faint);
  text-wrap: pretty;
}

.services-notes {
  margin-top: 48px;
  padding-top: 25px;
  border-top: 1px solid var(--color-rule);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(42px, 7vw, 92px);
}
.services-note { margin: 0; }
.services-note-label {
  font-size: 12px;
  line-height: 19px;
  font-weight: 700;
}
.services-note p {
  margin: 10px 0 0;
  max-width: 58ch;
  font-size: 13px;
  line-height: 22px;
  text-wrap: pretty;
}

.cta-wrap { margin-top: 38px; }
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border: 1px solid #292a2c; border-radius: 2px;
  font-size: 15px; font-weight: 600; color: #292a2c; outline-offset: 4px;
}
.cta:hover { color: var(--color-muted); }

.services-compare-link-wrap {
  margin-top: 30px;
  text-align: center;
}
.services-compare-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 650;
  color: var(--color-primary);
  outline-offset: 4px;
}
.services-compare-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.services-compare-link:hover::after,
.services-compare-link:focus-visible::after {
  transform: scaleX(1);
}

/* ============================================================
   DETAILED PLAN COMPARISON
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.compare-page {
  min-height: calc(100svh - 120px);
}
.compare-shell {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}
.compare-hero {
  padding: 176px clamp(24px, 5vw, 96px) 74px;
  text-align: center;
}
.compare-title {
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -1.8px;
  font-weight: 800;
  color: var(--color-primary);
}
.compare-intro {
  max-width: 600px;
  margin: 24px auto 0;
  font-size: 18px;
  line-height: 30px;
  color: var(--color-muted);
  text-wrap: pretty;
}
.compare-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 13px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  outline-offset: 4px;
  transition: border-color .2s ease, color .2s ease;
}
.compare-back-link:hover {
  border-color: currentColor;
}
.compare-content {
  padding: 0 clamp(24px, 5vw, 96px) 130px;
}
.compare-scroll-hint {
  display: none;
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  font-weight: 650;
  letter-spacing: .3px;
}
.compare-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-faint) transparent;
  -webkit-overflow-scrolling: touch;
}
.compare-table-scroll::-webkit-scrollbar { height: 7px; }
.compare-table-scroll::-webkit-scrollbar-track { background: transparent; }
.compare-table-scroll::-webkit-scrollbar-thumb {
  background: var(--color-faint);
  border-radius: 0;
}
.compare-table-scroll:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
}
.compare-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--color-primary);
}
.compare-label-column { width: 184px; }
.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
}
.compare-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-rule);
  box-shadow: 1px 0 0 var(--color-rule-soft);
}
.compare-plan-column {
  padding: 0 22px 34px;
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}
.compare-plan-column.is-featured {
  border-top: 2px solid var(--color-primary);
}
.compare-plan-head {
  display: flex;
  flex-direction: column;
  min-height: 216px;
  padding-top: 25px;
}
.compare-plan-marker {
  min-height: 18px;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: .5px;
  font-weight: 700;
}
.compare-plan-name {
  margin-top: 13px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -.65px;
  font-weight: 800;
  white-space: nowrap;
}
.compare-plan-audience {
  max-width: 22ch;
  min-height: 48px;
  margin-top: 15px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  text-wrap: pretty;
}
.compare-plan-price {
  margin-top: auto;
  padding-top: 21px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
  white-space: nowrap;
}
.compare-group-row th,
.compare-group-row td {
  padding: 74px 0 19px;
  border-bottom: 1px solid var(--color-rule);
}
.compare-group-row th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--color-bg);
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -.45px;
  font-weight: 750;
  color: var(--color-primary);
}
.compare-table tbody tr:not(.compare-group-row) > th,
.compare-table tbody tr:not(.compare-group-row) > td {
  padding: 27px 22px 30px;
  border-bottom: 1px solid var(--color-rule-soft);
}
.compare-table tbody tr:not(.compare-group-row) > th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--color-bg);
  padding-left: 0;
  font-size: 13px;
  line-height: 21px;
  letter-spacing: .15px;
  font-weight: 700;
  color: var(--color-faint);
  box-shadow: 1px 0 0 var(--color-rule-soft);
}
.compare-table tbody td {
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  color: var(--color-muted);
  text-wrap: pretty;
}
.compare-table tbody td strong {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 750;
  color: var(--color-primary);
}
.compare-notes {
  margin-top: 82px;
  padding-top: 28px;
  border-top: 1px solid var(--color-rule);
}
.compare-notes-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 750;
}
.compare-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 7vw, 90px);
  margin-top: 22px;
}
.compare-notes-grid p {
  max-width: 58ch;
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  text-wrap: pretty;
}
.compare-cta-wrap {
  margin-top: 42px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  box-sizing: border-box;
  min-height: calc(100svh - 120px);
  padding: 190px clamp(24px, 5vw, 96px) 120px;
  display: flex; justify-content: center;
}
.contact-inner {
  width: 100%; max-width: 1180px; margin: 0 auto;
  box-sizing: border-box;
  display: flex; flex-direction: row; align-items: flex-start; gap: 90px;
}
.contact-col-a { width: 42%; max-width: 520px; flex-shrink: 0; }
.contact-col-b { flex: 1; min-width: 0; max-width: 560px; display: flex; flex-direction: column; }
.contact-h1 {
  margin: 22px 0 0;
  font-size: 50px; line-height: 1.14; font-weight: 800; letter-spacing: -0.5px;
  color: #292a2c; word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty;
}
.contact-lead {
  margin: 26px 0 0;
  font-size: 17px; line-height: 30px;
  color: var(--color-muted); max-width: 440px; text-wrap: pretty; word-break: keep-all;
}
.email {
  margin-top: 14px;
  font-size: 26px; font-weight: 700; letter-spacing: -0.4px;
  color: #292a2c; user-select: text; overflow-wrap: anywhere; line-height: 1.3;
}
.contact-actions { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.contact-mail {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; font-weight: 600; color: #292a2c;
  border-bottom: 1px solid currentColor; outline-offset: 4px;
}
.contact-mail:hover { color: var(--color-muted); }
.contact-gmail {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; color: var(--color-muted); outline-offset: 4px;
}
.contact-gmail:hover { color: #292a2c; }
.contact-divider { margin: 40px 0 0; }
.contact-elsewhere-label { margin-top: 34px; }
.contact-elsewhere {
  margin-top: 17px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.contact-social {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-rule);
  color: #292a2c;
  outline-offset: 4px;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.contact-social:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  background: var(--color-surface);
}
.social-logo {
  width: 23px;
  height: 23px;
  display: block;
  object-fit: contain;
}
.social-logo--dark { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 44px clamp(24px, 5vw, 96px);
  border-top: 1px solid #eeeeee;
  font-size: 14px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; width: 100%; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-brand { color: #292a2c; font-weight: 600; }
.footer-links { display: flex; align-items: center; gap: 22px; }
.footer-contact { color: #292a2c; display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact:hover { color: var(--color-muted); }
.footer-mail {
  color: var(--color-muted); display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere;
}
.footer-mail:hover { color: #292a2c; }
.footer-by { color: var(--color-muted); }

/* focus affordances */
a:focus-visible, .linkwrap:focus-visible, .theme-btn:focus-visible {
  outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px;
}
.menu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.page[tabindex="-1"]:focus { outline: none; }

/* ============================================================
   DARK THEME
   ============================================================ */
[data-root][data-theme="dark"] {
  --color-bg: #111214;
  --color-primary: #f2f2f0;
  --color-muted: #9a9a9d;
  --color-faint: #85868a;
  --color-rule: #45474b;
  --color-rule-soft: #303236;
  --color-surface: #1a1b1e;
  background: var(--color-bg) !important;
  color: var(--color-primary) !important;
}
[data-theme="dark"] .c-primary { color: var(--color-primary) !important; }
[data-theme="dark"] .c-muted   { color: var(--color-muted) !important; }
[data-theme="dark"] .c-faint,
[data-theme="dark"] .eyebrow    { color: var(--color-faint) !important; }
[data-theme="dark"] .browser    { border-color: #2a2b2e !important; }
[data-theme="dark"] .footer     { border-top-color: #26272a !important; }
[data-theme="dark"] .toggle-icon { color: #f2f2f0 !important; }
[data-theme="dark"] .theme-btn  { color: #f2f2f0 !important; }
[data-theme="dark"] .menu-btn   { color: #f2f2f0 !important; }
[data-theme="dark"] .services   { border-top-color: #26272a !important; }
[data-theme="dark"] .about      { border-top-color: #26272a !important; }
[data-theme="dark"] .plan       { border-color: var(--color-rule) !important; }
[data-theme="dark"] .plan--featured { border-color: #a1a2a5 !important; }
[data-theme="dark"] .plan-line  { border-color: #303236 !important; }
[data-theme="dark"] .cta        { border-color: #f2f2f0 !important; }
[data-theme="dark"] .contact    { border-top-color: #26272a !important; }
[data-theme="dark"] .social-logo--light { display: none; }
[data-theme="dark"] .social-logo--dark  { display: block; }
/* keep primary text/link colours readable in dark */
[data-theme="dark"] .brand-name, [data-theme="dark"] .nav-link,
[data-theme="dark"] .footer-brand, [data-theme="dark"] .footer-contact { color: #f2f2f0 !important; }
[data-theme="dark"] a { color: #f2f2f0; }
[data-theme="dark"] a:hover { color: var(--color-muted); }

/* ============================================================
   RESPONSIVE  — tablet
   ============================================================ */
@media (max-width: 999px) {
  .nav { padding-top: 26px; padding-bottom: 26px; font-size: 15px; }
  .hero-inner { margin-left: 7%; max-width: 86%; }
  .h1 { font-size: 58px; line-height: 1.02; }
  .sub { font-size: 17px; max-width: 440px; }
  .work { padding-top: 110px; padding-bottom: 110px; min-height: max(820px, 100svh); }
  .workwrap { gap: 34px; }
  .textcol { width: 36%; max-width: 320px; }
  .h2 { font-size: 38px; }
  .browser { max-width: 560px; }
  .footer { padding-top: 40px; padding-bottom: 40px; }
  .services { padding-top: 110px; padding-bottom: 110px; }
  .about { padding-top: 110px; padding-bottom: 110px; }
  .plan { padding: 30px 20px 26px; }
  .plan-name { font-size: 22px; }
  .plan-desc { min-height: 92px; }
  .plan-price { font-size: 28px; }
  .plan-fact { grid-template-columns: 48px minmax(0, 1fr); gap: 9px; }
  .phone-vp[data-proj="be"]   { height: 320px; }
  .phonepos[data-proj="be"]   { width: 150px; right: 0; bottom: -40px; }
  .phone-vp[data-proj="yc"]   { height: 320px; }
  .phonepos[data-proj="yc"]   { width: 150px; right: 0; bottom: -40px; }
  .phone-vp[data-proj="keng"] { height: 330px; }
  .phonepos[data-proj="keng"] { width: 150px; right: 0; bottom: -40px; }
  .contact { padding-top: 120px; padding-bottom: 90px; }
  .contact-inner { gap: 48px; }
  .contact-h1 { font-size: 40px; }
  .compare-hero { padding-top: 150px; padding-bottom: 64px; }
  .compare-content { padding-bottom: 110px; }
  .compare-scroll-hint { display: block; }
  .compare-table { min-width: 920px; }
  .compare-label-column { width: 160px; }
  .compare-plan-name { font-size: 24px; }
}

@media (max-width: 880px) {
  .plans-scroll-hint {
    display: block;
    margin-top: 34px;
  }
  .plans {
    margin-top: 12px;
    padding-bottom: 12px;
  }
}

/* ============================================================
   RESPONSIVE  — mobile
   ============================================================ */
@media (max-width: 679px) {
  .nav { padding-top: 20px; padding-bottom: 20px; font-size: 14px; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: 54px; right: 0;
    width: min(230px, calc(100vw - 48px));
    padding: 8px 16px 12px;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    background: #ffffff; border: 1px solid #eeeeee;
    box-shadow: rgba(0,0,0,.08) 0 18px 40px -22px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease,
                background-color .56s ease, border-color .56s ease;
  }
  .nav.is-menu-open .nav-links {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  }
  .nav-link {
    display: flex; align-items: center;
    min-height: 44px; width: 100%;
    white-space: nowrap;
  }
  .nav-link.is-contact { min-height: 44px; }
  .nav-links .theme-btn {
    width: 100%; min-height: 44px; height: 44px;
    justify-content: flex-start;
  }
  .nav-links .theme-btn::after {
    content: "外觀";
    margin-left: 10px;
    font: inherit;
  }
  [data-theme="dark"] .nav-links {
    background: #111214;
    border-color: #26272a;
  }
  .hero { padding: 0 22px; }
  .hero-inner { margin-left: 0; max-width: 100%; }
  .h1 { font-size: 52px; line-height: 1.04; }
  .sub { font-size: 17px; max-width: 100%; }
  .work { padding-top: 92px; padding-bottom: 96px; min-height: auto; }
  .workwrap { flex-direction: column; align-items: stretch; gap: 40px; }
  .textcol { width: 100%; max-width: 100%; }
  .h2 { font-size: 34px; }
  .browser { max-width: 100%; }
  .devicecol { display: flex; flex-direction: column; align-items: center; width: 100%; }
  .footer { padding-top: 34px; padding-bottom: 34px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-links { flex-direction: column; align-items: flex-start; gap: 2px; }
  .services { padding-top: 92px; padding-bottom: 96px; }
  .about { padding-top: 92px; padding-bottom: 96px; }
  .services-title { font-size: min(34px, calc((100vw - 48px) / 10)); }
  .plans { margin-top: 12px; gap: 16px; }
  .plan { padding: 28px 20px 23px; }
  .plan-price { margin-top: 23px; }
  .plan-detail-groups { grid-template-columns: 1fr; gap: 27px; }
  .services-notes { grid-template-columns: 1fr; gap: 30px; }
  .phone-vp[data-proj="be"]   { height: 300px; }
  .phone-vp[data-proj="yc"]   { height: 300px; }
  .phone-vp[data-proj="keng"] { height: 300px; }
  .phonepos[data-proj="be"], .phonepos[data-proj="yc"], .phonepos[data-proj="keng"] {
    position: static; width: 160px; right: auto; bottom: auto; top: auto; left: auto;
    transform: none; margin: -34px auto 0;
  }
  .contact { padding-top: 112px; padding-bottom: 80px; }
  .contact-inner { flex-direction: column; gap: 36px; }
  .contact-col-a, .contact-col-b { width: 100%; max-width: 100%; }
  .contact-h1 { font-size: 32px; }
  .email { font-size: 20px; }
  .contact-elsewhere { gap: 14px; }
  .compare-hero { padding: 132px 24px 54px; }
  .compare-title { font-size: 40px; letter-spacing: -1px; }
  .compare-intro { margin-top: 20px; font-size: 17px; line-height: 28px; }
  .compare-content { padding: 0 24px 96px; }
  .compare-table {
    --compare-label-width: min(142px, 40vw);
    --compare-plan-width: max(180px, calc(100vw - 48px - var(--compare-label-width)));
    min-width: calc(
      var(--compare-label-width) +
      var(--compare-plan-width) +
      var(--compare-plan-width) +
      var(--compare-plan-width)
    );
  }
  .compare-label-column { width: var(--compare-label-width); }
  .compare-plan-column { padding-inline: 18px; }
  .compare-plan-head { min-height: 206px; }
  .compare-plan-name { font-size: 20px; }
  .compare-table tbody tr:not(.compare-group-row) > th,
  .compare-table tbody tr:not(.compare-group-row) > td { padding-inline: 18px; }
  .compare-table tbody tr:not(.compare-group-row) > th { padding-left: 0; }
  .compare-group-row th { padding-top: 62px; }
  .compare-notes { margin-top: 68px; }
  .compare-notes-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-root], [data-root] * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal], .hero { opacity: 1 !important; transform: none !important; animation: none !important; }
  .toggle-icon { animation: none !important; }
  .nav { transition: none !important; }
  .menu-icon span, .nav-links { transition: none !important; }
}
