@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --bg: #e8ebe6;
  --green: #3fa964;
  --text: #333333;
  --dark: #333333;
  --white: #ffffff;
  --border: #a8aaa8;
  --max-width: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.site-header {
  padding: 54px 20px 8px;
  text-align: center;
}
.logo {
  display: inline-block;
  margin: 0;
  color: var(--green);
  font-family: 'Alex Brush', cursive;
  font-size: clamp(3rem, 11vw, 5.9rem);
  line-height: 1;
  font-weight: 400;
  text-decoration: none;
}
.tagline {
  margin: 18px 0 28px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.45;
}

.nav-wrap {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  background-color: #e8ebe6;
}
.menu-toggle {
  width: 48px;
  height: 44px;
  margin: 0 auto;
  border: 0;
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  font-size: 1.55rem;
}
.main-nav {
  display: none;
  margin-top: 8px;
  background: var(--white);
  text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.main-nav.is-open { display: block; }
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu > li { position: relative; border-bottom: 1px solid #ececec; }
.menu > li:last-child { border-bottom: 0; }
.menu a,
.submenu-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 17px;
  border: 0;
  background: transparent;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.menu a:hover,
.menu a:focus-visible,
.menu .active > a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}
.submenu-toggle:hover,
.submenu-toggle:focus-visible,
.menu .active > .submenu-toggle {
  font-weight: 700;
  text-decoration: none;
}
.submenu-toggle .menu-label {
  display: inline-block;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.submenu-toggle:hover .menu-label,
.submenu-toggle:focus-visible .menu-label,
.menu .active > .submenu-toggle .menu-label {
  border-bottom-color: currentColor;
}
.submenu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--dark);
}
.has-submenu.open > .submenu { display: block; }
.submenu a {
  color: var(--white);
  padding: 12px 20px 12px 28px;
  text-decoration: none;
  font-weight: 400;
}
.submenu a:hover,
.submenu a:focus-visible,
.submenu .active > a {
  background: #232323;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.caret { font-size: .72em; transition: transform .2s ease; }
.has-submenu.open > .submenu-toggle .caret { transform: rotate(180deg); }

main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 46px 20px 92px;
  flex: 1;
}
.page-title {
  margin: 0 0 18px;
  color: #303030;
  font-size: clamp(1.6rem, 5vw, 2.05rem);
  line-height: 1.3;
}
.content-text p { margin: 0 0 22px; }
.content-media {
  display: grid;
  gap: 28px;
  margin: 24px 0 10px;
}
.content-photo {
  width: 100%;
  min-height: 260px;
  object-fit: cover;
  background: #6e6e6e;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.gallery-item,
.slogan-card {
  min-height: 250px;
}
.gallery-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #6f6f6f;
  cursor: zoom-in;
}
.gallery-item button {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  transition: transform .25s ease, opacity .25s ease;
}
.gallery-item button:hover img,
.gallery-item button:focus-visible img { transform: scale(1.02); opacity: .92; }
.slogan-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: #fff;
  border: 1px solid #c8c8c8;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.55;
}
.gallery-section { scroll-margin-top: 30px; }
.gallery-section + .gallery-section { margin-top: 34px; }

.contact-intro { margin-bottom: 38px; }
.contact-intro a { color: var(--green); text-decoration: none; }
.contact-intro a:hover { text-decoration: underline; }
.contact-form {
  max-width: 910px;
  display: grid;
  gap: 20px;
}
.form-row { display: grid; gap: 8px; }
.form-row label { color: #333; }
.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  color: #222;
  padding: 13px 14px;
  outline: none;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(63,169,100,.15); }
.form-row textarea { min-height: 190px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; }
.submit-btn {
  min-width: 160px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  padding: 12px 25px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}
