* {
    margin: 0;
    padding: 0;
    background-color: #F6F7F5;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Libre Baskerville", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (min-width: 768px) {
  body {
    font-size: 1.03rem;
  }
}

@media (min-width: 1200px) {
  body:before,
  body:after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 50px;
    background-color: #e7eee2;
    pointer-events: none;
    z-index: 0;
  }

  body:before {
    left: 0;
  }

  body:after {
    right: 0;
  }

  body {
    padding-left: 50px;
    padding-right: 50px;
  }
}

p {
  margin: 0 16px 1em;
}

@media (max-width: 820px) {
  p {
    margin: 0 8px 1em;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
  padding: 20px 40px 8px 40px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

main {
  color: rgba(0, 0, 0, 0.78);
  flex: 1;
}

h1 {
  margin: 0 20px -30px;
  display: block;
  width: fit-content;
  max-width: clamp(250px, 30vw, 400px);
  position: relative;
  z-index: 3;
}

@media (max-width: 768px) {
  header {
    display: contents;
  }

  h1 {
    max-width: clamp(200px, 34vw, 320px);
    margin: 15px auto 0;
  }

  nav.header-nav ul {
    width: 100%;
    justify-content: center;
    gap: 2em;
  }

  nav.header-nav {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
  }

  nav.header-nav a {
    font-size: 1.2rem;
  }
}

nav.header-nav {
  font-family: "IM Fell DW Pica SC", serif;
  font-weight: 400;
  letter-spacing: 0.15em;
  font-style: normal;
  color: #333332;
  font-size: clamp(0.85rem, 1vw, 1.1rem);
  position: sticky;
  top: 0;
  background-color: #F6F7F5;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 40px;
  width: 100%;
  flex-shrink: 0;
}

nav.header-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(1100px, 96%);
  border-bottom: 1px solid rgba(85, 89, 69, 0.15);
}

nav.header-nav li {
  display: inline-block;
  list-style: none;
}

nav.header-nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 3.5em;
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  nav.header-nav ul {
    width: 100%;
    justify-content: center;
    gap: 2em;
  }

  nav.header-nav {
    padding: 8px 0;
  }
}

nav.header-nav a {
  text-decoration: none;
  color: #555945;
  position: relative;
  opacity: 0.60;
  transition: all 280ms ease-in-out;
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.2rem);
}

@media (max-width: 768px) {
  nav.header-nav a {
    font-size: 1.2rem;
  }
}

nav.header-nav a:hover {
  opacity: 1;
}

nav.header-nav a.is-active {
  opacity: 1;
}

nav.header-nav a:after {
  backface-visibility: hidden;
  border: 0.3px solid transparent;
  bottom: 0px;
  content: " ";
  display: block;
  margin: 0 auto;
  position: absolute;
  width: 0;
  left: 50%;
  transform: translateX(-50%);
}

nav.header-nav a:hover:after,
nav.header-nav a.is-active:after {
  border-color: #555945;
  transition: width 350ms ease-in-out;
  width: 70%;
}

.gallery-nav {
  max-width: 1100px;
  margin: 10px auto 30px;
  padding: 0 20px;
  padding-bottom: 2px;
  text-align: center;
}

.gallery-nav ul {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.4em;
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
  padding-bottom: 1px;
}

.gallery-nav ul::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: calc(100% + 12px);
  border-bottom: 1px solid rgba(85, 89, 69, 0.15);
}

.gallery-intro {
  max-width: 780px;
  margin: 32px auto 26px;
  padding: 0 24px;
  text-align: center;
  font-size: clamp(0.95rem, 0.6vw + 0.85rem, 1.1rem);
  color: rgba(0, 0, 0, 0.78);
  font-style: italic;
  font-weight: normal;
}

@media (max-width: 768px) {
  .gallery-intro {
    margin: 24px auto 20px;
    padding: 0 16px;
  }
}

.gallery-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IM Fell DW Pica SC", serif;
  font-weight: 400;
  letter-spacing: 0.15em;
  font-style: normal;
  color: #555945;
  text-decoration: none;
  font-size: clamp(0.85rem, 0.5vw + 0.75rem, 1rem);
  opacity: 0.7;
  padding: 4px 6px;
  position: relative;
  transition: opacity 240ms ease-in-out;
}

.gallery-nav a:hover {
  opacity: 1;
}

.gallery-nav a.is-active {
  opacity: 1;
}

