/* 方智彥｜蘇澳鎮民代表 — 南方澳港口配色：深海藍＋救生橘＋港霧白 */
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --sea: #0d2b3e;
  --sea-2: #123a52;
  --sea-3: #1d5373;
  --mist: #eef3f6;
  --paper: #ffffff;
  --ink: #14232e;
  --ink-soft: #4a5c68;
  --line: #d3dde4;
  --buoy: #e8572a;
  --buoy-deep: #c2401a;
  --foam: #9fc3d6;
  --radius: 14px;
}
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--mist);
  color: var(--ink);
  line-height: 1.8;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea-3); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { scroll-margin-top: 76px; }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--sea);
  color: #fff;
  border-bottom: 3px solid var(--buoy);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand b { font-family: "Noto Serif TC", serif; font-size: 22px; letter-spacing: .12em; }
.brand span { font-size: 13px; color: var(--foam); letter-spacing: .06em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #dbe8ef; text-decoration: none; font-size: 15px; }
.nav a:hover { color: #fff; }
.head-cta {
  background: var(--buoy); color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap;
}
.head-cta:hover { background: var(--buoy-deep); }

/* hero */
.hero {
  background:
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(159,195,214,.07) 22px 23px),
    linear-gradient(160deg, var(--sea) 0%, var(--sea-2) 60%, var(--sea-3) 100%);
  color: #fff;
  padding: 72px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--foam); font-size: 15px; letter-spacing: .12em; margin-bottom: 14px; }
