/* ============================================================
   Kolme layout-mallia (rakenne, ei väriteema) — Tendera-tyylissä
   L1 Komentokeskus · L2 Lehtitalo · L3 Bento-ruudukko
   ============================================================ */

/* Layout-vaihdin (linkkeinä) — perustyylit mukana, jotta toimii ilman teematiedostoa */
.layout-switch {
  position: fixed; bottom: 22px; right: 22px; z-index: 90;
  display: flex; align-items: center; gap: 4px;
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 6px 8px 6px 16px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45);
  font-size: 12.5px; font-weight: 700;
}
.layout-switch > span { letter-spacing: 0.08em; text-transform: uppercase; font-size: 10.5px; opacity: 0.7; margin-right: 6px; }
.layout-switch a {
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25); color: #fff; text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.layout-switch a:hover { border-color: #fff; }
.layout-switch a.active { background: var(--orange); border-color: var(--orange); }
.layout-switch .ls-old { width: auto; border-radius: 999px; padding: 0 12px; font-size: 11.5px; }

/* ============================================================
   L1 · KOMENTOKESKUS — keskitetty hero + täysleveä konsoli
   ============================================================ */
.l1-hero { padding: clamp(56px, 7vw, 90px) 0 clamp(28px, 4vw, 44px); text-align: center; position: relative; }
.l1-hero h1 { font-size: clamp(40px, 5.6vw, 66px); max-width: 780px; margin: 0 auto 20px; }
.l1-hero h1 em { font-style: normal; color: var(--orange-deep); }
.l1-hero .lead { max-width: 620px; margin: 0 auto 28px; }
.l1-hero .hero-ctas { justify-content: center; }
.l1-hero .hero-note { margin-top: 14px; }

.l1-console { padding-bottom: clamp(48px, 6vw, 76px); }
.l1-console-card {
  background: var(--paper-raise); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lift); padding: clamp(20px, 3vw, 30px); position: relative;
}
.l1-console-top {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px;
}
.l1-console-top .mt-input { flex: 1 1 320px; box-shadow: none; }
.l1-console-top .mt-chips { margin-top: 0; }
.l1-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.l1-results .mp-row {
  grid-template-columns: 1fr; align-content: start; gap: 10px;
  padding: 16px; border: 1px solid var(--line-soft); background: var(--paper);
}
.l1-results .mp-row .stage { justify-self: start; }
.l1-results .mp-row .time { justify-self: start; font-size: 13px; }
.l1-console-card .mp-more { margin-top: 16px; }
.l1-console-note {
  text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--muted);
}
@media (max-width: 860px) { .l1-results { grid-template-columns: 1fr; } }

.l1-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 36px); }
.l1-step { border-top: 2.5px solid var(--orange); padding-top: 18px; }
.l1-step .n { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--orange-deep); }
.l1-step h3 { font-size: 20px; margin: 6px 0 8px; }
.l1-step p { font-size: 15px; color: var(--muted); }
@media (max-width: 760px) { .l1-steps { grid-template-columns: 1fr; } }

.l1-zig { display: grid; gap: clamp(44px, 6vw, 80px); }
.l1-zrow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.l1-zrow:nth-child(even) .l1-ztext { order: 2; }
.l1-zrow:nth-child(even) .l1-zvis { order: 1; }
.l1-ztext h3 { font-size: clamp(23px, 2.7vw, 30px); margin-bottom: 12px; }
.l1-ztext p { color: var(--ink-soft); max-width: 46ch; }
.l1-ztext .bene-why { margin-top: 14px; }
@media (max-width: 900px) {
  .l1-zrow { grid-template-columns: 1fr; }
  .l1-zrow:nth-child(even) .l1-ztext { order: 1; }
  .l1-zrow:nth-child(even) .l1-zvis { order: 2; }
}

/* ============================================================
   L2 · LEHTITALO — typografinen, ticker, numeroidut luvut
   ============================================================ */
