@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7efe2;
  color: #201e1d;
  font-family: "Figtree", "Noto Sans SC", system-ui, sans-serif;
  text-wrap: pretty;
}

a {
  color: #8e2e22;
}

:focus-visible {
  outline: 2px solid #b23a2c;
  outline-offset: 2px;
}

::selection {
  background: rgb(178 58 44 / 25%);
}

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

html[data-locale="en"] [data-lang="zh"],
html:not([data-locale="zh"]) [data-lang="zh"] {
  display: none !important;
}

html[data-locale="zh"] [data-lang="en"] {
  display: none !important;
}

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  margin-left: 8px;
  border: 1.5px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 7px 12px;
  min-height: 36px;
  min-width: 44px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: #8e2e22;
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
  background: rgb(255 255 255 / 16%);
}

.lang-switch button[aria-pressed="true"]:hover,
.lang-switch button[aria-pressed="true"]:focus-visible {
  background: #ffffff;
}

header nav a,
main a,
footer a {
  transition: background-color 160ms ease, color 160ms ease;
}

header nav a:hover,
header nav a:focus-visible {
  background: rgb(255 255 255 / 16%);
}

main a:hover {
  color: #b23a2c;
}

.photo-card {
  margin: 0;
  background: #fdf8ef;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(46, 43, 37, 0.12);
  display: flex;
  flex-direction: column;
}

.photo-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eee7db;
}

button.photo-card-media {
  appearance: none;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.photo-card-wide .photo-card-media {
  aspect-ratio: 16 / 9;
}

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

.photo-card figcaption,
.photo-card-meta {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-card figcaption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e2e22;
}

.map-link {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.footer-item {
  color: #a19786;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 24px;
  background: transparent;
  display: grid;
  place-items: center;
}

.photo-lightbox:not([open]) {
  display: none;
}

.photo-lightbox::backdrop {
  background: rgb(32 30 29 / 88%);
}

.photo-lightbox img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 35%);
}

.photo-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: #201e1d;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 700px) {
  header nav {
    margin-left: 0 !important;
    width: 100%;
  }

  header nav a {
    padding-inline: 8px !important;
  }

  .lang-switch {
    margin-left: auto;
  }

  main > section {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main > section > * {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
