/* ==========================================================================
   FlowDial - shared site stylesheet for secondary pages (tuote / ratkaisut /
   integraatiot). Mirrors the homepage design tokens so chrome is identical.
   The homepage keeps its own inline CSS; this file powers the sub-pages.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-brand: #ff4f3a;
  --color-brand-hover: #e04432;
  --color-text-main: #333333;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-bg-white: #ffffff;
  --color-bg-gray: #f9f9f9;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --v2-bg: #F4F1EC;
  --v2-ink: #0B0C0E;
  --v2-accent: #E5392E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: clip; }
body { font-family: var(--font-family); color: var(--color-text-main); background: var(--color-bg-white); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* Layout utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 4px; font-weight: 500; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: all .2s ease; }
.btn-primary { background: var(--color-brand); color: #fff; }
.btn-primary:hover { background: var(--color-brand-hover); }
.btn-outline { border-color: var(--color-border); background: #fff; color: var(--color-text-main); }
.btn-outline:hover { background: var(--color-bg-gray); }
.btn-text { background: none; color: var(--color-text-main); font-weight: 500; padding: 10px 16px; }
.btn-text:hover { color: var(--color-brand); }
/* Rounded accent CTA (matches hero) */
.cta-pill { background: var(--v2-accent); color: #fff; border: none; padding: 16px 28px; border-radius: 999px; font-family: 'Inter Tight','Inter',sans-serif; font-weight: 500; font-size: 16px; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(229,57,46,.55); display: inline-flex; align-items: center; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.cta-pill:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(229,57,46,.65); }
.cta-pill span { opacity: .85; }
.cta-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 16px 24px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; font-family: 'Inter Tight','Inter',sans-serif; font-weight: 500; font-size: 16px; color: var(--v2-ink); transition: border-color .2s; }
.cta-ghost:hover { border-color: rgba(11,12,14,.3); }

