/* ───────────────────────────────────────────────────────────────────────────
   Aurora design system — Agenttisivut.fi landing (TASK-040)
   Spec: docs/PLAN_FUNNEL_V3.md §3. Light "paper" surfaces, petrol→mint
   gradient for moments of magic, amber reserved for Aino/agent presence.
   No framework — this file is the whole system (Lighthouse ≥ 90 target).
─────────────────────────────────────────────────────────────────────────── */

:root {
  --paper: #F7F9F8;
  --ink: #0E1B25;
  --ink-60: rgba(14, 27, 37, .62);
  --ink-40: rgba(14, 27, 37, .42);
  --petrol: #0E7C66;
  --petrol-dark: #0A5D4D;
  --mint: #3DDC97;
  --amber: #FFB648;
  --hairline: #E5EAE8;
  --card-shadow: 0 8px 24px rgba(14, 27, 37, .06);
  --card-shadow-lift: 0 16px 40px rgba(14, 27, 37, .12);
  --radius: 16px;
  --grad: linear-gradient(120deg, var(--petrol), var(--mint));
  --font-display: 'Clash Display', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-weight: 600;
}
.h-xl { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.h-lg { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.h-md { font-size: 1.25rem; font-weight: 600; }

/* Signature: headings end with an aurora-gradient comma, not a period */
.comma {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--ink-60); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .95rem; border: 0; cursor: pointer;
  border-radius: 999px; padding: 14px 30px; font-family: var(--font-body);
  transition: transform .25s ease-out, box-shadow .25s ease-out, background .2s;
}
.btn-primary { background: var(--petrol); color: #fff; box-shadow: 0 6px 18px rgba(14, 124, 102, .28); }
.btn-primary:hover { background: var(--petrol-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.btn-ghost:hover { border-color: var(--petrol); color: var(--petrol); }
.btn-big { font-size: 1.1rem; padding: 18px 40px; }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(247, 249, 248, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1120px; margin: 0 auto; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.nav-links { display: none; gap: 28px; font-size: .9rem; color: var(--ink-60); font-weight: 500; }
.nav-links a:hover { color: var(--petrol); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .login { font-size: .9rem; color: var(--ink-60); font-weight: 600; }
.nav-cta .login:hover { color: var(--ink); }
.nav-cta .btn { padding: 10px 20px; font-size: .85rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }

/* ── Hero ── */
.hero { padding: 132px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(61, 220, 151, .12); color: var(--petrol);
  border: 1px solid rgba(14, 124, 102, .18);
  font-size: .78rem; font-weight: 700; padding: 7px 16px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero p.lead { font-size: 1.15rem; color: var(--ink-60); margin: 20px 0 28px; max-width: 34rem; }

/* Taikalaatikko */
.magicbox {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 6px; transition: box-shadow .25s, border-color .25s;
}
.magicbox:focus-within { border-color: var(--petrol); box-shadow: 0 0 0 4px rgba(14, 124, 102, .1), var(--card-shadow); }
.magicbox textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font: inherit; font-size: 1rem; color: var(--ink); padding: 14px 16px 6px; line-height: 1.5;
}
.magicbox textarea::placeholder { color: var(--ink-40); }
.magicbox-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px 16px; gap: 12px; }
.trustline { margin-top: 14px; font-size: .82rem; color: var(--ink-40); }

/* Hero demo card (self-typing + toasts) */
.demo-wrap { position: relative; }
.browser {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--card-shadow-lift); overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  background: #EFF3F1; border-bottom: 1px solid var(--hairline); padding: 10px 14px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #D5DDD9; }
.urlbar {
  flex: 1; background: #fff; border: 1px solid var(--hairline); border-radius: 8px;
  font-size: .72rem; color: var(--ink-40); text-align: center; padding: 4px 10px;
  margin-left: 8px; overflow: hidden; white-space: nowrap;
}
.demo-stage { padding: 18px; min-height: 320px; }
.demo-input {
  border: 1px solid var(--hairline); border-radius: 12px; background: var(--paper);
  font-size: .85rem; color: var(--ink); padding: 12px 14px; min-height: 44px;
}
.caret { display: inline-block; width: 2px; height: 1em; background: var(--petrol); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* mini site skeleton that "builds" */
.mini-site { margin-top: 14px; border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.mini-hero { height: 110px; background: linear-gradient(135deg, rgba(14, 27, 37, .72), rgba(14, 27, 37, .35)), var(--mini-img, var(--grad)); background-size: cover; background-position: center; position: relative; }
.mini-hero .mini-title { position: absolute; inset: auto 0 14px 0; text-align: center; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.mini-row { display: flex; gap: 8px; padding: 10px; }
.mini-card { flex: 1; height: 44px; border-radius: 8px; background: #EFF3F1; }
.mini-bar { height: 8px; border-radius: 4px; background: #E2E9E5; margin: 0 10px 10px; }
.mini-bar.w60 { width: 60%; } .mini-bar.w40 { width: 40%; }
.build-step { opacity: 0; transform: translateY(8px); transition: opacity .35s ease-out, transform .35s ease-out; }
.build-step.on { opacity: 1; transform: none; }

/* Toasts */
.toast {
  position: absolute; right: -10px; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: var(--card-shadow-lift); padding: 10px 16px; font-size: .8rem; font-weight: 600;
  opacity: 0; transform: translateY(10px); transition: opacity .35s ease-out, transform .35s ease-out;
  pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: none; }
.toast .t-ico { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; background: rgba(61, 220, 151, .15); }
.toast small { display: block; font-weight: 400; color: var(--ink-40); font-size: .7rem; }
.toast-1 { top: 26%; }
.toast-2 { top: 58%; right: auto; left: -14px; }

/* ── Stats band ── */
.stats { border-block: 1px solid var(--hairline); background: #fff; padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; text-align: center; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.stat span { font-size: .85rem; color: var(--ink-60); }

/* ── Sections ── */
.section { padding: 88px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--hairline); }
.kicker { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--petrol); margin-bottom: 12px; }

/* Carousel */
.carousel { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 18px; scroll-snap-type: x mandatory; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
.site-card { min-width: 250px; scroll-snap-align: start; }
.site-card .browser { box-shadow: var(--card-shadow); }
.site-card .browser:hover { box-shadow: var(--card-shadow-lift); }
.site-card .label { font-size: .8rem; color: var(--ink-60); margin-top: 10px; font-weight: 600; }

/* Feature splits */
.feature { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.flip > .f-visual { order: -1; }
}
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 14px; }
.feature p { color: var(--ink-60); margin-bottom: 18px; }
.f-points { list-style: none; display: grid; gap: 10px; font-size: .92rem; }
.f-points li::before { content: "✓ "; color: var(--petrol); font-weight: 800; }
.f-example {
  margin-top: 22px; border-left: 3px solid var(--mint); padding: 4px 0 4px 16px;
  font-size: .88rem; color: var(--ink-60); font-style: italic;
}
.f-example b { display: block; font-style: normal; color: var(--ink); font-size: .78rem; margin-top: 6px; }

/* WhatsApp mock */
.wa { background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--card-shadow-lift); overflow: hidden; max-width: 360px; margin: 0 auto; }
.wa-head { background: #075E54; color: #fff; padding: 12px 16px; display: flex; gap: 10px; align-items: center; font-size: .85rem; font-weight: 600; }
.wa-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; }
.wa-body { background: #ECE5DD; padding: 16px; display: grid; gap: 8px; }
.wa-msg { max-width: 85%; border-radius: 10px; padding: 8px 12px; font-size: .82rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.wa-in { background: #fff; justify-self: start; border-top-left-radius: 2px; }
.wa-out { background: #DCF8C6; justify-self: end; border-top-right-radius: 2px; }
.wa-meta { font-size: .65rem; color: rgba(14, 27, 37, .4); text-align: right; margin-top: 2px; }

/* Integrations */
.logo-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.logo-pill {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 999px; padding: 10px 20px;
  font-size: .85rem; font-weight: 600; color: var(--ink-60);
}

/* Full-bleed quote */
.quote-band { background: linear-gradient(120deg, var(--petrol-dark), var(--petrol) 55%, #14946F); color: #fff; padding: 88px 0; }
.quote-band blockquote { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 500; line-height: 1.25; max-width: 50rem; margin: 0 auto; }
.quote-band cite { display: block; margin-top: 22px; font-style: normal; font-size: .9rem; opacity: .85; font-family: var(--font-body); }

/* Pricing */
.price-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 32px 28px; position: relative; display: flex; flex-direction: column;
  transition: transform .25s ease-out, box-shadow .25s ease-out;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-lift); }
.price-card.hot { border: 2px solid var(--petrol); }
.hot-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: .68rem; font-weight: 800;
  letter-spacing: .08em; padding: 5px 16px; border-radius: 999px;
}
.price-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.price-sub { font-size: .8rem; color: var(--ink-40); margin-bottom: 18px; }
.price-eur { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; }
.price-eur small { font-size: .85rem; color: var(--ink-40); font-family: var(--font-body); font-weight: 400; }
.price-feats { list-style: none; display: grid; gap: 9px; font-size: .88rem; margin: 22px 0 26px; flex: 1; }
.price-feats li::before { content: "✓ "; color: var(--petrol); font-weight: 800; }
.price-feats li.no { color: var(--ink-40); }
.price-feats li.no::before { content: "— "; color: var(--ink-40); }
.soon { font-size: .68rem; background: rgba(255, 182, 72, .2); color: #9A6A12; border-radius: 999px; padding: 2px 8px; font-weight: 700; }

/* Comparison table */
.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--hairline); }
.cmp td:first-child, .cmp th:first-child { text-align: left; color: var(--ink-60); }
.cmp thead th { font-size: .8rem; }
.cmp .us { color: var(--petrol); font-weight: 700; background: rgba(61, 220, 151, .06); }
.cmp-scroll { overflow-x: auto; border-radius: var(--radius); }

/* Footer */
.footer { background: var(--ink); color: rgba(255, 255, 255, .75); padding: 64px 0 32px; font-size: .88rem; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer a:hover { color: var(--mint); }
.footer .legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .75rem; color: rgba(255, 255, 255, .45); }

/* Scroll reveal */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .45s ease-out, transform .45s ease-out; }
.rise.on { opacity: 1; transform: none; }

/* Reduced motion: everything lands instantly */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .build-step, .toast { opacity: 1; transform: none; }
}
