@font-face {
  font-family: "Lumisnow Sans";
  src: local("Inter"), local("Arial"), local("Helvetica Neue");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Lumisnow Serif";
  src: local("Playfair Display"), local("Georgia"), local("Times New Roman");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

html {
  line-height: 1.15;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  -webkit-font-smoothing: antialiased;
}

p, li, ul, ol, pre, div, h1, h2, h3, h4, h5, h6,
figure, blockquote, figcaption { margin: 0; padding: 0; }

button { background-color: transparent; }
button, input, optgroup, select, textarea {
  font: inherit;
  line-height: 1.15;
  margin: 0;
}
button, select { text-transform: none; }
button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  color: inherit;
}
a { color: inherit; text-decoration: inherit; }
pre { white-space: pre-wrap; }
input { padding: 2px 4px; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
details { display: block; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }

html, body { max-width: 100%; }
body {
  min-width: 320px;
  overflow-x: clip;
  font-family: "Lumisnow Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1.65;
  color: var(--color-on-surface);
  background: var(--color-surface);
  fill: var(--color-on-surface);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  color: #fff;
  background: #1e3a5f;
  border-radius: 0.375rem;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid #b2854e;
  outline-offset: 3px;
}

.contact-static-note {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin-top: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: default;
}

.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;
}

.cookie-consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1000;
  max-width: 58rem;
  margin-inline: auto;
  padding: 1rem;
  color: #ffffff;
  background: #15191a;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 0.75rem;
  box-shadow: 0 12px 36px rgba(0,0,0,0.24);
}
.cookie-consent__inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-consent__text { max-width: 43rem; font-size: 0.9375rem; line-height: 1.5; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex-shrink: 0; }
.cookie-consent .btn { min-height: 2.5rem; }
.cookie-consent .btn-outline { color: #15191a; border-color: #ffffff; background-color: #ffffff; }
.cookie-consent .btn-link { color: #ffffff; border-color: transparent; background: transparent; }
.cookie-consent a { text-decoration: underline; text-underline-offset: 0.2em; }

/* Give sections breathing room inside their own backgrounds. The first
   section is usually a full-bleed hero and keeps its dedicated spacing. */
main > section + section { margin-top: 0; }
main > section:not(:first-child) {
  padding-top: clamp(4rem, 7vw, 6.5rem);
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
}
section { scroll-margin-top: 6rem; }

@media (max-width: 767px) {
  body { overflow-x: hidden; }
  main, main > *, section, .section-container { min-width: 0; max-width: 100%; }
  main > section + section { margin-top: 0; }
  main > section:not(:first-child) {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  h1 { font-size: clamp(2rem, 9vw, 2.45rem) !important; line-height: 1.12 !important; overflow-wrap: anywhere; }
  h2 { font-size: clamp(1.6rem, 7vw, 2rem) !important; line-height: 1.2 !important; overflow-wrap: anywhere; }
  h3 { font-size: clamp(1.2rem, 5.5vw, 1.45rem) !important; line-height: 1.28 !important; overflow-wrap: anywhere; }
  p, li, a, span { overflow-wrap: anywhere; }
  .btn, button, input, select, textarea { max-width: 100%; }
  .cookie-consent__inner { align-items: stretch; flex-direction: column; }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent__actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive hardening for generated layouts */
@media (max-width: 1100px) {
  .process-steps {
    flex-wrap: wrap;
  }
  .palvelut-process-step {
    flex: 1 1 180px;
    min-width: 0;
  }
  .footer-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-main-grid > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .navigation-desktop-menu {
    display: none !important;
  }
  .navigation-mobile-toggle {
    display: block !important;
  }
  .navigation-container {
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .contact-form-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .contact-form-grid > *,
  .form-group,
  .form-group.full-width {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1 !important;
  }
  .form-input,
  .form-textarea,
  .form-card-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .checkbox-group label {
    min-width: 0;
  }
  .faq-grid,
  .faq-grid > *,
  .faq-intro,
  .palvelut-faq-accordion,
  .palvelut-faq-item,
  .faq-question,
  .faq-answer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .faq-question > :first-child {
    min-width: 0;
  }
  .faq-question svg {
    flex: 0 0 24px;
  }
  .faq-intro .btn,
  .cta-buttons .btn,
  .form-actions .btn {
    width: 100%;
    white-space: normal;
  }
  .footer-main-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand-column {
    grid-column: auto;
  }
}
