/* 色票取自正式 Logo：可可棕線條、小鹿奶茶、耳朵霧粉、滴管天空藍 */
:root {
  --cocoa: #5e4a40;
  --milktea: #c98f78;
  --tea-ink: #955f49;   /* 奶茶色文字用，對米白背景達 4.5:1 */
  --blush: #dcbfc1;
  --mist: #c3d9ee;      /* 滴管藍，用在淡水河 */
  --cream: #faf6f1;
  --linen: #f1e8df;
  --line: #06c755;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--cocoa);
  background: var(--cream);
  line-height: 1.8;
}

h1, h2, h3, .brand { font-family: "Zen Maru Gothic", "Noto Sans TC", sans-serif; font-weight: 700; }
h2 { font-size: 1.6rem; text-align: center; margin: 0 0 2rem; }
/* 標題下的小波浪＝淡水河 */
h2::after {
  content: ""; display: block; width: 3rem; height: .55rem; margin: .5rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 9'%3E%3Cpath d='M2 5 Q8 1 14 5 T26 5 T38 5 T50 5' fill='none' stroke='%23c98f78' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--milktea); outline-offset: 3px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1.25rem;
  background: rgba(250, 246, 241, .92);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: .4rem; text-decoration: none; font-size: 1.2rem; }
.brand small { margin-left: .5rem; font-size: .75rem; color: var(--tea-ink); letter-spacing: .1em; }
.topbar nav a { margin-left: 1.2rem; text-decoration: none; font-size: .95rem; }

main > section { max-width: 960px; margin: 0 auto; padding: 4.5rem 1.25rem; }

/* 首頁滿版，背景光暈才不會出現方框邊緣 */
.hero { text-align: center; padding-top: 3rem; max-width: none !important; }
/* logo.jpg 是白底，multiply 讓白底融進背景色 */
.hero-mark, footer img { mix-blend-mode: multiply; }
.hero-mark { display: block; width: min(320px, 80%); height: auto; margin: 0 auto 1rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.4; margin: 1rem 0; }
.lead { font-size: 1.05rem; margin-bottom: 2rem; }

.btn {
  display: inline-block;
  padding: .85rem 2.2rem;
  border-radius: 999px;
  background: var(--cocoa);
  color: var(--cream);
  text-decoration: none;
  transition: background .2s;
}
.btn:hover { background: var(--tea-ink); }
.note { font-size: .9rem; color: var(--tea-ink); text-align: center; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; padding: 0; list-style: none; }
.tags li { padding: .45rem 1.1rem; border-radius: 999px; background: var(--linen); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border-radius: 18px; padding: 1.5rem; }
.card h3 { margin: .5rem 0; }
.card p { margin: 0; font-size: .95rem; }
.card.featured { border: 1.5px solid var(--blush); }

.photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: linear-gradient(135deg, var(--linen), var(--blush)); margin-bottom: 1rem; }
.photo.skin { object-position: center 65%; }
.card .price { margin-top: .8rem; font-weight: 500; color: var(--tea-ink); }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.about h2 { text-align: left; }
.about h2::after { margin-left: 0; }
.about .photo { aspect-ratio: 3 / 4; margin: 0; }
.quote { font-family: "Zen Maru Gothic", sans-serif; font-size: 1.15rem; padding-left: 1rem; border-left: 3px solid var(--blush); }

.reviews { display: grid; gap: 1.2rem; }
.reviews blockquote { margin: 0; padding: 1.5rem 1.8rem; background: #fff; border-radius: 18px; }
.reviews p { margin: 0 0 .5rem; }
.reviews cite { font-style: normal; font-size: .85rem; color: var(--tea-ink); }
.reviews cite::before { content: "— "; }

.offers { background: var(--linen); border-radius: 24px; }
.offers ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 0; list-style: none; text-align: center; }
.offers strong { display: block; font-family: "Zen Maru Gothic", sans-serif; font-size: 1.8rem; color: var(--tea-ink); }

.booking { text-align: center; }
.booking dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; max-width: 520px; margin: 0 auto 2rem; text-align: left; }
.booking dt { font-weight: 500; color: var(--tea-ink); }
.booking dd { margin: 0; }
.qr { display: block; margin: 1.5rem auto .3rem; border-radius: 12px; }
.booking h3 { margin: 2.5rem 0 1rem; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; padding: 0; list-style: none; text-align: left; }
.rules li { padding: 1.3rem; background: #fff; border-radius: 18px; font-size: .95rem; }
.rules strong { display: block; font-family: "Zen Maru Gothic", sans-serif; margin-bottom: .3rem; }
.map { display: block; width: 100%; height: 320px; margin-top: 2.5rem; border: 0; border-radius: 18px; }

footer { text-align: center; padding: 3rem 1rem 6rem; font-size: .9rem; background: var(--linen); }
footer p { margin: .3rem 0; }

.float-line {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--line);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

/* ---- 質感細節 ---- */
.topbar { transition: box-shadow .3s; }
.past-hero .topbar { box-shadow: 0 1px 12px rgba(94, 74, 69, .08); }

.hero {
  background:
    radial-gradient(circle at 20% 30%, rgba(232, 180, 184, .28), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(192, 144, 122, .18), transparent 45%);
}
.hero-mark { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }

.card { position: relative; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(94, 74, 69, .1); }
.badge {
  position: absolute; top: 1rem; right: 1rem; z-index: 1;
  padding: .15rem .7rem; border-radius: 999px;
  background: var(--cocoa); color: var(--cream); font-size: .75rem;
}

.steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.2rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding: 1.4rem; background: #fff; border-radius: 18px; font-size: .95rem; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; margin-bottom: .6rem;
  border-radius: 50%; background: var(--blush); color: var(--cocoa);
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 700;
}
.steps strong { display: block; font-family: "Zen Maru Gothic", sans-serif; font-size: 1.1rem; }

