/* ---------- Civilsofts: tokens + base ---------- */
:root {
  --ink: #1F1F1F;
  --ink-2: #2B2B2B;
  --ink-muted: #5A5A5A;
  --ink-soft: #8A8A8A;
  --line: #E7E7E7;
  --line-soft: #EFEFEF;
  --bg: #FFFFFF;
  --bg-2: #F8F8F8;
  --bg-3: #F3F4F6;
  --red: #EF1B1B;
  --red-ink: #C61212;
  --red-tint: rgba(239, 27, 27, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 0 rgba(31, 31, 31, 0.04), 0 8px 24px -12px rgba(31, 31, 31, 0.10);
  --shadow-2: 0 1px 0 rgba(31, 31, 31, 0.04), 0 22px 50px -24px rgba(31, 31, 31, 0.22);
  --shadow-3: 0 30px 80px -30px rgba(31, 31, 31, 0.35);
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --head-w: 700;
  --display: 'Manrope', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--display);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section--ink { background: var(--ink); color: #fff; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 27, 27, 0.18);
}
.section--ink .eyebrow {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: var(--head-w); letter-spacing: -0.022em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(40px, 6.2vw, 76px); letter-spacing: -0.028em; }
h2 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -0.024em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); letter-spacing: -0.015em; line-height: 1.2; }
h4 { font-size: 17px; letter-spacing: -0.01em; }
p { margin: 0; color: var(--ink-muted); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-muted); line-height: 1.55; }
.h-accent { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 18px -8px rgba(31,31,31,0.5);
}
.btn--primary:hover { background: #000; }
.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 10px 22px -10px rgba(239,27,27,0.55);
}
.btn--red:hover { background: var(--red-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--bg-2); border-color: #d8d8d8; }
.btn--link {
  background: transparent;
  color: var(--ink);
  padding: 6px 0;
  border-radius: 0;
}
.btn--link:hover { color: var(--red); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.section--ink .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.18); }
.section--ink .btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

/* ---------- Language Switcher ---------- */
.lang-switch-form { display: inline-flex; }
.btn--lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: all .18s ease;
  font-family: var(--mono);
}
.btn--lang:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
}
.logo-civil { color: var(--ink); }
.logo-softs { color: var(--red); }
.section--ink .logo-civil { color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  background: rgba(255,255,255,0.0);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  gap: 32px;
}
.nav-menu {
  display: flex; align-items: center; gap: 28px;
  list-style: none; padding: 0; margin: 0;
}
.nav-menu a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color .18s ease;
  position: relative;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-burger span {
  display: block; width: 16px; height: 1.5px;
  background: var(--ink);
  position: relative;
}
.nav-burger span::before, .nav-burger span::after {
  content: ''; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink);
  transition: transform .2s ease;
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }
.nav-burger.open span { background: transparent; }
.nav-burger.open span::before { transform: translateY(5px) rotate(45deg); }
.nav-burger.open span::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 64px 0 0 0;
  background: #fff;
  z-index: 99;
  padding: 32px var(--gutter);
  display: none;
  flex-direction: column; gap: 4px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.6,.05,.2,1), opacity .25s ease;
  border-top: 1px solid var(--line);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (max-width: 880px) {
  .mobile-menu { display: flex; }
}
.mobile-menu a {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 16px; align-self: flex-start; }

