/* 彥儒工作室 YAN RU STUDIO — 全站樣式
   Tokens 依 design_handoff_studio_site/README.md（2026-07-23）
   16:9 桌面簡報式分屏（scroll-snap）＋行動裝置正常捲動 */

:root {
  --bg: #F2F1EC;
  --surface: #FAF9F6;
  --text: #1C1C1A;
  --text-secondary: #97958E;
  --border: #DDDBD2;
  --track-tie: #E0DED5;
  --track-rail: #D6D4CB;
  --accent: #2166FF;
  --accent-hover: #1a52d6;
  --ghost: rgba(28, 28, 26, .05);
  --nav-bg: rgba(242, 241, 236, .82);
  --radius-card: 16px;
  --radius-pill: 999px;
  --font-main: "Noto Sans TC", "PingFang TC", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "Noto Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
[data-theme="dark"] {
  --bg: #0A0D12;
  --surface: #0F141C;
  --text: #F2F1EC;
  --text-secondary: #6B7280;
  --border: #1C2432;
  --track-tie: #1E2836;
  --track-rail: #243040;
  --accent: #2A72FF;
  --accent-hover: #4d8bff;
  --ghost: rgba(242, 241, 236, .045);
  --nav-bg: rgba(10, 13, 18, .82);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.8;
  transition: background .45s ease, color .45s ease;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 28px; }
a { color: inherit; }
img { max-width: 100%; }
body { overflow-x: clip; }

/* ── TopNav ─────────────────────────── */
.topnav { border-bottom: 1px solid var(--border); }
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; gap: 16px; flex-wrap: wrap;
}
.brand-lockup { text-decoration: none; display: block; }
.brand-lockup .zh { font-size: 15px; letter-spacing: .3em; font-weight: 500; }
.brand-lockup .en { font-size: 10.5px; letter-spacing: .4em; color: var(--text-secondary); }
.navlinks { display: flex; align-items: center; gap: 26px; }
.navlink { text-decoration: none; text-align: center; transition: color .3s; }
.navlink .zh { display: block; font-size: 14px; letter-spacing: .24em; }
.navlink .en { display: block; font-size: 10.5px; letter-spacing: .36em; color: var(--text-secondary); transition: color .3s; }
.navlink:hover, .navlink.active { color: var(--accent); }
.navlink:hover .en, .navlink.active .en { color: var(--accent); }
.flip-btn {
  border: 1px solid var(--border); background: none; color: var(--text-secondary);
  font: inherit; font-size: 13px; letter-spacing: .2em; white-space: nowrap;
  padding: 7px 16px 7px 18px; border-radius: var(--radius-pill); cursor: pointer;
  transition: color .3s, border-color .3s;
}
.flip-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ── Buttons ────────────────────────── */
.btn {
  display: inline-block; text-decoration: none; font: inherit; cursor: pointer;
  border-radius: var(--radius-pill); letter-spacing: .2em;
  transition: color .3s, border-color .3s, background .3s;
}
.btn-md { font-size: 14.5px; padding: 11px 26px 11px 28px; }
.btn-lg { font-size: 15.5px; padding: 13px 32px 13px 34px; }
.btn-solid { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-solid:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: none; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { color: var(--accent); border-color: var(--accent); }
.btn-ghost { background: none; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--accent); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ── 分屏（.screen）────────────────── */
.screen { padding: 64px 0; }

/* ── Hero（首頁）────────────────────── */
.eyebrow { font-size: 13px; letter-spacing: .42em; color: var(--accent); margin-bottom: 30px; }
.hero h1 {
  font-size: clamp(34px, 6.4vw, 62px);
  font-weight: 700; letter-spacing: .1em; line-height: 1.42;
}
.hero .who { margin-top: 44px; display: flex; align-items: baseline; gap: 1.4em; flex-wrap: wrap; }
.hero .who .name { font-size: 21px; font-weight: 600; letter-spacing: .3em; }
.hero .who .en { font-size: 13px; letter-spacing: .4em; color: var(--text-secondary); }
.hero .tag { margin-top: 8px; font-size: 15.5px; letter-spacing: .24em; color: var(--text-secondary); }
.hero .tag .sep { color: var(--accent); margin: 0 .5em; }

/* ── 子頁 Hero ──────────────────────── */
.page-hero h1 { font-size: clamp(32px, 5.6vw, 54px); font-weight: 700; letter-spacing: .14em; }
.page-hero .lede { margin-top: 18px; font-size: 18px; color: var(--text-secondary); max-width: 620px; }

/* ── 鐵軌分隔 ───────────────────────── */
.track { position: relative; height: 64px; margin: 64px 0 0; overflow: hidden; }
.track .rails {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--track-tie) 0 10px, transparent 10px 46px),
    linear-gradient(var(--track-rail), var(--track-rail)) 0 20px / 100% 3px no-repeat,
    linear-gradient(var(--track-rail), var(--track-rail)) 0 41px / 100% 3px no-repeat;
}
.track .train {
  position: absolute; top: 8px; width: 10px; height: 48px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 12px, transparent 12px 18px);
  animation: run 26s linear infinite;
}
@keyframes run { from { left: -4%; } to { left: 104%; } }
@media (prefers-reduced-motion: reduce) { .track .train { animation: none; left: 12%; } }

