/* ============================================================
   Tokens：顏色取自定位筆的三種配色與短影音的色票
   ============================================================ */
:root {
  --night: #121214;
  --night-2: #1b1b1e;
  --paper: #efe9e1;
  --paper-2: #e4ddd3;
  --ink: #1d1d1f;
  --ink-soft: #5e5a55;
  --mist: #a3a3a8;
  --oat: #c9b49b;
  --oat-deep: #8a7457;
  --sage: #4f5c4b;

  --font-tc: "Noto Sans TC", "PingFang TC", "Heiti TC", system-ui, sans-serif;
  --font-latin: "Archivo", "Noto Sans TC", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-tc);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--oat); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--oat); color: var(--night); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* ---------- 共用文字 ---------- */
.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.section-lede { margin-top: 14px; font-size: 18px; color: var(--ink-soft); max-width: 36em; }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--oat);
  border: 1px solid rgba(201,180,155,.4); border-radius: 999px; padding: 5px 14px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--oat); animation: blip 2.4s infinite; }
@keyframes blip { 0% { box-shadow: 0 0 0 0 rgba(201,180,155,.6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(201,180,155,0); } }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-oat { background: var(--oat); color: var(--night); }
.btn-oat:hover { background: #d8c6b0; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }

/* ---------- 顏色選擇 ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border-radius: 999px;
  border: 1.5px solid rgba(239,233,225,.2); background: transparent; cursor: pointer;
  font-size: 15px; transition: border-color .2s, background-color .2s;
}
.swatches button::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.swatches button:hover { border-color: rgba(239,233,225,.5); }
.swatches button[aria-checked="true"] { border-color: var(--paper); background: rgba(239,233,225,.08); font-weight: 700; }

/* ============================================================
   導覽列
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gutter);
  transition: background-color .3s, height .3s var(--ease-out);
}
.nav.is-scrolled {
  height: 58px;
  background: rgba(18, 18, 20, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { text-decoration: none; font-size: 15px; color: rgba(239, 233, 225, .78); transition: color .2s; }
.nav-links a:hover { color: var(--paper); }
.nav-links .nav-cta { color: var(--night); background: var(--oat); padding: 8px 18px; border-radius: 999px; font-weight: 700; }
.nav-links .nav-cta:hover { color: var(--night); background: #d8c6b0; }
.menu-btn { display: none; background: none; border: 1.5px solid rgba(239,233,225,.35); border-radius: 999px; padding: 6px 16px; cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { background: rgba(18,18,20,.9); height: 58px; }
  .nav-links {
    position: fixed; inset: 58px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid rgba(239,233,225,.1);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .3s var(--ease-out), visibility .25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { font-size: 22px; padding: 14px 0; border-bottom: 1px solid rgba(239,233,225,.08); }
  .nav-links .nav-cta { margin-top: 18px; text-align: center; border: 0; }
}

/* ============================================================
   家人收到什麼：夜間地圖
   ============================================================ */
.map-section {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter);
  overflow: hidden; isolation: isolate;
  border-top: 1px solid rgba(239,233,225,.06);
}
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; cursor: crosshair; }
.map-section::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(18,18,20,.94) 0%, rgba(18,18,20,.6) 38%, rgba(18,18,20,0) 62%);
}
.map-copy { max-width: 520px; pointer-events: none; }
.map-copy p { margin-top: 20px; color: rgba(239,233,225,.78); max-width: 26em; }

.notice {
  position: absolute; left: min(70%, calc(100% - 324px - var(--gutter))); top: 44%; transform-origin: 0 0;
  width: 290px; margin: -250px 0 0 34px;
  background: var(--paper); color: var(--ink);
  border-radius: 20px; padding: 16px 18px 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  opacity: 0; translate: 0 24px; scale: .96;
  transition: opacity .45s var(--ease-out), translate .7s var(--ease-out), scale .7s var(--ease-out);
}
.notice.is-shown { opacity: 1; translate: 0 0; scale: 1; }
.notice-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.notice-head time { margin-left: auto; }
.notice-title { margin-top: 8px; font-weight: 900; font-size: 17px; }
.notice-body { font-size: 14px; color: var(--ink-soft); }
.notice-map { margin-top: 12px; width: 100%; height: auto; border-radius: 10px; background: var(--paper-2); color: var(--ink); }
.notice-ring { fill: none; stroke: var(--oat-deep); stroke-width: 1.5; transform-origin: 122px 60px; animation: ring 2s var(--ease-out) infinite; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(3); opacity: 0; } }
.notice-foot { margin-top: 10px; font-size: 13px; color: var(--oat-deep); font-weight: 700; }

