/* ===== Uusimahdollisuus — global styles ===== */
:root {
  --frozen-water: #dcfffd;
  --neon-ice: #52ffee;
  --mint-leaf: #4fb477;
  --hunter-green: #3f6634;
  --olive-leaf: #345511;
  --font-head: 'Stack Sans Notch', serif;
  --font-body: 'Fira Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--frozen-water);
  color: #000;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--olive-leaf);
}

a { color: var(--hunter-green); }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

main { flex: 1; }

section { padding: 4rem 0; }

/* ===== Header ===== */
.site-header {
  background: var(--mint-leaf);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(52, 85, 17, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}

.brand img { width: 46px; height: 46px; border-radius: 50%; }

.brand-name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--neon-ice);
  color: var(--neon-ice);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(52, 85, 17, 0.55), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.hero-content { position: relative; z-index: 2; padding: 2rem; max-width: 820px; }

.hero-content h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); text-shadow: 0 2px 12px rgba(0,0,0,0.5); }

.hero-content p { font-size: 1.15rem; margin: 1.25rem 0 2rem; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }

.hero-sub {
  text-align: center;
  padding: 3rem 0 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--hunter-green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.9rem;
  border-radius: 3px;
  border: 2px solid var(--mint-leaf);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(52, 85, 17, 0.4);
  background: var(--olive-leaf);
}

.btn-outline {
  background: transparent;
  border-color: #fff;
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.15); }

/* ===== Page hero (inner pages) ===== */
.page-hero {
  position: relative;
  min-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.page-hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(52, 85, 17, 0.6), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.page-hero .hero-content h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* ===== Section headings ===== */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin-bottom: 0.75rem;
}

.section-title.align-left { text-align: left; }

.align-center { text-align: center; }

.section-lead {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  color: #1e2b1a;
}

/* ===== Services — column flex + alternating cards ===== */
.services-flex {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--hunter-green);
  color: #fff;
  border-radius: 3px;
  border: 2px solid var(--mint-leaf);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 34px rgba(52, 85, 17, 0.45);
}

.service-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
  max-height: 500px;
}

.service-card .card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.service-card .card-body h3 { color: #fff; font-size: 1.5rem; }

.service-card .card-body p { color: #f0f7ee; }

.service-card .card-body a { color: var(--neon-ice); font-weight: 600; }

.service-card.reverse .card-media { order: 2; }
.service-card.reverse .card-body { order: 1; }

/* ===== Testimonials carousel ===== */
.testimonial-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border: 2px solid var(--mint-leaf);
  max-width: 960px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 420px;
}

.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 2.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(52, 85, 17, 0.85));
  color: #fff;
}

.slide-overlay blockquote {
  font-size: 1.2rem;
  font-style: italic;
  max-width: 640px;
}

.slide-overlay cite {
  font-style: normal;
  font-weight: 600;
  color: var(--neon-ice);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(52, 85, 17, 0.75);
  color: #fff;
  border: 2px solid var(--mint-leaf);
  border-radius: 3px;
  font-size: 1.5rem;
  width: 46px;
  height: 46px;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease;
}

.carousel-btn:hover { background: var(--hunter-green); }

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button.active { background: var(--neon-ice); }

/* ===== Highlight band (extra sections) ===== */
.highlight-band {
  background: var(--hunter-green);
  color: #fff;
}

.highlight-band .section-lead { color: #eaf5ec; }

.highlight-band h2, .highlight-band h3 { color: #fff; }

.highlight-band a { color: var(--neon-ice); font-weight: 600; }

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.highlight-item {
  border: 2px solid var(--mint-leaf);
  border-radius: 3px;
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-item:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.highlight-item h3 { margin-bottom: 0.6rem; font-size: 1.25rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split img { border-radius: 3px; border: 2px solid var(--mint-leaf); }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat .stat-num {
  font-family: var(--font-head);
  font-size: 2.6rem;
  color: var(--neon-ice);
}

.stat p { color: #eaf5ec; }

/* ===== Projects grid ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--hunter-green);
  color: #fff;
  border-radius: 3px;
  border: 2px solid var(--mint-leaf);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 34px rgba(52, 85, 17, 0.45);
}

.project-card img { width: 100%; height: 210px; object-fit: cover; }

.project-card .project-body { padding: 1.4rem; }

.project-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.4rem; }

.project-card p { color: #f0f7ee; font-size: 0.95rem; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-box {
  background: var(--hunter-green);
  color: #fff;
  border-radius: 3px;
  border: 2px solid var(--mint-leaf);
  padding: 2rem;
}

.contact-info-box h2, .contact-info-box h3 { color: #fff; }

.contact-info-box a { color: var(--neon-ice); }

.contact-info-box ul { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.9rem; }

.form-card {
  background: #fff;
  border: 2px solid var(--mint-leaf);
  border-radius: 3px;
  padding: 2rem;
}

.form-row { margin-bottom: 1.25rem; }

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--olive-leaf);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--mint-leaf);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--frozen-water);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: 2px solid var(--neon-ice);
  outline-offset: 1px;
}

.form-row .error-msg {
  display: none;
  color: #b3261e;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.form-row.invalid input,
.form-row.invalid textarea { border-color: #b3261e; }

.form-row.invalid .error-msg { display: block; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--hunter-green);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 3px;
  border-left: 6px solid var(--neon-ice);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  max-width: 360px;
  z-index: 999;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.toast.show { transform: translateY(0); opacity: 1; }

.toast.toast-error { border-left-color: #b3261e; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  max-width: 420px;
  background: var(--olive-leaf);
  color: #fff;
  border: 2px solid var(--mint-leaf);
  border-radius: 3px;
  padding: 1.25rem 1.4rem;
  z-index: 998;
  display: none;
}

.cookie-banner.show { display: block; }

.cookie-banner p { font-size: 0.9rem; margin-bottom: 0.8rem; }

.cookie-banner a { color: var(--neon-ice); }

.cookie-actions { display: flex; gap: 0.75rem; }

.cookie-actions .btn { padding: 0.5rem 1.1rem; font-size: 0.9rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--olive-leaf);
  color: #fff;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3.5rem 0 2.5rem;
}

.site-footer h3 {
  color: var(--neon-ice);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.site-footer a { color: #fff; text-decoration: none; }

.site-footer a:hover { color: var(--neon-ice); }

.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }

.footer-brand img { width: 40px; height: 40px; border-radius: 50%; }

.footer-brand span { font-family: var(--font-head); font-size: 1.2rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* ===== Legal pages ===== */
.legal-content { max-width: 820px; margin: 0 auto; }

.legal-content h2 { margin: 2rem 0 0.75rem; font-size: 1.4rem; }

.legal-content p, .legal-content li { color: #1e2b1a; }

.legal-content ul { padding-left: 1.4rem; margin: 0.75rem 0; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .highlight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mint-leaf);
    display: none;
    box-shadow: 0 8px 18px rgba(52, 85, 17, 0.35);
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 4%;
  }

  .main-nav li { width: 100%; }

  .main-nav a { display: block; padding: 0.85rem 0; }

  .service-card { grid-template-columns: 1fr; }

  .service-card.reverse .card-media { order: 0; }
  .service-card.reverse .card-body { order: 1; }

  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }

  .carousel-slide { min-height: 340px; }
  .slide-overlay { padding: 1.5rem; }
  .slide-overlay blockquote { font-size: 1rem; }
}

@media (max-width: 560px) {
  section { padding: 3rem 0; }
  .hero { min-height: 60vh; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { left: 0.5rem; right: 0.5rem; max-width: none; }
}