/* Header */
header { border-bottom: 1px solid var(--color-border); background: #fff; position: sticky; top: 0; z-index: 100; }
.nav-container { height: 70px; }
.logo { font-size: 22px; font-weight: 700; color: var(--color-brand); display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--color-text-muted); padding: 8px 12px; }
.nav-links a:hover { color: var(--color-text-main); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ==========================================================================
   SHARED SECTION SCAFFOLD (same names as homepage)
   ========================================================================== */
.fd-section { padding: 96px 0; }
.fd-section--cream { background: var(--v2-bg); }
.fd-section--gray { background: var(--color-bg-gray); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.fd-section--dark { background: #111319; color: #fff; }
.fd-section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.fd-section-head.fd-left { text-align: left; margin-left: 0; }
.fd-eyebrow { font-family: 'JetBrains Mono','Inter',monospace; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--v2-accent); margin-bottom: 16px; display: block; }
.fd-section-title { font-family: 'Inter Tight','Inter',sans-serif; font-size: clamp(28px,3.4vw,42px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; color: var(--v2-ink); margin: 0; text-wrap: balance; }
.fd-section--dark .fd-section-title { color: #fff; }
.fd-section-sub { font-size: 18px; line-height: 1.55; color: var(--color-text-muted); margin-top: 18px; }
.fd-section--dark .fd-section-sub { color: #a0aec0; }
.fd-ph { position: relative; }

/* ---- PAGE HERO (sub-page) ---- */
.page-hero { background: var(--v2-bg); color: var(--v2-ink); position: relative; overflow: hidden; padding: 88px 0 80px; font-family: 'Inter Tight','Inter',sans-serif; }
.page-hero::before { content: ''; position: absolute; top: -200px; right: -160px; width: 620px; height: 620px; background: radial-gradient(circle, rgba(229,57,46,.10), transparent 65%); pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero h1 { font-size: clamp(36px,5vw,60px); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; margin: 14px 0 0; text-wrap: balance; }
.page-hero h1 .accent { color: var(--v2-accent); }
.page-hero p { font-size: 20px; line-height: 1.5; color: rgba(11,12,14,.62); margin-top: 22px; max-width: 620px; }
.page-hero-cta { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---- STAT BAND ---- */
.stat-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat-cell { text-align: center; }
.stat-num { font-family: 'Inter Tight','Inter',sans-serif; font-size: clamp(34px,4vw,48px); font-weight: 600; letter-spacing: -.03em; color: var(--v2-accent); line-height: 1; }
.fd-section--dark .stat-num { color: #fff; }
.stat-label { font-size: 14px; color: var(--color-text-muted); margin-top: 10px; line-height: 1.4; }
.fd-section--dark .stat-label { color: #a0aec0; }

/* ---- FEATURE SPLIT (alternating image/text rows) ---- */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-split > * { min-width: 0; }
.feature-split + .feature-split { margin-top: 88px; }
.feature-split.reverse .fs-media { order: 2; }
.fs-copy h2 { font-family: 'Inter Tight','Inter',sans-serif; font-size: clamp(26px,3vw,34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; color: var(--v2-ink); margin-bottom: 16px; }
.fs-copy p { font-size: 16px; line-height: 1.6; color: var(--color-text-muted); margin-bottom: 14px; }
.fs-list { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.fs-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--color-text-main); }
.fs-list svg { width: 20px; height: 20px; stroke: var(--v2-accent); flex-shrink: 0; margin-top: 2px; }
.fs-media { min-width: 0; max-width: 100%; overflow: hidden; background: #fff; border: 1px solid var(--color-border); border-radius: 18px; padding: 22px; box-shadow: 0 40px 80px -28px rgba(11,12,14,.20); }

/* ---- DATA FIELD CHIPS ---- */
.field-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 920px; margin: 0 auto; }
.field-chip { padding: 10px 16px; border: 1px solid var(--color-border); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--color-text-main); display: inline-flex; align-items: center; gap: 8px; }
.field-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--v2-accent); }

/* ---- CARD GRID (generic 3-up) ---- */
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card-grid.cols-4 { grid-template-columns: repeat(4,1fr); }
.fd-card { background: #fff; border: 1px solid var(--color-border); border-radius: 16px; padding: 30px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.fd-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(11,12,14,.25); border-color: rgba(229,57,46,.30); }
.fd-card-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(229,57,46,.10); margin-bottom: 18px; }
.fd-card-ico svg { width: 22px; height: 22px; stroke: var(--v2-accent); }
.fd-card h3 { font-family: 'Inter Tight','Inter',sans-serif; font-size: 18px; font-weight: 600; color: var(--v2-ink); margin-bottom: 10px; }
.fd-card p { font-size: 14px; line-height: 1.55; color: var(--color-text-muted); }

/* ---- FAQ (same look as homepage) ---- */
.faq-section { padding: 40px 0 100px; max-width: 800px; margin: 0 auto; }
.faq-title { font-size: 24px; font-weight: 600; margin-bottom: 32px; }
.faq-item { border-top: 1px solid var(--color-border); font-size: 16px; font-weight: 500; color: #111; padding: 20px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--color-border); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; list-style: none; outline: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .2s; font-size: 24px; font-weight: 400; color: var(--color-text-light); }
.faq-answer { padding-top: 16px; font-weight: 400; color: var(--color-text-muted); font-size: 15px; line-height: 1.6; }

/* ---- CTA SECTION (same as homepage) ---- */
.cta-section { padding: 96px 24px; }
.cta-box { max-width: 1152px; margin: 0 auto; position: relative; background: #1a1b1f; border-radius: 48px; padding: 64px 48px; overflow: hidden; }
.cta-inner { position: relative; z-index: 10; text-align: center; max-width: 768px; margin: 0 auto; }
.cta-title { font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: #fff; font-size: clamp(2rem,5vw,3.5rem); }
.cta-subtitle { margin-top: 28px; font-size: 18px; color: rgba(227,226,231,.7); font-weight: 500; line-height: 1.5; }
.cta-actions { margin-top: 44px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.cta-btn-primary { background: var(--color-brand); color: #fff; padding: 18px 40px; border-radius: 9999px; font-weight: 800; font-size: 18px; transition: transform .2s; display: inline-block; }
.cta-btn-primary:hover { transform: scale(1.02); }
.cta-glow-1 { position: absolute; bottom: -128px; right: -128px; width: 500px; height: 500px; background: rgba(229,57,46,.25); border-radius: 50%; filter: blur(128px); pointer-events: none; }
.cta-glow-2 { position: absolute; top: -128px; left: -128px; width: 400px; height: 400px; background: rgba(16,185,129,.16); border-radius: 50%; filter: blur(128px); pointer-events: none; }

/* ---- FOOTER (same as homepage) ---- */
footer { background: #111319; color: #a0aec0; padding: 80px 0 0; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 64px; border-bottom: 1px solid #1e2330; }
.footer-logo-img { width: 136px; height: auto; object-fit: contain; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-brand-desc { font-size: 14px; color: #718096; line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-weight: 600; margin-bottom: 20px; color: #e2e8f0; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col a { color: #718096; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding: 28px 0; display: flex; justify-content: space-between; align-items: center; color: #4a5568; font-size: 13px; }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: #4a5568; transition: color .2s; }
.footer-bottom-links a:hover { color: #a0aec0; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .feature-split { grid-template-columns: 1fr; gap: 32px; }
  .feature-split.reverse .fs-media { order: 0; }
  .card-grid.cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .fd-section { padding: 72px 0; }
  .container { padding: 0 20px; }
  .nav-container { gap: 12px; }
  .nav-links { display: none; }
  .nav-actions { gap: 8px; flex-shrink: 0; }
  .nav-actions .btn-text { display: none; }
  .nav-actions .btn { padding: 9px 14px; }
  details.lang-toggle > summary { padding: 7px 10px; }
  details.lang-toggle > summary .lang-toggle-name { display: none; }
  .stat-band { grid-template-columns: repeat(2,1fr); gap: 32px 16px; }
  .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .page-hero { padding: 64px 0 56px; }
}