/* ── SectionHeader ──────────────────── */
.sec-head { position: relative; margin-bottom: 44px; }
.sec-head .ghost {
  position: absolute; top: -58px; left: -14px;
  font-size: 130px; font-weight: 700; line-height: 1;
  color: var(--ghost); user-select: none; z-index: 0;
}
.sec-head h2 { position: relative; z-index: 1; font-size: 22px; letter-spacing: .4em; font-weight: 600; }
.sec-head .sub { position: relative; z-index: 1; font-size: 12.5px; letter-spacing: .34em; color: var(--text-secondary); margin-top: 6px; }

/* ── 內文 ───────────────────────────── */
.prose p { max-width: 640px; font-size: 17px; margin-bottom: 1.25em; }

/* ── 路線圖 ─────────────────────────── */
.route { position: relative; max-width: 640px; padding-left: 56px; }
.route::before, .route::after {
  content: ""; position: absolute; top: 6px; bottom: 6px;
  width: 2.5px; background: var(--track-rail);
}
.route::before { left: 18px; }
.route::after { left: 31px; }
.route .ties {
  position: absolute; top: 6px; bottom: 6px; left: 12px; width: 28px;
  background: repeating-linear-gradient(180deg, var(--track-tie) 0 7px, transparent 7px 34px);
}
.station { position: relative; padding: 0 0 40px; }
.station:last-child { padding-bottom: 0; }
.station .dot {
  position: absolute; left: -37px; top: 9px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--text-secondary);
  transition: background .45s, border-color .3s;
}
.station.now .dot { background: var(--accent); border-color: var(--accent); }
.station .when { font-size: 12.5px; letter-spacing: .3em; color: var(--text-secondary); font-family: var(--font-mono); }
.station h3 { font-size: 18.5px; letter-spacing: .12em; font-weight: 600; margin: 2px 0 4px; }
.station.now h3 { color: var(--accent); }
.station p { font-size: 15px; color: var(--text-secondary); max-width: 480px; }

/* ── 作品卡 ─────────────────────────── */
.works { display: grid; gap: 20px; }
@media (min-width: 720px) { .works { grid-template-columns: 1fr 1fr; } }
.work {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 30px 32px; transition: border-color .3s, background .45s;
  display: grid; grid-template-columns: 52px 1fr; gap: 4px 22px;
  text-decoration: none; color: inherit;
}
.work:hover { border-color: var(--accent); }
.work .no {
  grid-row: 1 / 4; font-size: 15px; letter-spacing: .1em; color: var(--text-secondary);
  font-family: var(--font-mono);
  border-top: 2.5px solid var(--accent); padding-top: 10px; height: fit-content;
}
.work .row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.work h3 { font-size: 21px; letter-spacing: .1em; font-weight: 600; }
.work .plat { font-size: 12.5px; letter-spacing: .18em; color: var(--text-secondary); }
.work .hook { font-size: 16px; margin-top: 8px; }
.work .desc { margin-top: 3px; font-size: 14.5px; color: var(--text-secondary); }
@media (max-width: 560px) {
  .work { grid-template-columns: 1fr; padding: 26px 24px; }
  .work .no { grid-row: auto; margin-bottom: 12px; }
}

/* ── 服務卡 ─────────────────────────── */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }
.service {
  border-top: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 0 var(--radius-card) var(--radius-card); padding: 28px 32px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.service h3 { font-size: 18px; letter-spacing: .14em; margin-bottom: 10px; }
.service p { font-size: 15px; color: var(--text-secondary); }

/* ── Offering（服務頁大卡）──────────── */
.offering {
  border-top: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 0 var(--radius-card) var(--radius-card); padding: 36px 38px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.offering .head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.offering h3 { font-size: 24px; letter-spacing: .14em; font-weight: 600; }
.offering .tag-en { font-family: var(--font-mono); font-size: 12px; letter-spacing: .3em; color: var(--text-secondary); }
.offering .lead { margin-top: 14px; font-size: 17px; }
.offering ul { list-style: none; margin-top: 16px; }
.offering li { font-size: 15.5px; color: var(--text-secondary); padding: 5px 0; }
.offering li::before { content: "・"; color: var(--accent); margin-right: .4em; }

/* ── 作品詳情頁 ─────────────────────── */
.wd-hero { position: relative; }
.wd-hero .ghost-no {
  position: absolute; top: -20px; right: -10px;
  font-size: 170px; font-weight: 700; line-height: 1;
  color: var(--ghost); font-family: var(--font-mono); user-select: none;
}
.wd-hero h1 { position: relative; font-size: clamp(34px, 6vw, 58px); font-weight: 700; letter-spacing: .12em; }
.wd-hero .hook { position: relative; margin-top: 20px; font-size: clamp(19px, 2.6vw, 24px); font-weight: 500; letter-spacing: .06em; }
.wd-hero .desc { position: relative; margin-top: 12px; font-size: 17px; color: var(--text-secondary); max-width: 640px; }
.backlink { display: inline-block; margin-bottom: 24px; font-size: 14px; letter-spacing: .2em; text-decoration: none; color: var(--text-secondary); transition: color .3s; }
.backlink:hover { color: var(--accent); }

.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.screens.wide { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .screens, .screens.wide { grid-template-columns: 1fr; } }
.shot {
  aspect-ratio: 9 / 19.5; background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; letter-spacing: .3em; color: var(--text-secondary);
}
.screens.wide .shot { aspect-ratio: 16 / 10; }
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-card); }

