/* =========================
   styles.css
========================= */

:root{
  --prussian:#0b2c3d;
  --prussian2:#0f3a52;

  --paper:#ffffff;
  --mist:#f3f6f8;
  --ink:#0f172a;
  --line: rgba(15,23,42,.12);

  --shadowBand: 0 30px 80px rgba(0,0,0,.35);
  --shadowVideo: 0 22px 60px rgba(0,0,0,.18);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:"Noto Sans TC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--mist);
}

.container{ width:min(1020px, calc(100% - 44px)); margin:0 auto; }

/* =========================
   NAV
========================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,44,61,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.nav__wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 0;
  gap: 12px;
  flex-wrap:wrap;
}

.nav__brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  font-family:"Noto Serif TC", serif;
}

.dot{ width:10px;height:10px;border-radius:999px; background:#fff; opacity:.85; }

.logo-img{
  width: 34px;
  height: 34px;
  object-fit: cover;
  display:block;
  border-radius: 6px;
}

.logo-text{
  display:flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text .zh{
  font-size: 16px;
  font-weight: 700;
}

.logo-text .en{
  font-size: 12px;
  opacity:.75;
}

.nav__links{ display:flex; gap:14px; flex-wrap:wrap; }

.nav__links a{
  color:#fff;
  text-decoration:none;
  opacity:.82;
  font-size: 14px;
  position: relative;
}
.nav__links a:hover{ opacity:1; }

.nav__links a.is-active{ opacity: 1; }
.nav__links a.is-active::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
}

/* =========================
   HERO
========================= */
.hero{
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color:#fff;

  background-image: linear-gradient(
    140deg,
    rgba(11,44,61,.78) 0%,
    rgba(15,58,82,.72) 60%,
    rgba(11,44,61,.82) 100%
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index: 0;
}

.hero__overlay::before{
  content:"";
  position:absolute;
  inset:-10% -6%;
  background-image: url("img/6.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: blur(14px) saturate(1.05) contrast(1.02);
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.10);
  will-change: transform, filter;
}

.hero__overlay::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(
      140deg,
      rgba(11,44,61,.55) 0%,
      rgba(15,58,82,.40) 60%,
      rgba(11,44,61,.60) 100%
    );
  background-size: 18px 18px, cover;
  opacity: 1;
  pointer-events:none;
}

.hero__content{
  position:relative;
  z-index: 2;
  padding: 90px 0 70px;
}

.kicker{
  font-family:"Noto Serif TC", serif;
  letter-spacing:.22em;
  opacity:.92;
  margin:0 0 10px;
}
.hero h1{
  font-family:"Noto Serif TC", serif;
  font-size: clamp(40px, 6vw, 64px);
  margin:0 0 12px;
}
.subtitle{
  max-width: 44ch;
  font-size: 18px;
  line-height:1.9;
  opacity:.92;
  margin: 0 0 18px;
}

.hero .kicker,
.hero .subtitle,
.hero h1{
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

.hero__chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 26px;
}

.hero__chips .chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  color: rgba(255,255,255,.92);
  text-decoration: none;

  background: rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.26);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.hero__chips .chip:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.36);
}
.hero__chips .chip:focus-visible{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 3px;
}

.cta{
  display:inline-block;
  color:#fff;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.32);
  padding: 10px 14px;
  border-radius: 999px;
}

.hero::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 140px;
  pointer-events:none;
  background: linear-gradient(
    to bottom,
    rgba(11,44,61,0) 0%,
    rgba(11,44,61,.25) 35%,
    rgba(11,44,61,.45) 70%,
    rgba(11,44,61,.55) 100%
  );
  z-index: 2;
}

/* =========================
   BANDS
========================= */
.band{
  position: relative;
  padding: 92px 0;
  background: var(--paper);
  color: var(--ink);
  overflow: visible;
  transition: color .6s ease, box-shadow .6s ease, transform .6s ease;
  z-index: 1;
}

.band .band-bg{
  position:absolute;
  inset:0;
  background: linear-gradient(140deg, var(--prussian) 0%, var(--prussian2) 80%);
  opacity: 0;
  transition: opacity .85s ease;
  z-index: 0;
}

