:root {
  --purple: #6C63FF;
  --purple-dim: rgba(108,99,255,0.12);
  --purple-border: rgba(108,99,255,0.3);
  --bg: #0D0D0D;
  --bg2: #141414;
  --bg3: #1a1a1a;
  --text: #F0F0F0;
  --muted: #888;
  --border: rgba(255,255,255,0.07);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; max-width: 100%; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

section, nav, footer { position: relative; z-index: 1; }
.hero { position: relative; z-index: 1; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}
.nav-logo span { color: var(--purple); }
nav a.cta-small {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: opacity 0.2s;
}
nav a.cta-small:hover { opacity: 0.85; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-dim);
  border: 1px solid var(--purple-border);
  color: #a89fff;
  font-size: 12px;
  font-weight: 500;
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--purple);
  border-radius: 50%;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 1.5rem;
}
h1 em { font-style: normal; color: var(--purple); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* BUTTONS */
.btn-primary {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  transition: opacity 0.2s, transform 0.2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }

/* SECTION */
section { padding: 6rem 1.5rem; }
.container { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
}
h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 3rem;
}

/* SERVICES */
.services { background: var(--bg); }
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.card {
  background: var(--bg2);
  padding: 2rem;
  transition: background 0.2s;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.card:hover { background: var(--bg3); }
.card-icon {
  width: 40px; height: 40px;
  background: var(--purple-dim);
  border: 1px solid var(--purple-border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}
.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.card-price { font-size: 13px; color: #a89fff; font-weight: 500; }

/* DEMO */
#demo { background: var(--bg2); }
.chat-window {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}
.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.chat-avatar {
  width: 32px; height: 32px;
  background: var(--purple-dim);
  border: 1px solid var(--purple-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.chat-name { font-size: 14px; font-weight: 500; }
.chat-status { font-size: 12px; color: #4ade80; display: flex; align-items: center; gap: 4px; }
.chat-status::before { content: ''; width: 6px; height: 6px; background: #4ade80; border-radius: 50%; }
.chat-messages {
  padding: 1.25rem;
  min-height: 280px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 80%;
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.bot {
  background: var(--bg3);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.user {
  background: var(--purple);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.typing {
  display: flex; gap: 4px; align-items: center;
  padding: 0.625rem 0.875rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
}
.dot {
  width: 6px; height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}
.chat-input-row {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.chat-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--purple-border); }
.chat-input::placeholder { color: var(--muted); }
.chat-send {
  background: var(--purple);
  border: none;
  border-radius: 8px;
  width: 38px; height: 38px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.chat-send:hover { opacity: 0.85; }
.chat-send svg { width: 16px; height: 16px; fill: #fff; }

/* PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 800px;
}
.price-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, background 0.2s;
}
.price-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.price-card.featured { border-color: var(--purple-border); background: rgba(108,99,255,0.06); }
.price-card.featured:hover { background: rgba(108,99,255,0.1); }
.featured-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-name { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.price-amount { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.25rem; }
.price-period { font-size: 13px; color: var(--muted); margin-bottom: 1.5rem; }
.price-features { list-style: none; margin-bottom: 1.75rem; }
.price-features li { font-size: 14px; color: var(--muted); padding: 0.4rem 0; display: flex; align-items: center; gap: 8px; }
.price-features li::before { content: '✓'; color: var(--purple); font-weight: 600; font-size: 13px; flex-shrink: 0; }

/* CONTACT */
#yhteystiedot { background: var(--bg2); }
.contact-form { max-width: 520px; display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; font-weight: 500; color: var(--muted); }
input, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--purple-border); }
input::placeholder, textarea::placeholder { color: #555; }
textarea { resize: vertical; min-height: 120px; }

/* FOOTER */
footer { padding: 2rem 1.5rem; border-top: 1px solid var(--border); text-align: center; }
footer p { font-size: 13px; color: #444; }
footer span { color: var(--purple); }

/* ANIMATIONS */
@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* MOBILE */
@media (max-width: 600px) {
  nav { padding: 1rem; }
  section { padding: 3rem 1rem; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 6rem 1rem 3rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta a, .hero-cta button { text-align: center; }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-form { max-width: 100%; }
  .chat-window { margin: 0; }
}
@media (max-width: 480px) {
  #cookieBanner { width: calc(100% - 2rem) !important; left: 1rem !important; transform: none !important; bottom: 4rem !important; }

@keyframes ray {
  0% { background-position: 0% 50%, 0% 50%; }
  50% { background-position: 175% 50%, 175% 50%; }
  100% { background-position: 350% 50%, 350% 50%; }
}

@keyframes ray {
  0% { background-position: 0% 50%, 0% 50%; }
  100% { background-position: 350% 50%, 350% 50%; }
}

@keyframes aurora-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  33% { transform: translateY(-30px) scale(1.05); }
  66% { transform: translateY(-15px) scale(0.97); }
}

.aurora-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-layer {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background-image:
    repeating-linear-gradient(100deg, black 0%, black 7%, transparent 10%, transparent 12%, black 16%),
    repeating-linear-gradient(100deg, #6C63FF 10%, #a855f7 15%, #6C63FF 20%, #818cf8 25%, #6C63FF 30%);
  background-size: 300%, 200%;
  background-repeat: no-repeat;
  filter: blur(30px) saturate(300%);
  opacity: 0.18;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at 60% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, black 30%, transparent 75%);
  animation: ray 20s linear infinite, aurora-float 10s ease-in-out infinite;
}

.aurora-layer-2 {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  background-image:
    repeating-linear-gradient(80deg, black 0%, black 7%, transparent 10%, transparent 12%, black 16%),
    repeating-linear-gradient(80deg, #818cf8 10%, #6C63FF 15%, #a855f7 20%, #6C63FF 25%, #818cf8 30%);
  background-size: 250%, 150%;
  background-repeat: no-repeat;
  filter: blur(40px) saturate(250%);
  opacity: 0.12;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at 40% 60%, black 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 40% 60%, black 25%, transparent 70%);
  animation: ray 30s linear infinite reverse, aurora-float 14s ease-in-out infinite reverse;
}
}