/* 謙瀚國際｜全站共用樣式
   版面概念：深色「土壤」底，像夜裡的工作室；每個服務對應樹的一個生長階段，
   以燈絲的三種光色（金、冰藍、蘭紫）標示，其餘一律保持安靜。 */
:root {
  --soil: #070b0e;
  --soil-2: #0d1418;
  --soil-3: #131c21;
  --line: rgb(230 235 236 / .09);
  --ink: #e6ebec;
  --ink-dim: #8b979c;
  --ember: #f2c879;   /* 根：念頭與方向 */
  --sap: #86e0ee;     /* 幹：形象與識別 */
  --bloom: #d48cf0;   /* 冠：對外傳播 */
  --glow: 242 200 121;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --gutter: clamp(20px, 6vw, 96px);
  --header-h: 76px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--soil); scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--soil);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--sap); outline-offset: 6px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgb(7 11 14 / .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header__bar {
  height: var(--header-h);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.brand-name {
  font-family: var(--serif); font-weight: 500; font-size: 17px;
  letter-spacing: 0.32em; text-decoration: none; white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav a {
  position: relative;
  font-size: 14px; letter-spacing: 0.16em; text-decoration: none;
  color: var(--ink-dim); transition: color .3s;
  padding-block: 6px;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -4px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 10px 2px rgb(var(--glow) / .8);
}
.nav .nav__cta {
  color: var(--ink);
  padding: 8px 20px;
  border: 1px solid rgb(var(--glow) / .45);
  border-radius: 999px;
  background: rgb(var(--glow) / .05);
}
.nav .nav__cta:hover { background: rgb(var(--glow) / .14); }
.nav .nav__cta[aria-current="page"]::after { display: none; }

.nav-toggle {
  display: none;
  appearance: none; background: none; border: 0; color: var(--ink);
  font: inherit; font-size: 14px; letter-spacing: 0.2em;
  padding: 10px 0 10px 12px; cursor: pointer;
}
.nav-toggle span { display: inline-block; width: 18px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 10px; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: rgb(7 11 14 / .96);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-header.is-open { background: rgb(7 11 14 / .96); }
  .site-header.is-open .nav { display: flex; }
  .nav a { font-size: 16px; padding-block: 16px; border-top: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { left: auto; right: 4px; top: 50%; bottom: auto; margin-top: -2px; }
  .nav .nav__cta { margin-top: 20px; text-align: center; border-top: 1px solid rgb(var(--glow) / .45); }
}

/* ---------- Shared type ---------- */
.eyebrow {
  margin: 0 0 1.2em;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.32em; color: var(--ink-dim);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: var(--c, var(--ember)); box-shadow: 0 0 8px var(--c, var(--ember));
}
.display {
  margin: 0;
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(36px, 6vw, 80px); line-height: 1.25; letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 24px rgb(var(--glow) / .35), 0 0 70px rgb(var(--glow) / .2);
}
.section-title {
  margin: 0 0 1.2em;
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.35; letter-spacing: 0.16em;
}
.lede {
  margin: 1.4em 0 0;
  font-size: clamp(15px, 1.15vw, 17px);
  color: var(--ink-dim);
  max-width: 30em;
}
.prose p { margin: 0 0 1.2em; max-width: 34em; color: #c3cdd0; }
.prose p:last-child { margin-bottom: 0; }

.wrap { max-width: 1120px; margin: 0 auto; }
.section { padding: clamp(80px, 14vh, 160px) var(--gutter); position: relative; }
.section + .section { padding-top: 0; }

.cta {
  display: inline-block; margin-top: 2.2em;
  padding: 14px 30px;
  font-size: 15px; letter-spacing: 0.16em; text-decoration: none; color: var(--ink);
  border: 1px solid rgb(var(--glow) / .5);
  border-radius: 999px;
  background: rgb(var(--glow) / .06);
  box-shadow: 0 0 40px rgb(var(--glow) / .18), inset 0 0 20px rgb(var(--glow) / .08);
  transition: background .4s, box-shadow .4s;
}
.cta:hover { background: rgb(var(--glow) / .14); box-shadow: 0 0 60px rgb(var(--glow) / .35), inset 0 0 24px rgb(var(--glow) / .12); }
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: 0.16em; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid rgb(230 235 236 / .25); padding-bottom: 4px;
  transition: border-color .3s, gap .3s;
}
.text-link::after { content: "→"; }
.text-link:hover { border-color: var(--ink); gap: 14px; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(64px, 12vh, 140px)) var(--gutter) clamp(64px, 10vh, 120px);
  min-height: min(78vh, 760px);
  display: flex; align-items: flex-end;
}
.page-hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--pos, 60% 50%);
  opacity: .78;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--soil) 0%, rgb(7 11 14 / 0) 26%, rgb(7 11 14 / 0) 55%, var(--soil) 100%),
    linear-gradient(to right, rgb(7 11 14 / .88) 0%, rgb(7 11 14 / .35) 48%, rgb(7 11 14 / 0) 75%);
}
.page-hero .wrap { position: relative; z-index: 1; width: 100%; }
.page-hero--plain { min-height: 0; }
.page-hero--plain::after {
  background: radial-gradient(60% 80% at 20% 100%, rgb(var(--glow) / .09), transparent 70%);
}
@media (max-width: 760px) {
  .page-hero { min-height: 0; }
  .page-hero::after {
    background: linear-gradient(to bottom, var(--soil) 0%, rgb(7 11 14 / .2) 30%, rgb(7 11 14 / .75) 70%, var(--soil) 100%);
  }
}

