/* Kare Digital — yhteinen A4-flyer-pohja */

:root {
  --flyer-accent: #00a39b;
  --flyer-accent-dark: #008f88;
  --flyer-accent-darker: #007a74;
  --flyer-ink: #0c1e21;
  --flyer-muted: #3a4f52;
  --flyer-muted-light: #4a5c5f;
  --flyer-label: #2d4548;
  --flyer-soft: #ecf8f7;
  --flyer-hero: #d8e5e5;
  --flyer-border: #dce4e4;
  --flyer-white: #ffffff;
}

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

html {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

@page { size: A4 portrait; margin: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #c8d8d8;
  color: var(--flyer-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
  font-size: 10.5pt;
  line-height: 1.5;
}

@media print {
  body { background: #fff; gap: 0; padding: 0; }
}

/* ── A4-sivu ── */
.a4 {
  width: 210mm;
  height: 297mm;
  background: var(--flyer-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 4px 32px rgba(12, 30, 33, 0.12);
}

@media print {
  .a4 {
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }
  .a4:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }
}

@media print {
  .fl-strip,
  .fl-cards3,
  .fl-two-col,
  .fl-flow,
  .fl-features,
  .fl-why-box,
  .fl-footer,
  .fl-card,
  .fl-feat,
  .fl-flow-step,
  .fl-gateway-panel {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ── Typografia ── */
.fl-label {
  font-size: 8.5pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flyer-label);
  font-weight: 600;
}

.fl-block-label {
  font-size: 8.5pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--flyer-label);
  font-weight: 600;
  margin-bottom: 5px;
}

.fl-block-label i {
  color: var(--flyer-accent-dark);
  font-size: 11pt;
  margin-right: 3px;
  vertical-align: -1px;
}

.fl-block h2 {
  font-size: 15pt;
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 9px;
  color: var(--flyer-ink);
}

.fl-subtitle {
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.28;
  margin-bottom: 8px;
  color: var(--flyer-ink);
}

/* ── Hero ── */
.fl-hero {
  background: var(--flyer-hero);
  padding: 11mm 16mm 9mm;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.fl-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(0, 143, 136, 0.1);
  pointer-events: none;
}

.fl-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  position: relative;
  z-index: 1;
}

.fl-hero-top img { height: 36px; display: block; }

.fl-wordmark {
  font-size: 20pt;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fl-wordmark span { color: var(--flyer-accent-dark); }

.fl-hero .fl-label {
  margin-bottom: 7px;
  position: relative;
  z-index: 1;
}

.fl-hero h1 {
  font-size: 21pt;
  font-weight: 700;
  line-height: 1.14;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.fl-hero h1 em {
  font-style: normal;
  color: var(--flyer-accent-dark);
}

.fl-lead {
  font-size: 10pt;
  line-height: 1.58;
  color: var(--flyer-label);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  max-width: 98%;
}

.fl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.fl-badge {
  font-size: 8.5pt;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 143, 136, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--flyer-ink);
}

.fl-badge i { font-size: 10pt; color: var(--flyer-accent-dark); }

/* ── Hyötynauha ── */
.fl-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid #d8e0e0;
  flex-shrink: 0;
}

.fl-strip-item {
  padding: 24px 13px 24px;
  border-right: 1px solid #d8e0e0;
}

.fl-strip-item:last-child { border-right: none; }

.fl-strip-num {
  font-size: 16pt;
  font-weight: 700;
  color: var(--flyer-accent-dark);
  line-height: 1;
  margin-bottom: 5px;
}

.fl-strip-title {
  font-size: 9.5pt;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--flyer-ink);
  line-height: 1.25;
}

.fl-strip-desc {
  font-size: 8.5pt;
  line-height: 1.5;
  color: var(--flyer-muted);
}

/* ── Kuvakaappaus ── */
.fl-shot-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  background: var(--flyer-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fl-shot-wrap--page2 {
  flex: 1 1 0;
  min-height: 0;
}

.fl-shot-wrap--compact {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: transparent;
}

.fl-browser {
  flex: 1 1 0;
  min-height: 0;
  max-height: 80%;
  width: 86%;
  max-width: 100%;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(12, 30, 33, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
}

.fl-shot-wrap--compact .fl-browser {
  flex: 1 1 0;
}

@media print {
  .fl-browser { box-shadow: none; }
}

.fl-browser-bar {
  padding: 4px 9px;
  background: #eef2f2;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.fl-browser-bar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.fl-browser-bar .dot:nth-child(1) { background: #ff5f57; }
.fl-browser-bar .dot:nth-child(2) { background: #febc2e; }
.fl-browser-bar .dot:nth-child(3) { background: #28c840; }

.fl-browser-url {
  font-size: 7.5pt;
  padding: 2px 8px;
  background: #fff;
  border-radius: 4px;
  color: #666;
  margin-left: 4px;
  flex: 1;
  text-align: center;
}

.fl-browser-shot {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.fl-browser img,
.fl-browser-shot img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  object-fit: contain;
  object-position: top center;
}

.fl-shot-cap {
  font-size: 8pt;
  color: var(--flyer-muted-light);
  text-align: center;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 143, 136, 0.15);
  flex-shrink: 0;
  width: 88%;
  max-width: 100%;
}

.fl-shot-wrap--page2 .fl-shot-cap {
  width: 94%;
}

.fl-shot-wrap--compact .fl-shot-cap {
  width: 100%;
  margin-top: 5px;
}

/* ── Sivuotsikko ── */
.fl-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16mm;
  border-bottom: 1px solid #e0e6e6;
  flex-shrink: 0;
}

.fl-page-head img { height: 22px; }

.fl-page-head span {
  font-size: 9pt;
  color: var(--flyer-muted-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── Sisältölohko ── */
.fl-block {
  padding: 9mm 16mm 8mm;
  flex-shrink: 0;
}

.fl-block--gap {
  padding-top: 6mm;
  padding-bottom: 5mm;
}

.fl-block--features {
  padding: 6mm 16mm 4mm;
  flex-shrink: 0;
}

/* ── Kohderyhmäkortit ── */
.fl-cards3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 9px;
}

.fl-card {
  border-radius: 9px;
  padding: 13px 12px 12px;
  border: 1px solid var(--flyer-border);
  background: var(--flyer-white);
  border-top: 3px solid var(--flyer-accent-dark);
}

.fl-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--flyer-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 15pt;
  color: var(--flyer-accent-dark);
}

.fl-card h3 {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.25;
  color: var(--flyer-ink);
}

.fl-card p {
  font-size: 8.5pt;
  line-height: 1.48;
  color: var(--flyer-muted);
}

.fl-card ul {
  list-style: none;
  margin-top: 7px;
}

.fl-card li {
  font-size: 8.5pt;
  padding: 2px 0;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  color: var(--flyer-label);
  line-height: 1.4;
}

.fl-card li i {
  font-size: 9pt;
  color: var(--flyer-accent-dark);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Ongelma + työnkulku ── */
.fl-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fl-problems {
  background: #f7f9f9;
  border: 1px solid var(--flyer-border);
  border-radius: 9px;
  padding: 11px 13px;
}

.fl-problems h4 {
  font-size: 9pt;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--flyer-ink);
}

.fl-problems ul { list-style: none; }

.fl-problems li {
  font-size: 8.5pt;
  line-height: 1.48;
  padding-left: 13px;
  position: relative;
  color: var(--flyer-muted);
  margin-bottom: 2px;
}

.fl-problems li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: #7a8a8c;
  font-weight: 700;
  font-size: 9pt;
}

/* ── Työnkulku ── */
.fl-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.fl-flow-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  position: relative;
}

.fl-flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 30px;
  bottom: -2px;
  width: 2px;
  background: rgba(0, 143, 136, 0.25);
}

.fl-flow-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--flyer-accent-dark);
  color: #fff;
  font-size: 10pt;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.fl-flow-body h4 {
  font-size: 9.5pt;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--flyer-ink);
  line-height: 1.25;
}