.band .band-inner{ position: relative; z-index: 2; }

.band::before,
.band::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:46px;
  pointer-events:none;
  z-index:1;

  background: linear-gradient(
    to bottom,
    rgba(11,44,61,.30) 0%,
    rgba(11,44,61,.16) 42%,
    rgba(11,44,61,.07) 75%,
    rgba(11,44,61,0) 100%
  );
}

.band::before{
  top:-46px;
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}
.band::after{
  bottom:-46px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
}

.band:nth-of-type(even)::before{
  clip-path: polygon(0 0, 100% 100%, 100% 100%, 0 100%);
}
.band:nth-of-type(even)::after{
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
}

.band.is-active{
  color: #fff;
  box-shadow: var(--shadowBand);
  transform: translateY(-2px);
  z-index: 2;
}
.band.is-active .band-bg{ opacity: 1; }

.band.is-active::before,
.band.is-active::after{
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.46) 0%,
    rgba(0,0,0,.28) 45%,
    rgba(0,0,0,.13) 78%,
    rgba(0,0,0,0) 100%
  );
}

.band .band-inner{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .75s ease, transform .75s ease;
}
.band.is-active .band-inner{
  opacity: 1;
  transform: translateY(0);
}

.band :is(h2,h3,p,li){ color: var(--ink); }
.band.is-active :is(h2,h3,p,li){ color: rgba(255,255,255,.92); }
.band.is-active a{
  color: rgba(255,255,255,.96);
  text-decoration-color: rgba(255,255,255,.35);
}

.meta,
.chapter{
  font-family:"Noto Serif TC", serif;
  letter-spacing:.14em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: .72;
  margin-bottom: 10px;
}
.band.is-active .meta,
.band.is-active .chapter{ opacity: .80; }

h2{
  font-family:"Noto Serif TC", serif;
  font-size: 28px;
  margin: 10px 0 14px;
}
h3{
  margin:0 0 6px;
  font-size: 18px;
  font-family:"Noto Serif TC", serif;
}
p{ line-height: 1.9; font-size: 16px; margin: 10px 0; }

.note{
  border-left: 3px solid rgba(11,44,61,.35);
  padding-left: 12px;
  opacity:.9;
}
.band.is-active .note{
  border-left-color: rgba(255,255,255,.30);
  color: rgba(255,255,255,.88);
}
.note--subtle{ opacity: .78; margin-top: 14px; }

#story.band::before{
  background:
    radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(
      to bottom,
      rgba(0,0,0,.34) 0%,
      rgba(0,0,0,.20) 45%,
      rgba(0,0,0,.08) 75%,
      rgba(0,0,0,0) 100%
    );
  background-size: 24px 24px, auto;
  background-position: 0 0, 0 0;
  box-shadow:
    0 -1px 0 rgba(255,255,255,.22) inset,
    0 -10px 22px rgba(255,255,255,.06) inset;
}

#story.band.is-active::before{
  box-shadow:
    0 -1px 0 rgba(255,255,255,.30) inset,
    0 -12px 26px rgba(255,255,255,.08) inset;
}

/* =========================
   Principle split
========================= */
.bullets{ margin:0; padding-left: 18px; }
.bullets li{ margin: 8px 0; line-height: 1.8; }

