/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 122, 255, 0.35);
}

.btn-primary:hover {
  background: var(--blue-bright);
  box-shadow: 0 14px 32px rgba(0, 122, 255, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.btn-icon {
  width: 46px;
  height: 46px;
  padding: 0;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 19px;
  height: 19px;
}

/* ---------- Image placeholders ---------- */
.img-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px dashed var(--placeholder-dash);
  background: repeating-linear-gradient(135deg, var(--surface) 0 16px, var(--surface-2) 16px 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.8px;
}

.img-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.tile {
  grid-column: span 4;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  transition: transform 0.35s var(--ease), filter 0.35s, border-color 0.35s;
}

.tile:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 122, 255, 0.45);
  filter: drop-shadow(0 16px 30px rgba(0, 122, 255, 0.22));
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.tile-icon svg {
  width: 24px;
  height: 24px;
}

.tile h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tile p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.tile-tags {
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 600;
}

.tile-chat {
  grid-column: span 7;
}

.tile-db {
  grid-column: span 5;
}

.tile-web {
  grid-column: span 4;
}

.tile-flex {
  grid-column: span 12;
  background: linear-gradient(115deg, var(--surface) 0%, var(--surface-2) 100%);
}

/* ---------- Accordion (services) ---------- */
.acc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}

.acc-item.open {
  border-color: rgba(0, 122, 255, 0.45);
}

.acc-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.acc-index {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--blue);
  flex-shrink: 0;
}

.acc-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  flex: 1;
}

.acc-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s;
}

.acc-icon svg {
  width: 15px;
  height: 15px;
}

.acc-item.open .acc-icon {
  transform: rotate(45deg);
  background: var(--blue-soft);
  color: var(--blue);
}

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.acc-item.open .acc-panel {
  grid-template-rows: 1fr;
}

.acc-body {
  overflow: hidden;
}

.acc-inner {
  padding: 0 24px 26px 64px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
}

.acc-inner p + p {
  margin-top: 12px;
}

/* ---------- Services: header + case-study CTA ---------- */
.svc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 46px;
}

.svc-head .section-head {
  margin-bottom: 0;
}

.svc-cta {
  flex-shrink: 0;
  margin-bottom: 4px;
}

/* ---------- Implementations ---------- */
.impl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.impl-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.impl-shot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.impl-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease);
}

.impl-thumb:hover {
  transform: translateY(-5px);
}

.impl-thumb:hover .impl-shot {
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: 0 18px 44px rgba(0, 122, 255, 0.22);
}

.impl-thumb:focus-visible {
  outline: none;
}

