/*
 * itCon 3.1 — editable content sections.
 * Workflow, professional services, case studies and FAQ.
 */

/* Connected workflow */
.ns-workflow-section {
  padding-top: clamp(72px, 8vw, 112px);
  background: #fff;
}

.ns-workflow-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(245px, .68fr) minmax(0, 1.72fr);
  gap: clamp(34px, 4vw, 70px);
  overflow: hidden;
  padding: clamp(42px, 5vw, 70px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 34px;
  background:
    radial-gradient(circle at 91% 11%, rgba(52, 98, 255, .23), transparent 28%),
    linear-gradient(135deg, #121923, #080d16 76%);
  box-shadow: 0 34px 90px rgba(7, 17, 35, .2);
}

.ns-workflow-shell::before {
  position: absolute;
  z-index: -1;
  bottom: -240px;
  left: -205px;
  width: 560px;
  height: 560px;
  content: "";
  opacity: .35;
  border: 1px solid rgba(122, 153, 255, .24);
  border-radius: 38% 62% 58% 42%;
  box-shadow:
    0 0 0 24px rgba(122, 153, 255, .035),
    0 0 0 49px rgba(122, 153, 255, .03),
    0 0 0 74px rgba(122, 153, 255, .025),
    0 0 0 99px rgba(122, 153, 255, .02),
    0 0 0 124px rgba(122, 153, 255, .018);
  transform: rotate(18deg);
}

.ns-workflow-intro {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.ns-workflow-intro .ns-kicker { color: #7397ff; }
.ns-workflow-intro .ns-kicker::before { background: #7397ff; }

.ns-workflow-intro h2 {
  max-width: 340px;
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(2.45rem, 4.2vw, 4.15rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.ns-workflow-intro > p {
  max-width: 325px;
  margin: 0 0 34px;
  color: rgba(235, 241, 255, .68);
  font-size: .97rem;
  line-height: 1.7;
}

.ns-workflow-intro .ns-button { margin-top: auto; }

.ns-workflow-map {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 450px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 1fr);
  gap: 54px 38px;
  align-items: center;
}

.ns-workflow-map__line {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: rgba(183, 200, 255, .7);
  stroke-width: 1.5;
  stroke-dasharray: 5 8;
  vector-effect: non-scaling-stroke;
}

.ns-workflow-node {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 134px;
  padding: 18px;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  color: #101828;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 17px 45px rgba(0, 0, 0, .18);
  transition: transform .25s ease, box-shadow .25s ease;
}

.ns-workflow-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .25);
}

.ns-workflow-node::after {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 12px;
  height: 12px;
  content: "";
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--ns-accent);
  box-shadow: 0 0 0 1px rgba(36, 87, 255, .16);
  transform: translateY(-50%);
}

.ns-workflow-node--4::after,
.ns-workflow-node--5::after,
.ns-workflow-node--6::after {
  right: auto;
  left: -8px;
}

.ns-workflow-node--1 { grid-column: 1; grid-row: 1; }
.ns-workflow-node--2 { grid-column: 2; grid-row: 1; }
.ns-workflow-node--3 { grid-column: 3; grid-row: 1; }
.ns-workflow-node--4 { grid-column: 3; grid-row: 2; }
.ns-workflow-node--5 { grid-column: 2; grid-row: 2; }
.ns-workflow-node--6 { grid-column: 1; grid-row: 2; }

.ns-workflow-node__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--ns-accent);
  border-radius: 14px;
  background: #eaf0ff;
}