@media (max-width: 768px) {
  .gallery-nav a {
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  .gallery-nav {
    margin: 10px auto 20px;
    padding: 0 10px;
  }

  .gallery-nav ul {
    gap: 1em;
  }
}

.gallery {
  margin: 30px auto;
  max-width: 1100px;
  padding: 0 20px;
  column-count: 3;
  column-gap: 20px;
}

.gallery figure {
  margin: 0 0 20px;
  break-inside: avoid;
}

.gallery figcaption {
  display: none;
}

.gallery a {
  display: block;
  transition: opacity 200ms ease-in-out;
}

.gallery a:hover {
  opacity: 0.7;
}

.gallery a:focus-visible {
  outline: 2px solid rgba(85, 89, 69, 0.4);
  outline-offset: 4px;
}

.gallery img {
  width: 100%;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-in-out;
  z-index: 5;
}

.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 85vh;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.lightbox figcaption {
  color: #F6F7F5;
  font-size: 0.95rem;
  text-align: center;
  max-width: min(92vw, 1100px);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  min-height: 0;
}

.lightbox figcaption i,
.lightbox figcaption em {
  background: none !important;
}
}

.lightbox figcaption:empty {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: "IM Fell DW Pica SC", serif;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: #555945;
  background-color: #F6F7F5;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  opacity: 0.8;
}

.lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 980px) {
  .gallery {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gallery {
    column-count: 1;
  }
}


footer {
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: clamp(0.75rem, 0.9vw, 0.95rem);
  color: rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

footer > a {
  display: inline-flex;
  flex-shrink: 0;
}

.footer-text {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.footer-text p {
  line-height: 1.4;
  font-size: clamp(0.8rem, 1vw, 1.05rem);
  margin: 0 16px;
}

footer img {
  max-width: 28px;
  opacity: 0.6;
  transition: opacity 200ms ease-in-out;
}

footer a:hover img {
  opacity: 1;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
  }

  .footer-text {
    flex-direction: column;
    gap: 4px;
  }
}

hr.footer-hr {
  border: none;
  border-top: 1px solid rgba(85, 89, 69, 0.15);
  width: min(1100px, 96%);
  margin: 0 auto;
}

.textInputWrapper {
  position: relative;
  width: 100%;
  margin: 0;
  --accent-color: #a4b36d;
}

.textInputWrapper:before,
.textInputWrapper:after {
  content: "";
  left: 0;
  right: 0;
  position: absolute;
  pointer-events: none;
  bottom: -1px;
  z-index: 1;
  width: 100%;
}

.textInputWrapper:before {
  transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
}

.textInputWrapper:focus-within:before {
  border-bottom: 1px solid var(--accent-color);
  transform: scaleX(1);
}

.textInputWrapper:focus-within:after {
  border-bottom: 1.2px solid var(--accent-color);
  transform: scaleX(1);
}

.textInputWrapper:after {
  content: "";
  transform: scaleX(0);
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1) 0ms;
  will-change: transform;
  border-bottom: 1.2px solid var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.textInput::placeholder {
  transition: opacity 250ms cubic-bezier(0, 0, 0.2, 1) 0ms;
  opacity: 1;
  user-select: none;
  color: rgba(0, 0, 0, 0.55);
}

.textInputWrapper .textInput {
  max-height: 36px;
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: "Libre Baskerville", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  padding: 12px;
  width: 100%;
  border: none;
}

.textInputWrapper textarea.textInput {
  min-height: 140px;
  max-height: none;
  resize: vertical;
}

.textInputWrapper .textInput:focus,
.textInputWrapper .textInput:active {
  outline: none;
}

.textInputWrapper:focus-within .textInput::placeholder {
  opacity: 0;
}

button {
  font-family: "IM Fell DW Pica SC", serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw, 1.4rem);
  letter-spacing: 0.15em;
  font-style: normal;
  color: #555945;
  padding: 10px 25px;
  border-radius: 6px;
  border: 1px solid rgba(85, 89, 69, 0.15);
  transition: all 0.5s;
  cursor: pointer;
  z-index: 1;
  pointer-events: auto;
  width: 100%;
}

button:hover {
  background-color: #e4e8d3;
  transform: scale(1.05);
}

button:active {
  background-color: #9fa681;
  transition: all 0.25s;
  transform: scale(0.98);
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.contact-main,
.about-main {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 0 20px 40px;
}

.contact-layout,
.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.contact-copy,
.about-text {
  flex: 1;
  line-height: 1.6;
}


.contact-form {
  flex: 1;
}

@media (max-width: 820px) {
  .contact-main,
  .about-main {
    margin-top: 30px;
    padding: 0 10px 40px;
  }

  .contact-layout {
    flex-direction: column;
    align-items: center;
  }

  .contact-copy {
    text-align: left;
    max-width: 640px;
  }

  .contact-form .form-container {
    max-width: 100%;
  }

  .contact-form,
  .contact-form form {
    width: 100%;
  }
}

@media (min-width: 821px) {
  .contact-form {
    border-left: 1px solid rgba(85, 89, 69, 0.15);
    padding-left: 40px;
  }
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
}

@media (max-width: 820px) {
  .about-layout {
    flex-direction: column;
  }

  .about-text,
  .about-image {
    width: 100%;
  }
}