.hero h1 {
  font-family: "Noto Serif TC", serif; font-weight: 900;
  font-size: 88px; line-height: 1.05; letter-spacing: .14em; margin-bottom: 22px;
}
.hero h1 small { display: block; font-size: 22px; letter-spacing: .08em; font-weight: 600; color: var(--buoy); margin-top: 14px; font-family: "Noto Sans TC", sans-serif; }
.hero .lead { font-size: 19px; color: #dbe8ef; max-width: 34em; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chips span { border: 1px solid rgba(159,195,214,.5); color: #e6f0f5; padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; text-decoration: none; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.btn-main { background: var(--buoy); color: #fff; }
.btn-main:hover { background: var(--buoy-deep); }
.btn-line { border: 2px solid #fff; color: #fff; }
.btn-line:hover { background: rgba(255,255,255,.1); }
.portrait { position: relative; justify-self: center; width: 100%; max-width: 340px; }
.portrait figure { background: #fff; padding: 12px 12px 0; border-radius: 6px; box-shadow: 0 24px 50px rgba(0,0,0,.35); transform: rotate(1.5deg); }
.portrait img { aspect-ratio: 602 / 738; object-fit: cover; border-radius: 2px; }
.portrait figcaption { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 10px 0 12px; letter-spacing: .08em; }
.portrait::before {
  content: ""; position: absolute; inset: -18px -18px auto auto; width: 90px; height: 90px;
  border-radius: 50%; border: 12px solid var(--buoy); opacity: .9; z-index: -1;
}

/* sections */
.sec { padding: 80px 0; }
.sec-white { background: var(--paper); }
.sec-head { margin-bottom: 36px; }
.sec-head .no { color: var(--buoy); font-weight: 700; letter-spacing: .14em; font-size: 14px; }
.sec-head h2 { font-family: "Noto Serif TC", serif; font-size: 36px; line-height: 1.35; color: var(--sea); margin-top: 6px; }
.sec-head p { color: var(--ink-soft); margin-top: 10px; max-width: 40em; }

.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; }
.about .text p + p { margin-top: 1em; }
.facts { background: var(--mist); border-radius: var(--radius); padding: 8px 24px; align-self: start; }
.facts div { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { font-weight: 600; }

/* timeline */
.timeline { list-style: none; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 26px 52px; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--sea-3);
}
.timeline li.now::before { border-color: var(--buoy); background: var(--buoy); }
.timeline b { display: block; font-size: 19px; color: var(--sea); }
.timeline span { color: var(--ink-soft); font-size: 15px; }

/* 政見 */
.pledges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; counter-reset: p; }
.pledge {
  background: var(--paper); border-radius: var(--radius); padding: 24px 26px 24px 78px; position: relative;
  border: 1px solid var(--line);
}
.pledge::before {
  counter-increment: p; content: counter(p, decimal-leading-zero);
  position: absolute; left: 22px; top: 20px; font-family: "Noto Serif TC", serif; font-weight: 900;
  font-size: 30px; color: var(--buoy); line-height: 1;
}
.pledge .tag { display: inline-block; font-size: 13px; color: var(--sea-3); background: #e2eef4; padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.pledge p { font-size: 18px; font-weight: 600; line-height: 1.65; }
.pledge.wide { grid-column: 1 / -1; }
.note { color: var(--ink-soft); font-size: 14px; margin-top: 22px; }

/* 在地 */
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.role { background: var(--sea); color: #fff; border-radius: var(--radius); padding: 24px 22px; }
.role b { display: block; font-size: 18px; margin-bottom: 8px; }
.role p { color: #c7dbe6; font-size: 15px; line-height: 1.7; }
.villages { margin-top: 36px; background: var(--mist); border-radius: var(--radius); padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.villages h3 { font-size: 18px; color: var(--sea); margin-right: 8px; }
.villages ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.villages li { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-weight: 600; }

/* 聯絡 */
.contact { background: var(--sea); color: #fff; }
.contact .sec-head h2 { color: #fff; }
.contact .sec-head p { color: #c7dbe6; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--sea-2); border-radius: var(--radius); padding: 28px; border: 1px solid rgba(159,195,214,.25); }
.card .k { color: var(--foam); font-size: 14px; letter-spacing: .1em; }
.card .v { font-size: 26px; font-weight: 700; margin: 6px 0 16px; line-height: 1.4; }
.card .v a { color: #fff; text-decoration: none; }
.card .btn { font-size: 15px; padding: 10px 20px; }

.site-foot { background: #081d2a; color: #8fa9b8; font-size: 14px; padding: 28px 0 36px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot a { color: #b8d0dd; }

/* tablet */
@media (max-width: 960px) {
  .hero .wrap, .about { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; grid-row: 1; }
  .roles { grid-template-columns: repeat(2, 1fr); }
}
/* mobile：vw 在 LINE 內不準，字級全用 px */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .site-head .wrap { height: 58px; justify-content: space-between; }
  .brand b { font-size: 20px; }
  .brand span { font-size: 12px; }
  .head-cta { padding: 8px 14px; font-size: 14px; }
  section { scroll-margin-top: 64px; }
  .hero { padding: 40px 0 56px; }
  .hero .wrap { gap: 32px; }
  .hero h1 { font-size: 56px; }
  .hero h1 small { font-size: 18px; }
  .hero .lead { font-size: 17px; }
  .portrait { max-width: 230px; }
  .sec { padding: 56px 0; }
  .sec-head h2 { font-size: 27px; }
  .pledges, .contact-grid { grid-template-columns: 1fr; }
  .pledge { padding: 20px 20px 20px 66px; }
  .pledge::before { left: 18px; font-size: 26px; }
  .pledge p { font-size: 17px; }
  .card .v { font-size: 22px; }
}
@media (max-width: 480px) {
  .roles { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .btns .btn { flex: 1 1 100%; text-align: center; }
}

/* 2026 競選：1 號徽章＋投票資訊 */
.no-badge { position: absolute; width: 120px; height: 120px; left: -40px; top: -34px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); transform: rotate(-6deg); }
.vote { border-bottom: 1px solid var(--line); }
.vote-grid { display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: center; }
.vote-photo img { width: 100%; border-radius: var(--radius); box-shadow: 0 16px 36px rgba(13,43,62,.18); }
.vote-facts { border-top: 3px solid var(--sea); }
.vote-facts div { display: grid; grid-template-columns: 5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vote-facts dt { color: var(--ink-soft); }
.vote-facts dd { font-weight: 700; }
.big-no { display: flex; align-items: center; gap: 12px; }
@media (max-width: 960px) {
  .vote-grid { grid-template-columns: 1fr; gap: 28px; }
  .vote-photo { max-width: 320px; }
}
@media (max-width: 768px) {
  .no-badge { width: 92px; height: 92px; left: -22px; top: -24px; }
  .vote-facts div { grid-template-columns: 4.5em 1fr; font-size: 15px; }
}

/* 第 2 選舉區大色帶（主視覺正下方） */
.district {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #f0652f 0%, var(--buoy) 45%, var(--buoy-deep) 100%);
  padding: 92px 0 76px;
}
.district::before { /* 慢慢掃過的光 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%);
  background-size: 250% 100%; animation: dSweep 7s linear infinite; pointer-events: none;
}
.district-wave { position: absolute; left: 0; top: 0; width: 200%; height: 60px; }
.district-wave.wa path { fill: var(--sea-3); }
.district-wave.wb path { fill: var(--sea); }
.district-wave.wb { opacity: .55; }
.district-wave.wa { animation: dWave 9s linear infinite; }
.district-wave.wb { animation: dWave 13s linear infinite reverse; }
.district .wrap { position: relative; }
.district-head { text-align: center; margin-bottom: 40px; }
.district-kicker { letter-spacing: .2em; font-size: 15px; font-weight: 700; color: #ffe3d6; }
.district h2 {
  font-family: "Noto Serif TC", serif; font-weight: 900; font-size: 64px; line-height: 1.15;
  letter-spacing: .08em; margin: 6px 0 12px; text-shadow: 0 6px 0 rgba(122,30,6,.28);
}
.district .d-no { color: var(--sea); background: #fff; padding: 0 .28em; border-radius: 12px; margin-right: .1em; text-shadow: none; display: inline-block; }
.district-sub { font-size: 21px; font-weight: 600; }
.d-one {
  display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; margin: 0 .2em;
  border-radius: 50%; background: var(--sea); color: #fff; font-family: "Noto Serif TC", serif; font-weight: 900;
  vertical-align: middle; position: relative;
}
.d-one::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #fff;
  animation: dPulse 2.2s ease-out infinite;
}
.district-grid { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.district-grid li {
  position: relative; overflow: hidden; background: #fff; color: var(--sea);
  border-radius: 16px; padding: 30px 8px 26px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; min-height: 140px;
  box-shadow: 0 14px 30px rgba(110,28,4,.28);
  transition: transform .25s;
}
.district-grid li:hover { transform: translateY(-4px); }
.district-grid .v { font-family: "Noto Serif TC", serif; font-weight: 900; font-size: 34px; letter-spacing: .06em; display: block; }
.district-grid em { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: var(--buoy-deep); margin-top: 6px; }
.district-grid li::after { /* 卡片輪流閃光 */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(232,87,42,.22), transparent);
  transform: skewX(-18deg); animation: dShine 6s ease-in-out infinite; animation-delay: calc(var(--i) * .45s + 1.2s);
}
/* 進場：只淡入＋微放大，不改版面高度；提前 30% 視窗觸發 */
.district.await .district-grid li { opacity: 0; transform: scale(.9); }
.district.on .district-grid li { animation: dPop .55s cubic-bezier(.2,.9,.3,1.25) forwards; animation-delay: calc(var(--i) * .09s); }
.district.on .district-grid li::after { animation-name: dShine; }
@keyframes dPop { to { opacity: 1; transform: scale(1); } }
@keyframes dShine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes dSweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes dWave { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dPulse { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

@media (max-width: 960px) {
  .district-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .district { padding: 72px 0 56px; }
  .district h2 { font-size: 44px; }
  .district-sub { font-size: 17px; }
  .district-sub span { display: block; }
  .district-grid li { min-height: 104px; }
  .district-grid { gap: 10px; }
  .district-grid li { padding: 20px 4px 18px; border-radius: 12px; }
  .district-grid .v { font-size: 24px; }
  .district-grid em { font-size: 12px; }
}
@media (max-width: 360px) {
  .district h2 { font-size: 38px; }
  .district-grid .v { font-size: 21px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) {
  .district::before, .district-wave, .district-grid li::after, .d-one::after { animation: none; }
  .district.await .district-grid li { opacity: 1; transform: none; }
  .district.on .district-grid li { animation: none; }
}

/* 分享卡（搬自 muchstay.com 10-13 第二版，改成港口配色） */
.share-sec { padding: 0 0 72px; }
.share-bar { margin: 0; padding: 26px 28px; background: linear-gradient(135deg, #fff, #e6f0f5); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 30px -18px rgba(13,43,62,.35); }
.share-head { margin-bottom: 16px; }
.share-head b { display: block; font-size: 21px; color: var(--sea); }
.share-head b i { font-style: normal; }
.share-head span { font-size: 15px; color: var(--ink-soft); }
.share-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.share-bar .sh { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 20px; border-radius: 99px; border: 0; background: #fff;
  color: #fff; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0,0,0,.45); transition: transform .15s, box-shadow .15s; }
.share-bar .sh svg { width: 20px; height: 20px; flex: 0 0 auto; }
.share-bar .sh:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(0,0,0,.5); color: #fff; }
.share-bar .sh-line { background: #06c755; } .share-bar .sh-fb { background: #1877f2; } .share-bar .sh-threads, .share-bar .sh-x { background: #111; }
.share-bar .sh-native { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.share-bar .sh-native[hidden] { display: none; }
.share-bar .sh-copy { background: #fff; color: var(--sea); box-shadow: inset 0 0 0 2px var(--foam); }
.share-bar .sh-copy:hover { color: var(--sea); }
@media (max-width: 520px) {
  .share-sec { padding-bottom: 56px; }
  .share-bar { padding: 20px 16px; }
  .share-head b { font-size: 18px; }
  .share-head b i { display: block; }
  .share-bar .sh { flex: 1 1 calc(50% - 5px); justify-content: center; padding: 8px 12px; }
}

/* 頁尾承製：放大、獨立一行 */
.site-foot .credit { flex-basis: 100%; margin-top: 14px; padding-top: 18px; border-top: 1px solid rgba(159,195,214,.18); font-size: 16px; color: #b8d0dd; }
.site-foot .credit a { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: .08em; text-decoration: none; border-bottom: 2px solid var(--buoy); padding-bottom: 2px; }
.site-foot .credit a:hover { color: var(--buoy); }
@media (max-width: 768px) { .site-foot .credit a { font-size: 20px; } }

/* 右下浮動分享鈕（手機、電腦都在右下，壓在所有內容上面） */
.share-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; transition: opacity .2s, visibility .2s; }
.share-fab.away { opacity: 0; visibility: hidden; pointer-events: none; }
.share-fab-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 99px;
  background: var(--buoy); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 26px -8px rgba(122,30,6,.55), 0 0 0 3px #fff;
}
.share-fab-btn svg { width: 22px; height: 22px; }
.share-fab-btn:hover { background: var(--buoy-deep); }
.share-fab.open .share-fab-btn { background: var(--sea); }
.share-pop {
  width: 300px; background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line);
  box-shadow: 0 24px 50px -16px rgba(13,43,62,.5); transform-origin: bottom right; animation: popIn .18s ease-out;
}
.share-pop[hidden] { display: none; }
.share-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--sea); font-size: 17px; }
.share-pop-x { border: 0; background: var(--mist); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.share-pop .share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-pop .sh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 6px 10px; border-radius: 99px; border: 0;
  color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.share-pop .sh svg { width: 19px; height: 19px; flex: 0 0 auto; }
.share-pop .sh-line { background: #06c755; } .share-pop .sh-fb { background: #1877f2; } .share-pop .sh-threads, .share-pop .sh-x { background: #111; }
.share-pop .sh-native { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.share-pop .sh-native[hidden] { display: none; }
.share-pop .sh-copy { background: #fff; color: var(--sea); box-shadow: inset 0 0 0 2px var(--foam); grid-column: 1 / -1; }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) {
  .share-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .share-fab-btn { height: 52px; padding: 0 18px 0 15px; font-size: 16px; }
  .share-pop { width: min(300px, calc(100vw - 28px)); }
}
@media (prefers-reduced-motion: reduce) { .share-pop { animation: none; } }
