/* IPCS components. Every colour, space, radius and shadow is a token from tokens.json; type sizes come from the type-style classes (heading-3, text-small, mono-label…). */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.ip-container { max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.ip-icon { flex: none; display: block; }
.ip-chev { transition: transform .18s ease; }
[aria-expanded="true"] > .ip-chev { transform: rotate(180deg); }
[class*="ip-"] { box-sizing: border-box; }
[class*="ip-"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.ip-night [class*="ip-"]:focus-visible, .ip-night:focus-visible { outline-color: var(--brand-on-night); }
.ip-header ul, .ip-drawer ul, .ip-footer ul, .ip-lang ul, .ip-steps { list-style: none; margin: 0; padding: 0; }
.ip-header p, .ip-drawer p, .ip-footer p, .ip-sechead p, .ip-sechead h1, .ip-sechead h2, .ip-sechead h3 { margin: 0; }

/* Logo — wordmark set in the display face until the mark file is added */
.ip-logo { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; flex: none; }
.ip-logo__mark { display: block; height: 32px; width: auto; }
.ip-logo__word { font-family: var(--font-display); font-weight: 750; font-size: 22px; line-height: 1; letter-spacing: 0.02em; }
.ip-logo--sm .ip-logo__mark { height: 24px; }
.ip-logo--sm .ip-logo__word { font-size: 18px; }
.ip-logo--lg .ip-logo__mark { height: 48px; }
.ip-logo--lg .ip-logo__word { font-size: 32px; }
.ip-logo--night { color: var(--on-night); }

/* Button */
.ip-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border: 1px solid transparent; border-radius: var(--radius-md); font-family: var(--font-sans); font-weight: 550; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.ip-btn--sm { height: 36px; padding: 0 var(--space-3); font-size: 14px; }
.ip-btn--md { height: 44px; padding: 0 var(--space-5); font-size: 15px; }
.ip-btn--lg { height: 52px; padding: 0 var(--space-6); font-size: 16px; }
.ip-btn--block { display: flex; width: 100%; height: auto; min-height: 44px; padding-block: 10px; white-space: normal; text-align: center; }
.ip-btn--block.ip-btn--lg { min-height: 52px; }
.ip-btn--block.ip-btn--sm { min-height: 36px; padding-block: 6px; }
.ip-btn--primary { background: var(--brand); color: var(--on-brand); }
.ip-btn--primary:hover { background: var(--brand-hover); }
.ip-btn--ai { background: var(--ai); color: var(--on-ai); }
.ip-btn--ai:hover { background: var(--ai-hover); }
.ip-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.ip-btn--secondary:hover { border-color: var(--ink); }
.ip-btn--ghost { background: transparent; color: var(--ink); }
.ip-btn--ghost:hover { background: var(--surface-sunken); }
.ip-btn--night.ip-btn--secondary { background: transparent; color: var(--on-night); border-color: var(--night-muted); }
.ip-btn--night.ip-btn--secondary:hover { border-color: var(--on-night); }
.ip-btn--night.ip-btn--ghost { color: var(--on-night); }
.ip-btn--night.ip-btn--ghost:hover { background: var(--night-raised); }
.ip-btn__trail { transition: transform .15s ease; }
.ip-btn:hover .ip-btn__trail { transform: translateX(2px); }
.ip-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Badge */
.ip-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--radius-sm); text-transform: uppercase; white-space: nowrap; }
.ip-badge--neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.ip-badge--brand { background: var(--brand-soft); color: var(--brand); }
.ip-badge--ai { background: var(--ai-soft); color: var(--ai); }
.ip-badge--ok { background: var(--ok-soft); color: var(--ok); }