.coords {
  position: absolute; right: var(--gutter); bottom: 40px;
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--font-latin); font-variation-settings: "wdth" 80;
  font-size: 14px; line-height: 1.5; color: var(--oat);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

@media (max-width: 860px) {
  .map-section { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 28px; padding-top: 90px; }
  .map-section::after { background: linear-gradient(0deg, rgba(18,18,20,.95) 0%, rgba(18,18,20,.7) 40%, rgba(18,18,20,0) 75%); }
  .notice { position: relative; left: auto; top: auto; margin: 0; width: min(290px, 100%); align-self: flex-end; order: -1; }
  .coords { top: 76px; bottom: auto; font-size: 12px; }
}

/* ============================================================
   開賣通知與規格（紙色）
   ============================================================ */
.notify { background: var(--paper); color: var(--ink); padding: clamp(88px, 14vh, 150px) 0; }
.notify-photo { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 20px; background: #a3a29f; }
.notify-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); margin-top: clamp(48px, 8vh, 80px); }
.eb-form { margin-top: 32px; }
.eb-form label { font-size: 14px; color: var(--ink-soft); }
.eb-row { display: flex; gap: 10px; margin-top: 6px; }
.eb-row input { flex: 1; min-width: 0; }

.specs { margin: 0; padding: 0; }
.specs div { display: grid; grid-template-columns: 6em 1fr; padding: 11px 0; border-top: 1px solid rgba(29,29,31,.12); }
.specs div:last-child { border-bottom: 1px solid rgba(29,29,31,.12); }
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; font-weight: 500; }
.note { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

@media (max-width: 760px) {
  .notify-inner { grid-template-columns: 1fr; }
  .notify-photo { aspect-ratio: 4 / 3; }
  .eb-row { flex-direction: column; }
}

/* ---------- 表單欄位 ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* 防機器人的隱藏欄位 */
.btn:disabled { opacity: .6; cursor: progress; }
input[type="email"], input:not([type]), textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: 12px; border: 1.5px solid rgba(29,29,31,.2); background: rgba(255,255,255,.6);
  transition: border-color .2s, background-color .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3402f; }
.form-msg { margin-top: 10px; min-height: 1.7em; font-size: 15px; }
.form-msg.is-error { color: #b3402f; }
.form-msg.is-ok { color: var(--sage); font-weight: 700; }
.form-privacy { font-size: 13px; color: var(--ink-soft); }
.form-privacy a { text-underline-offset: 3px; }
.contact .form-privacy { margin-top: 2px; color: rgba(239,233,225,.55); }

/* 深色底上的開賣通知表單（3D 拆解最後一段） */
.eb-dark label { color: rgba(239,233,225,.78); }
.eb-dark input { background: var(--night-2); border-color: rgba(239,233,225,.2); color: var(--paper); }
.eb-dark input:focus { background: #222226; border-color: var(--oat); }
.eb-dark input[aria-invalid="true"] { border-color: #ff9a85; }
.eb-dark .btn { flex: none; }
.eb-dark .form-msg { margin-top: 8px !important; }
.eb-dark .form-msg.is-ok { color: var(--oat); }
.eb-dark .form-msg.is-error { color: #ff9a85; }

/* ============================================================
   常見問題
   ============================================================ */
.faq { background: var(--paper); color: var(--ink); padding: 0 0 clamp(88px, 14vh, 150px); }
.faq-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; border-top: 1px solid rgba(29,29,31,.12); padding-top: clamp(64px, 10vh, 110px); }
.faq-list details { border-bottom: 1px solid rgba(29,29,31,.12); }
.faq-list details:first-child { border-top: 1px solid rgba(29,29,31,.12); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-size: clamp(17px, 1.6vw, 19px); font-weight: 700;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--oat-deep); border-bottom: 2px solid var(--oat-deep);
  transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease-out);
}
.faq-list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-list details p { padding: 0 0 20px; color: var(--ink-soft); max-width: 36em; }
.faq-list details a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 760px) { .faq-inner { grid-template-columns: 1fr; gap: 24px; } }

