:root {
  --bg: #ffffff;
  --panel: #f9f9f9;
  --muted: #485058;
  --text: #363c41;
  --accent: #00bf63;
  --accent-2: #c1ff72;
  --glass: rgba(0, 0, 0, 0.03);
  --card-radius: 12px;
  --max-width: 1200px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-synthesis: none;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

/* Pakota selain-autofill valkoiseksi */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background-color: #fafafa;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

/* Estä scrollaus kun modaali on auki */
body.modal-open {
  overflow: hidden;
}

.container {
  width: calc(100% - 40px);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 0;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  background-color: #fafafa;
  /* start without a visible border; show it only after scroll */
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

/* when the page is scrolled, apply a subtle border and lift */
.navbar.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.06);

}

/* Reduce vertical space in the navbar container so header isn't too tall */
.navbar .container {
  padding: 20px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: auto;
  height: 28px; /* keep layout height small */
  max-height: 28px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  transform-origin: center;
  transform: scale(1.6); /* visually larger without increasing layout height */
  will-change: transform;
}

.logo-img { display: block; background: transparent; }

/* Make a subtle dark pill behind the logo so light/white logos remain visible */
.logo {
  padding: 4px 24px; /* smaller internal padding so header height stays controlled */
  display: flex;
  align-items: center;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: color 220ms ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.nav-links a.btn:focus {
  outline: none;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.06);
}

/* Hide hamburger menu on desktop */
.mobile-menu-toggle {
  display: none;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 700;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  border-radius: 12px;
  background-clip: padding-box;
  box-shadow: none;
  position: relative;
  z-index: 1;
  /* promote to its own layer to avoid subpixel overlap artifacts */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  outline: 1px solid transparent; /* prevent hairline artifacts on some browsers */
  /* subtle interactive transition for hover effects */
  transition: filter 160ms ease, opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #ffffff !important;
  padding: 14px 22px;
  font-size: 1.05rem;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background-origin: border-box;
  border: 0;
  box-shadow: none;
  z-index: 1;
}



.btn.ghost {
  /* Use a solid background so adjacent gradient doesn't show in corners */
  background: var(--bg) !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--muted);
  box-shadow: none;
  padding: 14px 22px;
  font-size: 1.05rem;
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
  font-weight: 600;
}

.btn.secondary:hover {
  background: var(--accent);
  color: #ffffff;
}

.btn.cta {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #ffffff;
  padding: 14px 22px;
  font-size: 1.05rem;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background-origin: border-box;
}

.btn.large {
  padding: 16px 28px;
  font-size: 1.1rem;
  border-radius: 14px;
}


/* Ensure CTA group buttons align and have consistent height */
.hero-ctas .btn {
  min-height: 44px;
}

/* CTA group spacing and consistent radius - DESKTOP: rivinä */
.hero-ctas { 
  display: flex; 
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}
.hero-ctas .btn { 
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 1rem;
}

.hero-ctas .btn.cta {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.hero-ctas .btn.secondary {
  min-width: 160px;
}

/* HERO */
.hero {
  padding: 40px 0;
}

.hero-inner {
  display: flex;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  flex: 1;
}

.hero-copy h1 {
  font-size: 3rem;
  margin: 0 0 12px;
  padding-top: 60px;
}

.hero-copy .lead {
  color: var(--muted);
  font-size: 1.3rem;
  margin-bottom: 20px;
  max-width: 550px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  padding-top: 12px;
}

.hero-visual {
  width: 420px;
  flex: 0 0 420px;
}



/* SECTIONS */
.section {
  padding: 40px 0;
}

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.section .muted {
  color: var(--muted);
  max-width: 720px;
}

.grid {
  display: grid;
  gap: 20px;
}

.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--panel);
  padding: 22px;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.icon-card .icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.icon-card h3 {
  margin: 6px 0;
}

 .icon-card h3 {
    font-size: 1.3rem;
    margin: 4px 0;
  }

/* Icon styling for inline SVGs */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;

  margin-bottom: 10px;
}

.icon img {
  width: 58px;
  height: 58px;
  color: var(--accent);
  fill: none; /* default to no fill unless specified in SVG */
  margin-left: 10px;
}

.solution-row {
  display: flex;
  gap: 28px;
  align-items: center;
}

.solution-copy {
  flex: 1;
}

.solution-visual {
  width: 360px;
  flex: 0 0 360px;
}

.placeholder-img {
  width: 100%;
  height: 220px;
  background: linear-gradient(90deg, rgba(40, 167, 69, 0.15), rgba(32, 201, 151, 0.08));
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.steps .step {
  padding: 12px;
  border-radius: 10px;
  text-align: left;
  background: var(--panel);
  padding: 22px;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08)
}


.step-icon {
  display: inline-flex;
  align-items: left;
  justify-content: left;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 200px;
}


.step img {
  width: 58px;
  height: 58px;
  color: var(--accent);
  fill: none; /* default to no fill unless specified in SVG */
}
  .step h4 {
    font-size: 1.3rem;
    margin: 8px 0;
  }


/* PRICING */
.pricing {
  padding-bottom: 80px !important;
}

.pricing-grid .pricing-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;

}

.pricing-card .card-head {
  font-weight: 800;
  font-size: 1.8rem;
}

.price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.per {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  margin-left: 6px;
}

.pricing-card.featured {
  border: 1px solid rgba(40, 167, 69, 0.2);
  background: linear-gradient(120deg, rgba(63, 230, 102, 0.2), transparent);
}

.badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.pricing-card .features {
  list-style: none;
  padding: 0;
  margin: 6px 0 14px;
}

.pricing-card .features li {
  color: var(--muted);
  margin-bottom: 8px;
}


/* FOOTER */
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px 0;
  background: transparent;
  background-color: #fafafa;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: left;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  margin-left: 14px;
  text-decoration: none;
  transition: color 220ms ease;
}

.footer-links a:hover {
  color: var(--accent);
}


/* --- MODAL STYLES --- */
.modal-overlay {
    display: none; /* Piilotettu oletuksena */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    color: #212529;
    padding: 40px;
    border-radius: 20px;
    width: 85%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 191, 99, 0.15), 0 0 40px rgba(193, 255, 114, 0.1);
    border: 2px solid rgba(0, 191, 99, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}


.close-modal {
    color: var(--muted);
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;

}

.close-modal:hover {
    color: var(--accent);

    transform: rotate(90deg);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--accent), #00a84f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    color: var(--text);
}

.modal-content > p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0 0 25px 0;
    max-width: 390px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.modal-content label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.modal-content input, .modal-content textarea {
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid #e0e0e0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    color: var(--text);
}

.modal-content input:focus, .modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #ffffff;

    transform: translateY(-1px);
}

.modal-content textarea {
    resize: vertical;
    font-family: inherit;
}

.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    padding-right: 25px;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
    margin-right: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Ensure modal buttons use the Poppins family and bold weight */
.modal-content .btn {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial !important;
  font-weight: 700 !important;
}

/* Subtle hover effect for all button-like controls: simulated 10% darkening
   using an inset semi-transparent black overlay so text color isn't affected. */
.btn:hover,
button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  /* an inset shadow adds a subtle overlay without changing text color */
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.06);
  cursor: pointer;
}

.btn:focus,
button:focus,
.button:focus,
input[type="submit"]:focus,
input[type="button"]:focus {
  outline: none;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.06);
}

/* Palautteet */
.notice { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; }
.notice.success { background-color: #d4edda; color: #155724; }
.notice.error { background-color: #f8d7da; color: #721c24; }