.split{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.mini{
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(243,246,248,.65);
}
.band.is-active .mini{
  background: rgba(0,0,0,.18);
  border-color: rgba(255,255,255,.18);
}
.mini h3{ font-size: 16px; }

/* =========================
   Steps
========================= */
.steps{ margin-top: 12px; display:grid; gap: 12px; }
.step{
  display:grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child{ border-bottom: 0; }

.step__no{
  width: 44px; height: 44px;
  border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-family:"Noto Serif TC", serif;
}
.band.is-active .step{ border-bottom-color: rgba(255,255,255,.14); }
.band.is-active .step__no{
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
}

/* =========================
   Howto grid
========================= */
.howto-grid{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 28px;
  align-items: start;
}
.howto-video{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
}
.video-wrap{
  width: 100%;
  max-width: 560px;
}

.video{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadowVideo);
}
.video iframe{
  width:100%;
  aspect-ratio: 16 / 9;
  display:block;
}
.video-caption{
  margin-top: 10px;
  font-size: 13px;
  opacity: .82;
}
.band.is-active .video{
  border-color: rgba(255,255,255,.20);
  box-shadow: 0 34px 90px rgba(0,0,0,.35);
}

/* =========================
   Marquee Gallery
========================= */
.marquee{
  margin-top: 14px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 0;
  overflow: hidden;
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  position: relative;
}

.marquee::before,
.marquee::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width: 64px;
  pointer-events:none;
  z-index: 2;
}
.marquee::before{
  left:0;
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}
.marquee::after{
  right:0;
  background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.marquee__track{
  display: flex;
  gap: 10px;
  padding: 14px;
  width: max-content;
  animation: marqueeMove 26s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track{
  animation-play-state: paused;
}

.shot{
  margin: 0;
  flex: 0 0 auto;
  width: 320px;
  height: 220px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  box-shadow: none;
}

.shot img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: none;
}

.band.is-active .marquee{
  background: rgba(0,0,0,.10);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 26px 70px rgba(0,0,0,.30);
}
.band.is-active .marquee::before{
  background: linear-gradient(to right, rgba(11,44,61,1), rgba(11,44,61,0));
}
.band.is-active .marquee::after{
  background: linear-gradient(to left, rgba(11,44,61,1), rgba(11,44,61,0));
}
.band.is-active .shot{
  border-color: rgba(255,255,255,.14);
}

@keyframes marqueeMove{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* =========================
   Footer
========================= */
.footer{
  background: linear-gradient(140deg, var(--prussian) 0%, var(--prussian2) 80%);
  color:#fff;
  padding: 26px 0;
}
.footer__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.brand{ font-family:"Noto Serif TC", serif; font-weight:700; }
.footer .muted{ opacity:.8; font-size: 14px; }
.top{
  color:#fff; text-decoration:none;
  border:1px solid rgba(255,255,255,.28);
  padding: 8px 12px;
  border-radius: 999px;
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px){
  .howto-grid{ grid-template-columns: 1fr; gap: 18px; }
  .howto-video{ min-height: auto; }
  .video-wrap{ max-width: 100%; }
}

@media (max-width: 720px){
  .band{ padding: 72px 0; }

  .band::before,
  .band::after{ height:32px; }

  .band::before{ top:-32px; }
  .band::after{ bottom:-32px; }

  .split{ grid-template-columns: 1fr; }

  .hero::after{ height: 110px; }

  .marquee__track{
    padding: 12px;
    gap: 8px;
    animation-duration: 34s;
  }
  .shot{
    width: 260px;
    height: 180px;
  }
}

/* 修正 band 上緣陰影方向（避免上方灰帶） */
.band::before{
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.06) 45%,
    rgba(0,0,0,.16) 75%,
    rgba(0,0,0,.28) 100%
  );
}

/* Active 藍段：上緣陰影也要貼邊 */
.band.is-active::before{
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.10) 45%,
    rgba(0,0,0,.26) 80%,
    rgba(0,0,0,.42) 100%
  );
}

.band:last-of-type::after{ display: none; }
.grid{ display:none; }

/* =========================
   Reduced motion
========================= */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .marquee__track{ animation: none !important; }
  .band .band-inner{ transform:none !important; opacity: 1 !important; transition: none !important; }
  .band{ transition: none !important; }
  .hero__overlay::before{ transform:none !important; }
}

/* =========================
   FAQ
========================= */
.faq{
  margin-top: 22px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}

.band.is-active .faq{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
}

.faq-item{ border-bottom: 1px solid rgba(15,23,42,.40); }
.band.is-active .faq-item{ border-bottom-color: rgba(255,255,255,.34); }
.faq-item:last-child{ border-bottom: none; }

.faq-item summary{
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: rgba(15,23,42,.92);
  user-select: none;
}
.band.is-active .faq-item summary{ color: rgba(255,255,255,.95); }
.faq-item summary::-webkit-details-marker{ display:none; }

