@font-face {
  font-family: "Futura-book";
  font-display: swap;
  src: url("assets/et-fonts/Futura-Book-Regular.otf") format("opentype");
}
@font-face {
  font-family: "Hiddensoul";
  font-display: swap;
  src: url("assets/et-fonts/HiddenSoul-Regular.ttf") format("truetype");
}

:root {
  --accent: #f1ab49;
  --accent-2: #30b9c5;
  --dark: #000;
  --text-light: #fff;
  --text-body: #666;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--text-body);
  line-height: 1.7;
  font-size: 16px;
  /* Responsive base font size */
  font-size: clamp(16px, 1vw + 0.5rem, 20px);
  background: #000;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2 {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-weight: 700;
  margin: 0 0 10px;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 10px 0;
  background: rgba(0,0,0,0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease, padding 0.25s ease;
}
header.scrolled {
  background: rgba(0,0,0,0.8);
  padding: 8px 0;
}
header.hidden {
  transform: translateY(-100%);
}
header .container {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 40px;
}
header .logo img {
  height: 38px;
  width: auto;
}
#top-menu {
  list-style: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
#top-menu > li + li {
  margin-left: 18px;
}
#top-menu a {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  font-size: clamp(12px, 0.8vw + 0.5rem, 15px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
#top-menu a:hover { opacity: 0.7; }

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
}
.mobile-menu-toggle span,
.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
}
.mobile-menu-toggle span { top: 11px; }
.mobile-menu-toggle span::before { top: -8px; }
.mobile-menu-toggle span::after { top: 8px; }

@media (min-width: 861px) {
  header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #top-menu {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    position: static;
    background: transparent;
    padding: 0;
  }

  #top-menu li {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
  }

  #top-menu a {
    display: inline-block;
    padding: 0;
    border-bottom: none;
    white-space: nowrap;
  }
}

@media (max-width: 860px) {
  header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #top-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0,0,0,0.92);
    padding: 10px 0;
  }

  #top-menu.open { display: flex; }

  #top-menu a {
    display: block;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .mobile-menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 20px 80px;
  background-color: #000;
  background-image: -webkit-linear-gradient(270deg, rgba(0, 0, 0, 0.439) 0%, rgba(0, 0, 0, 0.801) 100%), url("assets/images/IMG_20200123_150143.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-inner { max-width: 700px; }
.hero img.logo-large {
  width: 180px;
  margin: 0 auto 24px;
}
.hero h1 {
  color: var(--accent);
  font-size: 32px;
  font-size: clamp(28px, 4vw + 1rem, 64px);
  text-shadow: 0 2px 4px rgba(255,255,255,0.25);
}
.hero p {
  color: #fff;
  font-family: "Futura-book", Arial, sans-serif;
  font-size: 16px;
  font-size: clamp(14px, 1.2vw + 0.2rem, 20px);
  margin: 6px 0;
}

/* ---------- Section base ---------- */
section {
  padding: 70px 0;
  background: #000;
}
section.alt { background: #050505; }
section h2 {
  font-family: "Hiddensoul", "Montserrat", sans-serif;
  text-align: center;
  color: var(--accent);
  font-size: 32px;
  font-size: clamp(24px, 2.5vw + 1rem, 48px);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 40px;
}
section#facebook h2 { color: var(--accent-2); }

/* Accessibility helper: visually hidden but readable by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Optional: make visible when focused (for skip links etc.) */
.visually-hidden-focusable:active,
.visually-hidden-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.gallery-grid figure {
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  padding: 0;
}
.gallery-group {
  position: relative;
  display: block;
}

.group-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
  border-radius: 4px;
}
.gallery-group:hover .group-cover { transform: scale(1.06); }
.group-count {
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

/* Mobile: show stacked thumbnails (up to 4) and clearer separation */
@media (max-width: 860px) {
  .gallery-grid { max-width: 420px; grid-template-columns: 1fr; }
  .gallery-grid figure { width: 100%; margin: 12px 0; padding: 12px; border-radius: 8px; background: #070707; border: 1px solid rgba(255,255,255,0.06); }
  .gallery-stack { display: flex; flex-direction: column; gap: 8px; }
  .group-cover { height: 215px; }
  /* a bit more breathing room around the thumbnail */
  .gallery-grid figure { padding: 5px; }
}

@media (min-width: 861px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-cover { height: 220px; }
  /* show group count badge on desktop and move to top-right */
  .group-count {
    display: inline-block;
    top: 10px;
    bottom: auto;
    right: 10px;
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.65);
  }
}

/* Make headings larger on small/mobile screens so titles match image scale */
@media (max-width: 700px) {
  .hero h1 { font-size: 36px; font-size: clamp(28px, 7vw + 0.8rem, 48px); }
  section h2 { font-size: 24px; font-size: clamp(20px, 6vw + 0.6rem, 40px); }
  #top-menu a { font-size: 14px; font-size: clamp(13px, 2.4vw + 0.4rem, 16px); }
}

/* ---------- Larger / ultra-wide screens ---------- */
@media (min-width: 1200px) {
  .container { max-width: 1400px; }
  .hero-inner { max-width: 900px; }
  .hero h1 { font-size: 72px; }

  /* Keep a 2x2 gallery layout on larger screens, but increase sizes */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1200px;
    gap: 28px;
  }
  .gallery-grid figure { padding: 12px; }
  .group-cover { height: 320px; }

  .lightbox img { max-width: 88vw; max-height: 86vh; }
}

@media (min-width: 1600px) {
  .container { max-width: 1600px; }
  .hero h1 { font-size: 88px; }

  /* Still 2 columns, but larger thumbnails and wider gaps for ultra-wide screens */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1400px;
    gap: 36px;
  }
  .group-cover { height: 420px; }
}

