:root {
  color-scheme: light;
  --paper: #fcfbf7;
  --white: #ffffff;
  --ink: #153e43;
  --body: #3c5050;
  --green: #246159;
  --coral: #dc7058;
  --rule: #dce3db;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max-width: 73rem;
  font-family: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.8;
}

h1, h2, h3, p, figure {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 750;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
}

h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

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

.wrap {
  width: min(var(--max-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  inset-block-start: .5rem;
  inset-inline-start: var(--gutter);
  padding: .5rem .85rem;
  transform: translateY(-150%);
  background: var(--white);
  color: var(--ink);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.header-layout,
.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand {
  display: block;
  margin-inline-start: -.5rem;
  flex: 0 0 auto;
}

.brand img {
  width: clamp(13rem, 22vw, 17rem);
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem clamp(.85rem, 3vw, 2rem);
}

nav a {
  padding-block: .5rem;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 4.75rem);
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.35vw, 4.9rem);
  font-weight: 800;
  letter-spacing: -.045em;
}

.hero h1 span {
  display: block;
  color: var(--green);
}

.hero-copy p {
  max-width: 24rem;
  margin-top: 1.4rem;
  color: var(--body);
  font-size: clamp(1.015rem, 1.5vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.5rem;
  margin-top: 1.7rem;
}

.primary-link {
  display: inline-block;
  padding: .7rem 1.15rem;
  border-radius: .45rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--green);
}

.text-link {
  font-weight: 650;
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #dae6e1;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero-photo figcaption {
  position: absolute;
  inset-inline-start: .8rem;
  inset-block-end: .8rem;
  padding: .16rem .56rem;
  border-radius: .3rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .875rem;
}

.section-padding {
  padding-block: clamp(2.8rem, 6vw, 5.4rem);
}

.about {
  background: var(--white);
  border-top: 1px solid var(--rule);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
  align-items: start;
  gap: 1.1rem 3rem;
}

.about-layout p {
  max-width: 41rem;
  color: var(--body);
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
}

.work {
  background: var(--ink);
  color: var(--white);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 6vw, 5rem);
  margin-top: 2.1rem;
}

.work article {
  border-top: 1px solid #6d8d8b;
  padding-top: 1.35rem;
}

.work h3 {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.work h3::before {
  content: "";
  width: 1.1rem;
  height: .24rem;
  border-radius: 1rem;
  background: var(--coral);
}

.work p {
  max-width: 28rem;
  margin-top: .6rem;
  color: #e4efea;
}

.gallery-heading p {
  margin-top: .65rem;
  color: var(--body);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.8rem;
}

.gallery-card {
  --tile: #e4eee8;
  --tile-line: #789187;
}

.gallery-card:nth-child(2) {
  --tile: #f3e5dc;
  --tile-line: #9d786a;
}

.gallery-card:nth-child(3) {
  --tile: #e7ebee;
  --tile-line: #778b94;
}

.gallery-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .75rem;
}

.team-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: .5rem;
}

.team-photos a {
  display: block;
  min-height: 0;
  border-radius: .75rem;
  background: var(--tile);
}

.team-photos img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed var(--tile-line);
  background: var(--tile);
  color: var(--tile-line);
}

.photo-placeholder span {
  position: relative;
  width: 2.5rem;
  height: 1.95rem;
  overflow: hidden;
  border: 1.5px solid currentColor;
  border-radius: .28rem;
}

.photo-placeholder span::before {
  position: absolute;
  content: "";
  inset: .32rem auto auto .38rem;
  width: .36rem;
  height: .36rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.photo-placeholder span::after {
  position: absolute;
  content: "";
  inset: .8rem auto auto .84rem;
  width: 1.6rem;
  height: 1.6rem;
  transform: rotate(45deg);
  border: 1px solid currentColor;
}

.gallery-card figcaption {
  margin-top: .75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-footer {
  padding-block: 1.85rem;
  background: var(--white);
  border-top: 1px solid var(--rule);
}

.site-footer p[lang="en"] {
  color: var(--body);
  font-size: .9rem;
}

.footer-name {
  font-weight: 750;
}

@media (max-width: 48rem) {
  .header-layout {
    flex-wrap: wrap;
    row-gap: 0;
    padding-block-end: .45rem;
  }

  .hero,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 8.3vw, 4.5rem);
  }

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

@media (max-width: 32rem) {
  .header-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    padding-block: .55rem;
  }

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

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}
