/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --navy: #2d3a7d;
  --navy-dark: #232e66;
  --navy-deeper: #1a2452;
  --navy-50: #eef0f8;
  --pink: #e91e85;
  --pink-soft: #ffb3d9;
  --pink-50: #fdeaf3;
  --orange: #f58024;
  --orange-soft: #fcb549;
  --orange-50: #fff2e6;
  --red: #e64644;
  --magenta: #d823cd;

  --grad: linear-gradient(90deg, #fcb549 0%, #e64644 50%, #d823cd 100%);
  --grad-tilt: linear-gradient(135deg, #fcb549 0%, #e64644 50%, #d823cd 100%);
  --grad-soft: linear-gradient(135deg, #fff2e6 0%, #fdeaf3 100%);

  --bg: #ffffff;
  --surface: #f7f8fc;
  --surface-2: #f2f4f8;
  --border: #e8eaef;
  --text: #151515;
  --text-muted: #6b7280;

  --font: 'Figtree', system-ui, -apple-system, sans-serif;

  --sh-md: 0 4px 8px rgba(35, 46, 102, 0.06), 0 8px 24px rgba(35, 46, 102, 0.08);
  --sh-lg: 0 12px 24px -8px rgba(35, 46, 102, 0.12), 0 24px 64px -12px rgba(35, 46, 102, 0.18);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--pink); color: #fff; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   HERO — dark navy, full-bleed, aspirational
   ============================================================ */
.hero-platform {
  padding: 160px 0 120px;
  background: linear-gradient(160deg, #0f1830 0%, #1a2452 55%, #232e66 100%);
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-platform::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -120px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(232, 30, 133, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-platform::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(45, 58, 125, 0.60) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
/* Subtle grid overlay */
.hero-platform-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.hero-platform-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}
.hero-platform .kicker {
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
  letter-spacing: 0.16em;
}
.hero-platform h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 32px;
}
.hero-platform h1 .gr {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-platform .hero-tagline {
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255,255,255,0.70);
  line-height: 1.65;
  max-width: 660px;
  margin-bottom: 44px;
  font-weight: 400;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  box-shadow: 0 12px 28px -8px rgba(230, 70, 68, 0.55);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -8px rgba(230, 70, 68, 0.70);
}

/* ============================================================
   AI-HI WIDGET (dark variant for hero)
   ============================================================ */
.ai-hi {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 16px 28px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  font-family: var(--font);
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.ai-hi:hover, .ai-hi:focus-within {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.38);
  transform: translateY(-2px);
}
.ai-hi-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  user-select: none;
  cursor: default;
}
.ai-hi-wave {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transform-origin: 70% 70%;
  animation: aiWave 3.4s ease-in-out 2s infinite;
}
@keyframes aiWave {
  0%, 78%, 100% { transform: rotate(0deg); }
  82%  { transform: rotate(14deg); }
  86%  { transform: rotate(-8deg); }
  90%  { transform: rotate(14deg); }
  94%  { transform: rotate(-4deg); }
  98%  { transform: rotate(10deg); }
}
.ai-hi-input {
  width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: 500 14px/1 var(--font);
  opacity: 0;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease 0.05s, padding 0.3s ease, margin 0.3s ease;
}
.ai-hi-input::placeholder { color: rgba(255,255,255,0.50); font-weight: 400; }
.ai-hi:hover .ai-hi-input,
.ai-hi:focus-within .ai-hi-input {
  width: 200px;
  opacity: 1;
  padding: 0 12px;
  margin-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.20);
}
.ai-hi-send {
  width: 0;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.65);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease 0.1s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
.ai-hi-send svg { width: 14px; height: 14px; stroke-width: 2.6; }
.ai-hi:hover .ai-hi-send,
.ai-hi:focus-within .ai-hi-send {
  width: 32px;
  opacity: 1;
  transform: scale(1);
}
.ai-hi-send:hover, .ai-hi-send:focus-visible { color: var(--pink); }

/* Light variant for non-hero sections */
.ai-hi.light {
  background: #fff;
  color: var(--navy-dark);
  border-color: var(--border);
}
.ai-hi.light:hover, .ai-hi.light:focus-within {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
}
.ai-hi.light .ai-hi-input { color: var(--navy-dark); }
.ai-hi.light .ai-hi-input::placeholder { color: var(--text-muted); }
.ai-hi.light .ai-hi-send { color: var(--navy-dark); }
.ai-hi.light:hover .ai-hi-input,
.ai-hi.light:focus-within .ai-hi-input {
  border-left-color: var(--border);
}

/* ============================================================
   SECTION SHARED
   ============================================================ */
.block { padding: 100px 0; }
.block.alt { background: var(--surface); }
.section-head {
  margin-bottom: 64px;
  max-width: 880px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 16px;
}
.kicker.orange { color: var(--orange); }
.kicker.pink { color: var(--pink); }
.kicker.navy { color: var(--navy); }
.section-title {
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 24px;
  letter-spacing: -0.018em;
}
.section-title .gr {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.7;
}
.section-head.center .section-lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   VISIO — full-width dark quote section
   ============================================================ */
.visio-band {
  background: linear-gradient(160deg, #0f1830 0%, #1a2452 60%, #232e66 100%);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.visio-band::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -180px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 30, 133, 0.16) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.visio-band::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -160px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(252, 181, 73, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.visio-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.visio-quote {
  font-size: clamp(26px, 3.8vw, 50px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 40px;
}
.visio-quote .gr {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.visio-body {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(255,255,255,0.68);
  line-height: 1.75;
  max-width: 680px;
  margin: 0 auto;
  font-weight: 400;
}

/* ============================================================
   MITÄ RAKENNAMME — 3-col cards
   ============================================================ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.platform-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s;
}
.platform-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sh-lg);
  border-color: rgba(232, 30, 133, 0.20);
}
.platform-card:hover::before { opacity: 1; }
.platform-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.platform-card-icon.market { background: var(--navy-50); color: var(--navy); }
.platform-card-icon.service { background: var(--pink-50); color: var(--pink); }
.platform-card-icon.api { background: var(--orange-50); color: var(--orange); }
.platform-card h3 {
  font-size: 23px;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.platform-card p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.platform-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  width: 100%;
  font-size: 15px;
  font-weight: 800;
  color: var(--pink);
  transition: gap 0.2s, color 0.2s;
}
.platform-card-link svg { flex-shrink: 0; }
.platform-card-link:hover { gap: 13px; color: var(--magenta); }

/* ============================================================
   KENELLE TÄMÄ SOPII: 3 persona cards
   ============================================================ */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.persona {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.persona:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
  border-color: rgba(232, 30, 133, 0.20);
}
.persona-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: var(--navy-50);
  color: var(--navy);
}
.persona-icon.pink { background: var(--pink-50); color: var(--pink); }
.persona-icon.orange { background: var(--orange-50); color: var(--orange); }
.persona h3 {
  font-size: 21px;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.persona p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   UKK
   ============================================================ */
.faq-list {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item:hover {
  border-color: var(--pink-soft);
  box-shadow: var(--sh-md);
}
.faq-item summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 28px;
  font-weight: 300;
  color: var(--magenta);
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}
.faq-item p a {
  color: var(--pink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(233, 30, 133, 0.35);
  transition: text-decoration-color 0.2s;
}
.faq-item p a:hover { text-decoration-color: var(--pink); }

/* ============================================================
   OSAAMINEN — copy block
   ============================================================ */
.osaaminen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.osaaminen-text h2 {
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.018em;
  color: var(--navy-dark);
  margin-bottom: 24px;
}
.osaaminen-text h2 .gr {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.osaaminen-text p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.osaaminen-text p:last-of-type { margin-bottom: 0; }
.osaaminen-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Abstract "architecture" blocks for visual */
.arch-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--sh-md);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.arch-block:nth-child(2) { margin-left: 32px; transform: translateX(0); }
.arch-block:nth-child(3) { margin-left: 16px; }
.arch-block:hover { transform: translateY(-4px) translateX(0); }
.arch-block:nth-child(2):hover { transform: translateY(-4px) translateX(32px); }
.arch-block:nth-child(3):hover { transform: translateY(-4px) translateX(16px); }
.arch-dot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.arch-dot.navy { background: var(--navy-50); color: var(--navy); }
.arch-dot.pink { background: var(--pink-50); color: var(--pink); }
.arch-dot.orange { background: var(--orange-50); color: var(--orange); }
.arch-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.3;
}
.arch-label span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}
.arch-connector {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--border) 0%, transparent 100%);
  margin: 0 auto;
  margin-left: 36px;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--navy-deeper);
  padding: 120px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(45, 58, 125, 0.55) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-band::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 30, 133, 0.20) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-band-inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.cta-band h2 {
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}
.cta-band h2 .gr {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin-bottom: 44px;
  font-weight: 400;
}

