:root {
  --cotton: #FBFAF6;
  --cotton-deep: #F1EEE6;
  --ink: #1C2541;
  --ink-soft: #4B5474;
  --line: #DEDACF;
  --accent: #FF6B35;
  --accent-ink: #1C2541;
  --radius: 14px;
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--cotton);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cotton); font-size: 17px; line-height: 1.75; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* 頁首 */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--cotton) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 46px; height: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name b { font-size: 19px; font-weight: 800; letter-spacing: 0.06em; }
.brand-name small { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-soft); }
.brand-name small i { font-style: normal; font-size: 9px; letter-spacing: 0.24em; margin-left: 2px; }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a:hover { text-decoration: underline; }
@media (max-width: 640px) { .nav a:not(.nav-cta) { display: none; } }
.nav-cta { background: var(--ink); color: var(--cotton); padding: 8px 16px !important; border-radius: 999px; }
.nav-cta:hover { text-decoration: none !important; background: #2A3560; }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .2s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px rgba(255, 107, 53, .7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(255, 107, 53, .75); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cotton); }

/* 首頁主視覺 */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero-mark { order: 2; justify-self: center; width: min(100%, 440px); }
.hero-mark svg { width: 100%; height: auto; overflow: visible; }
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.18; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 30em; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { order: 0; width: min(64%, 280px); }
}

/* 笑臉眨眼：只有一次，之後滑過才眨 */
.eye { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark .eye { animation: blink .5s var(--ease-out) 1.1s 1; }
  .hero-mark:hover .eye { animation: blink .45s var(--ease-out) 1; }
  .hero-mark .smile-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease-out) .1s forwards; }
}
@keyframes blink { 0%, 100% { transform: scaleY(1); } 45% { transform: scaleY(0.12); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 區塊 */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.section h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 18px; }

/* 均碼 vs 訂做：織標 */
.fit { background: var(--cotton-deep); }
.labels { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
@media (max-width: 760px) { .labels { grid-template-columns: 1fr; } }
.woven { position: relative; padding: 36px 32px 34px; border-radius: 6px; }
.woven::after { content: ""; position: absolute; inset: 9px; border: 1.5px dashed currentColor; border-radius: 3px; opacity: .45; pointer-events: none; }
.woven-free { background: #fff; color: var(--ink-soft); transform: rotate(-1.2deg); box-shadow: 0 10px 24px -16px rgba(28, 37, 65, .35); }
.woven-made { background: var(--ink); color: var(--cotton); transform: rotate(0.8deg); box-shadow: 0 18px 36px -18px rgba(28, 37, 65, .6); }
.woven .size { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1.5px solid currentColor; }
.woven .size b { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; letter-spacing: 0.02em; }
.woven .size span { font-size: 14px; letter-spacing: 0.14em; font-weight: 500; }
.woven-made .size b { color: var(--accent); }
.woven h3 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.woven-free h3 { color: var(--ink); }

/* 尺寸表：服務 */
.size-chart { width: 100%; border-collapse: collapse; font-size: 16px; }
.size-chart th { text-align: left; font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.06em; padding: 0 16px 14px 0; border-bottom: 2px solid var(--ink); }
.size-chart td { padding: 24px 16px 24px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.size-chart td:first-child { width: 28%; }
.size-chart td:first-child b { display: block; font-size: 21px; font-weight: 800; }
.size-chart td:first-child span { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.size-chart tr.main td:first-child span { background: var(--accent); border-color: var(--accent); }
.size-chart td:last-child { width: 30%; color: var(--ink-soft); }
@media (max-width: 760px) {
  .size-chart thead { display: none; }
  .size-chart, .size-chart tbody, .size-chart tr, .size-chart td { display: block; width: auto !important; }
  .size-chart tr { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .size-chart td { border: 0; padding: 0; }
  .size-chart td + td { margin-top: 8px; }
  .size-chart td:last-child::before { content: "例如："; }
}

/* 洗標：品牌價值 */
.care { background: var(--ink); color: var(--cotton); }
.care .section-head p { color: #B9BFD3; }
.care-label { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid rgba(251, 250, 246, .3); }
@media (max-width: 900px) { .care-label { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .care-label { grid-template-columns: 1fr; } }
.care-label li { padding: 28px 24px 8px 0; }
.care-label svg { width: 44px; height: 44px; margin-bottom: 18px; stroke: var(--accent); }
.care-label h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.care-label p { color: #C9CEDD; font-size: 16px; }

/* 合作方式 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding-right: 24px; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); font-weight: 800; margin-bottom: 18px; background: var(--cotton); position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; border-top: 2px dashed var(--line); }
@media (max-width: 900px) { .steps li::after { display: none; } }
.steps h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: 16px; }

/* 收尾 */
.close { text-align: center; padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.close svg { width: 120px; margin: 0 auto 28px; }
.close h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
.close p { margin: 16px auto 34px; color: var(--ink-soft); font-size: 18px; max-width: 28em; }
.mail { font-size: 15px; color: var(--ink-soft); margin-top: 18px; }

/* 頁尾 */
.site-footer { background: var(--cotton-deep); padding: 40px 0; font-size: 14px; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; gap: 20px; }

/* 法律文件 */
.doc { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 120px); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.doc .meta { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }
.doc .toc { margin: 32px 0 8px; padding: 20px 24px; border-radius: var(--radius); background: var(--cotton-deep); font-size: 15px; }
.doc .toc ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
@media (max-width: 560px) { .doc .toc ol { columns: 1; } }
.doc h2 { font-size: 23px; font-weight: 800; margin: 48px 0 14px; scroll-margin-top: 88px; }
.doc h3 { font-size: 18px; font-weight: 700; margin: 26px 0 8px; }
.doc p, .doc li { color: #2C3552; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol:not(.toc ol) { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 700; border-bottom: 2px solid var(--ink); }
@media (max-width: 560px) { .doc table { font-size: 14px; } }
.doc th[scope="row"] { white-space: nowrap; width: 6em; border-bottom: 1px solid var(--line); }
.doc thead th { white-space: nowrap; }
.doc code { font-family: inherit; font-weight: 700; }
