:root {
  --container-max: 1020px;
  --text: #222;
  --muted: #777;
  --muted-2: #9a9a9a;
  --divider: rgba(0, 0, 0, 0.35);
  --divider-light: rgba(0, 0, 0, 0.18);
  --tagline-bg: rgba(0, 0, 0, 0.35);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 26px;
}

/* Header */
.site-header {
  padding-top: 6px;
}

.utility-bar {
  font-size: 12px;
  color: #111;
}

.utility-bar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.utility-bar__left {
  justify-self: start;
  color: #111;
  opacity: 0.85;
}

.utility-bar__center {
  justify-self: center;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.utility-bar__right {
  justify-self: end;
}

.logo-row {
  display: flex;
  justify-content: center;
  padding: 16px 0 10px;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav {
  border-top: 1px solid transparent;
}

.nav__list {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 8px 26px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}

.nav__item {
  display: flex;
  align-items: center;
}

.nav__link {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 300;
  /* letter-spacing: 0.02em; */
  position: relative;
  color: rgba(0, 0, 0, 0.8);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav__link:hover::after {
  transform: scaleX(1);
  opacity: 0.35;
}

.nav__link.is-active {
  color: rgba(0, 0, 0, 0.9);
}

.nav__link.is-active::after {
  transform: scaleX(1);
  opacity: 0.65;
}

.nav__divider {
  width: 1px;
  height: 22px;
  background: var(--divider-light);
}

/* Hero */
.hero {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 26px;
}

.hero__image {
  width: 100%;
  height: 520px;
  /* background: #eaeaea; */
  display: flex;
  align-items: center;
  justify-content: center;
  /* border: 1px solid rgba(0, 0, 0, 0.06); */
}

.hero__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.hero__tagline {
  position: absolute;
  left: 26px;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
}

.hero__tagline-inner {
  background: var(--tagline-bg);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: none;
}

/* Sections */
.section {
  padding: 34px 0 20px;
}

.section-title {
  margin: 0 0 26px;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-align: center;
  color: rgba(0, 0, 0, 0.65);
}

.featured {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 46px;
  align-items: start;
}

.featured + .featured {
  margin-top: 34px;
}

.featured--reverse {
  grid-template-columns: 1fr minmax(240px, 320px);
}

.featured__title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
  /* letter-spacing: 0.12em; */
  color: rgba(0, 0, 0, 0.75);
}

.featured__body {
  margin: 0;
  /* font-size: 12.5px; */
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.55);
}

.featured__image {
  width: 100%;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.site-footer {
  padding: 34px 0 44px;
}

.site-footer .container {
  text-align: center;
}

.site-footer__brand {
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(0, 0, 0, 0.65);
}

.site-footer__meta {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.site-footer__link {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.project-card {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
  transition: border-color 160ms ease;
}

.project-card::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.project-card:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

.project-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-thumb {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: border-color 160ms ease;
}

.gallery-thumb--video {
  position: relative;
}

.gallery-thumb--video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.gallery-thumb--video::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-38%, -50%);
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.gallery-thumb:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

.gallery-thumb__img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  z-index: 999;
}

.lightbox.is-open {
  display: block;
}

.lightbox__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox__video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 300;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
}

.lightbox__close:hover {
  border-color: rgba(255, 255, 255, 0.55);
}

body.is-lightbox-open {
  overflow: hidden;
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 8px;
}

.required-asterisk {
  margin-left: 4px;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.85);
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.85);
  outline: none;
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.015);
}

.form-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.5);
}

.form-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.form-button {
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: transparent;
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.form-button:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

.form-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.form-status {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

/* Responsive */
@media (max-width: 820px) {
  .nav__divider {
    display: none;
  }

  .nav__link {
    padding: 10px 12px;
  }

  .nav__link::after {
    left: 12px;
    right: 12px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

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

  .gallery-thumb__img {
    height: 200px;
  }

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

  .featured {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured__media {
    order: -1;
  }

  .hero__tagline-inner {
    font-size: 15px;
    letter-spacing: 0.16em;
  }

  .hero__image {
    height: auto;
    display: block;
    background: transparent;
  }

  .hero__img {
    max-height: none;
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

  .gallery-thumb__img {
    height: 220px;
  }
}