@media (max-width: 880px) {
  .nav-menu { display: none; }
  .nav-cta .btn--ghost { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ---------- Page Hero (for sub-pages) ---------- */
.page-hero {
  padding-top: clamp(140px, 16vw, 200px);
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(239,27,27,0.06), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fff 60%, var(--bg-2) 100%);
  z-index: -1;
}
.page-hero h1 { max-width: 16ch; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(120px, 14vw, 168px);
  padding-bottom: clamp(72px, 9vw, 120px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(239,27,27,0.06), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fff 60%, var(--bg-2) 100%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 28px; }
.hero-copy h1 { margin-bottom: 22px; max-width: 14ch; }
.hero-copy h1 .h-accent { white-space: nowrap; }
.hero-copy .lead { max-width: 52ch; margin-bottom: 36px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero-meta {
  display: flex; gap: 36px; flex-wrap: wrap;
}
.hero-meta-item .num {
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: block; line-height: 1;
}
.hero-meta-item .lbl {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.02;
}
.hero-visual .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(239,27,27,0.05), transparent 65%);
}
.hero-visual .dashboard {
  position: absolute;
  inset: 4% 0 8% 4%;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.dash-bar {
  height: 36px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
}
.dash-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dash-bar i:nth-child(1) { background: #FFB4B4; }
.dash-bar i:nth-child(2) { background: #FFD9A0; }
.dash-bar i:nth-child(3) { background: #B8E6C1; }
.dash-bar .url {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
}
.dash-body { flex: 1; display: grid; grid-template-columns: 130px 1fr; min-height: 0; }
.dash-side {
  background: #FAFAFA;
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.dash-side .mini-logo {
  font-weight: 800; font-size: 13px; letter-spacing: -0.02em;
  margin-bottom: 12px; padding: 0 6px;
}
.dash-side .mini-logo .r { color: var(--red); }
.dash-side .item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 11.5px; color: var(--ink-muted);
}
.dash-side .item.active { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--line-soft), 0 6px 14px -10px rgba(0,0,0,.15); }
.dash-side .item .ico { width: 12px; height: 12px; border-radius: 3px; background: var(--line); flex: 0 0 12px; }
.dash-side .item.active .ico { background: var(--red); }
.dash-main { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dash-stat {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 12px 12px 10px;
  border: 1px solid var(--line-soft);
}
.dash-stat .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px;
}
.dash-stat .v { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-stat .d { font-size: 10px; color: #18A957; margin-top: 6px; }
.dash-stat .d.neg { color: var(--red); }
.dash-chart {
  flex: 1; min-height: 0;
  background: var(--bg-2);
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  padding: 14px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.dash-chart .ttl { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.dash-chart .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.dash-chart svg { width: 100%; flex: 1; }
.dash-chart svg .area { fill: rgba(239, 27, 27, 0.10); }
.dash-chart svg .line { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash-chart svg .line-2 { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 4; opacity: .35; }
.dash-chart .dot {
  position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(239,27,27,.18);
}

/* floating chips around the hero */
.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: center;
  font-size: 12px;
}
.float-card .icon-tile {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.float-card .icon-tile.red { background: var(--red); }
.float-card .ttl { font-weight: 600; font-size: 12.5px; }
.float-card .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }

.float-a { top: 6%; right: 0; }
.float-b { bottom: 4%; left: -3%; }
.float-c { top: 44%; right: -4%; }

.hero-tape {
  margin-top: clamp(60px, 7vw, 80px);
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
  justify-content: space-between;
}
.hero-tape .tape-lbl {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-tape .tape-logos {
  display: flex; gap: 36px; flex-wrap: wrap; align-items: center;
}
.tape-logo {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  font-size: 17px;
  opacity: 0.7;
  transition: opacity .2s ease, color .2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.tape-logo:hover { opacity: 1; color: var(--ink); }
.tape-logo .mark {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--ink);
  display: inline-block;
}
.tape-logo:nth-child(2) .mark { border-radius: 50%; background: var(--red); }
.tape-logo:nth-child(3) .mark { background: var(--ink); transform: rotate(45deg); border-radius: 3px; }
.tape-logo:nth-child(4) .mark { background: linear-gradient(135deg, var(--ink) 50%, var(--red) 50%); }
.tape-logo:nth-child(5) .mark { background: var(--ink); border-radius: 50% 0 50% 50%; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 1 / 0.95; max-width: 560px; margin: 0 auto; }
  .float-a { right: 2%; }
  .float-c { right: 0; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.svc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  cursor: default;
  display: flex; flex-direction: column;
  min-height: 260px;
}
.svc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: #DADADA;
}
.svc-card .icon-tile {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  margin-bottom: 22px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.svc-card:hover .icon-tile {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.svc-card h3 { margin-bottom: 10px; }
.svc-card p { font-size: 14.5px; line-height: 1.5; }
.svc-card .arrow-row {
  margin-top: auto;
  padding-top: 22px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color .2s ease;
}
.svc-card:hover .arrow-row { color: var(--red); }
.svc-card .arrow-row .arrow { transition: transform .2s ease; }
.svc-card:hover .arrow-row .arrow { transform: translateX(4px); }
.svc-card .corner-num {
  position: absolute;
  top: 20px; right: 22px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Why choose ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.why-list {
  display: flex; flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.why-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.why-row .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.why-row h3 { margin-bottom: 6px; }
.why-row p { font-size: 14.5px; max-width: 46ch; }
.why-row .marker {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.why-row:hover .marker {
  color: #fff; background: var(--red); border-color: var(--red);
}

.why-callout .lead { margin-top: 18px; }
.why-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 32px;
}
.why-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  background: #fff;
}
.why-stat .num {
  font-size: 38px; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1;
  display: flex; align-items: baseline; gap: 4px;
}
.why-stat .num .unit { font-size: 22px; color: var(--red); }
.why-stat .lbl {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 10px;
}

@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ---------- ERP ---------- */
.erp-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.erp-copy .feat-list {
  list-style: none; padding: 0; margin: 28px 0 36px;
  display: grid; gap: 6px;
}
.erp-copy .feat-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 16px;
}
.erp-copy .feat-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.erp-copy .feat-list .tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 22px;
}

.erp-visual {
  background: #161616;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.erp-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
}
.erp-tabs .tab { padding: 6px 10px; border-radius: 7px; background: rgba(255,255,255,0.04); cursor: pointer; }
.erp-tabs .tab.active { background: var(--red); color: #fff; }
.erp-table {
  display: grid; gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  font-size: 13.5px;
}
.erp-table .row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
}
.erp-table .row:last-child { border-bottom: 0; }
.erp-table .row.head {
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.02);
}
.erp-table .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
}
.erp-table .pill.ok { background: rgba(24,169,87,0.12); color: #4FCB89; }
.erp-table .pill.warn { background: rgba(239,158,27,0.12); color: #F0A93B; }
.erp-table .pill.red { background: rgba(239,27,27,0.14); color: #FF6464; }
.erp-table .num { font-variant-numeric: tabular-nums; }

.erp-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 18px;
}
.erp-meta .cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.erp-meta .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.erp-meta .v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.erp-meta .v .accent { color: var(--red); }

@media (max-width: 880px) {
  .erp-grid { grid-template-columns: 1fr; }
}

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  counter-reset: step;
}
.proc {
  position: relative;
  padding: 32px 26px 30px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.proc:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #DADADA; }
.proc .step-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 18px;
}
.proc h3 { margin-bottom: 10px; }
.proc p { font-size: 14.5px; line-height: 1.5; }
.proc .deliv {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.proc .deliv span {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 3px 8px;
}

@media (max-width: 960px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .process-grid { grid-template-columns: 1fr; } }

/* ---------- Portfolio ---------- */
.portfolio-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.portfolio-head .left { max-width: 600px; }
.port-filters { display: flex; gap: 6px; }
.port-filter {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all .2s ease;
}
.port-filter:hover { color: var(--ink); border-color: #d4d4d4; }
.port-filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.port-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.port-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.port-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: #DADADA;
}
.port-card.hidden {
  display: none;
}
.port-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.port-meta {
  padding: 22px 22px 24px;
}
.port-meta .tag {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--red);
}
.port-meta h3 { margin: 8px 0 8px; }
.port-meta p { font-size: 14px; }
.port-meta .row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.port-meta .row .view { color: var(--ink); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* portfolio thumb mocks */
.thumb-ecom { background: linear-gradient(160deg, #FAFAFA, #EFEFEF); padding: 24px; }
.thumb-ecom .browser {
  background: #fff;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  height: 100%;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 30px -20px rgba(0,0,0,0.2);
}
.thumb-ecom .bbar { height: 22px; background: var(--bg-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; padding: 0 9px; }
.thumb-ecom .bbar i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.thumb-ecom .bbody { flex: 1; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; grid-template-rows: auto 1fr; }
.thumb-ecom .hd { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.thumb-ecom .hd .lg { font-weight: 800; font-size: 11px; }
.thumb-ecom .hd .lg .r { color: var(--red); }
.thumb-ecom .hd .cart { width: 16px; height: 12px; background: var(--ink); border-radius: 2px; }
.thumb-ecom .prod { background: var(--bg-3); border-radius: 6px; aspect-ratio: 1; position: relative; }
.thumb-ecom .prod::after { content: ''; position: absolute; left: 6px; right: 30%; bottom: 6px; height: 4px; background: var(--ink); border-radius: 2px; }
.thumb-ecom .prod:nth-child(3)::before { content: '$'; position: absolute; right: 6px; top: 6px; background: var(--red); color: #fff; font-size: 8px; font-weight: 700; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.thumb-erp { background: #1F1F1F; padding: 22px; position: relative; }
.thumb-erp .panel { background: #2A2A2A; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; height: 100%; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 18px 30px -20px rgba(0,0,0,0.5); }
.thumb-erp .erp-head { display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 11px; font-weight: 600; }
.thumb-erp .erp-head .accent { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; margin-right: 6px; }
.thumb-erp .erp-chart { flex: 1; background: #161616; border-radius: 7px; padding: 8px; position: relative; overflow: hidden; }
.thumb-erp .erp-chart svg { width: 100%; height: 100%; }
.thumb-erp .erp-rows { display: grid; gap: 4px; }
.thumb-erp .erp-rows .r { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 9px; color: rgba(255,255,255,0.6); padding: 4px 8px; background: rgba(255,255,255,0.03); border-radius: 4px; }
.thumb-erp .erp-rows .r .v { color: #fff; font-family: var(--mono); }

.thumb-app { background: linear-gradient(160deg, #FFE9E9, #FFF6F6); padding: 22px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.thumb-app .phone {
  width: 56%;
  aspect-ratio: 9/18;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 20px 30px -16px rgba(0,0,0,0.25);
  transform: rotate(-4deg);
}
.thumb-app .phone .notch { width: 30%; height: 4px; background: var(--ink); border-radius: 4px; margin: 0 auto 4px; }
.thumb-app .phone .greet { font-size: 8.5px; font-weight: 700; }
.thumb-app .phone .greet .r { color: var(--red); }
.thumb-app .phone .card { background: var(--bg-3); border-radius: 6px; padding: 6px 7px; font-size: 7px; line-height: 1.3; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; }
.thumb-app .phone .card.red { background: var(--red); color: #fff; }
.thumb-app .phone .card .t { font-weight: 700; font-size: 8px; }
.thumb-app .phone .card .b { font-size: 6.5px; opacity: .8; }
.thumb-app .phone .bn { background: var(--ink); color: #fff; border-radius: 14px; text-align: center; padding: 5px; font-size: 8px; font-weight: 700; }
.thumb-app .blob {
  position: absolute; right: -20px; bottom: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(239,27,27,0.10);
}

@media (max-width: 960px) { .port-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .port-grid { grid-template-columns: 1fr; } }

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 100% 50%, rgba(239,27,27,0.18), transparent 60%),
    radial-gradient(40% 50% at 0% 0%, rgba(239,27,27,0.08), transparent 70%);
}
.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(60px, 8vw, 100px) 0;
}
.cta-inner h2 { color: #fff; max-width: 14ch; margin-bottom: 18px; }
.cta-inner h2 .h-accent { color: #FF7A7A; }
.cta-inner .lead { color: rgba(255,255,255,0.72); max-width: 48ch; }
.cta-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 22px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cta-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.cta-form input, .cta-form textarea, .cta-form select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 13px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.cta-form input::placeholder, .cta-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.cta-form input:focus, .cta-form textarea:focus, .cta-form select:focus {
  border-color: rgba(239,27,27,0.6);
  background: rgba(255,255,255,0.06);
}
.cta-form input.invalid { border-color: var(--red); }
.cta-form textarea.invalid { border-color: var(--red); }
.cta-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%23ffffff' opacity='0.6' d='M3 5l3 3 3-3z'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.cta-form textarea { resize: vertical; min-height: 84px; }
.cta-form .submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.cta-form .submit-row .reply {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cta-form .submit-row .reply .pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4FCB89; margin-right: 8px;
  box-shadow: 0 0 0 3px rgba(79, 203, 137, 0.18);
  vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.cta-form .success {
  text-align: center;
  padding: 38px 20px;
}
.cta-form .success .check {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.cta-form .success h4 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.cta-form .success p { color: rgba(255,255,255,0.68); }

@media (max-width: 880px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-form .row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand p { font-size: 14.5px; max-width: 32ch; line-height: 1.6; margin-bottom: 22px; }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.footer-socials a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.footer-col h5 {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: var(--ink-muted);
  font-size: 14.5px;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--red); }
.footer-col .contact-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-muted); }
.footer-col .contact-item .ico { color: var(--red); flex: 0 0 18px; padding-top: 2px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom .links { display: flex; gap: 22px; }
.footer-bottom .links a { transition: color .15s ease; }
.footer-bottom .links a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Misc ---------- */
::selection { background: var(--red); color: #fff; }