.submit-btn:hover,
.submit-btn:focus-visible { background: #fff; color: #000; }

.site-footer {
  background: var(--dark);
  color: #eee;
  text-align: center;
  padding: 26px 20px;
}
.site-footer a {
  font-weight: 700;
  text-underline-offset: 4px;
  transition: color .2s ease;
}
.site-footer a:hover,
.site-footer a:focus-visible { color: #777; }

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s ease;
  z-index: 900;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #000; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.9);
  padding: 60px 12px 28px;
}
.lightbox.open { display: flex; }
.lightbox-figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lightbox-image { max-width: 92vw; max-height: 76vh; margin: 0 auto; object-fit: contain; }
.lightbox-caption { color: #fff; margin-top: 14px; font-size: 1rem; }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}
.lightbox-close { top: 12px; right: 12px; font-size: 1.7rem; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: #000; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 760px) {
  .site-header { padding-top: 76px; }
  .tagline { margin: 18px 0 38px; }
  .menu-toggle { display: none; }
  .main-nav { display: block; margin-top: 0; background: transparent; box-shadow: none; text-align: center; }
  .menu { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
  .menu > li { border: 0; }
  .menu a,
  .submenu-toggle { width: auto; padding: 8px 13px; justify-content: center; }
  .submenu {
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;
    width: 220px;
    text-align: left;
    box-shadow: 0 8px 18px rgba(0,0,0,.14);
    background: var(--white);
  }
  .submenu a { color: #555; background: var(--white); }
  .submenu a:hover,
  .submenu a:focus-visible,
  .submenu .active > a { background: var(--dark); color: var(--white); }
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu,
  .has-submenu.open > .submenu { display: block; }
  .submenu a { width: 100%; padding: 12px 18px; justify-content: flex-start; }
  main { padding: 64px 42px 96px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item.tall, .gallery-item.tall button, .gallery-item.tall img { min-height: 410px; }
  .gallery-item.wide { grid-column: span 2; }
  .slogan-card { min-height: 330px; }
  .content-media.two-col { grid-template-columns: 1.35fr .75fr; align-items: start; }
  .content-media.reverse { grid-template-columns: .85fr 1.2fr; align-items: start; }
  .contact-form { gap: 24px; }
  .form-row { grid-template-columns: 170px 1fr; align-items: start; gap: 22px; }
  .form-row label { padding-top: 12px; }
  .form-actions { padding-left: 192px; }
}

@media (min-width: 1050px) {
  .site-header { padding-top: 110px; }
  main { padding-left: 84px; padding-right: 84px; }
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 34px; }
  .gallery-item.span3 { grid-column: span 3; }
  .gallery-item.span2 { grid-column: span 2; }
  .gallery-item.span4 { grid-column: span 4; }
  .gallery-item.span5 { grid-column: span 3; }
  .slogan-card { grid-column: span 2; }
  .gallery-item.wide { grid-column: span 3; }
}

.gallery-item button, .gallery-item img { cursor: pointer; }
.author-photo { margin: 0; }
.author-photo button { display:block; width:100%; padding:0; border:0; background:transparent; cursor:pointer; }
.author-photo img { width:100%; min-height:260px; object-fit:cover; background:#6e6e6e; cursor:pointer; }


/* --- 2026-09-05 desktop navigation alignment + gallery load more --- */
.gallery-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
  color: #333333;
}
.gallery-more-btn {
  min-width: 160px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  padding: 12px 25px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}
.gallery-more-btn:hover,
.gallery-more-btn:focus-visible {
  background: #fff;
  color: #000;
}
.gallery-extra[hidden] { display: none !important; }

@media (min-width: 760px) {
  .menu {
    align-items: stretch;
  }
  .menu > li {
    display: flex;
    align-items: stretch;
  }
  .menu > li > a,
  .menu > li > .submenu-toggle {
    height: 44px;
    min-height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
  }
  .submenu-toggle .menu-label {
    padding-bottom: 0;
    line-height: 1;
  }
  .submenu-toggle {
    gap: 7px;
  }
  .submenu {
    top: 44px;
  }
}

/* Keep dropdown-parent active underline at the same vertical level as normal menu links */
@media (min-width: 760px) {
  .submenu-toggle .menu-label {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .submenu-toggle:hover .menu-label,
  .submenu-toggle:focus-visible .menu-label,
  .menu .active > .submenu-toggle .menu-label {
    border-bottom: 0;
    text-decoration: underline;
    text-underline-offset: 7px;
    text-decoration-thickness: 2px;
  }
}


/* --- 2026-09-06 sticky navigation bar + story submenu active state --- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1500;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2px 14px;
  background-color: #e8ebe6;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.nav-wrap .menu-toggle {
  display: block;
  color: #333333;
}
.nav-wrap .main-nav {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
}
.submenu li.active > a,
.submenu a.active {
  background: #232323;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

@media (min-width: 760px) {
  .nav-wrap {
    padding: 1px 20px;
  background-color: #e8ebe6;
}
  .nav-wrap .menu-toggle {
    display: none;
  color: #333333;
}
  .nav-wrap .main-nav {
    margin-top: 0;
  color: #333333;
}
  .submenu li.active > a,
  .submenu a.active {
    background: var(--dark);
    color: var(--white);
  }
}

/* Story dropdown titles: keep each title on one line on desktop */
@media (min-width: 760px) {
  .submenu {
    width: max-content;
    min-width: 220px;
    max-width: none;
  }
  .submenu a {
    white-space: nowrap;
  }
}

/* Full memoir story pages */
.story-body p { margin: 0 0 1.15rem; line-height: 1.8; }
.story-body .content-media { margin: 1.6rem 0 1.9rem; align-items: start; }
.story-body .content-media > div p:last-child { margin-bottom: 0; }
.story-photo-placeholder { cursor: pointer; }
@media (min-width: 760px) {
  .story-body .content-media.two-col, .story-body .content-media.reverse { gap: 32px; }
}


/* Real photo thumbnails and story lightbox media */
.story-photo { margin: 0; width: 100%; }
.story-photo button, .author-inline-photo button { display:block; width:100%; padding:0; border:0; background:transparent; cursor:zoom-in; }
.story-photo img, .author-inline-photo img { display:block; width:100%; min-height:260px; max-height:520px; object-fit:cover; background:#6e6e6e; cursor:zoom-in; }
.story-extra-gallery { display:grid; grid-template-columns:1fr; gap:24px; margin:32px 0 12px; }
.story-extra-gallery .story-photo img { min-height:240px; }
.author-inline-photo { max-width:620px;  margin: 30px auto 10px 0; }
.author-inline-photo .story-photo { margin:0; }
.author-new-photos { display:grid; grid-template-columns:1fr; gap:24px; margin:32px 0 12px; }
.people-centered img { object-position:center center; }
@media (min-width:760px) {
  .story-extra-gallery, .author-new-photos { grid-template-columns:repeat(2,minmax(0,1fr)); }
}


/* Sisulehtede klõpsatavad pildid */
.story-photo img,
.content-media img,
.gallery img,
.lightbox-trigger img,
a[data-lightbox] img {
  cursor: pointer;
}

/* Contact form status and spam trap */
.hp-field { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; }
.form-status { margin:0; min-height:1.4em; font-size:.95rem; }
.form-status.is-error { font-weight:600; }
.form-status.is-success { font-weight:600; }
.submit-btn:disabled { opacity:.65; cursor:wait; }
