@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── VARIABLES ─────────────────────────────────────── */
:root {
  --bg:      #060c1a;
  --bg2:     #0d1830;
  --card:    rgba(255, 255, 255, 0.04);
  --accent:  #3b82f6;
  --accent2: #06b6d4;
  --grad:    linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --text:    #f8fafc;
  --muted:   #94a3b8;
  --border:  rgba(255, 255, 255, 0.08);
  --radius:  16px;
  --nav-h:   70px;
}

/* ─── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── TYPOGRAPHY ────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
p  { color: var(--muted); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title { margin-bottom: 14px; }
.section-sub   { max-width: 580px; font-size: 1.05rem; margin-bottom: 56px; }

/* ─── BADGE ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  margin-bottom: 28px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.925rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.42);
}

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── NAVIGATION ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 12, 26, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

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

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}
.nav-links a:hover  { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--text); }

.nav-links a.btn-nav {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  padding: 8px 20px;
  margin-left: 8px;
  border-radius: 8px;
}
.nav-links a.btn-nav:hover { opacity: 0.85; transform: none; background: var(--grad); }

/* Muut-dropdown */
.nav-dropdown { position: relative; list-style: none; }
.nav-dropdown > a { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dropdown > a svg { transition: transform 0.2s; }
.nav-dropdown:hover > a svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; flex-direction: column; }
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.875rem; color: var(--muted); transition: all 0.15s;
}
.nav-dropdown-menu a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-dropdown-menu a span.dd-icon { font-size: 1rem; flex-shrink: 0; }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-menu.open { max-height: 300px; }
.mobile-menu a {
  display: block;
  padding: 14px 24px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); }

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 65% at 10% 55%, rgba(59, 130, 246, 0.13) 0%, transparent 100%),
    radial-gradient(ellipse 40% 50% at 85% 15%, rgba(6, 182, 212, 0.09) 0%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 48px;
}
.hero-sq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 18px 12px;
  backdrop-filter: blur(10px);
  text-align: center;
}
.hero-sq i { font-size: 1.1rem; color: var(--accent); margin-bottom: 5px; }
.hero-sq strong { font-size: 0.78rem; font-weight: 700; }
.hero-sq span { font-size: 0.67rem; color: var(--muted); }

@media (max-width: 640px) {
  .hero-stats-row { grid-template-columns: 1fr 1fr; }
}

.hero-content h1    { margin-bottom: 24px; }
.hero-content > p   { font-size: 1.1rem; max-width: 500px; margin-bottom: 40px; line-height: 1.75; }

.hero-visual { display: flex; justify-content: flex-end; }

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
  position: relative;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: var(--grad);
  z-index: -1;
  opacity: 0.2;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.hero-stat:last-child { border-bottom: none; }

.hero-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.hero-stat-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat-text span { font-size: 0.8rem; color: var(--muted); }

/* ─── VALUE PROPS ────────────────────────────────────── */
.hero-delivery {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  margin-top: -8px;
}

/* ─── ERIKOISTARJOUS ──────────────────────────────────── */
.promo-strip {
  background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(6,182,212,0.1) 100%);
  border-top: 1px solid rgba(59,130,246,0.25);
  border-bottom: 1px solid rgba(59,130,246,0.25);
  padding: 20px 0;
}
.promo-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.promo-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 200px;
}
.promo-text strong { color: #fff; }

@media (max-width: 600px) {
  .promo-inner { flex-direction: column; align-items: flex-start; }
}

.props-section { background: var(--bg2); }

.props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.prop-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
}
.prop-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.prop-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 20px;
}

.prop-card h3 { margin-bottom: 10px; }

/* ─── SERVICES ───────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover::after  { transform: scaleX(1); }
.service-card:hover {
  border-color: rgba(59, 130, 246, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.service-card h3 { margin-bottom: 10px; }

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: gap 0.2s;
}
.service-link:hover { gap: 10px; }

/* ─── SERVICE DETAIL (palvelut-page) ─────────────────── */
.service-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  transition: border-color 0.3s;
}
.service-detail:hover { border-color: rgba(59, 130, 246, 0.2); }

.service-detail-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; overflow-wrap: break-word; }

.service-detail-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--accent);
}

.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.service-detail h2 { margin-bottom: 12px; font-size: 1.5rem; overflow-wrap: break-word; word-break: break-word; hyphens: auto; max-width: 100%; }
.service-detail > div > p { margin-bottom: 20px; font-size: 0.975rem; line-height: 1.7; }

.feature-list { margin-top: 8px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.925rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--accent); margin-top: 3px; font-size: 0.75rem; flex-shrink: 0; }

/* ─── PROCESS ────────────────────────────────────────── */
.process-section { background: var(--bg2); }

.timeline {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -60px;
  top: 2px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  box-shadow: 0 0 0 4px var(--bg2), 0 0 0 7px rgba(59, 130, 246, 0.15);
  z-index: 1;
}

.timeline-item h3 { margin-bottom: 6px; }

/* ─── REFERENCES ─────────────────────────────────────── */
.refs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ref-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
}
.ref-card:hover {
  border-color: rgba(59, 130, 246, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.ref-year {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ref-card h3 { margin-bottom: 10px; }

.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ref-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}
.ref-tag i { color: var(--accent); font-size: 0.65rem; }

.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: gap 0.2s;
}
.ref-link:hover { gap: 10px; }

/* ─── CTA SECTION ────────────────────────────────────── */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.07), rgba(6, 182, 212, 0.04));
  border-top: 1px solid var(--border);
}

.cta-section h2         { margin-bottom: 14px; }
.cta-section > div > p  { max-width: 500px; margin: 0 auto 40px; font-size: 1.05rem; }

/* ─── CONTACT ────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2    { margin-bottom: 14px; }
.contact-info > p   { margin-bottom: 36px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-text strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.contact-item-text span   { font-size: 0.82rem; color: var(--muted); }

/* FORM */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--accent); background: rgba(59, 130, 246, 0.04); }
.form-control::placeholder { color: rgba(148, 163, 184, 0.5); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-submit { width: 100%; justify-content: center; margin-top: 8px; }

.form-msg { margin-top: 14px; font-size: 0.875rem; text-align: center; padding: 12px; border-radius: 8px; }
.form-msg.success { color: #4ade80; background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.2); }
.form-msg.error   { color: #f87171; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.2); }

/* ─── PAGE HERO (inner pages) ────────────────────────── */
.page-hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 0% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner { max-width: 640px; }
.page-hero h1   { margin-bottom: 14px; }
.page-hero > div > p { font-size: 1.05rem; }

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid     { grid-template-columns: 1fr; }
  .props-grid    { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .refs-grid     { grid-template-columns: 1fr 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail-meta { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .nav-links     { display: none; }
  .hamburger     { display: flex; }
  .props-grid    { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .refs-grid     { grid-template-columns: 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .footer-inner  { flex-direction: column; }
  .service-detail { padding: 32px 24px; }
  section { padding: 64px 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
