/* ==========================================================================
   Botteri — tyylit
   ========================================================================== */

:root {
  --paper: #F7F6F2;
  --paper-2: #EFEDE7;
  --card: #FFFFFF;
  --ink: #0F0E13;
  --ink-2: #3A3842;
  --muted: #6B6874;
  --faint: #A09DA8;
  --line: rgba(15, 14, 19, .09);
  --line-strong: rgba(15, 14, 19, .16);

  --accent: #5B3DF5;
  --accent-deep: #4327E0;
  --accent-soft: #ECE8FF;
  --accent-glow: rgba(91, 61, 245, .35);
  --live: #22C55E;

  --dark: #0E0D12;
  --dark-2: #17151F;
  --dark-line: rgba(255, 255, 255, .1);
  --dark-muted: rgba(255, 255, 255, .62);

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --max-width: 1200px;
  --gutter: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 14, 19, .05), 0 2px 6px rgba(15, 14, 19, .04);
  --shadow-md: 0 1px 2px rgba(15, 14, 19, .04), 0 12px 32px -8px rgba(15, 14, 19, .12);
  --shadow-lg: 0 2px 4px rgba(15, 14, 19, .04), 0 40px 80px -24px rgba(15, 14, 19, .28);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Typografia ---------- */
h1, h2, h3 { margin: 0; }

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
  hyphens: manual;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--accent);
}

h2 { font-size: clamp(40px, 5.2vw, 64px); }

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mono-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

.section-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 22px 0 0;
  max-width: 34ch;
}

.section-lead a,
.pricing-contact a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- Painikkeet ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}

.btn .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: scale(.98); }

.btn-large { --btn-h: 52px; padding: 0 26px; font-size: 16px; }
.btn-small { --btn-h: 38px; padding: 0 16px; font-size: 14px; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(67, 39, 224, .4), 0 8px 24px -6px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(67, 39, 224, .4), 0 14px 32px -8px var(--accent-glow); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2833; }

.btn-outline {
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover { background: #fff; border-color: var(--ink); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(247, 246, 242, .78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark { width: 30px; height: 30px; }

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

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-links a:hover { color: var(--ink); background: rgba(15, 14, 19, .05); }

.nav-links .nav-links-login { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-login {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-login:hover { color: var(--ink); background: rgba(15, 14, 19, .05); }

.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 56px 0 96px;
  margin-top: -72px;
  padding-top: 144px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 14, 19, .09) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 64px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.pill:hover { border-color: var(--line-strong); background: #fff; }
.pill .icon { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease); }
.pill:hover .icon { transform: translateX(2px); }

.pill-tag {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(52px, 7.2vw, 92px);
  line-height: .98;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  max-width: 11ch;
}

.hero-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 36px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--muted);
}

.hero-checks li { display: flex; align-items: center; gap: 8px; }
.hero-checks .icon {
  width: 18px;
  height: 18px;
  padding: 3px;
  stroke-width: 3;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

/* Demo */
.hero-visual {
  position: relative;
  padding: 0 0 0 48px;
}

.demo-glow {
  position: absolute;
  z-index: -1;
  width: 110%;
  aspect-ratio: 1;
  right: -20%;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(91, 61, 245, .22), rgba(91, 61, 245, .06) 55%, transparent);
  filter: blur(20px);
  pointer-events: none;
}

.demo-site {
  position: absolute;
  left: 0;
  top: -28px;
  width: 78%;
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.demo-site-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 242, .8);
}

.demo-site-bar > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.demo-site-url {
  margin-left: 12px;
  flex: 1;
  max-width: 200px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
  transition: opacity .3s var(--ease);
}

.demo-site-body { padding: 22px 20px 26px; }

.sk { background: var(--paper-2); border-radius: 6px; }
.sk-title { height: 18px; width: 55%; margin-bottom: 14px; }
.sk-line { height: 9px; width: 85%; margin-bottom: 8px; }
.sk-line.short { width: 60%; margin-bottom: 20px; }
.sk-row { display: flex; gap: 10px; }
.sk-img { height: 90px; flex: 1; border-radius: 10px; }

.demo-chat {
  position: relative;
  margin-left: auto;
  width: min(100%, 380px);
  margin-top: 64px;
  background: var(--card);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--accent);
  color: #fff;
}

.demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .16);
  display: grid;
  place-items: center;
}
.demo-avatar svg { width: 24px; height: 24px; }

.demo-chat-name {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  transition: opacity .3s var(--ease);
}

