:root {
  --name: #dfc1a7;
  --tagline: #caa378;
  --contact: #dac0a7;
  --about-bg: #be9665;
  --about-ink: #1c1502;
  --services-title: #8e765e;
  --card-bg: #d0b195;
  --card-title: #4b4539;
  --card-ink: #4f3f30;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--contact);
  line-height: 1.45;
  background: #0c0402;
}

/* Content column: light oak texture tinted dark, warm brown at the top, near black at the bottom.
   Outside this column the page is plain near black. */
.page {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #0c0402;
  background-image:
    linear-gradient(to bottom, #6a4318 0, #3a2208 22%, #1e1206 55%, #0c0402 100%),
    url("images/lemn.jpg");
  background-size: 100% 100%, 1600px auto;
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- Header ---------- */
.hero {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 1rem clamp(2.5rem, 6vw, 4rem);
}
.logo {
  width: clamp(110px, 14vw, 150px);
  margin: 0 auto 0.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--name);
}
.tagline {
  margin: .15em 0 .25em;
  line-height: 1.15;
  font-size: clamp(1.25rem, 4vw, 2.9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--tagline);
}
.contact {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.65rem);
  font-weight: 600;
}
.contact a { text-decoration: none; }
.contact a:hover, .contact a:focus-visible { text-decoration: underline; }
.sep { margin: 0 .3em; }

/* ---------- Main ---------- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.2rem;
  align-items: start;
  background: var(--about-bg);
  color: var(--about-ink);
  padding: 2.25rem 1.6rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.about img { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.about h2 {
  margin: -.2em 0 .5em;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.1;
}
.about p {
  margin: 0 0 1.4em;
  font-size: 1.02rem;
  font-weight: 600;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 8vw, 6.5rem);
  padding: clamp(3rem, 7vw, 4.5rem) clamp(1rem, 3vw, 2rem);
}
.photo {
  position: relative;
  display: block;
  padding: 0;
  border: 3px solid #fff;
  background: #fff;
  cursor: zoom-in;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
  transition: transform .2s ease;
  isolation: isolate; /* keeps the frame below in front of the wood background */
}
/* Tilted white frame peeking out behind each photo; it tilts a bit more on hover */
.photo::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 4px solid #fff;
  transform: rotate(5deg) translate(4%, 2%);
  z-index: -1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  transition: transform .25s ease;
}
.photo:hover, .photo:focus-visible { transform: translateY(-4px); }
.photo:hover::before, .photo:focus-visible::before { transform: rotate(9deg) translate(6%, 3%); }
.photo:focus-visible { outline: 3px solid var(--tagline); outline-offset: 6px; }
.photo img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* Services */
.services h2 {
  margin: 0 0 .3em;
  text-align: center;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  color: var(--services-title);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0 -2rem;
}
.card {
  background: var(--card-bg);
  color: var(--card-ink);
  padding: 1rem 1.2rem 1.5rem;
}
.card img { width: 50px; margin: 0 auto .25rem; }
.card h3 {
  margin: 0 0 .4em;
  text-align: center;
  font-size: 1.75rem;
  color: var(--card-title);
}
.card p { margin: 0; font-size: 1rem; font-weight: 600; }

footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  font-size: .85rem;
  color: rgba(218, 192, 167, .55);
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 4, 1, .94); }
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 5rem);
  width: auto;
  height: auto;
  border: 4px solid #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.lb-count {
  position: absolute;
  bottom: .6rem;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: var(--contact);
  font-family: var(--serif);
}
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 18, 6, .7);
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(190, 150, 101, .9); }
.lb-close { top: 1rem; right: 1rem; }
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-count { display: none; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .cards { margin: 0; gap: 1.25rem; }
}
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem 1.25rem .5rem; }
  .about h2 { margin-top: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .contact a { display: block; margin: .2em 0; }
  .sep { display: none; }
  .gallery { gap: 2.25rem 1.75rem; padding-left: .5rem; padding-right: .5rem; }
  .lb-prev, .lb-next { top: auto; bottom: .25rem; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .photo, .photo::before { transition: none; }
}
