:root {
  color-scheme: light;
  --ink: #111715;
  --muted: #66706b;
  --paper: #f4f3ed;
  --surface: #ffffff;
  --line: #d8dcd7;
  --green: #176c55;
  --green-dark: #0d493a;
  --coral: #d35f42;
  --yellow: #f2c14e;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(17, 23, 21, 0.12);
  --content: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.site-header {
  position: relative;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: var(--content);
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand span {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: #e8efeb;
  color: var(--green-dark);
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 78px));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background-color: #26332f;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(8, 19, 15, 0.58);
}

.hero-content {
  width: var(--content);
  margin: 0 auto;
  padding: 120px 0 110px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-content > p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.1rem;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
}

.button-primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #211b0e;
}

.button-ghost {
  background: rgba(8, 19, 15, 0.24);
  color: #fff;
  backdrop-filter: blur(8px);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.hero-caption {
  position: absolute;
  right: max(20px, calc((100% - 1180px) / 2));
  bottom: 28px;
  max-width: 320px;
  padding-left: 14px;
  border-left: 3px solid var(--yellow);
  color: #fff;
}

.hero-caption span,
.hero-caption strong {
  display: block;
}

.hero-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.content-section {
  width: var(--content);
  margin: 0 auto;
}

.intro-strip {
  margin-top: -28px;
  position: relative;
  z-index: 3;
  min-height: 112px;
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  align-items: center;
  gap: 30px;
  padding: 22px 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-strip div {
  min-width: 92px;
}

.intro-strip strong,
.intro-strip span {
  display: block;
}

.intro-strip strong {
  color: var(--green);
  font-size: 1.7rem;
  line-height: 1;
}

.intro-strip span,
.intro-strip p {
  color: var(--muted);
  font-size: 0.86rem;
}

.intro-strip p {
  margin: 0 0 0 auto;
  max-width: 430px;
}

.section-heading {
  padding: 88px 0 28px;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 420px);
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
}

.featured-grid {
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1.25fr 0.875fr 0.875fr;
  gap: 16px;
}

.featured-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #cad1cc;
  color: #fff;
  text-decoration: none;
}

.featured-card:first-child {
  min-height: 520px;
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.image-shade {
  position: absolute;
  inset: 38% 0 0;
  background: rgba(8, 19, 15, 0.62);
}

.featured-copy {
  position: absolute;
  inset: auto 22px 22px;
  display: grid;
  gap: 6px;
}

.featured-copy small {
  color: var(--yellow);
  font-weight: 800;
}

.featured-copy strong {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.featured-copy > span {
  font-size: 0.88rem;
  font-weight: 800;
}

.featured-card:hover img,
.featured-card:focus-visible img {
  transform: scale(1.04);
}

.image-unavailable {
  position: relative;
  background: #dfe3df;
}

.image-unavailable::before {
  content: "圖片暫時無法顯示";
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.featured-card.image-unavailable::before,
.story-card.image-unavailable::before {
  color: #fff;
}

.latest-grid {
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.latest-card {
  min-height: 156px;
  display: grid;
  grid-template-columns: 132px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}

.latest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-card.image-unavailable::before {
  width: 132px;
  right: auto;
}

.latest-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
}

.card-label {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
}

.latest-card strong {
  margin-top: 8px;
  line-height: 1.35;
}

.latest-card small {
  margin-top: auto;
  color: var(--muted);
}

.latest-card:hover,
.latest-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(17, 23, 21, 0.09);
}

.story-band {
  margin-top: 92px;
  padding-bottom: 80px;
  background: var(--ink);
  color: #fff;
}

.section-heading-light {
  border-color: rgba(255, 255, 255, 0.18);
}

.section-heading-light > p {
  color: rgba(255, 255, 255, 0.64);
}

.story-grid {
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.story-card {
  min-height: 470px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #27322f;
  color: #fff;
  text-decoration: none;
}

.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.story-card > span {
  position: absolute;
  inset: auto 20px 20px;
  padding: 18px;
  border-left: 3px solid var(--yellow);
  background: rgba(8, 19, 15, 0.82);
}

.story-card small,
.story-card strong,
.story-card em {
  display: block;
}

.story-card small {
  color: var(--yellow);
}

.story-card strong {
  margin-top: 7px;
  font-size: 1.28rem;
  line-height: 1.35;
}

.story-card em {
  margin-top: 14px;
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
}

.story-card:hover img,
.story-card:focus-visible img {
  opacity: 0.92;
  transform: scale(1.035);
}

.gallery-section {
  padding-bottom: 90px;
}

.filter-row {
  padding: 22px 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-button {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery-card[hidden] {
  display: none;
}

.gallery-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #dfe3df;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-image > span {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 4px;
  background: rgba(17, 23, 21, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.gallery-card-body {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.gallery-card-body > small {
  color: var(--coral);
  font-weight: 900;
}

.gallery-card h3 {
  margin: 7px 0 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.gallery-card h3 a {
  text-decoration: none;
}

.gallery-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.gallery-meta {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.gallery-meta a {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.gallery-card:hover,
.gallery-card:focus-within {
  border-color: #9ab9ad;
  box-shadow: var(--shadow);
}

.gallery-card:hover .gallery-image img,
.gallery-card:focus-within .gallery-image img {
  transform: scale(1.035);
}

.empty-state {
  padding: 44px 20px;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--muted);
}

.site-footer {
  background: #e1e5e0;
  border-top: 1px solid #c9cec9;
}

.footer-inner {
  width: var(--content);
  min-height: 180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 20px 40px;
}

.footer-inner p {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--green-dark);
  font-weight: 800;
}

.visitor-count {
  grid-column: 1 / -1;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .menu-toggle {
    width: 44px;
    height: 44px;
    margin-left: auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
  }

  .menu-toggle::before,
  .menu-toggle::after,
  .menu-toggle > span:first-child {
    content: "";
    width: 20px;
    height: 2px;
    position: absolute;
    background: var(--ink);
  }

  .menu-toggle::before {
    transform: translateY(-6px);
  }

  .menu-toggle::after {
    transform: translateY(6px);
  }

  .menu-toggle[aria-expanded="true"] > span:first-child {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"]::before {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"]::after {
    transform: rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    display: none;
    padding: 14px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav a {
    padding: 11px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-card:first-child {
    grid-column: 1 / -1;
    min-height: 480px;
  }

  .latest-grid,
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --content: min(100% - 28px, 1180px);
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    padding: 96px 0 126px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .hero-content > p:not(.eyebrow) {
    font-size: 1rem;
  }

  .hero-caption {
    left: 14px;
    right: 14px;
    bottom: 22px;
  }

  .intro-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    text-align: center;
  }

  .intro-strip p {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 13px;
    border-top: 1px solid var(--line);
  }

  .section-heading {
    padding-top: 68px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .featured-grid,
  .latest-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .featured-card,
  .featured-card:first-child {
    grid-column: auto;
    min-height: 400px;
  }

  .story-card {
    min-height: 430px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card-body {
    min-height: 270px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 42px 0;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .visitor-count {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .header-inner {
    min-height: 70px;
  }

  .brand strong {
    font-size: 0.94rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    top: 70px;
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 610px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .intro-strip strong {
    font-size: 1.35rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-image {
    aspect-ratio: 16 / 11;
  }

  .gallery-card-body {
    min-height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