.fl-flow-body p {
  font-size: 8.5pt;
  line-height: 1.45;
  color: var(--flyer-muted);
}

/* ── Gateway-laitteisto (Pulse) ── */
.fl-gateway-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42mm;
  gap: 8px;
  align-items: center;
  margin: 0 16mm 4mm;
  padding: 8px 11px;
  background: linear-gradient(135deg, #f4fbfb 0%, #fff 52%, #f8fafa 100%);
  border: 1px solid rgba(0, 143, 136, 0.22);
  border-radius: 9px;
  flex-shrink: 0;
}

.fl-gateway-content .fl-block-label {
  margin-bottom: 3px;
}

.fl-gateway-content .fl-subtitle {
  font-size: 10pt;
  margin-bottom: 5px;
  line-height: 1.22;
}

.fl-gateway-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}

.fl-gateway-list li {
  font-size: 8pt;
  line-height: 1.35;
  color: var(--flyer-label);
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.fl-gateway-list li i {
  font-size: 9pt;
  color: var(--flyer-accent-dark);
  flex-shrink: 0;
  margin-top: 1px;
}

.fl-gateway-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 24mm;
}

.fl-gateway-visual::before {
  content: '';
  position: absolute;
  inset: 8% 0;
  background: radial-gradient(ellipse at center, rgba(0, 163, 155, 0.12) 0%, transparent 72%);
  pointer-events: none;
}