footer img { display: block; margin: 0 auto .5rem; }

/* ---- 捲動帶入（無 JS 時內容照常顯示） ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }

.js .float-line { opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity .3s, transform .3s; }
.js .past-hero .float-line { opacity: 1; pointer-events: auto; transform: none; }

/* ---- 八里風景：觀音山、夕陽、淡水河 ---- */
.landscape { display: block; width: 100%; max-width: 720px; height: auto; margin: 3rem auto -4.5rem; }
.landscape .ridge { fill: none; stroke: var(--cocoa); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.landscape .wave { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.js .landscape .sun { animation: sunset 6s ease-in-out infinite alternate; }
@keyframes sunset { to { translate: 0 6px; } }

.bali { text-align: center; }
.bali .lead { max-width: 34rem; margin: 0 auto 2rem; }
.spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; padding: 0; list-style: none; text-align: left; }
.spots li { padding: 1.5rem; border-radius: 18px; background: #fff; }
.spots svg { width: 56px; height: 56px; margin-bottom: .6rem; border-radius: 50%; background: var(--mist); }
.spots svg * { fill: none; stroke: var(--cocoa); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.spots strong { display: block; font-family: "Zen Maru Gothic", sans-serif; font-size: 1.1rem; }
.spots p { margin: .3rem 0 0; font-size: .95rem; }

/* 頁尾上緣的山稜線 */
footer { position: relative; }
footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -39px; height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 L0 30 C60 26 100 14 150 12 C190 10 205 2 230 2 C255 2 262 12 285 13 C310 14 322 6 345 7 C380 9 410 22 460 26 C510 30 560 30 600 31 L600 40 Z' fill='%23f1e8df'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

/* ---- 常見問題 ---- */
.faq details { margin-bottom: .8rem; padding: 0 1.4rem; background: #fff; border-radius: 18px; }
.faq summary { padding: 1.1rem 0; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; color: var(--tea-ink); font-size: 1.3rem; line-height: 1.4; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1.2rem; }
.faq summary:focus-visible { outline: 2px solid var(--milktea); outline-offset: 3px; border-radius: 6px; }

/* ---- 價格頁／作品頁 ---- */
.topbar nav a[aria-current="page"] { color: var(--tea-ink); font-weight: 500; }
.page-head { text-align: center; padding-bottom: 1rem !important; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0; }

.price-groups { display: grid; gap: 1.5rem; }
.price-card { background: #fff; border-radius: 18px; padding: 1.6rem 1.8rem; }
.price-card h3 { margin: 0 0 .8rem; font-size: 1.25rem; }
.price-card ul { margin: 0; padding: 0; list-style: none; }
.price-card li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--linen); }
.price-card li:last-child { border-bottom: 0; }
.p-name small { margin-left: .6rem; font-size: .8rem; color: var(--tea-ink); }
.p-price { font-weight: 500; white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2rem; }
.filters button { padding: .45rem 1.2rem; border: 1.5px solid var(--linen); border-radius: 999px; background: #fff; color: var(--cocoa); font: inherit; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.works-grid figure { margin: 0; background: #fff; border-radius: 18px; overflow: hidden; }
.works-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.works-grid figcaption { padding: .8rem 1rem; font-size: .9rem; }
.works-grid figcaption span { display: inline-block; margin-right: .5rem; padding: 0 .6rem; border-radius: 999px; background: var(--linen); font-size: .8rem; }

/* ---- 後台 ---- */
.admin main { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 7rem; }
.admin h2 { text-align: left; }
.admin h2::after { margin-left: 0; }
.admin input { padding: .5rem .7rem; border: 1px solid #ddd0c6; border-radius: 10px; font: inherit; color: var(--cocoa); background: #fff; min-width: 0; }
.admin input:focus-visible, .admin button:focus-visible, .admin label:focus-within { outline: 2px solid var(--milktea); outline-offset: 2px; }
.admin button { font: inherit; cursor: pointer; border: 0; }
#login-form { display: grid; gap: .8rem; max-width: 320px; }
.admin fieldset { margin: 0 0 1.2rem; padding: 1rem 1.2rem; border: 0; border-radius: 18px; background: #fff; }
.admin legend { display: flex; gap: .6rem; float: left; width: 100%; margin-bottom: .6rem; }
.admin legend input { flex: 1; font-weight: 700; }
.admin .row { clear: both; display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: .5rem; margin-bottom: .5rem; }
.ghost { display: inline-block; padding: .45rem 1rem; border-radius: 999px; background: var(--linen); color: var(--cocoa); cursor: pointer; }
.x { width: 2.4rem; border-radius: 10px; background: var(--linen); color: var(--cocoa); }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.hint { font-size: .85rem; color: var(--tea-ink); }
.admin-works figcaption { display: grid; gap: .4rem; }
.save-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: .8rem 1.25rem; background: rgba(250, 246, 241, .95); box-shadow: 0 -1px 12px rgba(94, 74, 69, .08); }
.msg { margin: 0; font-size: .9rem; color: var(--tea-ink); }

@media (max-width: 640px) {
  .admin .row { grid-template-columns: 1fr 1fr; }
  .topbar nav a { margin-left: .8rem; }
  .brand small { display: none; }
  .about { grid-template-columns: 1fr; }
  .about .photo { aspect-ratio: 4 / 3; }
  .float-line { left: 1rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark, .js .landscape .sun { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