/* ============================================================
   關於、聯絡、頁尾
   ============================================================ */
.about { background: var(--paper-2); color: var(--ink); padding: clamp(88px, 14vh, 150px) 0; }
.about-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.about-body p { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.8; max-width: 30em; }
.about-body p + p { margin-top: 18px; color: var(--ink-soft); }

.contact { background: var(--night); padding: clamp(88px, 14vh, 150px) 0; }
.contact .section-lede { color: rgba(239,233,225,.7); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); }
.contact-mail { margin-top: 28px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; }
.contact-mail a { text-decoration-color: var(--oat); text-underline-offset: 6px; }
.contact-form { display: flex; flex-direction: column; }
.contact-form > label { margin-top: 18px; font-size: 14px; color: rgba(239,233,225,.7); }
.contact-form input, .contact-form textarea { margin-top: 6px; background: var(--night-2); border-color: rgba(239,233,225,.16); color: var(--paper); }
.contact-form input:focus, .contact-form textarea:focus { background: #222226; border-color: var(--oat); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { margin-top: 24px; align-self: flex-start; }
.contact .form-msg.is-ok { color: var(--oat); }
.contact .form-msg.is-error { color: #ff9a85; }
.contact input[aria-invalid="true"], .contact textarea[aria-invalid="true"] { border-color: #ff9a85; }
.topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics legend { font-size: 14px; color: rgba(239,233,225,.7); margin-bottom: 8px; padding: 0; }
.topics label { position: relative; cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(239,233,225,.2); font-size: 15px; transition: border-color .2s, background-color .2s; }
.topics input { position: absolute; opacity: 0; }
.topics label:has(input:checked) { border-color: var(--oat); background: rgba(201,180,155,.14); color: var(--oat); font-weight: 700; }
.topics label:has(input:focus-visible) { outline: 2px solid var(--oat); outline-offset: 3px; }

@media (max-width: 760px) { .about-inner, .contact-inner { grid-template-columns: 1fr; } }

.footer { border-top: 1px solid rgba(239,233,225,.1); padding: 28px 0; font-size: 14px; color: rgba(239,233,225,.6); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-right: auto; margin-left: 16px; }
.footer-links a { text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--paper); }
@media (max-width: 760px) { .footer-links { margin-left: 0; width: 100%; order: 3; } }

/* ============================================================
   隱私權政策等文字頁
   ============================================================ */
.legal-page { background: var(--paper); color: var(--ink); }
.legal-page .nav, .legal-page .footer { color: var(--paper); }
.legal-back { font-size: 15px; color: rgba(239,233,225,.78); text-decoration: none; }
.legal-back:hover { color: var(--paper); }
.legal { padding: clamp(110px, 16vh, 160px) 0 clamp(72px, 10vh, 120px); }
.legal-inner { max-width: 760px; }
.legal-date { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.legal h2 { margin-top: 44px; font-size: 22px; font-weight: 900; }
.legal p, .legal ul { margin-top: 14px; }
.legal-date + p { margin-top: 32px; }
.legal ul { padding-left: 1.3em; }
.legal li + li { margin-top: 6px; }
.legal a { text-underline-offset: 3px; }
.legal-table { margin: 16px 0 0; }
.legal-table div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(29,29,31,.12); }
.legal-table div:last-child { border-bottom: 1px solid rgba(29,29,31,.12); }
.legal-table dt { font-weight: 700; }
.legal-table dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .legal-table div { grid-template-columns: 1fr; gap: 2px; } }
.legal-page .footer { background: var(--night); }

/* ============================================================
   減少動態
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