.ns-workflow-node__icon svg { width: 25px; height: 25px; }
.ns-workflow-node span { display: block; margin-bottom: 4px; color: var(--ns-accent); font-size: .59rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.ns-workflow-node h3 { margin: 0; color: #111827; font-size: 1rem; line-height: 1.18; }
.ns-workflow-node p { margin: 7px 0 0; color: #657189; font-size: .72rem; line-height: 1.42; }

/* Professional service offering */
.ns-offering-section { overflow: hidden; }
.ns-offering-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }

.ns-offering-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 335px;
  overflow: hidden;
  padding: 28px;
  flex-direction: column;
  border: 1px solid #e7ebf3;
  border-radius: 21px;
  background: linear-gradient(145deg, #fff, #fbfcff);
  box-shadow: 0 12px 38px rgba(15, 30, 60, .055);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.ns-offering-card::before {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 180px;
  height: 180px;
  content: "";
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 87, 255, .12), transparent 68%);
  transition: opacity .25s ease;
}

.ns-offering-card:hover { border-color: rgba(36, 87, 255, .28); box-shadow: 0 25px 58px rgba(15, 30, 60, .11); transform: translateY(-6px); }
.ns-offering-card:hover::before { opacity: 1; }
.ns-offering-card__top { position: relative; display: flex; min-height: 64px; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ns-offering-card__top > span { padding: 6px 8px; color: var(--ns-accent); border-radius: 8px; background: #eaf0ff; font-size: .57rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }

.ns-offering-card__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--ns-accent);
  border-radius: 15px;
  background: #edf2ff;
}

.ns-offering-card__icon svg { width: 26px; height: 26px; }
.ns-offering-card h3 { margin: 31px 0 13px; font-size: 1.2rem; line-height: 1.2; }
.ns-offering-card h3 a { color: #151c29; text-decoration: none; }
.ns-offering-card > p { margin: 0; color: #667187; font-size: .86rem; line-height: 1.65; }
.ns-offering-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 24px; }
.ns-offering-card__footer > span { color: #6d7890; font-size: .65rem; font-weight: 750; }
.ns-offering-card__footer > a,
.ns-offering-card__footer > i { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; color: var(--ns-accent); border: 1px solid #dde5f4; border-radius: 50%; background: #fff; font-style: normal; text-decoration: none; transition: color .2s ease, background .2s ease, transform .2s ease; }
.ns-offering-card__footer > a:hover { color: #fff; background: var(--ns-accent); transform: rotate(8deg); }

/* Interactive case studies */
.ns-case-studies-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 12%, rgba(36, 87, 255, .07), transparent 22%),
    #f3f6fc;
}

.ns-section-heading--center { display: block; max-width: 920px; margin-right: auto; margin-left: auto; text-align: center; }
.ns-section-heading--center > div,
.ns-section-heading--center > p { max-width: none; }
.ns-section-heading--center > p { max-width: 720px; margin: 18px auto 0; }

.ns-case-tabs__nav {
  display: grid;
  padding: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  border: 1px solid #e7ebf3;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 35px rgba(15, 30, 60, .055);
}

.ns-case-tabs__nav button {
  min-width: 0;
  min-height: 52px;
  overflow: hidden;
  padding: 10px 13px;
  color: #303849;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.ns-case-tabs__nav button:hover { color: var(--ns-accent); background: #f0f4ff; }
.ns-case-tabs__nav button[aria-selected="true"] { color: #fff; background: #121a28; box-shadow: 0 10px 26px rgba(9, 17, 30, .2); }
.ns-case-tabs__nav button:focus-visible { outline: 3px solid rgba(36, 87, 255, .25); outline-offset: 2px; }
.ns-case-tabs__panels { margin-top: 28px; }

.ns-case-panel {
  display: grid;
  min-height: 500px;
  grid-template-columns: 1.18fr .82fr;
  gap: 22px;
  animation: ns-case-in .4s ease both;
}

.ns-case-panel[hidden] { display: none; }

@keyframes ns-case-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ns-case-panel__visual,
.ns-case-panel__content { overflow: hidden; border: 1px solid #e6ebf4; border-radius: 24px; background: #fff; box-shadow: 0 14px 44px rgba(15, 30, 60, .06); }
.ns-case-panel__visual { display: flex; min-width: 0; padding: 24px; flex-direction: column; }
.ns-case-panel__media { position: relative; min-height: 345px; overflow: hidden; flex: 1; border-radius: 17px; background: linear-gradient(145deg, #123fca, #0d1b3c); }
.ns-case-panel__media img { width: 100%; height: 100%; min-height: 345px; object-fit: cover; transition: transform .6s ease; }
.ns-case-panel:hover .ns-case-panel__media img { transform: scale(1.025); }
.ns-case-panel__media .ns-project-card__pattern { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.ns-case-panel__media::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, transparent 58%, rgba(5, 15, 35, .33)); }
.ns-case-panel__metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.ns-case-panel__metrics:empty { display: none; }
.ns-case-panel__metrics > span { display: flex; min-width: 0; padding: 16px 18px; align-items: center; gap: 11px; border: 1px solid #e7ebf3; border-radius: 14px; background: #f8faff; }
.ns-case-panel__metrics strong { color: var(--ns-accent); font-size: 1.45rem; letter-spacing: -.035em; }
.ns-case-panel__metrics small { color: #667187; font-size: .67rem; line-height: 1.25; }

.ns-case-panel__content { position: relative; display: flex; padding: clamp(32px, 4vw, 54px); align-items: flex-start; flex-direction: column; }
.ns-case-panel__icon { display: grid; width: 54px; height: 54px; margin-bottom: 28px; place-items: center; color: var(--ns-accent); border-radius: 15px; background: #eaf0ff; }
.ns-case-panel__icon svg { width: 26px; height: 26px; }
.ns-case-panel__content .ns-kicker { margin-bottom: 13px; }
.ns-case-panel__content h3 { margin: 0 0 18px; font-size: clamp(1.75rem, 2.6vw, 2.65rem); line-height: 1.04; letter-spacing: -.045em; }
.ns-case-panel__content > p { margin: 0; color: #5f6c83; font-size: .97rem; line-height: 1.72; }
.ns-case-panel__meta { display: grid; width: calc(100% - 72px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: auto; padding-top: 30px; }
.ns-case-panel__meta span { display: flex; min-width: 0; color: #202a3b; flex-direction: column; font-size: .76rem; font-weight: 770; }
.ns-case-panel__meta small { margin-bottom: 4px; color: #8590a4; font-size: .59rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ns-case-panel__link { position: absolute; right: 34px; bottom: 34px; display: grid; width: 52px; height: 52px; place-items: center; color: #fff; border-radius: 50%; background: var(--ns-accent); box-shadow: 0 12px 28px rgba(36, 87, 255, .22); text-decoration: none; transition: transform .2s ease, background .2s ease; }
.ns-case-panel__link:hover { color: #fff; background: var(--ns-accent-dark); transform: rotate(9deg) scale(1.04); }

/* FAQ and editable facts */
.ns-faq-section { background: #fff; }
.ns-faq-section .ns-faq-layout { grid-template-columns: minmax(0, .78fr) minmax(520px, 1.22fr); gap: clamp(60px, 7vw, 108px); align-items: start; }
.ns-faq-intro { position: sticky; top: 130px; }
.ns-faq-intro h2 { margin: 17px 0 20px; font-size: clamp(2.45rem, 4vw, 3.8rem); line-height: 1.02; letter-spacing: -.052em; }
.ns-faq-intro > p { max-width: 500px; color: #637087; line-height: 1.72; }
.ns-faq-intro > .ns-text-link { margin-top: 22px; }

.ns-faq-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 38px; }
.ns-faq-facts > div { display: flex; min-width: 0; min-height: 105px; padding: 17px; justify-content: center; flex-direction: column; border: 1px solid #e5eaf3; border-radius: 15px; background: #f7f9fd; }
.ns-faq-facts strong { color: var(--ns-accent); font-size: 1.4rem; line-height: 1; letter-spacing: -.035em; }
.ns-faq-facts span { margin-top: 8px; color: #6d7890; font-size: .62rem; line-height: 1.3; }
.ns-faq-section .ns-faq-list { display: grid; gap: 12px; }
.ns-faq-section .ns-faq-item { overflow: hidden; border: 1px solid #e1e7f0; border-radius: 17px; background: #fff; box-shadow: 0 8px 25px rgba(15, 30, 60, .035); transition: border-color .2s ease, box-shadow .2s ease; }
.ns-faq-section .ns-faq-item[open] { border-color: rgba(36, 87, 255, .27); box-shadow: 0 16px 40px rgba(15, 30, 60, .07); }
.ns-faq-section .ns-faq-item summary { min-height: 78px; padding: 21px 24px; color: #172033; font-size: .96rem; font-weight: 780; }
.ns-faq-section .ns-faq-item summary span { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; color: var(--ns-accent); border-radius: 10px; background: #eaf0ff; transition: color .2s ease, background .2s ease, transform .25s ease; }
.ns-faq-section .ns-faq-item[open] summary span { color: #fff; background: var(--ns-accent); transform: rotate(45deg); }
.ns-faq-section .ns-faq-item > div { padding: 0 72px 23px 24px; color: #637087; font-size: .89rem; line-height: 1.72; }
.ns-faq-section .ns-faq-item > div > :last-child { margin-bottom: 0; }

@media (max-width: 1220px) {
  .ns-workflow-shell { grid-template-columns: 1fr; }
  .ns-workflow-intro { display: grid; grid-template-columns: 1.15fr .85fr; column-gap: 42px; }
  .ns-workflow-intro .ns-kicker,
  .ns-workflow-intro h2 { grid-column: 1; }
  .ns-workflow-intro > p { grid-column: 2; grid-row: 2; align-self: end; }
  .ns-workflow-intro .ns-button { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 0; }
  .ns-offering-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .ns-workflow-map { min-height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 18px; }
  .ns-workflow-map__line { display: none; }
  .ns-workflow-node,
  .ns-workflow-node--1,
  .ns-workflow-node--2,
  .ns-workflow-node--3,
  .ns-workflow-node--4,
  .ns-workflow-node--5,
  .ns-workflow-node--6 { grid-column: auto; grid-row: auto; }
  .ns-workflow-node::after { display: none; }
  .ns-case-panel { min-height: 0; grid-template-columns: 1fr; }
  .ns-case-panel__visual { min-height: 470px; }
  .ns-case-panel__content { min-height: 430px; }
  .ns-faq-section .ns-faq-layout { grid-template-columns: 1fr; gap: 54px; }
  .ns-faq-intro { position: static; }
}

@media (max-width: 760px) {
  .ns-workflow-shell { padding: 30px 22px; border-radius: 24px; }
  .ns-workflow-intro { display: flex; }
  .ns-workflow-intro h2 { font-size: clamp(2.3rem, 11vw, 3.3rem); }
  .ns-workflow-intro > p { margin-bottom: 25px; }
  .ns-workflow-intro .ns-button { margin-top: 0; }
  .ns-workflow-map { grid-template-columns: 1fr; margin-top: 8px; }
  .ns-workflow-node { min-height: 118px; }
  .ns-offering-grid { grid-template-columns: 1fr; }
  .ns-offering-card { min-height: 285px; }
  .ns-case-tabs__nav { display: flex; overflow-x: auto; padding: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .ns-case-tabs__nav button { min-width: 190px; scroll-snap-align: start; }
  .ns-case-panel__visual { min-height: 390px; padding: 15px; }
  .ns-case-panel__media,
  .ns-case-panel__media img { min-height: 275px; }
  .ns-case-panel__metrics > span { padding: 13px; }
  .ns-case-panel__content { min-height: 410px; padding: 28px 24px 88px; }
  .ns-case-panel__link { right: 24px; bottom: 24px; }
  .ns-case-panel__meta { width: 100%; }
  .ns-faq-facts { grid-template-columns: 1fr; }
  .ns-faq-facts > div { min-height: 82px; }
  .ns-faq-section .ns-faq-item summary { min-height: 70px; padding: 18px; }
  .ns-faq-section .ns-faq-item > div { padding: 0 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ns-case-panel { animation: none; }
  .ns-workflow-node,
  .ns-offering-card,
  .ns-case-panel__media img { transition: none; }
}
