/* ============================================================
   Lukas Draugelis Photography — design system
   Palette:  paper #FBFAF8 / ink #1A1A17 / stone #6B6862 /
             line #E4E0D8 / frame #FFFFFF
   Type:     display = "Cormorant Garamond" (restrained serif)
             body/ui = "Inter" (clean sans)
   ============================================================ */

:root {
  --paper: #FBFAF8;
  --ink:   #1A1A17;
  --stone: #6B6862;
  --line:  #E4E0D8;
  --frame: #FFFFFF;
  --nav-h: 92px;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- top navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;

  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
/* transparent over the hero, solid once scrolled or on inner pages */
.nav.solid,
.nav.inner {
  background: rgba(251, 250, 248, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--frame);
  transition: color 0.4s var(--ease);
}
.nav.solid .nav__name,
.nav.inner .nav__name { color: var(--ink); }

.nav__menu { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; list-style: none; }
.nav__link {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frame);
  transition: color 0.4s var(--ease), opacity 0.2s;
  cursor: pointer;
  padding: 8px 0;
}
.nav.solid .nav__link,
.nav.inner .nav__link { color: var(--ink); }
.nav__link:hover { opacity: 0.55; }

/* dropdown */
.nav__item { position: relative; }
.nav__dropdown {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--paper);
  border: 1px solid var(--line);
  min-width: 170px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  box-shadow: 0 12px 30px rgba(26,26,23,0.08);
}
.nav__item:hover .nav__dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav__dropdown a {
  display: block;
  padding: 9px 20px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink);
  white-space: nowrap;
}
.nav__dropdown a:hover { background: var(--frame); color: var(--stone); }

/* grouped Galleries panel: categories as headers */
.nav__dropdown--grouped {
  min-width: 210px;
  padding: 10px 0;
}
.nav__group { padding: 4px 0; }
.nav__group + .nav__group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.nav__group-label {
  display: block;
  padding: 4px 20px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.nav__dropdown--grouped a {
  padding: 7px 20px 7px 28px;
}

/* mobile menu toggle */
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 26px; height: 20px; position: relative; }
.nav__toggle span { position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--frame); transition: 0.3s var(--ease); }
.nav.solid .nav__toggle span, .nav.inner .nav__toggle span { background: var(--ink); }
.nav__toggle span:nth-child(1){ top: 2px; } .nav__toggle span:nth-child(2){ top: 9px; } .nav__toggle span:nth-child(3){ top: 16px; }

/* ---------- hero ---------- */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
/* the thin white frame */
.hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,0.85);
  pointer-events: none;
}
.hero__caption {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 8vh, 90px) clamp(30px, 8vw, 90px);
  color: var(--frame);
}
.hero__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.hero__sub {
  margin-top: 14px;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---------- gallery pages ---------- */
.page { padding-top: var(--nav-h); }
.page__head {
  padding: clamp(48px, 9vh, 96px) clamp(20px, 5vw, 56px) 30px;
  max-width: 900px;
}
.page__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.page__blurb { color: var(--stone); margin-top: 10px; font-size: 1rem; }

/* masonry-ish grid */
.grid {
  columns: 3;
  column-gap: 14px;
  padding: 10px clamp(20px, 5vw, 56px) 80px;
}
.grid img {
  width: 100%;
  margin-bottom: 14px;
  display: block;
  cursor: zoom-in;
  border-radius: 1px;
  transition: opacity 0.6s var(--ease), transform 0.4s var(--ease);
  opacity: 0;
  transform: translateY(12px);
}
.grid img.loaded { opacity: 1; transform: none; }

.empty-note {
  padding: 0 clamp(20px, 5vw, 56px) 90px;
  color: var(--stone);
  font-style: italic;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20,19,17,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease);
  z-index: 200;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 22px; right: 28px; color: #fff; font-size: 1.8rem; cursor: pointer; opacity: 0.8; line-height: 1; }
.lightbox__close:hover { opacity: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.4rem; cursor: pointer; opacity: 0.6; padding: 20px; user-select: none; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__prev { left: 10px; } .lightbox__next { right: 10px; }

/* ---------- about / contact ---------- */
.prose { max-width: 620px; padding: clamp(48px,9vh,96px) clamp(20px,5vw,56px) 90px; }
.prose h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: clamp(2rem,5vw,3.2rem); margin-bottom: 20px; }
.prose p { color: var(--stone); margin-bottom: 18px; }

/* about page: floated photo so text + contact flow up the left side */
.prose.prose--about { max-width: 1040px; overflow: hidden; }
.about-photos {
  float: right;
  width: 54%;
  margin: 0 0 20px 40px;
}
.about-photos img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1px;
}
.prose--about h1 { clear: none; }
.form { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; }
.form label { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--frame);
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--stone); }
.form button {
  align-self: flex-start;
  padding: 13px 30px;
  background: var(--ink); color: var(--frame);
  border: 0; cursor: pointer;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: opacity 0.2s;
}
.form button:hover { opacity: 0.82; }
.form__note { font-size: 0.85rem; color: var(--stone); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px clamp(20px,5vw,56px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--stone); }

/* ---------- responsive ---------- */
@media (max-width: 860px) { .grid { columns: 2; } }
@media (max-width: 720px) {
  .nav__menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 10px 0; display: none;
  }
  .nav__menu.open { display: flex; }
  .nav__link { color: var(--ink); width: 100%; padding: 12px clamp(20px,5vw,56px); }
  .nav__dropdown { position: static; transform: none; opacity: 1; visibility: visible; border: 0; box-shadow: none; min-width: 0; padding: 0 0 6px 16px; }
  .nav__toggle { display: block; }
  .hero__title { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  /* stack about text over photos on mobile (photos already stack) */
  .about-row { flex-direction: column; }
}
@media (max-width: 480px) { .grid { columns: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .grid img { opacity: 1; transform: none; transition: none; }
}

/* hero slideshow layers */
.hero { overflow: hidden; }
.hero__slides { position: absolute; inset: 18px; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero__slide.is-active { opacity: 1; }

/* soft scrim so nav text stays legible over bright photos */
.hero::before {
  content: "";
  position: absolute;
  top: 18px; left: 18px; right: 18px;
  height: 180px;
  background: linear-gradient(to bottom, rgba(20,19,17,0.45), rgba(20,19,17,0));
  pointer-events: none;
  z-index: 1;
}