/* ============================================================
   REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].in { opacity: 1; transform: translateY(0); }
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal-stagger].in > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].in > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].in > *:nth-child(2) { transition-delay: 0.10s; }
[data-reveal-stagger].in > *:nth-child(3) { transition-delay: 0.15s; }
[data-reveal-stagger].in > *:nth-child(4) { transition-delay: 0.20s; }
[data-reveal-stagger].in > *:nth-child(5) { transition-delay: 0.25s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .platform-grid { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: 1fr; }
  .osaaminen-grid { grid-template-columns: 1fr; gap: 56px; }
  .osaaminen-visual { max-width: 480px; }
}
@media (max-width: 700px) {
  .hero-platform { padding: 120px 0 80px; }
  .block { padding: 70px 0; }
  .visio-band { padding: 80px 0; }
  .cta-band { padding: 80px 0; }
  .section-head { margin-bottom: 48px; }
  .platform-card { padding: 32px 28px; }
  .persona { padding: 32px 28px; }
  .faq-item { padding: 20px 22px; }
  .faq-item summary { font-size: 17px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .btn-primary { justify-content: center; }
  .ai-hi { justify-content: center; }
  .ai-hi:hover .ai-hi-input,
  .ai-hi:focus-within .ai-hi-input { width: 140px; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .arch-block:nth-child(2) { margin-left: 0; }
  .arch-block:nth-child(3) { margin-left: 0; }
  .arch-connector { margin-left: auto; margin-right: auto; }
}
