/* =============================
   0. CUSTOM PROPERTIES
   ============================= */
:root {
  --green-dark:  #1e3a1e;
  --green-mid:   #2d5a27;
  --green-mid-light: #609e4e;
  --green-light: #e8f0e4;
  --amber:       #c8860a;
  --amber-dark:  #a06d08;
  --text:        #1a1a1a;
  --text-muted:  #555;
  --bg:          #fafaf7;
  --border:      #d4e2ce;
  --font-body:   Georgia, 'Times New Roman', serif;
  --font-ui:     system-ui, -apple-system, sans-serif;
  --max-width:   1100px;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(0, 0, 0, 0.08);
}

/* =============================
   1. RESET & BASE
   ============================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* =============================
   2. TYPOGRAPHY
   ============================= */
h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =============================
   3. LAYOUT UTILITIES
   ============================= */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section { padding-block: 4rem; }
.section--alt { background: var(--green-light); }
.text-center { text-align: center; }
.page-intro { color: var(--text-muted); margin-bottom: 0; }

/* =============================
   4. HEADER & NAV
   ============================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img { height: 40px; width: auto; }
.logo:hover { text-decoration: none; opacity: 0.85; }

.site-nav ul {
  display: flex;
  gap: 0.25rem;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--green-mid); color: #fff; text-decoration: none; }
.site-nav a.active { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* =============================
   5. HAMBURGER (MOBILE)
   ============================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.site-header.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.site-header.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .hamburger { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 0.75rem 0.5rem; font-size: 1rem; }
}

/* =============================
   6. BUTTONS
   ============================= */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--amber); color: #fff; border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: #fff; text-decoration: none; }

/* =============================
   7. FOOTER
   ============================= */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  padding-block: 2rem;
  text-align: center;
}
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: #fff; text-decoration: none; }

/* =============================
   8. HERO (Etusivu)
   ============================= */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: url('../images/hero_image_opt.jpg') center / cover no-repeat;
  background-color: var(--green-dark);
  color: #ffffff;
  background-position-y: 15%;
}
.hero-tint {
  background-color: rgba(0, 0, 0, 0.35);
  background-blend-mode: multiply;
}
.hero::after {
  /* Keep this overlay when using a background photo */
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem;
  max-width: 700px;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; }

.bottom-information-text {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  color: var(--text-muted);
}

/* =============================
   9. SERVICE CARDS (Palvelut)
   ============================= */
.service-cta-label { color: var(--text-muted); margin-bottom: 1.5rem; }
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.service-card {
  background: #fff;
  border-left: 4px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.service-card p { color: var(--text-muted); font-size: 0.9375rem; margin: 0; }
p.service-note { margin-top: 0.75rem; font-style: italic; font-size: 0.875rem; color: var(--green-mid); }
.service-note-link { color: var(--green-mid-light); text-decoration-line: underline; }

/* =============================
   10. GALLERY (Kuvagalleria)
   ============================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}
.gallery-item {
  cursor: pointer;
  border-radius: var(--radius);
  background: var(--green-light);
  overflow: hidden;
}
.gallery-img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem 0.5rem;
  text-align: center;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding-bottom: 0.1em;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-close { top: 1.5rem; right: 1.5rem; font-size: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  text-align: center;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem 0.875rem;
  border-radius: var(--radius);
}

/* =============================
   11. CONTACT (Yhteystiedot)
   ============================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  margin-top: 2rem;
}
@media (max-width: 700px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-layout h3 { color: var(--green-dark); margin-bottom: 1rem; }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}
.contact-detail-label {
  font-weight: 700;
  color: var(--green-dark);
  min-width: 90px;
}
.contact-info-note {
  font-style: italic;
  color: var(--text-muted);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.form-group label {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-dark);
}
.form-group input,
.form-group textarea {
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-mid);
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}
.form-submit { margin-top: 0.5rem; }

/* =============================
   12. TOAST
   ============================= */
.toast {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  background: var(--green-dark);
  color: #fff;
  padding: 1.75rem 2.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  max-width: 420px;
  width: calc(100% - 2.5rem);
  text-align: center;
}
.toast.open { display: block; }
.toast-close {
  position: absolute;
  top: 0.5rem;
  right: 0.625rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
}
.toast-close:hover { color: #fff; }
