:root {
  --ink: #3f3b2f;
  --muted: #77715f;
  --line: #ddd2bd;
  --paper: #fbf6ea;
  --paper-deep: #f0e7d5;
  --olive: #526c2f;
  --olive-dark: #31451f;
  --gold: #a98947;
  --white: #fffdf8;
  --shadow: 0 22px 55px rgba(70, 62, 40, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 18%, rgba(154, 137, 82, .1), transparent 24rem),
    radial-gradient(circle at 90% 78%, rgba(82, 108, 47, .1), transparent 22rem),
    linear-gradient(180deg, #fffaf0 0%, var(--paper) 48%, #f6efdf 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 5vw, 86px);
  background: rgba(255, 250, 240, .88);
  border-bottom: 1px solid rgba(221, 210, 189, .72);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.brand span {
  color: var(--olive-dark);
  font: 700 28px "Noto Serif TC", serif;
  letter-spacing: .04em;
  white-space: nowrap;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}
.main-nav a {
  position: relative;
  padding: 10px 0;
}
.main-nav a::after {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  content: "";
  background: var(--olive);
  transform: translateX(-50%);
  transition: width .2s ease;
}
.main-nav a:hover::after { width: 100%; }
.hero {
  position: relative;
  min-height: 670px;
  display: grid;
  grid-template-columns: minmax(300px, 560px) minmax(280px, 420px);
  align-items: center;
  justify-content: space-between;
  gap: 46px;
  padding: 74px clamp(22px, 7vw, 124px) 92px;
  overflow: hidden;
}
.hero::before {
  position: absolute;
  inset: 0 0 94px 30%;
  content: "";
  background: linear-gradient(90deg, rgba(255,250,240,.96), rgba(255,250,240,.38) 27%, rgba(255,250,240,.18)), url("../images/hero-coast.png") center / cover;
  clip-path: ellipse(82% 61% at 58% 38%);
  filter: saturate(.82) sepia(.12);
}
.hero::after {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 34px;
  height: 130px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(251,246,234,.92) 60%, var(--paper));
}
.hero-copy,
.search-panel { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 12px;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: .08em;
}
h1 {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 1.12;
  font-weight: 700;
}
.lead {
  max-width: 450px;
  margin: 28px 0 0;
  color: #59523f;
  font-size: 18px;
  line-height: 2;
}

.search-panel {
  padding: 28px;
  border: 1px solid rgba(221, 210, 189, .92);
  border-radius: 18px;
  background: rgba(255, 253, 248, .9);
  box-shadow: var(--shadow);
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-title h2 {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: 28px;
}
.panel-title i { color: var(--gold); font-size: 24px; }
label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
select,
input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.primary-btn {
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #6d853f, #405a25);
  box-shadow: 0 10px 20px rgba(64, 90, 37, .22);
  font: 700 16px "Noto Sans TC", sans-serif;
  cursor: pointer;
}
.primary-btn:hover { filter: brightness(1.04); }
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.quick-tags a { color: var(--olive-dark); font-weight: 700; }

section {
  padding: 42px clamp(18px, 6vw, 98px);
}
.section-heading {
  margin: 0 auto 28px;
  text-align: center;
}
.section-heading p {
  margin: 0 0 6px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .16em;
}
.section-heading h2 {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(26px, 3vw, 40px);
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}
.intent-grid button {
  min-height: 132px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 253, 248, .72);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.intent-grid button:hover {
  border-color: #b9a979;
  box-shadow: 0 14px 30px rgba(91, 76, 45, .11);
  transform: translateY(-3px);
}
.intent-grid i {
  display: block;
  margin-bottom: 14px;
  color: var(--olive);
  font-size: 34px;
}
.intent-grid span {
  display: block;
  font: 700 18px "Noto Serif TC", serif;
}
.intent-grid small { color: var(--muted); }

.district-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}
.district-notes {
  display: grid;
  gap: 14px;
}
.district-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: rgba(248, 241, 224, .72);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}
.district-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(255,253,248,.8) 0%, rgba(255,253,248,.5) 42%, rgba(248,241,224,.15) 100%);
}
.district-card strong,
.district-card span {
  position: relative;
  z-index: 1;
}
.district-north {
  background-image: url("../images/district-north.png");
}
.district-central {
  background-image: url("../images/district-central.png");
}
.district-south {
  background-image: url("../images/district-south.png");
}
.district-notes strong {
  display: block;
  margin-bottom: 8px;
  color: var(--olive-dark);
  font: 700 30px "Noto Serif TC", serif;
}
.district-notes span { color: var(--muted); line-height: 1.7; }
.town-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.town-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, .82);
  transition: transform .2s ease, box-shadow .2s ease;
}
.town-card:hover {
  box-shadow: 0 18px 36px rgba(70, 62, 40, .13);
  transform: translateY(-4px);
}
.town-card:focus-visible {
  outline: 3px solid rgba(82, 108, 47, .35);
  outline-offset: 4px;
}
.town-card.is-dimmed { opacity: .32; }
.town-card img {
  width: 100%;
  aspect-ratio: 16 / 7.4;
  object-fit: cover;
  object-position: center;
  background: #e9dfc8;
  filter: saturate(.92) contrast(.98);
}
.town-body { padding: 16px 18px 18px; }
.town-body h3 {
  margin: 0;
  font: 700 24px "Noto Serif TC", serif;
}
.roman {
  margin: 2px 0 10px;
  color: #8b826f;
  font-size: 12px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chips span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #6d6249;
  background: #eee5d0;
  font-size: 12px;
}
.town-link {
  color: var(--olive-dark);
  font-weight: 700;
  font-size: 14px;
}