.features { max-width: 720px; }
.feat { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.feat:last-child { border-bottom: none; }
.feat .no { font-family: var(--font-mono); font-size: 14px; color: var(--accent); letter-spacing: .1em; padding-top: 3px; }
.feat h3 { font-size: 18px; letter-spacing: .1em; font-weight: 600; }
.feat p { font-size: 15.5px; color: var(--text-secondary); margin-top: 2px; }

.avail { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.avail .ver { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .12em; color: var(--text-secondary); }

/* ── 聯絡頁 ─────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-2col { grid-template-columns: 1fr; } }
.yrs-label { display: block; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-secondary); margin: 18px 0 6px; }
.yrs-field {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 12px 14px; font: inherit; font-size: 15.5px;
  color: var(--text); transition: border-color .3s; outline: none;
}
.yrs-field:focus { border-color: var(--accent); }
textarea.yrs-field { resize: vertical; }
.info-row { padding: 16px 0; border-bottom: 1px solid var(--border); }
.info-row .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .3em; color: var(--text-secondary); }
.info-row .v { font-size: 16px; margin-top: 4px; }
.info-row .v a { text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; font-family: var(--font-mono); font-size: 15px; }
.info-row .v a:hover { color: var(--accent); }

/* ── 聯絡（首頁區塊）────────────────── */
.contact-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.studio-mark { margin-top: 56px; display: flex; align-items: center; gap: 18px; }
.studio-mark .bar { width: 8px; height: 44px; background: repeating-linear-gradient(180deg, var(--accent) 0 11px, transparent 11px 16px); }
.studio-mark .zh { font-size: 19px; letter-spacing: .5em; }
.studio-mark .en { font-size: 12px; letter-spacing: .46em; color: var(--text-secondary); margin-top: 4px; }

/* ── Footer ─────────────────────────── */
.site-footer {
  margin-top: 40px; padding: 28px 0 40px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
}
.site-footer .mark { display: flex; align-items: center; gap: 12px; }
.site-footer .mark .bar { width: 6px; height: 30px; background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 12px); }
.site-footer .mark .zh { font-size: 14px; letter-spacing: .3em; }
.site-footer .mark .en { font-size: 10px; letter-spacing: .4em; color: var(--text-secondary); }
.site-footer .meta { font-size: 12.5px; letter-spacing: .14em; color: var(--text-secondary); font-family: var(--font-mono); }

/* ── 行動裝置調整 ───────────────────── */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 14px 0; gap: 10px; }
  .navlinks { gap: 16px; }
  .navlink .en, .brand-lockup .en { display: none; }
  .navlink .zh { font-size: 13.5px; letter-spacing: .18em; }
  .flip-btn { padding: 6px 12px; font-size: 12px; letter-spacing: .12em; }
  .screen { padding: 48px 0; }
  .hero h1 { letter-spacing: .06em; }
  .hero .who { margin-top: 32px; }
  .sec-head .ghost { font-size: 92px; top: -40px; left: -8px; }
  .wd-hero .ghost-no { font-size: 96px; top: -6px; right: 0; }
  .offering { padding: 28px 24px; }
  .offering h3 { font-size: 21px; }
  .contact-grid { gap: 32px; }
  .studio-mark { margin-top: 40px; }
  .track { margin-top: 40px; height: 52px; }
}

/* ═══ 16:9 簡報式分屏（桌面橫向）═══════
   每個 .screen 至少填滿一個視窗高度、內容垂直置中，
   捲動吸附到每一屏；手機直向不啟用、維持自然流動 */
@media (min-width: 900px) and (orientation: landscape) {
  html { scroll-snap-type: y mandatory; }
  .topnav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: background .45s ease;
  }
  .screen {
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    scroll-snap-align: start;
    padding: 110px 0 36px;
  }
  .screen > .site-footer { margin-top: auto; }
  .track { margin-top: 48px; }
  .station { padding-bottom: 30px; }
  .screen .sec-head { margin-bottom: 36px; }
}
