/* CRM / ERP — navy-violet tint, not forest-green */

body[data-page="crm"] {
  --forest: #141218;
  --forest-deep: #0a0a0e;
  --crm: #16151c;
  --crm-deep: #0a0a10;
  background:
    linear-gradient(90deg, rgba(5, 5, 8, 0.06) 0%, transparent 38%),
    radial-gradient(1100px 520px at 100% 8%, rgba(72, 52, 120, 0.07), transparent 52%);
}
body[data-page="crm"] .btn-primary {
  background: #121014;
  color: #fff;
  border: 1px solid rgba(132, 104, 176, 0.38);
  box-shadow: 0 10px 26px rgba(16, 8, 32, 0.32), inset 0 0 22px rgba(88, 62, 140, 0.2);
}
body[data-page="crm"] .btn-primary:hover {
  background: #1a1624;
}

.crm-hero {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  padding: clamp(22px, 3.5vw, 32px);
  min-height: 0;
  display: grid;
  align-content: start;
  color: #fff;
  background-color: #07070a;
  background-image:
    var(--hero-photo-veil),
    var(--hero-photo-veil-extra),
    url("../assets/crm-calm.jpg");
  background-repeat: no-repeat;
  background-size: auto, auto, 128% auto;
  background-position: 0 0, 0 0, 88% 22%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.crm-hero .kicker,
.crm-hero h1,
.crm-hero .lead,
.crm-hero-actions { position: relative; z-index: 3; }
.crm-hero h1 { color: #fff; max-width: min(22ch, 42rem); margin: 0; }
.crm-hero .lead { color: rgba(255, 255, 255, 0.76); margin: 14px 0 18px; max-width: min(34rem, 48%); }
.crm-hero .kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}
.crm-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: 48%; }
.crm-hero .btn-dark { background: #fff; color: #101010; }
.crm-hero .btn-line { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* Light cards — most of the page */
.crm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  color: var(--ink);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.crm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(28, 22, 56, 0.14);
}
.crm-card h3 { margin: 0 0 8px; color: var(--ink); }
.crm-card p { margin: 0; color: var(--copy); font-weight: 500; }
.crm-card .tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.06);
  color: #1a1a22;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Accent — almost black, hint of violet only on hover glow */
.crm-accent {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #050508 0%, #0e0c16 58%, #1a1630 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  border-radius: 24px;
  color: #fff;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.crm-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}
.crm-accent h3 { color: #fff; margin: 0 0 8px; }
.crm-accent p { color: rgba(255, 255, 255, 0.7); margin: 0; }
.crm-accent a { color: rgba(255, 255, 255, 0.88); }
.crm-accent .tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.crm-accent .glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  left: var(--mx, 50%);
  top: var(--my, 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle, rgba(92, 78, 160, 0.36) 0%, rgba(92, 78, 160, 0) 70%);
  filter: blur(2px);
  z-index: 0;
}
.crm-accent.is-warm .glow {
  background: radial-gradient(circle, rgba(120, 88, 180, 0.38) 0%, rgba(120, 88, 180, 0) 70%);
}
.crm-accent.is-cool .glow {
  background: radial-gradient(circle, rgba(70, 90, 180, 0.38) 0%, rgba(70, 90, 180, 0) 70%);
}
.crm-accent:hover .glow { opacity: 1; }
.crm-accent > *:not(.glow) { position: relative; z-index: 1; }

.crm-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}
.crm-pillars article {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
#servisy { scroll-margin-top: 88px; }
.crm-pillars h3 { max-width: 18ch; }
.crm-pillars > article > p { flex: 1; }
.scope-link {
  margin-top: 18px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.scope-link:hover { border-color: rgba(255, 255, 255, 0.55); }

.crm-line {
  display: grid;
  gap: 12px;
}
.crm-line article {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}
.crm-line .num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--crm);
  line-height: 1;
}
.crm-line h3 { margin: 0 0 6px; }
.crm-line p { font-size: 0.92rem; }

.crm-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.crm-tiles article { padding: 20px; }

.crm-price { padding: 24px; display: flex; flex-direction: column; }
.crm-price .btn { margin-top: auto; }
.crm-price .price-note { margin: -6px 0 16px; font-size: 0.82rem; line-height: 1.45; }
.crm-card.crm-price .price-note { color: var(--muted); }
.crm-accent.crm-price .price-note { color: rgba(255, 255, 255, 0.55); }
.crm-accent.crm-price .amount { font-size: 1.8rem; font-weight: 800; margin: 8px 0 2px; color: #fff; }
.crm-accent.crm-price .sub { color: rgba(255, 255, 255, 0.55); font-size: 0.88rem; margin-bottom: 12px; }
.crm-card.crm-price .amount { font-size: 1.8rem; font-weight: 800; margin: 8px 0 2px; }
.crm-card.crm-price .sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 12px; }
.crm-price ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 7px;
}
.crm-price li {
  padding-left: 14px;
  position: relative;
  font-size: 0.92rem;
}
.crm-card.crm-price li { color: var(--muted); }
.crm-accent.crm-price li { color: rgba(255, 255, 255, 0.72); }
.crm-price li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  position: absolute;
  left: 0;
  top: 0.55em;
}
.crm-accent .btn-primary {
  background: #fff;
  color: #101010;
}
.crm-accent .btn-primary:hover { background: #f0f0f0; }
.crm-accent .btn-light { background: #fff; color: #101010; }

.crm-split-pic {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 300px;
}
.crm-split-pic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, transparent 58%);
  pointer-events: none;
}
.crm-split-pic img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }

.scope-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.scope-modal[hidden] { display: none; }
.scope-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.55);
}
.scope-modal-box {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 28px 26px 24px;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.scope-modal-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 24, 22, 0.06);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.scope-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.scope-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}
.scope-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #101010;
  position: absolute;
  left: 0;
  top: 0.55em;
}
.scope-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.crm-float { position: relative; }
.crm-float .panel,
.crm-float .node {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
  animation: crm-drift 9s ease-in-out infinite;
}
.crm-float .panel {
  width: min(240px, 36vw);
  top: auto;
  right: 4px;
  bottom: 8px;
}
.crm-float .node {
  width: min(156px, 22vw);
  top: auto;
  right: 268px;
  bottom: 18px;
  animation-delay: -3s;
  opacity: 0.92;
}
@keyframes crm-drift {
  0%, 100% { transform: translateY(0) scaleX(-1); }
  50% { transform: translateY(-12px) scaleX(-1); }
}

@media (max-width: 900px) {
  .crm-pillars, .crm-tiles { grid-template-columns: 1fr; }
  .crm-line article { grid-template-columns: 40px 1fr; }
  .crm-float .node { display: none; }
  .crm-float .panel { width: min(128px, 34vw); right: -6px; bottom: -16px; }
  .crm-hero .lead { max-width: 88%; }
  .crm-hero-actions { max-width: 100%; }
}
@media (max-width: 560px) {
  .crm-hero {
    background-size: auto, auto, cover;
    background-position: 0 0, 0 0, 85% 20%;
  }
}