.transport,
.themes,
.faq { max-width: 1280px; margin: 0 auto; }
.route-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  align-items: stretch;
  position: relative;
}
.route-line::before {
  position: absolute;
  top: 28px;
  left: 8%;
  right: 8%;
  height: 2px;
  content: "";
  background: #b9aa81;
}
.route-line a {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, .9);
  text-align: center;
}
.route-line span {
  display: block;
  margin-bottom: 8px;
  font: 700 20px "Noto Serif TC", serif;
}
.route-line small { color: var(--muted); }
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.theme-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 18px 30px rgba(58, 50, 31, .15);
}
.theme-card img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  object-position: center;
  filter: saturate(.88) brightness(.72);
}
.theme-card span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #fff;
  font: 700 25px "Noto Serif TC", serif;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  max-width: 920px;
  margin: 0 auto;
}
details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, .76);
}
summary {
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
}
details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  line-height: 1.8;
}

.footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.7fr);
  gap: clamp(28px, 5vw, 68px);
  margin-top: 48px;
  padding: 54px clamp(22px, 7vw, 116px);
  background:
    linear-gradient(180deg, rgba(251,246,234,.94) 0%, rgba(240,231,213,.88) 48%, rgba(231,223,203,.78) 100%),
    url("../images/footer-landscape.png") center bottom / cover no-repeat,
    var(--paper-deep);
}
.footer > * {
  position: relative;
  z-index: 1;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.footer-logo img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
.footer-logo span {
  color: var(--olive-dark);
  font: 700 32px "Noto Serif TC", serif;
  letter-spacing: .05em;
  white-space: nowrap;
}
.footer h2,
.footer h3,
.footer p { margin: 0; }
.footer h2 {
  margin-bottom: 12px;
  color: var(--olive-dark);
  font: 700 28px "Noto Serif TC", serif;
}
.footer h3 {
  margin-bottom: 14px;
  color: var(--olive-dark);
  font: 700 18px "Noto Serif TC", serif;
}
.footer p,
.footer a,
.footer span,
.footer strong {
  color: #625c4d;
  line-height: 1.9;
}
.footer-kicker {
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer-brand p[itemprop="description"] {
  max-width: 420px;
  margin-bottom: 18px;
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid #b9aa81;
  border-radius: 999px;
  color: var(--olive-dark);
  background: rgba(255,253,248,.56);
  font-weight: 700;
}
.footer-actions a:hover { background: rgba(255,253,248,.9); }
.footer-columns {
  display: grid;
  grid-template-columns: .72fr 1.35fr .95fr;
  gap: clamp(22px, 3vw, 40px);
}
.footer-group {
  display: grid;
  align-content: start;
  gap: 7px;
  font-style: normal;
}
.footer-group a:hover { color: var(--olive-dark); text-decoration: underline; }
.footer-town-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
}
.footer-town-links h3 { grid-column: 1 / -1; }
.footer-town-links div {
  display: grid;
  align-content: start;
  gap: 5px;
}
.footer-town-links strong {
  color: var(--gold);
  font-weight: 700;
}
.footer-contact a,
.footer-contact span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.footer i {
  width: 18px;
  padding-top: 6px;
  color: var(--olive);
}
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 26px;
  border-top: 1px solid rgba(137, 122, 88, .25);
  font-size: 13px;
}
.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--olive);
  box-shadow: 0 10px 26px rgba(49, 69, 31, .24);
  cursor: pointer;
}
.back-top:hover { filter: brightness(1.06); }

@media (max-width: 980px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 48px; }
  .hero::before { inset: 180px 0 0 0; clip-path: ellipse(95% 48% at 60% 38%); opacity: .7; }
  .search-panel { max-width: 520px; }
  .intent-grid { grid-template-columns: repeat(3, 1fr); }
  .district-layout { grid-template-columns: 1fr; }
  .district-notes { grid-template-columns: repeat(3, 1fr); }
  .town-grid { grid-template-columns: repeat(2, 1fr); }
  .route-line,
  .theme-grid,
  .footer,
  .footer-columns { grid-template-columns: 1fr; }
  .footer-town-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-header { gap: 14px; }
  .brand { gap: 9px; }
  .brand img {
    width: 44px;
    height: 44px;
  }
  .brand span { font-size: 22px; }
  .footer-logo img {
    width: 62px;
    height: 62px;
  }
  .footer-logo span { font-size: 28px; }
  .hero { padding-inline: 18px; }
  .field-row,
  .intent-grid,
  .district-notes,
  .town-grid,
  .route-line,
  .theme-grid,
  .faq-list,
  .footer,
  .footer-columns,
  .footer-town-links { grid-template-columns: 1fr; }
  .route-line::before { display: none; }
  section { padding-inline: 18px; }
  .footer-bottom { display: grid; }
}
