:root {
  --paper: #f7f3eb;
  --ink: #29322d;
  --muted: #6c756f;
  --green: #355c4a;
  --sage: #cdd8c7;
  --peach: #e6b397;
  --line: rgba(41, 50, 45, .15);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a { color: inherit; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(24px, 5vw, 78px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  border-radius: 50% 50% 46% 54%;
  font-size: 16px;
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  position: relative;
  font-size: 14px;
  text-decoration: none;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transition: transform .25s ease;
}

nav a:hover::after { transform: scaleX(1); }

.hero {
  min-height: 790px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  gap: clamp(35px, 6vw, 100px);
  padding: 130px clamp(24px, 7vw, 108px) 70px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1, h2 {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  line-height: 1.38;
}

h1 {
  max-width: 560px;
  font-size: clamp(44px, 5.1vw, 76px);
  letter-spacing: -.04em;
}

h1 em {
  color: var(--green);
  font-style: normal;
}

.hero-text {
  max-width: 470px;
  margin: 28px 0 32px;
  color: var(--muted);
  font-size: 16px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 13px 20px 13px 24px;
  color: white;
  background: var(--green);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.primary-button:hover {
  background: #274838;
  transform: translateY(-2px);
}

.primary-button span { font-size: 18px; }

.hero-collage {
  position: relative;
  min-height: 570px;
}

.hero-photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(38, 49, 42, .14);
}

.hero-photo-main {
  top: 0;
  right: 8%;
  width: 73%;
  height: 86%;
  border-radius: 48% 48% 9px 9px;
}

.hero-photo-small {
  bottom: 0;
  left: 0;
  width: 39%;
  height: 42%;
  border: 9px solid var(--paper);
  border-radius: 6px;
  transform: rotate(-4deg);
}

.hero-note {
  position: absolute;
  right: 0;
  bottom: 3%;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--peach);
  font-family: "Noto Serif TC", serif;
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  transform: rotate(7deg);
}

.intro-strip {
  display: flex;
  justify-content: space-between;
  padding: 23px clamp(24px, 7vw, 108px);
  color: #e9eee9;
  background: var(--green);
  font-size: 13px;
  letter-spacing: .05em;
}

.intro-strip p { margin: 0; }
.intro-strip strong { color: white; }
.intro-message { font-family: "Noto Serif TC", serif; }

.photo-section {
  padding: 100px clamp(24px, 7vw, 108px) 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

h2 { font-size: clamp(34px, 4vw, 50px); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.filter-button:hover,
.filter-button.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.photo-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 250px;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.photo-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  color: white;
  background: #d9dfd5;
  cursor: zoom-in;
  text-align: left;
}

.photo-card.tall { grid-row: span 2; }
.photo-card.wide { grid-column: span 2; }

.photo-card img {
  transition: transform .7s cubic-bezier(.2,.75,.2,1), filter .4s ease;
}

.photo-card:hover img {
  filter: brightness(.78);
  transform: scale(1.045);
}

.photo-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 55px 20px 18px;
  background: linear-gradient(transparent, rgba(20, 28, 23, .72));
  opacity: 0;
  transform: translateY(8px);
  transition: .3s ease;
}

.photo-card:hover .photo-caption,
.photo-card:focus-visible .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.photo-caption strong { font-size: 15px; }
.photo-caption small { white-space: nowrap; opacity: .8; }
.photo-card.is-hidden { display: none; }

.life-section {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 620px;
  background: #e7dfd2;
}

.life-photo { min-height: 540px; }

.life-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px clamp(35px, 7vw, 100px);
}

.life-note h2 { margin-bottom: 25px; }
.life-note > p:not(.eyebrow):not(.signature) { color: #5f6862; }

.signature {
  margin-top: 22px;
  color: var(--green);
  font-family: "Noto Serif TC", serif;
  font-size: 19px;
}

.signature span { font-size: 14px; }

.about-section {
  max-width: 850px;
  margin: 0 auto;
  padding: 125px 30px;
  text-align: center;
}

.about-section h2 { margin-bottom: 24px; }

.about-section > p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 auto 27px;
  color: var(--muted);
}

.text-link {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 6px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px clamp(24px, 7vw, 108px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 52px 24px 28px;
  background: rgba(14, 19, 16, .94);
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 76vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 25px;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 38px;
}

.lightbox-info {
  display: flex;
  gap: 20px;
  margin-top: 17px;
  color: white;
}

.lightbox-info span { opacity: .65; }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 150px;
  }

  .hero-copy { position: relative; z-index: 2; }
  .hero-collage { min-height: 520px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .life-section { grid-template-columns: 1fr; }
  .life-photo { min-height: 420px; }
}

@media (max-width: 600px) {
  .site-header { padding: 20px; }
  .brand > span:last-child { font-size: 14px; }
  nav { display: none; }

  .hero {
    min-height: auto;
    gap: 35px;
    padding: 125px 20px 60px;
  }

  h1 { font-size: 42px; }
  .hero-text { font-size: 15px; }
  .hero-collage { min-height: 390px; }
  .hero-photo-main { right: 0; width: 84%; }
  .hero-photo-small { width: 43%; }
  .hero-note { width: 108px; height: 108px; font-size: 14px; }
  .intro-strip { justify-content: center; }
  .intro-strip p:not(.intro-message) { display: none; }
  .photo-section { padding: 75px 16px 85px; }
  .section-heading { align-items: start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .photo-grid { grid-auto-rows: 210px; gap: 10px; }
  .photo-card.wide { grid-column: span 2; }
  .photo-caption { padding: 45px 12px 12px; opacity: 1; transform: none; }
  .photo-caption small { display: none; }
  .life-photo { min-height: 330px; }
  .life-note { padding: 65px 24px; }
  .about-section { padding: 90px 24px; }
  footer { align-items: center; flex-direction: column; gap: 4px; }
}

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