/* StatusPill */
.ip-status { display: inline-flex; align-items: center; gap: var(--space-2); height: 28px; padding: 0 var(--space-3) 0 10px; border-radius: var(--radius-full); white-space: nowrap; width: max-content; }
.ip-status--ok { background: var(--ok-soft); color: var(--ok); }
.ip-status--warn { background: var(--warn-soft); color: var(--warn); }
.ip-status--down { background: var(--danger-soft); color: var(--danger); }
.ip-status__dot { position: relative; width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; }
.ip-status--night { background: var(--night-raised); color: var(--on-night); box-shadow: inset 0 0 0 1px var(--night-line); }
.ip-status--night.ip-status--ok .ip-status__dot { background: var(--ok-on-night); }
.ip-status--night.ip-status--warn .ip-status__dot { background: var(--warn); }
.ip-status--night.ip-status--down .ip-status__dot { background: var(--danger); }
.ip-status__dot--pulse::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid currentColor; opacity: 0; animation: ip-pulse 2.4s ease-out infinite; }
.ip-status--night .ip-status__dot--pulse::after { border-color: var(--ok-on-night); }
@keyframes ip-pulse { 0% { opacity: .6; transform: scale(.6); } 70%, 100% { opacity: 0; transform: scale(1.4); } }

/* LangSwitch */
.ip-lang { position: relative; }
.ip-lang__btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--surface); color: var(--ink); cursor: pointer; font-family: var(--font-mono); }
.ip-lang__btn:hover, .ip-lang.is-open .ip-lang__btn { border-color: var(--line-strong); }
.ip-lang__menu { position: absolute; top: calc(100% + 8px); min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); z-index: var(--z-menu); }
.ip-lang__menu--right { right: 0; }
.ip-lang__menu--left { left: 0; }
.ip-lang__opt { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: var(--space-3); width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.ip-lang__opt:hover { background: var(--paper); }
.ip-lang__opt.is-current, .ip-lang__opt[aria-current="true"], .ip-lang__opt[aria-selected="true"] { background: var(--brand-soft); }
.ip-lang__code { color: var(--ink-subtle); }
.ip-lang__check { color: var(--brand); visibility: hidden; }
.ip-lang__opt.is-current .ip-lang__code, .ip-lang__opt[aria-current="true"] .ip-lang__code, .ip-lang__opt[aria-selected="true"] .ip-lang__code { color: var(--brand); }
.ip-lang__opt.is-current .ip-lang__check, .ip-lang__opt[aria-current="true"] .ip-lang__check, .ip-lang__opt[aria-selected="true"] .ip-lang__check { visibility: visible; }

/* Header */
.ip-header { position: relative; z-index: var(--z-header); font-family: var(--font-sans); }
.ip-header--sticky { position: sticky; top: 0; }
.ip-header__bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.ip-header__inner { display: flex; align-items: center; gap: var(--space-6); height: var(--header-height); }
.ip-nav { flex: 1; min-width: 0; }
.ip-nav__list { display: flex; align-items: center; gap: 2px; }
.ip-nav__item { position: relative; }
.ip-nav__link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; font-family: var(--font-sans); }
.ip-nav__link:hover { background: var(--paper); }
.ip-nav__link.is-active { background: var(--brand-soft); color: var(--brand); }
.ip-nav__link--ai.is-active { background: var(--ai-soft); color: var(--ai); }
.ip-nav__link.is-current { color: var(--brand); }
.ip-nav__link .ip-chev { color: var(--ink-subtle); }
.ip-nav__link.is-active .ip-chev { color: currentColor; }
.ip-nav__dot { display: inline-block; width: 6px; height: 6px; margin-right: 2px; border-radius: var(--radius-full); background: var(--ai); flex: none; }
.ip-nav__ext { color: var(--ink-subtle); }
.ip-header__tools { display: flex; align-items: center; gap: var(--space-4); flex: none; }
.ip-header__phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ip-header__phone .ip-icon { color: var(--brand); }
.ip-header__phone:hover { color: var(--brand); }
.ip-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); cursor: pointer; flex: none; }
.ip-iconbtn:hover { border-color: var(--line-strong); }
.ip-header__burger { display: none; }

