:root {
  --cream: #fff8e8;
  --cream-strong: #fff0c7;
  --yellow: #ffd85a;
  --orange: #f39b45;
  --sky: #8dd7f7;
  --blue: #3f88a8;
  --brown: #9a7357;
  --ink: #27323a;
  --muted: #68727c;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(118, 86, 48, 0.14);
  --soft-shadow: 0 10px 28px rgba(118, 86, 48, 0.11);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", Arial, sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 216, 90, 0.32), transparent 28rem),
    radial-gradient(circle at 92% 16%, rgba(141, 215, 247, 0.28), transparent 30rem),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 46%, #fff8e8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(154, 115, 87, 0.12);
  background: rgba(255, 248, 232, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 50%;
  color: #5c3b17;
  background: linear-gradient(145deg, var(--yellow), #fff1a8);
  box-shadow: var(--soft-shadow);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.site-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: #60442e;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255, 216, 90, 0.36);
  transform: translateY(-1px);
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.hero {
  display: grid;
  min-height: calc(100vh - 74px);
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.22rem;
  line-height: 1.35;
}

.hero-subtitle {
  display: inline-flex;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.3rem;
  color: #6d421c;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  background: rgba(255, 216, 90, 0.48);
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

.btn.primary {
  color: #4c2d0f;
  background: linear-gradient(135deg, var(--yellow), #ffe88d);
}

.btn.secondary {
  color: #355061;
  background: rgba(141, 215, 247, 0.28);
}

.hero-card {
  position: relative;
  min-height: 430px;
  border-radius: 50px;
  overflow: hidden;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  border-radius: 42px;
  object-fit: contain;
  background: #fff;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading.center,
.elements-section .section-heading,
.perma-section .section-heading,
.passport-section .section-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading p:last-child {
  color: var(--muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.intro-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card,
.perma-card,
.element-card,
.passport-feature {
  border: 1px solid rgba(154, 115, 87, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
}

.content-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.content-card.large {
  grid-column: span 1;
  background: linear-gradient(145deg, #ffffff, #fff1cc);
}

.content-card p,
.perma-card p,
.element-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.card-icon {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 1rem;
  color: #613b12;
  font-weight: 900;
  background: var(--yellow);
}

.perma-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1rem;
}

.perma-card {
  padding: 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.perma-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.perma-card span {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 1rem;
  color: #5a3512;
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--yellow), #fff1ad);
}

.elements-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.element-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  padding: 1.65rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.element-card::after {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  background: rgba(255, 216, 90, 0.34);
  content: "";
}

.element-card:hover {
  border-color: rgba(243, 155, 69, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.element-card h3 {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #5d3714;
  background: linear-gradient(135deg, #fff2a8, var(--yellow));
}

.passport-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 241, 204, 0.76));
}

.passport-copy {
  align-self: center;
}

.passport-copy p {
  color: var(--muted);
}

.passport-points {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.passport-points li {
  position: relative;
  padding-left: 1.35rem;
  color: #60442e;
  font-weight: 700;
}

.passport-points li::before {
  position: absolute;
  top: 0.72rem;
  left: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.passport-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.image-frame {
  position: relative;
  display: grid;
  min-height: 155px;
  overflow: hidden;
  place-items: center;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff0c7, #dff5ff);
}

.image-frame img {
  width: 100%;
  height: 100%;
  min-height: 155px;
  object-fit: cover;
}

.zoomable-image {
  cursor: zoom-in;
}

.zoomable-image.is-missing {
  display: none;
}

.image-frame img.is-missing {
  display: none;
}

.image-frame.has-missing {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 1rem;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(39, 50, 58, 0.46);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 32px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(35, 25, 12, 0.26);
  animation: modalIn 0.22s ease both;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5a3512;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  background: var(--yellow);
}

.modal-header {
  margin-bottom: 1.4rem;
  padding-right: 3rem;
}

.modal-header p:last-child {
  color: var(--muted);
}

.activity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.activity-tab {
  border: 1px solid rgba(154, 115, 87, 0.16);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: #5f432f;
  font-weight: 800;
  cursor: pointer;
  background: #fff6dd;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.activity-tab:hover,
.activity-tab.is-active {
  color: #4c2d0f;
  background: var(--yellow);
  transform: translateY(-1px);
}

.activity-title {
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.gallery-grid .image-frame {
  min-height: 185px;
  margin-bottom: 0;
}

.gallery-grid .image-frame img {
  min-height: 185px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(24, 28, 31, 0.82);
  backdrop-filter: blur(10px);
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 88vh;
  border-radius: 22px;
  object-fit: contain;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5a3512;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  background: var(--yellow);
}

.site-footer {
  padding: 2rem 1rem;
  color: #60442e;
  text-align: center;
  background: #ffe8aa;
}

.site-footer p {
  margin-bottom: 0.25rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open,
body.lightbox-open {
  overflow: hidden;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 360px;
  }

  .hero-image-card img {
    min-height: 340px;
  }

  .perma-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .passport-feature {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .intro-grid,
  .elements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid,
  .passport-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-nav a {
    padding: 0.35rem 0.65rem;
    font-size: 0.86rem;
  }

  .section {
    width: min(100% - 1rem, 1180px);
    padding: 3.5rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 2.4rem;
  }

  .hero-actions,
  .btn {
    width: 100%;
  }

  .hero-card {
    min-height: 310px;
    border-radius: 32px;
  }

  .hero-image-card img {
    min-height: 290px;
    border-radius: 26px;
  }

  .intro-grid,
  .perma-grid,
  .elements-grid,
  .passport-gallery {
    grid-template-columns: 1fr;
  }

  .element-card {
    min-height: auto;
  }

  .modal {
    padding: 0.5rem;
  }

  .modal-panel {
    max-height: 92vh;
    border-radius: 24px;
  }

  .modal-header {
    padding-right: 0;
  }

  .activity-tab {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
