﻿:root {
  --cream: #FFF9EF;   /* 奶油白 */
  --sea: #6FAFC1;     /* 天空藍 */
  --sea-dark: #244B5A; /* 海軍藍 */
  --gray: #244B5A;    /* 海軍藍 */
  --brown: #C98268;   /* 珊瑚棕 */
  --card-shadow: 0 4px 18px rgba(36, 75, 90, 0.08);
  --bg: var(--cream);
  --fg: var(--gray);
  --card-bg: #fff;
  --nav-bg: rgba(255, 249, 239, 0.85);
}
[data-theme="dark"] {
  --bg: #1c313b;
  --fg: #f2ece2;
  --card-bg: #24404d;
  --nav-bg: rgba(28, 49, 59, 0.85);
  --card-shadow: 0 4px 18px rgba(0,0,0,0.3);
  --sea-dark: #f2ece2;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.85;
  letter-spacing: 0.02em;
  transition: background 0.3s ease, color 0.3s ease;
}
h1, h2, h3, .nav .logo { font-family: "Noto Serif TC", serif; }
.tagline { font-family: "Playfair Display", serif; }
.sec-no { font-family: "ZCOOL KuaiLe", cursive; }

::selection { background: var(--sea); color: #fff; }

/* 導覽列 */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: nowrap;
  padding: 0.75rem 1.25rem;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(36, 75, 90, 0.08);
}
.nav .logo { font-weight: 700; color: var(--sea-dark); text-decoration: none; letter-spacing: 0.05em; }
.nav .links { display: flex; gap: 0.9rem; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav .links::-webkit-scrollbar { display: none; }
.nav .links a { flex-shrink: 0; }
.nav .links a { color: var(--sea-dark); text-decoration: none; font-size: 0.75rem; opacity: 0.75; }
.nav .links a:hover { opacity: 1; color: var(--brown); }

/* Hero */
.hero { position: relative; text-align: left; color: #fff; }
.hero-img { width: 100%; height: 70vh; object-fit: cover; object-position: center 40%; display: block; animation: kenburns 14s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12); } }
.hero-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; text-align: left;
  padding: 0 1.5rem;
  background: linear-gradient(90deg, rgba(36, 75, 90, 0.55) 0%, rgba(36, 75, 90, 0.25) 60%, transparent 100%);
}
.hero-text h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem); letter-spacing: 0.04em; line-height: 1.25;
  font-weight: 700;
  animation: rise 0.9s ease backwards;
}
.tagline { animation: rise 1.1s ease backwards; }
.hero-sub { animation: rise 1.3s ease backwards; }
.hero-text .btn { animation: rise 1.5s ease backwards; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.kicker { letter-spacing: 0.3em; font-size: 0.85rem; }
.tagline { margin-top: 0.75rem; font-size: 1rem; opacity: 0.92; font-style: italic; }
.hero-sub { margin: 1rem 0 1.5rem; font-size: 0.95rem; max-width: 34rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.8rem; border-radius: 999px;
  background: var(--sea); color: #fff; text-decoration: none; border: none;
  font-size: 0.95rem; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { background: var(--brown); transform: translateY(-2px); }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.avatar {
  position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--cream); box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transform: rotate(-4deg);
}
@media (min-width: 640px) {
  .avatar { width: 127px; height: 127px; }
  .hero-img { height: 85vh; }
}

main { max-width: 760px; margin: 0 auto; padding: 3rem 1.25rem; }
section { margin-bottom: 4rem; scroll-margin-top: 4rem; }
h2 {
  color: var(--sea-dark); font-size: 1.5rem; margin-bottom: 1.25rem; letter-spacing: 0.05em;
  border-left: 4px solid var(--brown); padding-left: 0.75rem;
}
section img { width: 100%; border-radius: 16px; margin-bottom: 1.25rem; box-shadow: var(--card-shadow); transition: transform 0.4s ease, filter 0.4s ease; }
section img:hover { transform: scale(1.02); filter: saturate(1.1) brightness(1.03); }
section p { margin-bottom: 1rem; }
.sec-no { color: var(--brown); letter-spacing: 0.2em; font-size: 0.78rem; margin-bottom: 0.4rem; }
.sec-no { font-size: clamp(0.9rem, 2vw, 1.1rem); }

.world-block { margin-bottom: 2.5rem; }
.world-block h3 { color: var(--sea-dark); margin-bottom: 0.75rem; font-size: 1.15rem; }
blockquote {
  border-left: 4px solid var(--sea); padding: 0.75rem 1.25rem; margin: 1rem 0;
  background: var(--card-bg); border-radius: 0 12px 12px 0; font-size: 1.25rem; color: var(--sea-dark);
  box-shadow: var(--card-shadow);
}

/* 手機版字級縮小 */
@media (max-width: 640px) {
  section p { font-size: 0.88rem; line-height: 1.7; }
  h2 { font-size: 0.95rem; }
  h3, .world-block h3 { font-size: 0.82rem; }
  .card p, .card h3 { font-size: 0.7rem; }
  .gallery figcaption { font-size: 0.6rem; }
  blockquote { font-size: 0.85rem; }
  .currently-list li, .check-list li { font-size: 0.7rem; }
  .sec-no { font-size: 0.62rem; }
  .hero-text h1 { font-size: 1.2rem; }
  .hero-sub { font-size: 0.72rem; }
  main { padding: 1.25rem 0.8rem; }
  section { margin-bottom: 1.75rem; }
}

.cards { display: grid; gap: 1rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card-bg); border-radius: 16px; padding: 1.1rem;
  box-shadow: var(--card-shadow); transition: transform 0.2s ease;
}
.card:nth-child(1) { transform: rotate(-1deg); }
.card:nth-child(2) { transform: rotate(1deg); }
.card:nth-child(3) { transform: rotate(-0.5deg); }
.card:hover { transform: translateY(-4px) rotate(0deg); }
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card h3 { color: var(--sea-dark); margin-bottom: 0.25rem; }
.card em { color: var(--brown); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { text-align: center; overflow: hidden; border-radius: 14px; transition: transform 0.3s ease; }
.gallery figure:nth-child(odd) { transform: rotate(-1.5deg); }
.gallery figure:nth-child(even) { transform: rotate(1.5deg); }
.gallery figure:hover { transform: rotate(0deg) scale(1.03); z-index: 1; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; transition: transform 0.4s ease; }
.gallery img:hover { transform: scale(1.05); }
.gallery figcaption { font-size: 0.8rem; color: var(--brown); margin-top: 0.4rem; line-height: 1.5; }

.currently-list, .check-list { list-style: none; }
.currently-list li, .check-list li { padding: 0.55rem 0; border-bottom: 1px solid rgba(36, 75, 90, 0.1); }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }

.big { font-size: 1.15rem; color: var(--sea-dark); font-weight: 600; margin-top: 1rem; }

form label { display: block; margin-bottom: 1rem; color: var(--sea-dark); font-weight: 600; }
input, textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid rgba(36, 75, 90, 0.2); border-radius: 10px;
  background: var(--card-bg); font: inherit; color: var(--fg); margin-top: 0.3rem;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--sea); }
button {
  background: var(--sea); color: #fff; border: none; border-radius: 999px;
  padding: 0.75rem 2.5rem; font-size: 1rem; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
button:hover { background: var(--brown); transform: translateY(-2px); }
.hp { position: absolute; left: -9999px; } /* honeypot 隱藏 */
#form-msg { margin-top: 1rem; color: var(--brown); }

footer {
  background: var(--gray); color: var(--cream); text-align: center;
  padding: 2.5rem 1rem; margin-top: 2rem;
}
footer a { color: #fff; text-decoration-color: var(--sea); }
.muted { opacity: 0.6; font-size: 0.85rem; margin-top: 0.5rem; }

/* 暗色模式按鈕 */
#theme-toggle {
  background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0;
  transform: none;
}
#theme-toggle:hover { background: none; transform: none; }

/* 滾動進場動畫 */
/* Hero Ken Burns 緩慢推近 */
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12); } }

/* 跑馬燈 */
.ticker { overflow: hidden; background: #244B5A; color: var(--cream); padding: 0.6rem 0; font-family: "ZCOOL KuaiLe", cursive; }
.ticker-track { display: inline-block; white-space: nowrap; animation: ticker 20s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 點擊愛心氣泡 */
.bubble { position: fixed; pointer-events: none; font-size: 1.4rem; animation: floaty 1.2s ease-out forwards; z-index: 999; }
@keyframes floaty { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-80px) scale(1.5); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