/* Mega-menu */
.ip-mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-panel); animation: ip-drop .16s ease-out; }
@keyframes ip-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ip-mega__inner { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); padding-top: var(--space-6); padding-bottom: var(--space-6); }
.ip-mega__groups { display: grid; gap: var(--space-5); }
.ip-mega__groups--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ip-mega__groups--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ip-mega__groups--single .ip-mega__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); }
.ip-mega__title { padding: 0 12px var(--space-3); color: var(--ink-subtle); text-transform: uppercase; }
.ip-mega__rows { display: grid; gap: 2px; }
.ip-mega__strip { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-5); padding: var(--space-4) var(--space-4) var(--space-4) 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.ip-mega .ip-mega__strip p { flex: 1; margin: 0; color: var(--ink-muted); }
.ip-mega__strip--ai .ip-row__icon { background: var(--ai-soft); color: var(--ai); }
.ip-mega__all { display: inline-flex; align-items: center; gap: 6px; margin: var(--space-4) 0 0 12px; color: var(--brand); text-decoration: none; }
.ip-mega__all:hover { color: var(--brand-hover); }
.ip-mega__aside { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-5); background: var(--surface-sunken); border-radius: var(--radius-lg); }
.ip-mega__aside-title { color: var(--ink); }
.ip-mega__aside-text { color: var(--ink-muted); }
.ip-mega__aside .ip-btn { margin-top: auto; }
.ip-mega__phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.ip-mega__phone .ip-icon { color: var(--brand); }

.ip-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: 10px 12px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.ip-row:hover { background: var(--paper); }
.ip-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand); flex: none; }
.ip-row--ai .ip-row__icon { background: var(--ai-soft); color: var(--ai); }
.ip-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ip-row__label { display: inline-flex; align-items: center; gap: var(--space-2); }
.ip-row__desc { color: var(--ink-muted); }
.ip-row:hover .ip-row__label { color: var(--brand); }
.ip-row--ai:hover .ip-row__label { color: var(--ai); }

.ip-dropdown { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); z-index: var(--z-menu); animation: ip-drop .16s ease-out; }
.ip-dropdown__link { display: block; padding: 10px 12px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.ip-dropdown__link:hover { background: var(--paper); color: var(--brand); }

/* Mobile drawer */
.ip-drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); font-family: var(--font-sans); }
.ip-drawer--inline { position: relative; inset: auto; height: 100%; min-height: 100%; }
.ip-drawer__top { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line); flex: none; }
.ip-drawer__body { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-4); }
.ip-drawer__item { border-bottom: 1px solid var(--line); }
.ip-drawer__head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer; font-family: var(--font-display); font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -0.005em; text-align: left; }
.ip-drawer__head > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.ip-drawer__head .ip-chev, .ip-drawer__head .ip-nav__ext { color: var(--ink-subtle); }
.ip-drawer__item.is-open .ip-drawer__head { color: var(--brand); }
.ip-drawer__item.is-open .ip-drawer__head--ai { color: var(--ai); }
.ip-drawer__panel { padding: 0 0 var(--space-4); display: grid; gap: var(--space-4); }
.ip-drawer .ip-drawer__gtitle { margin: 0 0 var(--space-1); color: var(--ink-subtle); text-transform: uppercase; }
.ip-drawer__link { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 4px 0; color: var(--ink); text-decoration: none; }
.ip-drawer__link--plain { padding-left: 0; }
.ip-drawer__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand); flex: none; }
.ip-drawer__link--ai .ip-drawer__icon { background: var(--ai-soft); color: var(--ai); }
.ip-drawer__foot { display: grid; gap: var(--space-4); padding: var(--space-4); border-top: 1px solid var(--line); background: var(--paper); flex: none; }
.ip-drawer__contacts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.ip-drawer__contacts a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--ink); text-decoration: none; }
.ip-drawer__contacts .ip-icon { color: var(--brand); }
.ip-drawer__langs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ip-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-full); color: var(--ink); text-decoration: none; }
.ip-chip.is-current { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* SectionHeader */
.ip-sechead { display: grid; gap: var(--space-4); max-width: 760px; }
.ip-sechead--center { margin-inline: auto; text-align: center; justify-items: center; }
.ip-sechead__eyebrow { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink-subtle); text-transform: uppercase; }
.ip-sechead__index { color: var(--brand); }
.ip-sechead__rule { width: 32px; height: 1px; background: var(--line-strong); }
.ip-sechead__title { color: var(--ink); text-wrap: balance; }
.ip-sechead__lead { color: var(--ink-muted); max-width: 640px; }
.ip-sechead--night .ip-sechead__eyebrow { color: var(--night-muted); }
.ip-sechead--night .ip-sechead__index { color: var(--brand-on-night); }
.ip-sechead--night .ip-sechead__rule { background: var(--night-line); }
.ip-sechead--night .ip-sechead__title { color: var(--on-night); }
.ip-sechead--night .ip-sechead__lead { color: var(--night-muted); }