.demo-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: .82;
  margin-top: 2px;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  flex-shrink: 0;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.demo-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  white-space: nowrap;
}

.demo-messages {
  height: 300px;
  padding: 18px;
  background: #F7F7FB;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  animation: msg-in .45s var(--ease) both;
}

.msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  color: var(--ink);
}

.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.msg.typing {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
}

.msg.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  animation: typing 1.1s infinite ease-in-out;
}
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.demo-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  color: var(--faint);
}

.demo-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}
.demo-send .icon { width: 15px; height: 15px; }

.demo-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.demo-tab {
  position: relative;
  overflow: hidden;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.demo-tab:hover { color: var(--ink); border-color: var(--line-strong); }
.demo-tab.is-active { color: var(--ink); background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.demo-tab::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.demo-tab.is-running::after {
  animation: tab-progress var(--dur, 9s) linear forwards;
}

@keyframes tab-progress { to { transform: scaleX(1); } }

.demo-note {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ---------- Toimialat ---------- */
.industries {
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.industries .mono-label {
  justify-content: center;
  margin-bottom: 18px;
}
.industries .mono-label::before { display: none; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.marquee li {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--ink-2);
  white-space: nowrap;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 56px;
}

.marquee li::after {
  content: '✦';
  font-size: 14px;
  color: var(--accent);
  margin-right: -28px;
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Osiot ---------- */
.section { padding: 128px 0; }

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

/* ---------- Miksi nyt ---------- */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: start;
}

.why-intro {
  position: sticky;
  top: 120px;
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.why-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line-strong);
}

.why-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 6px;
}

.why-list h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.why-list p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 48ch;
}

/* ---------- Ominaisuudet (bento) ---------- */
.features {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.tile:hover { border-color: var(--line-strong); }

.tile-copy h3 { margin-bottom: 8px; font-size: 18px; }
.tile-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.tile-visual {
  flex: 1;
  min-height: 190px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  position: relative;
}

/* Leveä: koodi */
.tile-wide {
  grid-column: span 4;
  flex-direction: row;
  align-items: stretch;
  gap: 32px;
}

.tile-wide .tile-copy {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tile-wide .tile-copy h3 { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 12px; }

.code-card {
  flex: 1;
  min-width: 0;
  background: var(--dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.copy-btn:hover { background: rgba(255, 255, 255, .14); }
.copy-btn .icon { width: 13px; height: 13px; }
.copy-btn.is-copied { background: rgba(34, 197, 94, .18); border-color: rgba(34, 197, 94, .4); }

.code-card pre {
  margin: 0;
  padding: 22px 20px 26px;
  flex: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.code-card pre code {
  background: none;
  padding: 0;
  color: #E7E5EE;
  font-size: 13.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  width: 100%;
}

.code-card .ln {
  display: inline-block;
  width: 2.2em;
  color: #4A4757;
  user-select: none;
}

.code-hl {
  display: block;
  margin: 2px -20px;
  padding: 4px 20px 4px calc(20px + 2.2em);
  text-indent: -2.2em;
  background: rgba(91, 61, 245, .16);
  box-shadow: inset 2px 0 0 var(--accent);
}

.code-hl .ln { color: #B3A4FF; text-indent: 0; }

.c-dim { color: #6F6C7C; }
.c-tag { color: #FF8FA3; }
.c-attr { color: #F5C66A; }
.c-str { color: #9BE7B4; }
.c-key { white-space: nowrap; color: #fff;background: rgba(91, 61, 245, .55); border-radius: 4px; padding: 1px 5px; }

/* NLU-visualisointi */
.nlu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box;
}

.nlu .q {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.nlu .q:nth-child(2) { margin-left: 18px; }
.nlu .q:nth-child(3) { margin-left: 6px; }

.nlu .a {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}
.nlu .a .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }

/* Editori */
.editor { display: flex; flex-direction: column; overflow: hidden; }

.editor-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #15803D;
}
.saved::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

.editor-body { padding: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.editor-body p { margin: 0 0 8px; }
.editor-body b { color: var(--ink); font-weight: 600; }

.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Tilastot */
.stats { display: flex; flex-direction: column; padding: 16px 16px 0; }

.stats-top { display: flex; flex-direction: column; gap: 2px; }
.stats-top span { font-size: 12px; color: var(--muted); }
.stats-top b { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stats-top small { font-size: 14px; color: var(--faint); font-weight: 500; }

.bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-top: 14px;
}

.bars i {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(91, 61, 245, .35), rgba(91, 61, 245, .12));
  transform-origin: bottom;
}
.bars i:last-child { background: var(--accent); }

.js .tile.reveal .bars i { transform: scaleY(.2); transition: transform .9s var(--ease); }
.js .tile.reveal.is-visible .bars i { transform: scaleY(1); }
.bars i:nth-child(2) { transition-delay: .05s !important; }
.bars i:nth-child(3) { transition-delay: .1s !important; }
.bars i:nth-child(4) { transition-delay: .15s !important; }
.bars i:nth-child(5) { transition-delay: .2s !important; }
.bars i:nth-child(6) { transition-delay: .25s !important; }
.bars i:nth-child(7) { transition-delay: .3s !important; }
.bars i:nth-child(8) { transition-delay: .35s !important; }

/* Laitteet */
.devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  padding: 24px 16px 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--paper));
}

.device { border: 1.5px solid var(--ink); background: var(--card); position: relative; }
.device-screen { position: absolute; inset: 6px; border-radius: 4px; background: var(--paper); }

.laptop {
  width: 70%;
  aspect-ratio: 16 / 10;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.phone {
  z-index: 1;
  width: 24%;
  aspect-ratio: 9 / 17;
  border-radius: 14px;
  margin-right: -8%;
  margin-bottom: -22px;
  box-shadow: 8px 0 24px -8px rgba(15, 14, 19, .25);
}

.mini-lines {
  position: absolute;
  left: 26%;
  top: 14%;
  right: 10%;
  height: 40%;
  background:
    linear-gradient(var(--paper-2), var(--paper-2)) 0 0 / 60% 18% no-repeat,
    linear-gradient(var(--paper-2), var(--paper-2)) 0 45% / 90% 10% no-repeat,
    linear-gradient(var(--paper-2), var(--paper-2)) 0 75% / 70% 10% no-repeat;
}
.phone .device-screen { border-radius: 9px; inset: 4px; }

.mini-bubble {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
}

.mini-chat {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background:
    linear-gradient(var(--accent), var(--accent)) top / 100% 18% no-repeat,
    linear-gradient(#fff, #fff) 12% 32% / 60% 9% no-repeat,
    linear-gradient(var(--accent), var(--accent)) 88% 48% / 50% 9% no-repeat,
    linear-gradient(#fff, #fff) 12% 64% / 66% 9% no-repeat,
    #F7F7FB;
}

/* Strip */
.tile-strip {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
}

.tile-strip .tile-copy { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.tile-strip .tile-copy h3 { margin: 0; }

.strip-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.strip-icon .icon { width: 20px; height: 20px; }

.strip-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* ---------- Vaiheet ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.step::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 48px;
  background: var(--accent);
}

.step-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1;
  color: var(--faint);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; max-width: 30ch; }

/* ---------- Hinnoittelu ---------- */
.pricing { padding-top: 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 80px;
  align-items: center;
  padding-top: 128px;
  border-top: 1px solid var(--line);
}

.pricing-contact {
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
}

.price-card {
  position: relative;
  isolation: isolate;
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .04) 40%, rgba(91, 61, 245, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

.price-card-glow {
  position: absolute;
  z-index: -2;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(91, 61, 245, .7), transparent);
  filter: blur(30px);
}

.price-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.price-name { font-size: 15px; font-weight: 500; color: var(--dark-muted); }

.price-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: rgba(91, 61, 245, .35);
  border: 1px solid rgba(155, 137, 255, .5);
  border-radius: 999px;
  padding: 4px 10px;
}

.price { display: flex; align-items: baseline; gap: 10px; }

.price-amount {
  font-family: var(--font-serif);
  font-size: 96px;
  line-height: .9;
  letter-spacing: -0.03em;
}

.price-period { font-size: 18px; color: var(--dark-muted); }

.price-sub {
  margin: 14px 0 32px;
  color: var(--dark-muted);
  font-size: 15px;
}

.price-features {
  list-style: none;
  padding: 28px 0 0;
  margin: 0 0 36px;
  border-top: 1px solid var(--dark-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: rgba(255, 255, 255, .88);
}

.price-features .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 3px;
  stroke-width: 3;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- UKK ---------- */
.faq { padding-top: 0; }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 80px;
  align-items: start;
  padding-top: 128px;
  border-top: 1px solid var(--line);
}

.faq-list { border-top: 1px solid var(--line-strong); }

.faq-item { border-bottom: 1px solid var(--line-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }

.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: transform .35s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.faq-icon .icon { width: 15px; height: 15px; }

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.faq-body p {
  margin: 0;
  padding: 0 56px 28px 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}

/* Avautumisanimaatio tukevissa selaimissa */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    height: 0;
    overflow: clip;
    transition: height .35s var(--ease), content-visibility .35s allow-discrete;
  }
  .faq-item[open]::details-content { height: auto; }
}

/* ---------- CTA ---------- */
.cta { padding: 32px 0 128px; }

.cta-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: 112px 32px;
  border-radius: 36px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(91, 61, 245, .75), transparent 70%),
    var(--dark);
  color: #fff;
}

.cta-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 10%, transparent 70%);
}

.cta .mono-label { justify-content: center; color: var(--dark-muted); }

.cta h2 {
  font-size: clamp(44px, 7vw, 88px);
  max-width: 18ch;
  margin: 0 auto 22px;
}
.cta h2 em { color: #B3A4FF; }

.cta-panel > p:not(.mono-label) {
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--dark-muted);
}

.cta-actions { display: flex; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-top: 72px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 56px;
}

.footer-brand p { color: var(--muted); font-size: 15px; margin: 14px 0 0; }

.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }

.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
  margin: 0 0 16px;
}

.footer-cols a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  padding: 4px 0;
  transition: color .2s var(--ease);
}
.footer-cols a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
}

