:root {
  --page-max: 100%;
  --side-pad: 103px;
  --gap: 18px;
  --text: #111;
  --muted: #555;
  --hover: #777;
  --bg: rgb(246, 248, 249);
}

* { box-sizing: border-box; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: var(--bg);
  color: var(--text);
  font-family: "Karla", Arial, Helvetica, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

a, a:visited { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
  width: 100%;
  padding: 75px var(--side-pad) 71px;
}

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.09em;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(32px, 3vw, 52px);
  flex-wrap: wrap;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.site-nav a {
  position: relative;
  padding-bottom: 3px;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--hover); }

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

main { width: 100%; flex: 1 0 auto; }

.page-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--side-pad) 34px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.gallery figure { margin: 0; }

.gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg);
}

.places-masonry {
  display: block;
  position: relative;
}

.places-masonry figure {
  margin: 0;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 360ms ease;
}

.places-masonry img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none;
  backface-visibility: visible;
}

.places-masonry.is-laid-out figure.is-visible { opacity: 1; }

.about-layout {
  max-width: 720px;
  margin: 0 auto;
  display: block;
  padding: 0;
  text-align: center;
}

.about-copy h1,
.contact-copy h1 {
  margin: 0 0 28px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.about-copy p,
.contact-copy p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.8;
}


.about-tagline {
  margin-top: 34px;
  margin-bottom: 0;
  color: #aaa;
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.contact-copy {
  max-width: 680px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.email-address {
  display: inline-block;
  margin-top: 10px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  user-select: all;
}

@media (min-width: 761px) {
  .about-layout { transform: translateY(-18px); }
  .contact-copy { transform: translateY(-40px); }
}

.site-footer {
  flex-shrink: 0;
  padding: 26px var(--side-pad) 36px;
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.instagram-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: #111;
  transition: color 160ms ease;
}

.instagram-icon:hover,
.instagram-icon:focus-visible { color: var(--hover); }
.instagram-icon svg,
.instagram-icon img { width: 18px; height: 18px; }

@media (min-width: 761px) and (min-height: 640px) {
  body.text-page { height: 100dvh; overflow: hidden; }
  body.text-page main { display: flex; align-items: center; }
  body.text-page .page-shell { width: 100%; padding-bottom: 0; }
  body.text-page .site-footer { padding-top: 20px; padding-bottom: 28px; }
}

@media (max-width: 1180px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --side-pad: 18px; }
  .site-header { padding-top: 34px; padding-bottom: 44px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 14px 28px; font-size: 16px; }
  .page-shell { padding-left: 12px; padding-right: 12px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .contact-copy { padding-top: 38px; padding-bottom: 78px; }
}

@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-end; }
}