/* ServiceCard */
.ip-card { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
a.ip-card:hover { border-color: var(--brand); box-shadow: var(--shadow-card); }
a.ip-card--ai:hover { border-color: var(--ai); }
.ip-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-2); }
.ip-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand); }
.ip-card--ai .ip-card__icon { background: var(--ai-soft); color: var(--ai); }
.ip-card__text { color: var(--ink-muted); }
.ip-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: var(--space-2); color: var(--brand); }
.ip-card--ai .ip-card__more { color: var(--ai); }
.ip-card__arrow { transition: transform .15s ease; }
a.ip-card:hover .ip-card__arrow { transform: translateX(3px); }

/* Stat */
.ip-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.ip-stat__value { color: var(--ink); font-variant-numeric: tabular-nums; }
.ip-stat__label { color: var(--ink-muted); }
.ip-stat--night .ip-stat__value { color: var(--on-night); }
.ip-stat--night .ip-stat__label { color: var(--night-muted); }

/* ProcessSteps */
.ip-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); counter-reset: none; }
.ip-steps__item { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); }
.ip-steps__item::before { content: ""; position: absolute; top: 28px; left: 56px; right: calc(-1 * var(--space-5)); height: 1px; background: var(--line-strong); }
.ip-steps__item:last-child::before { display: none; }
.ip-steps__num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--brand); }
.ip-steps__text { color: var(--ink-muted); }

/* Field */
.ip-field { display: grid; gap: 6px; }
.ip-field__label { color: var(--ink); font-weight: 550; }
.ip-field__req { color: var(--danger); }
.ip-field__control { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-family: var(--font-sans); }
.ip-field__control--area { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
.ip-field__control::placeholder { color: var(--ink-subtle); }
.ip-field__control:hover { border-color: var(--ink-muted); }
.ip-field__control:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.ip-field__msg { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-subtle); }
.ip-field.is-error .ip-field__control { border-color: var(--danger); }
.ip-field__msg--error { color: var(--danger); }

/* Footer */
.ip-night { background: var(--night); color: var(--on-night); }
.ip-footer { padding: var(--space-9) 0 var(--space-6); border-top: 1px solid var(--night-line); font-family: var(--font-sans); }
.ip-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); padding-bottom: var(--space-7); }
.ip-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.ip-footer__tagline { max-width: 300px; color: var(--night-muted); }
.ip-footer .ip-footer__head { margin-bottom: var(--space-4); color: var(--night-muted); text-transform: uppercase; }
.ip-footer__col ul { display: grid; gap: var(--space-3); }
.ip-footer__link { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--on-night); text-decoration: none; }
.ip-footer__link .ip-icon { color: var(--brand-on-night); }
a.ip-footer__link:hover { color: var(--brand-on-night); }
.ip-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--night-line); color: var(--night-muted); }

/* Breakpoints: 1180 tightens the bar, 1024 swaps the menu for the drawer, 640 is phones */
@media (max-width: 1180px) {
  .ip-header__inner { gap: var(--space-4); }
  .ip-header__phone { display: none; }
}
@media (max-width: 1024px) {
  :root { --header-height: 64px; }
  .ip-nav { display: none; }
  .ip-header__inner { justify-content: space-between; }
  .ip-header__burger { display: inline-flex; }
  .ip-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-6); }
  .ip-steps__item:nth-child(2)::before { display: none; }
  .ip-footer__grid { grid-template-columns: 1fr 1fr; }
  .ip-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .ip-header__lang, .ip-header__cta { display: none; }
  .display-xl { font-size: 40px; line-height: 44px; }
  .display-l { font-size: 32px; line-height: 38px; }
  .text-lead { font-size: 18px; line-height: 28px; }
  .ip-steps { grid-template-columns: 1fr; }
  .ip-steps__item::before { display: none; }
  .ip-footer { padding-top: var(--space-8); }
  .ip-footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ip-status__dot--pulse::after, .ip-mega, .ip-dropdown { animation: none; }
  .ip-chev, .ip-btn__trail, .ip-card__arrow { transition: none; }
}