.faq-item summary:hover{ background: rgba(15,23,42,.04); }
.band.is-active .faq-item summary:hover{ background: rgba(255,255,255,.06); }

.faq-item summary:focus-visible{
  outline: 2px solid rgba(15,23,42,.55);
  outline-offset: -2px;
}
.band.is-active .faq-item summary:focus-visible{ outline-color: rgba(255,255,255,.70); }

.faq-answer{ padding: 0 18px 18px; }
.faq-answer p{
  margin: 10px 0;
  line-height: 1.9;
  font-size: 15px;
  color: rgba(15,23,42,.88);
}
.band.is-active .faq-answer p{ color: rgba(255,255,255,.88); }

.faq-item[open] summary{ background: rgba(15,23,42,.05); }
.band.is-active .faq-item[open] summary{ background: rgba(255,255,255,.08); }

.faq-item[open] .faq-answer{
  border-top: 1px solid rgba(15,23,42,.14);
  padding-top: 12px;
}
.band.is-active .faq-item[open] .faq-answer{ border-top-color: rgba(255,255,255,.18); }

@media (prefers-reduced-motion: no-preference){
  .faq-item[open] .faq-answer{ animation: faqFade .22s ease; }
}
@keyframes faqFade{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* =========================
   ✅ Rail（直線｜均分｜白字清楚｜實心點）— 最終覆蓋段
========================= */
.rail{
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}

/* 手機隱藏 */
@media (max-width: 900px){
  .rail{ display:none !important; }
}

.rail__nav{
  position: relative;
  width: 240px;
  height: 520px !important;
}

/* 不用弧線：保留不刪，但隱藏 */
.rail__curve{ display:none !important; }

/* 直線：畫在 rail__nav */
.rail__nav::before{
  content:"";
  position:absolute;
  left: 22px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: rgba(255,255,255,.40);
  box-shadow: 0 0 0 1px rgba(11,44,61,.25);
  border-radius: 999px;
}

/* item：無膠囊、無底色 */
.rail__item{
  position: absolute;
  left: 16px; /* 讓圓點中心落在線上(22px) */
  display: inline-flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 2px 0 !important;

  /* 均分位置：5點 index 0~4 */
  top: calc(16px + (var(--i) * (520px - 32px) / 4)) !important;
}

/* 對應 5 個項目（svg 是第 1 個，a 是第 2~6 個） */
.rail__item:nth-child(2){ --i: 0; }
.rail__item:nth-child(3){ --i: 1; }
.rail__item:nth-child(4){ --i: 2; }
.rail__item:nth-child(5){ --i: 3; }
.rail__item:nth-child(6){ --i: 4; }

/* 圓點：實心 */
.rail__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.90) !important;
  border: 0 !important;
  flex: 0 0 auto;
  box-shadow:
    0 0 0 2px rgba(11,44,61,.45),
    0 6px 18px rgba(0,0,0,.25);
}

/* 文字：永遠清楚 */
.rail__label{
  color: rgba(255,255,255,.92) !important;
  opacity: 1 !important;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 14px;

  text-shadow:
    0 1px 3px rgba(0,0,0,.55),
    0 0 1px rgba(0,0,0,.6);

  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

/* hover：只加亮 */
.rail__item:hover .rail__label{
  color: #fff !important;
}

/* active：只亮文字 + 微放大 */
.rail__item.is-active .rail__label{
  color: #fff !important;
  transform: scale(1.10);
}

.rail__item.is-active .rail__dot{
  background: #fff !important;
}

/* ===== Principle：移除兩窗格，改成一段補充說明 ===== */
.principle-note{
  margin-top: 22px;
  max-width: 860px;
}

.principle-note h3{
  margin: 0 0 10px;
  font-size: 18px;
  font-family: "Noto Serif TC", serif;
}

.principle-note p{
  margin: 10px 0;
  line-height: 1.9;
}

/* band 變藍底時，保持一致可讀 */
.band.is-active .principle-note p{
  color: rgba(255,255,255,.9);
}