.l2-ticker {
  background: var(--ink-deep); color: #cfd9e0; overflow: hidden; white-space: nowrap;
  font-size: 13px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.l2-ticker-track { display: inline-flex; gap: 44px; padding-right: 44px; animation: l2tick 36s linear infinite; }
.l2-ticker:hover .l2-ticker-track { animation-play-state: paused; }
@keyframes l2tick { to { transform: translateX(-50%); } }
.l2-ticker .tk { display: inline-flex; gap: 9px; align-items: baseline; }
.l2-ticker .tk b { color: #fff; font-weight: 700; }
.l2-ticker .tk .src { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.l2-ticker .tk-label {
  color: var(--orange); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px;
}
@media (prefers-reduced-motion: reduce) { .l2-ticker-track { animation: none; } }

.l2-hero { padding: clamp(52px, 7vw, 92px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.l2-hero h1 {
  font-size: clamp(46px, 7.2vw, 92px); line-height: 1.02; letter-spacing: -0.03em;
  margin-bottom: clamp(28px, 4vw, 44px); max-width: 1000px;
}
.l2-hero h1 .row2 { display: block; color: var(--orange-deep); }
.l2-hero-cols {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px); align-items: end;
}
.l2-stat .big {
  font-size: clamp(64px, 8vw, 110px); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em;
  color: var(--orange-deep); font-variant-numeric: tabular-nums;
}
.l2-stat .l2cap { font-size: 15px; color: var(--muted); margin-top: 8px; max-width: 34ch; }
.l2-intro p { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink-soft); max-width: 52ch; margin-bottom: 24px; }
.l2-intro p strong { color: var(--ink); }
@media (max-width: 860px) { .l2-hero-cols { grid-template-columns: 1fr; align-items: start; } }

.l2-chapter { padding: clamp(52px, 7vw, 96px) 0; }
.l2-chapter.tinted { background: var(--paper-warm); }
.l2-ch-head { display: flex; align-items: baseline; gap: clamp(16px, 2.5vw, 30px); margin-bottom: clamp(26px, 4vw, 42px); }
.l2-ch-head .num {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(56px, 7vw, 96px); line-height: 0.9; color: var(--orange);
}
.l2-ch-head h2 { font-size: clamp(27px, 3.6vw, 44px); }
.l2-ch-body {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.l2-chapter:nth-of-type(even) .l2-ch-body > .l2-ch-text { order: 2; }
.l2-ch-text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 48ch; }
.l2-ch-text p strong { color: var(--ink); }
.l2-ch-text .bene-why { max-width: 48ch; }
@media (max-width: 900px) {
  .l2-ch-body { grid-template-columns: 1fr; }
  .l2-chapter:nth-of-type(even) .l2-ch-body > .l2-ch-text { order: 0; }
}

.l2-price-rows { display: grid; border-top: 1.5px solid var(--ink); }
.l2-prow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(16px, 3vw, 40px);
  align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; transition: background 0.2s;
}
.l2-prow:hover { background: color-mix(in srgb, var(--paper-warm) 55%, transparent); }
.l2-prow .tier { font-weight: 700; font-size: 19px; }
.l2-prow .tier small { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 14.5px; color: var(--muted); }
.l2-prow .pr { font-size: 24px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.l2-prow .pr small { font-size: 13px; font-weight: 400; color: var(--muted); }
.l2-prow .go { font-weight: 700; color: var(--orange-deep); white-space: nowrap; font-size: 15px; }
.l2-prow.hot .tier::after {
  content: "Suosituin"; margin-left: 10px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--orange);
  border-radius: 999px; padding: 3px 10px; vertical-align: 2px;
}
@media (max-width: 640px) { .l2-prow { grid-template-columns: 1fr auto; } .l2-prow .go { display: none; } }

/* ============================================================
   L3 · BENTO — kykyruudukko heti heron alla
   ============================================================ */
.l3-hero { padding: clamp(44px, 6vw, 70px) 0 clamp(26px, 3.5vw, 40px); }
.l3-hero-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 60px);
  align-items: end;
}
.l3-hero h1 { font-size: clamp(36px, 4.8vw, 56px); max-width: 640px; }
.l3-hero h1 em { font-style: normal; color: var(--orange-deep); }
.l3-hero .lead { max-width: 560px; margin-top: 14px; }
.l3-hero .hero-ctas { margin-bottom: 6px; }
@media (max-width: 860px) { .l3-hero-row { grid-template-columns: 1fr; align-items: start; } }

.l3-bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "console console stat    alert"
    "console console intel   intel"
    "ai      pipe    intel   intel"
    "sources sources sources sources";
}
.l3-tile {
  background: var(--paper-raise); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 20px; position: relative; min-width: 0;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.l3-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.l3-tile .tl-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 8px;
}
.l3-tile .tl-label .demo { opacity: 0.7; }
.l3-console { grid-area: console; display: flex; flex-direction: column; }
.l3-console .mt-input-row { margin-bottom: 10px; }
.l3-console .mt-input { box-shadow: none; }
.l3-console .mp-rows { margin-top: 12px; }
.l3-console .mp-more { margin-top: auto; padding-top: 13px; }
.l3-stat { grid-area: stat; background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.l3-stat .tl-label { color: #8fa0af; }
.l3-stat .big { font-size: clamp(40px, 4vw, 58px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--orange); }
.l3-stat p { font-size: 13.5px; color: #b9c5cf; margin-top: 8px; }
.l3-alert { grid-area: alert; }
.l3-intel { grid-area: intel; }
.l3-ai { grid-area: ai; }
.l3-pipe { grid-area: pipe; }
.l3-sources { grid-area: sources; display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; background: var(--paper-warm); }
.l3-sources .s-title { font-weight: 700; font-size: 15px; margin-right: 6px; }
.l3-sources .chip-t { background: var(--paper-raise); }
.l3-sources .s-arrow { color: var(--orange); font-weight: 700; }
.l3-sources .s-end { font-weight: 700; font-size: 15px; color: var(--orange-deep); }
.l3-bento .kanban { grid-template-columns: 1fr; gap: 6px; }
.l3-bento .kb-col h5 { margin-bottom: 5px; }
@media (max-width: 1020px) {
  .l3-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "console console"
      "stat    alert"
      "intel   intel"
      "ai      pipe"
      "sources sources";
  }
}
@media (max-width: 640px) {
  .l3-bento {
    grid-template-columns: 1fr;
    grid-template-areas: "console" "stat" "alert" "intel" "ai" "pipe" "sources";
  }
}

.l3-strip {
  text-align: center; padding: clamp(36px, 5vw, 60px) 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 28px); color: var(--ink-soft);
}
.l3-strip b { color: var(--orange-deep); font-style: normal; font-weight: 400; }

/* ---------- Luottamusnauha (Codex-poiminta) ---------- */
.trust-band { border-top: 1px solid var(--line-soft); }
.trust-band-inner {
  display: flex; flex-wrap: wrap; gap: 14px clamp(24px, 4vw, 60px);
  justify-content: center; padding: 26px 0;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.trust-band-inner span { display: inline-flex; align-items: center; gap: 9px; }
.trust-band-inner span::before { content: "\2713"; color: var(--orange-deep); font-weight: 700; }