.footer-bottom p { margin: 0; color: var(--muted); font-size: 14px; }

.footer-bottom a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}
.footer-bottom a:hover { color: var(--accent); }
.back-top { color: var(--muted) !important; font-weight: 400 !important; }

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(120px, 26vw, 380px);
  line-height: .78;
  letter-spacing: -0.04em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(15, 14, 19, .1), rgba(15, 14, 19, 0) 85%);
  -webkit-background-clip: text;
          background-clip: text;
  user-select: none;
  margin-bottom: -0.12em;
}

/* ---------- Scroll-animaatiot ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsiivisuus ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .hero h1 { max-width: 13ch; }
  .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .tile-wide { flex-direction: column; }
  .tile-wide .tile-copy { flex: none; }
  .why-grid, .pricing-grid, .faq-grid { gap: 56px; }
}

@media (max-width: 900px) {
  .section { padding: 96px 0; }
  .pricing-grid, .faq-grid { padding-top: 96px; }
  .why-grid, .pricing-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .why-intro { position: static; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-column: span 1; }
  .tile-wide, .tile-strip { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .section-lead { max-width: 48ch; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }

  .nav { height: 64px; }
  html { scroll-padding-top: 76px; }

  .menu-toggle { display: block; }
  .nav-login { display: none; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    border-radius: 0;
    background: rgba(247, 246, 242, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(15, 14, 19, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }

  .nav-links.open { opacity: 1; visibility: visible; transform: none; }

  .nav-links a {
    font-size: 18px;
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:hover { background: none; }
  .nav-links .nav-links-login { display: block; border-bottom: none; color: var(--muted); }

  .site-header.menu-open {
    background: rgba(247, 246, 242, .97);
    border-bottom-color: var(--line);
  }

  .hero { margin-top: -64px; padding-top: 112px; padding-bottom: 72px; }
  .hero h1 { font-size: clamp(46px, 13vw, 64px); }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { padding-left: 0; }
  .demo-site { width: 88%; top: -20px; }
  .demo-chat { margin-top: 56px; width: 92%; }
  .demo-messages { height: 280px; }
  .demo-tabs { justify-content: center; }
  .demo-note { text-align: center; }

  .section { padding: 80px 0; }
  .pricing-grid, .faq-grid { padding-top: 80px; }
  .section-head { margin-bottom: 44px; }
  .section-lead { font-size: 17px; }

  .why-list li { grid-template-columns: 44px minmax(0, 1fr); padding: 28px 0; }

  .bento { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tile, .tile-wide, .tile-strip { grid-column: span 1; }
  .tile { padding: 22px; gap: 22px; }
  .tile-wide .tile-copy h3 { font-size: 30px; }
  .tile-strip { flex-wrap: wrap; }
  .strip-badge { margin-left: 64px; }

  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .step-num { font-size: 52px; margin-bottom: 18px; }

  .price-card { padding: 32px 24px; }
  .price-amount { font-size: 80px; }

  .faq-item summary { font-size: 16.5px; padding: 22px 0; }
  .faq-body p { padding-right: 0; }

  .cta { padding-bottom: 80px; }
  .cta-panel { padding: 80px 20px; border-radius: 28px; }
  .cta-actions .btn { width: 100%; white-space: normal; height: auto; min-height: 52px; padding: 12px 20px; text-align: center; }

  .footer-cols { gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