/* Increase section headings on large screens to match larger images */
@media (min-width: 1200px) {
  section h2 { font-size: 64px; }
}
@media (min-width: 1600px) {
  section h2 { font-size: 72px; }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 24px 20px 80px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}
.lightbox-progress {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
}
.lightbox-progress .progress-dot {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  background: transparent;
}
.lightbox-progress .progress-dot.active {
  background: #fff;
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  color: #fff;
  font-size: 34px;
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 4px;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Make arrows more visible and larger on mobile; always visible */
@media (max-width: 860px) {
  .lightbox .lb-prev,
  .lightbox .lb-next {
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    font-size: 36px;
    padding: 14px 18px;
    opacity: 0.95;
    border-radius: 6px;
    z-index: 2100;
  }
  .lightbox .lb-prev { left: 8px; }
  .lightbox .lb-next { right: 8px; }
  .lightbox .lb-close { top: 12px; right: 12px; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  text-align: center;
}
.services-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #fff;
  font-family: "Futura-book", Arial, sans-serif;
  font-size: 16px;
  font-size: clamp(15px, 0.8vw + 0.8rem, 18px);
}
.services-grid li { padding: 4px 0; }
@media (max-width: 700px) {
  .services-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Facebook ---------- */
.facebook-cta {
  text-align: center;
}
#fbFallback {
  display: none;
  margin-top: 20px;
  color: #fff;
  text-align: center;
}
#fbFallback p {
  margin: 0 0 6px;
}
#fbFallback a {
  color: var(--accent-2);
  text-decoration: underline;
}
.fb-button {
  display: inline-block;
  padding: 14px 34px;
  border: 2px solid var(--accent-2);
  color: var(--accent-2);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, color 0.2s ease;
}
.fb-button:hover { background: var(--accent-2); color: #000; }

/* ---------- Contact ---------- */
#yhteystiedot .contact-image {
  max-width: 700px;
  margin: 0 auto 40px;
  border-radius: 4px;
  overflow: hidden;
}
.contact-info {
  text-align: center;
  color: #fff;
  font-family: "Futura-book", Arial, sans-serif;
  font-size: 17px;
}
.contact-info a { color: var(--accent-2); }

/* ---------- Footer ---------- */
footer {
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #999;
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  right: 0;
  bottom: 60px;
  z-index: 999;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