.fl-gateway-visual img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 21mm;
  width: auto;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 60, 58, 0.12));
}

.fl-gateway-caption {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 6.5pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.fl-gateway-panel--fill {
  flex: 1 1 0;
  min-height: 0;
  margin: 0 16mm 0;
  padding: 14px 16px;
  grid-template-columns: minmax(0, 1fr) 54mm;
  align-items: center;
}

.fl-gateway-panel--fill .fl-gateway-content .fl-subtitle {
  font-size: 11pt;
  margin-bottom: 8px;
}

.fl-gateway-lead {
  font-size: 9pt;
  line-height: 1.55;
  color: var(--flyer-muted);
  margin: 0 0 10px;
  max-width: 98%;
}

.fl-gateway-panel--fill .fl-gateway-list {
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.fl-gateway-panel--fill .fl-gateway-list li {
  font-size: 8.5pt;
}

.fl-gateway-panel--fill .fl-gateway-visual {
  min-height: 52mm;
}

.fl-gateway-panel--fill .fl-gateway-visual img {
  max-height: 48mm;
}

.fl-shot-wrap--page3 {
  flex: 1 1 0;
  min-height: 0;
  background: var(--flyer-soft);
  padding-top: 4px;
}

.fl-shot-wrap--page3 .fl-browser {
  max-height: 88%;
  width: 92%;
}

.fl-shot-wrap--page3 .fl-shot-cap {
  width: 92%;
}

/* ── Ominaisuudet ── */
.fl-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fl-feat {
  border: 1px solid var(--flyer-border);
  border-radius: 9px;
  padding: 11px 12px 10px;
  background: var(--flyer-white);
}

.fl-feat-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.fl-feat-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--flyer-soft);
  color: var(--flyer-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13pt;
  flex-shrink: 0;
}

.fl-feat h4 {
  font-size: 9.5pt;
  font-weight: 700;
  color: var(--flyer-accent-dark);
  line-height: 1.2;
}

.fl-feat ul { list-style: none; }

.fl-feat li {
  font-size: 8.5pt;
  line-height: 1.52;
  color: var(--flyer-muted);
  padding-left: 11px;
  position: relative;
}

.fl-feat li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--flyer-accent-dark);
}

/* ── Miksi Kare + kuva ── */
.fl-split {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 16mm 3mm;
}

.fl-why-box {
  background: var(--flyer-soft);
  border: 1px solid rgba(0, 143, 136, 0.22);
  border-left: 4px solid var(--flyer-accent-dark);
  border-radius: 9px;
  padding: 9px 13px;
  flex-shrink: 0;
}

.fl-why-box .fl-subtitle {
  margin-bottom: 8px;
}

.fl-why-box ul {
  list-style: none;
}

.fl-why-box li {
  font-size: 9pt;
  line-height: 1.52;
  padding-left: 15px;
  position: relative;
  color: var(--flyer-label);
  margin-bottom: 3px;
}

.fl-why-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--flyer-accent-dark);
  font-weight: 700;
  font-size: 9pt;
}

/* ── Footer ── */
.fl-footer {
  background: linear-gradient(135deg, var(--flyer-hero) 0%, var(--flyer-soft) 100%);
  border-top: 1px solid rgba(0, 143, 136, 0.25);
  padding: 14px 16mm 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  margin-top: auto;
}

.fl-footer h3 {
  font-size: 11.5pt;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.28;
  color: var(--flyer-ink);
}

.fl-footer-main p {
  font-size: 9pt;
  color: var(--flyer-muted);
  line-height: 1.48;
  max-width: 420px;
}

.fl-footer-note {
  margin-top: 4px !important;
  font-size: 8.5pt !important;
  color: var(--flyer-muted-light) !important;
}

.fl-footer-contact {
  margin-top: 6px !important;
  font-size: 9.5pt !important;
}

.fl-footer a {
  color: var(--flyer-accent-darker);
  text-decoration: none;
  font-weight: 700;
}

.fl-footer-right {
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}

.fl-footer-url {
  display: block;
  font-size: 10pt;
  font-weight: 700;
  color: var(--flyer-accent-dark);
  line-height: 1.4;
}

.fl-footer-copy {
  font-size: 8pt;
  color: #5a6a6c;
  margin-top: 3px;
  display: block;
}