/* ---------- Services list (shared by home & services) ---------- */
.services { list-style: none; margin: 0; padding: 0; }
.service {
  display: grid;
  grid-template-columns: minmax(0, 19em) minmax(0, 1fr);
  gap: 8px clamp(24px, 5vw, 72px);
  align-items: baseline;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service h3 {
  margin: 0;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.9vw, 26px);
  letter-spacing: 0.12em;
}
.service h3::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 12px 2px var(--c);
}
.service p { margin: 0; color: var(--ink-dim); max-width: 34em; }
.is-root  { --c: var(--ember); }
.is-trunk { --c: var(--sap); }
.is-crown { --c: var(--bloom); }

/* ---------- Contact band (bottom of every page) ---------- */
.contact-band {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  background: radial-gradient(60% 70% at 50% 100%, rgb(134 224 238 / .07), transparent 70%), var(--soil);
  text-align: center;
}
.contact-band .section-title { margin-bottom: 0; }
.contact-band .lede { margin-inline: auto; }
.contact-band .cta { --glow: 134 224 238; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 0 var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--soil);
}
.site-footer .wrap {
  padding-top: 36px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 32px;
  font-size: 13px; color: var(--ink-dim); letter-spacing: 0.1em; line-height: 2;
}
.site-footer .brand-name { font-size: 15px; color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; transition: color .3s; }
.site-footer a:hover { color: var(--ink); }
.site-footer__legal {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px;
}
@media (max-width: 760px) {
  .service { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .text-link, .nav a, .site-header { transition: none; }
}

/* 服務摘要下的項目標籤 */
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 13px; letter-spacing: 0.08em; color: var(--ink);
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 7%, transparent);
}

/* 頁尾：資潤 App 連結 */
.footer-app a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(230 235 236 / .3); }

/* 條款類長文（資潤 App 頁面） */
.legal { max-width: 46em; color: #c3cdd0; overflow-wrap: anywhere; }
.legal h2 { margin: 2.4em 0 .6em; font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.9vw, 24px); letter-spacing: 0.1em; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 16px); }
.legal h3 { margin: 1.8em 0 .3em; font-size: 16px; font-weight: 500; color: var(--ink); }
.legal p, .legal ul, .legal ol { margin: 0 0 1em; }
.legal li { margin-bottom: .4em; }
.legal a { color: var(--sap); text-underline-offset: 3px; }
.legal-table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 4px; }
.legal table { width: 100%; min-width: 34em; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 500; background: var(--soil-2); }
.legal tr:last-child td { border-bottom: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2em; }
.legal-nav a { font-size: 13px; letter-spacing: 0.12em; text-decoration: none; color: var(--ink-dim); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { color: var(--ink); border-color: rgb(134 224 238 / .5); }

/* 遮住瀏覽器加在影片上的懸浮按鈕 */
.hero__media { position: relative; }
.hero__video { pointer-events: none; }
.hero__media::after { content: ""; position: absolute; inset: 0; z-index: 1; }