.impl-thumb:focus-visible .impl-shot {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* ---------- Screenshot lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 76px 24px 44px;
  background: rgba(4, 9, 18, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: min(1080px, 100%);
  max-height: calc(100vh - 230px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}

.lightbox.open .lightbox-img {
  transform: none;
}

.lightbox-caption {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.lightbox-close:hover {
  border-color: rgba(0, 122, 255, 0.5);
  background-color: var(--blue-soft);
}

.lightbox-close:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* ---------- Chat (simulation) ---------- */
.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-dots {
  display: flex;
  gap: 6px;
}

.chat-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate);
  opacity: 0.5;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-avatar {
  width: 26px;
  height: auto;
}

.chat-title strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(0, 122, 255, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.chat-body {
  height: 380px;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: msg-in 0.3s var(--ease);
}

.msg.bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg.user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}

.quick-btn {
  border: 1px solid rgba(0, 122, 255, 0.4);
  background: var(--blue-soft);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s var(--ease);
}

.quick-btn:hover {
  background: rgba(0, 122, 255, 0.26);
  transform: translateY(-1px);
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 18px 18px;
}

.chat-input input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 16px;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* Retrieval status line (in-chat) */
.msg.status {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 2px 0;
  background: none;
  animation: msg-in 0.3s var(--ease);
}

.status-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.status-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: typing-blink 1.2s infinite;
}

.status-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.status-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.status-label {
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

/* ---------- Sources panel (simulation) ---------- */
.sources {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sources-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px;
}

.sources-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sources-count {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(0, 122, 255, 0.35);
  border-radius: 999px;
  padding: 2px 9px;
  min-width: 24px;
  text-align: center;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sources-empty {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 6px 4px;
}

.source {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: msg-in 0.35s var(--ease);
}

.source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-type {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--slate);
}

.source-conf {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.source-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
}

.source-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}

.source-bar span {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  animation: bar-fill 0.7s var(--ease);
}

/* ---------- Form (contact) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.cf-turnstile {
  display: flex;
  justify-content: center;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.btn-primary:disabled {
  box-shadow: none;
}

.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.contact-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.contact-info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.info-icon svg {
  width: 17px;
  height: 17px;
}

.contact-cta {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.contact-cta p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.contact-cta .btn {
  width: 100%;
  text-align: center;
}

/* ---------- Team (about) ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.member {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.member:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 122, 255, 0.4);
}

.portrait {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 18px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.15);
}

.portrait .duo {
  position: absolute;
  inset: 0;
  background: var(--duo-mid);
  mix-blend-mode: color;
  pointer-events: none;
}

.portrait .scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, var(--scanline) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portrait::before {
  background: var(--duo-shadow);
  mix-blend-mode: screen;
}

.portrait::after {
  background: var(--duo-highlight);
  mix-blend-mode: multiply;
}

.member h3 {
  font-size: 19px;
  font-weight: 600;
}

.member-role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--blue);
  margin: 5px 0 12px;
}

.member-bio {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 32px 36px;
}

.facts h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
}

.facts p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.75;
  max-width: 80ch;
}

/* ---------- Opinions ---------- */
.trusted-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.trusted {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 48px;
  padding: 28px 24px;
  border-block: 1px solid var(--border);
  margin-bottom: 48px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text-muted);
  opacity: 0.75;
  transition: opacity 0.3s, color 0.3s;
}

.wordmark:hover {
  opacity: 1;
}

.wm-autopol {
  font-family: "Archivo Black", var(--font-display);
  font-size: 22px;
  color: #e30613;
  letter-spacing: 0.5px;
}

.wm-cargotrans {
  font-family: "Montserrat", var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: #ff3300;
  letter-spacing: 0.5px;
}

.wm-cargotrans .ct-cargo {
  border-bottom: 3px dashed currentColor;
  padding-bottom: 5px;
}

.wm-cargotrans .ct-trans {
  border-top: 4px solid currentColor;
  padding-top: 5px;
}

.wm-micon {
  font-family: "Archivo Black", var(--font-display);
  font-size: 22px;
  color: #f50000;
  letter-spacing: 2px;
}

.wm-lesna {
  font-family: var(--font-body);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
  color: var(--text);
}

.wm-lesna .lesna-1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.wm-lesna .lesna-2 {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 1.5px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.quote-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 122, 255, 0.4);
}

.quote-card blockquote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  flex: 1;
}

.quote-card blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 0.6;
  color: var(--blue);
  margin-bottom: 14px;
}

.quote-card figcaption {
  display: flex;
  align-items: center;
  gap: 13px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quote-who {
  display: flex;
  flex-direction: column;
}

.quote-who strong {
  font-size: 14.5px;
  font-weight: 600;
}

.quote-who span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .impl-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sim-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .bento .tile {
    grid-column: span 6;
  }

  .bento .tile-chat,
  .bento .tile-flex {
    grid-column: span 12;
  }

  .team,
  .quotes {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .team {
    margin-left: auto;
    margin-right: auto;
  }

  .quotes {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bento .tile,
  .bento .tile-chat {
    grid-column: span 12;
  }

  .section {
    padding: 56px 20px;
  }

  .acc-inner {
    padding-left: 24px;
  }

  .svc-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .impl-shots {
    grid-template-columns: 1fr;
  }

  .chat-body {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .badge {
    display: none;
  }
}
