/* ==========================================================================
   OK 品牌官網 · 設計系統
   高端奢華 / 國際化 / 實驗室科技感
   ========================================================================== */

:root {
  --ink: #16130f;
  --ink-2: #2b2620;
  --cream: #f7f3ec;
  --cream-2: #efe8dd;
  --paper: #fbf9f5;
  --gold: #b8935a;
  --gold-2: #d8c19b;
  --gold-deep: #9a7440;
  --muted: #6f675c;
  --muted-2: #9a917f;
  --line: #e6ddcd;
  --line-2: #d8cdb8;
  --lavender: #7d6b9e;
  --silver: #9aa2ad;
  --shadow: 0 18px 50px -22px rgba(22, 19, 15, 0.28);
  --shadow-sm: 0 8px 26px -16px rgba(22, 19, 15, 0.35);

  --font-display: "Cormorant Garamond", "Noto Serif TC", "Songti SC", serif;
  --font-serif-tc: "Noto Serif TC", "Songti SC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-label: "Jost", "Noto Sans TC", sans-serif;

  --header-h: 76px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* ---------- 排版 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.display-xl { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.display-lg { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.display-md { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

.zh-serif { font-family: var(--font-serif-tc); }
.hero-title .zh { display: block; font-weight: 600; line-height: 1.18; }

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--muted); font-weight: 300; }

.en-sub { display: block; font-family: var(--font-label); font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); font-size: 0.78rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-label); font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 16px 34px; border: 1px solid var(--ink);
  color: var(--ink); background: transparent;
  transition: all .35s var(--ease); position: relative; overflow: hidden;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: #fff; }
.btn--light { border-color: rgba(236,228,212,.55); color: var(--cream); }
.btn--light:hover { background: rgba(236,228,212,.12); border-color: var(--cream); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(251, 249, 245, .92); backdrop-filter: blur(12px); border-color: var(--line); }
.site-header.brand-dark .nav-link { color: var(--cream); }
.site-header.brand-dark .brand-logo { filter: brightness(0) invert(1); }
.site-header.is-scrolled.brand-dark .nav-link { color: var(--ink); }
.site-header.is-scrolled.brand-dark .brand-logo { filter: none; }

.nav-inner {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo { height: 34px; width: auto; transition: filter .35s var(--ease); }
.brand-word { font-family: var(--font-label); letter-spacing: 0.14em; font-size: 0.8rem; text-transform: uppercase; color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav-link { font-family: var(--font-label); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--ink); position: relative; padding: 6px 0; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--gold); transition: width .35s var(--ease); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--gold); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 1px; background: currentColor; display: block; transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; color: var(--cream); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,13,9,.42) 0%, rgba(16,13,9,.14) 40%, rgba(16,13,9,.78) 100%); }
.hero-content { position: relative; z-index: 2; width: 100%; padding: calc(var(--header-h) + 40px) 0 96px; }
.hero-content .eyebrow { color: var(--gold-2); }
.hero-cont { max-width: 760px; }
.hero-title { color: #fff; margin: 20px 0; }
.hero-title .en { font-family: var(--font-display); font-style: italic; font-weight: 400; display: block; font-size: 0.55em; margin-top: .4em; color: var(--gold-2); letter-spacing: 0.02em; }
.hero-sub { max-width: 560px; color: rgba(243,238,227,.86); margin-bottom: 40px; }

/* ---------- 章節 ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section--alt { background: var(--cream); }
.section--dark { background: var(--ink); color: var(--cream); }
.section--dark .display { color: var(--cream); }
.section--dark .muted, .section--dark .lead { color: rgba(236,228,212,.66); }
.section--dark .eyebrow { color: var(--gold-2); }
.section-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 18px; display: block; }
.section-head .display { margin-bottom: 22px; }
.section-head .en-sub { margin-top: -8px; }

/* ---------- 分割線 / 標籤 ---------- */
.hairline { height: 1px; background: var(--line); border: none; }
.kicker-row { display: flex; align-items: center; gap: 16px; }
.kicker-row::before { content: ""; width: 42px; height: 1px; background: var(--gold); }

/* ---------- 首頁 Intro ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.intro-body .rich p + p { margin-top: 1.2em; }

/* ---------- 產品卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3vw, 38px); }
.product-card { background: #fff; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.product-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media.noimg { display: flex; align-items: center; justify-content: center; }
.product-media.noimg::before { content: "OK"; font-family: var(--font-display); font-size: 3rem; color: var(--line-2); }
.product-badge { position: absolute; top: 16px; left: 16px; font-family: var(--font-label); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; padding: 6px 12px; background: var(--gold); color: #fff; }
.product-body { padding: 26px 26px 30px; }
.product-seq { font-family: var(--font-display); font-style: italic; font-size: 0.9rem; color: var(--muted-2); }
.product-name { font-family: var(--font-serif-tc); font-weight: 600; font-size: 1.28rem; margin: 8px 0 2px; }
.product-name-en { font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.product-sub { font-size: 0.92rem; color: var(--muted); margin-top: 12px; }
.product-sub .en-item { display: block; font-family: var(--font-label); font-size: 0.74rem; color: var(--muted-2); }
.product-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-deep); }
.product-link::after { content: "→"; transition: transform .3s var(--ease); }
.product-link:hover::after { transform: translateX(5px); }

/* ---------- 產品詳情（products 頁） ---------- */
.product-feature { border: 1px solid var(--line); background: #fff; }
.product-feature + .product-feature { margin-top: clamp(40px, 6vw, 80px); }
.pf-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; }
.pf-media { position: relative; background: var(--cream-2); min-height: 360px; }
.pf-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-media.noimg { display: flex; align-items: center; justify-content: center; }
.pf-media.noimg::before { content: "OK"; font-family: var(--font-display); font-size: 5rem; color: var(--line-2); }
.pf-accent { position: absolute; top: 0; left: 0; width: 5px; height: 100%; }
.pf-body { padding: clamp(30px, 4vw, 54px); }
.pf-body .eyebrow { margin-bottom: 14px; display: block; }
.pf-body .product-name { font-size: 1.7rem; }
.pf-audience { margin-top: 12px; font-size: 0.9rem; color: var(--gold-deep); }
.pf-audience .en-item { font-family: var(--font-label); font-size: 0.76rem; color: var(--muted-2); }
.pf-desc { margin: 22px 0; color: var(--muted); }
.pf-desc .en { margin-top: 14px; font-size: 0.92rem; color: var(--muted-2); border-top: 1px dashed var(--line); padding-top: 14px; }
.pf-subblock { margin-top: 26px; }
.pf-subblock h4 { font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.spec-list, .ing-list { display: grid; gap: 10px; }
.spec-list li { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.spec-list .k { color: var(--muted); }
.spec-list .v { color: var(--ink); font-weight: 400; }
.ing-item { padding: 12px 16px; background: var(--cream); border-left: 2px solid var(--gold-2); }
.ing-item .ing-name { font-weight: 500; font-size: 0.98rem; }
.ing-item .ing-name-en { font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.ing-item .ing-desc { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }

/* ---------- 專利 / 成分 / 歷程 ---------- */
.patent-list { display: grid; gap: 22px; }
.patent-item { display: grid; grid-template-columns: 60px 1fr; gap: 22px; padding: 30px; border: 1px solid var(--line); background: #fff; }
.patent-icon { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--gold); }
.patent-no { font-family: var(--font-label); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--gold-deep); }
.patent-title { font-family: var(--font-serif-tc); font-weight: 500; font-size: 1.12rem; margin: 6px 0; }
.patent-title .en { display: block; font-family: var(--font-label); font-size: 0.76rem; letter-spacing: 0.04em; text-transform: none; color: var(--muted-2); font-weight: 300; margin-top: 4px; }
.patent-meta { font-size: 0.84rem; color: var(--muted); }
.patent-meta span + span::before { content: " · "; color: var(--line-2); }

.ing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ing-card { padding: 34px 30px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; }
.ing-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.ing-tag { font-family: var(--font-label); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.ing-name { font-family: var(--font-serif-tc); font-weight: 600; font-size: 1.3rem; margin: 8px 0 2px; }
.ing-name-en { font-family: var(--font-label); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.ing-desc { margin-top: 14px; color: var(--muted); font-size: 0.94rem; }
.ing-desc .en { display: block; font-family: var(--font-label); font-size: 0.8rem; color: var(--muted-2); margin-top: 8px; }

.timeline-list { position: relative; padding-left: 34px; }
.timeline-list::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; padding: 0 0 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -34px; top: 8px; width: 19px; height: 19px; border-radius: 50%; border: 3px solid var(--gold); background: var(--paper); }
.tl-period { font-family: var(--font-label); letter-spacing: 0.2em; font-size: 0.8rem; color: var(--gold-deep); }
.tl-title { font-family: var(--font-serif-tc); font-weight: 500; font-size: 1.2rem; margin: 6px 0; }
.tl-title .en { display: block; font-family: var(--font-label); font-size: 0.76rem; color: var(--muted-2); font-weight: 300; }
.tl-desc { color: var(--muted); font-size: 0.94rem; }
.tl-desc .en { display: block; font-family: var(--font-label); font-size: 0.8rem; color: var(--muted-2); margin-top: 4px; }

/* ---------- 統計 / 數字 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--gold-2); line-height: 1; }
.stat-label { font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(236,228,212,.6); margin-top: 12px; }

/* ---------- CTA ---------- */
.cta-band { text-align: center; padding: clamp(80px, 12vw, 140px) 0; }
.cta-band .display { margin: 20px auto; max-width: 720px; }

/* ---------- 頁面 Hero（內頁） ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(60px, 10vw, 120px)); padding-bottom: clamp(60px, 8vw, 100px); background: var(--cream); }
.page-hero .eyebrow { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(236,228,212,.72); padding: clamp(60px, 8vw, 96px) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 60px; }
.footer-brand .brand-logo { height: 40px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.footer-about { font-size: 0.9rem; max-width: 380px; }
.footer-col h4 { font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a, .footer-col li { font-size: 0.9rem; color: rgba(236,228,212,.72); transition: color .3s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(236,228,212,.12); padding: 26px 0 30px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-size: 0.78rem; color: rgba(236,228,212,.45); }
.footer-bottom .en { font-family: var(--font-label); letter-spacing: 0.08em; }
.footer-disc { font-size: 0.74rem; color: rgba(236,228,212,.4); max-width: 640px; line-height: 1.6; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); }
.contact-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-item .en-item { font-family: var(--font-label); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted-2); }
.contact-item h4 { font-family: var(--font-label); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.contact-item p { font-size: 1.02rem; color: var(--ink); }
.contact-panel { background: var(--ink); color: var(--cream); padding: clamp(34px, 4vw, 54px); }
.contact-panel .eyebrow { color: var(--gold-2); }
.contact-panel .display { color: #fff; margin: 14px 0 10px; }

/* ---------- 動態狀態 ---------- */
[data-en] { display: block; }
.hidden { display: none !important; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav-toggle { display: flex; color: var(--ink); }
  .site-header.brand-dark .nav-toggle { color: var(--cream); }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); padding: 20px var(--gutter) 34px; gap: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .4s var(--ease); z-index: -1;
  }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav .nav-link { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .intro-grid, .contact-grid { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-media { min-height: 300px; }
  .patent-item { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .btn { padding: 14px 24px; }
}

/* ---------- 無 JS 後備 ---------- */
noscript .hidden { display: block; }