/* ==========================================================================
   ITERUM SCHOOL — UI enhancement layer
   Loaded AFTER styles.css. Visual changes only: no text or content is changed.
   Principles: one colour system (navy / brand blue / violet), warm sunset accent
   kept for dark surfaces only, WCAG AA contrast, visible focus, 44px touch
   targets, consistent spacing + radius scale, calm motion.
   ========================================================================== */

:root {
  --navy: #0a1d5c;
  --navy-deep: #06143f;
  --brand: #4a5be8;
  --brand-dark: #3441c4;
  --violet: #8a4bc4;
  --tint: #eef1ff;
  --mist: #d3dcfb;
  --grad-brand: linear-gradient(135deg, #4a5be8 0%, #6a55e0 55%, #8a4bc4 100%);
  --grad-brand-hover: linear-gradient(135deg, #3f50dc 0%, #5d49d3 55%, #7a41b8 100%);
  --grad-text: linear-gradient(90deg, #4a5be8 0%, #8a4bc4 100%);
  --grad-text-dark: linear-gradient(90deg, #9fb2ff 0%, #d3b6ff 100%);
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(23, 40, 94, .04), 0 10px 28px rgba(23, 40, 94, .07);
  --sh-2: 0 2px 4px rgba(23, 40, 94, .05), 0 22px 50px rgba(23, 40, 94, .13);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { text-wrap: balance; }
::selection { background: #c9d1ff; color: var(--navy); }

/* focus: brand blue on light surfaces, white on dark surfaces (>= 3:1) */
body a:focus-visible,
body button:focus-visible,
body summary:focus-visible,
body select:focus-visible,
body input:focus-visible,
body .cm input:focus-visible + span {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
body .hero a:focus-visible,
body .hero button:focus-visible,
body .site-header:not(.is-scrolled) a:focus-visible,
body .site-header:not(.is-scrolled) button:focus-visible,
body .footer a:focus-visible,
body .footer button:focus-visible {
  outline-color: #fff;
}

/* ---------- section rhythm ---------- */
body .section { padding: clamp(64px, 8vw, 108px) 0; }
body .title-row {
  justify-content: center;
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 52px);
}
body .title-row > div { max-width: 720px; }
body .section-heading-center { margin-bottom: clamp(32px, 4vw, 52px); }

/* eyebrow: small accent rule makes every section start the same way */
body .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  margin-bottom: 14px;
  color: var(--brand);
}
body .eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-text);
}
body .section-heading-center .eyebrow::after,
body .title-row .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8a4bc4, #4a5be8);
}

/* heading accent words: brand gradient (>= 4.5:1 on white) */
body h2 span,
body .contact-intro h2 span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
body .hero h1 span {
  background: var(--grad-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- header ---------- */
body .nav a { position: relative; padding: 10px 0; }
body .nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
body .nav a:hover::after { transform: scaleX(1); }
body .lang-btn { min-height: 44px; }

/* ---------- hero ---------- */
body .hero-overlay {
  background:
    linear-gradient(90deg, rgba(6, 20, 63, .66) 0%, rgba(6, 20, 63, .42) 38%, rgba(6, 20, 63, 0) 68%),
    linear-gradient(180deg, rgba(6, 20, 63, .38) 0%, rgba(6, 20, 63, 0) 22%, rgba(6, 20, 63, 0) 82%, rgba(6, 20, 63, .30) 100%);
}
body .hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 29, 92, .45);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #e4e9ff;
}
@media (min-width: 651px) {
  body .hero-notes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 34px;
  }
  body .hero-note {
    padding: 9px 16px 9px 12px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 999px;
    background: rgba(10, 29, 92, .38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 14.5px;
    line-height: 1.3;
    max-width: none;
    color: #eef1ff;
  }
  body .hero-note img { width: 20px; height: 20px; }
}

/* ---------- buttons ---------- */
body .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
body .btn:active { transform: translateY(0) scale(.99); }
/* light surfaces use the brand gradient; the warm sunset stays on dark surfaces */
body .service-card a.service-cta,
body .lead-form .btn,
body .lead-form #submitBtn {
  background: var(--grad-brand);
  color: #fff !important;
  border: 0;
}
body .service-card a.service-cta:hover,
body .lead-form .btn:hover,
body .lead-form #submitBtn:hover:not(:disabled) {
  background: var(--grad-brand-hover);
  color: #fff !important;
}
body .lead-form #submitBtn,
body .lead-form .btn { background: var(--grad-brand) !important; }
body .lead-form #submitBtn:hover:not(:disabled) { background: var(--grad-brand-hover) !important; }
body .lead-form #submitBtn:disabled {
  background: #e4e9fb !important;
  color: #6676aa !important;
  opacity: 1 !important;
  cursor: not-allowed;
}
body .service-card a.service-cta span,
body .lead-form .btn span { color: inherit; }

/* ---------- services ---------- */
body .services-detailed { gap: 20px; }
body .service-card {
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
body .service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: #c5cffa;
}
body .service-card .card-top { margin-bottom: 22px; }
body .service-card .icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef1ff 0%, #e7e3ff 100%);
  box-shadow: inset 0 0 0 1px #e1e6ff;
}
body .service-card .icon img { width: 30px; height: 30px; }
/* index number: calm brand tint instead of the small pink/orange gradient */
body .service-card .num {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #4a5be8;
  font: 800 13px/1 var(--head);
  letter-spacing: .08em;
}
body .service-card h3 { color: var(--navy); letter-spacing: -.01em; }
body .service-card .teaser { color: #56668f; }
body .service-card .price-big {
  font-size: 32px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
body .service-card .price-rows div:last-child { border-bottom: 0; padding-bottom: 0; }
body .service-card .price-rows dd { font-variant-numeric: tabular-nums; }
@media (min-width: 1001px) {
  body .service-card .price-line {
    min-height: 84px;
    align-items: flex-end;
    align-content: flex-end;
  }
}
body .price-footnote { color: #56668f; }

/* ---------- how we work ---------- */
body .process-section { background: linear-gradient(180deg, #f5f7ff 0%, #eaeeff 100%); }
body .who {
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin: 0 0 28px;
  padding: clamp(20px, 3vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--sh-1);
}
body .who-text h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.015em; color: var(--navy); }
body .who-text p { font-size: 16px; line-height: 1.7; color: #56668f; }
body .who .about-visual { border-radius: 22px; box-shadow: var(--sh-1); }
body .who .about-visual img { border-radius: 22px; }

body .process-grid.four { gap: 20px; }
body .process-card {
  position: relative;
  overflow: visible;
  padding: 26px 22px 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
body .process-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
body .process-card .process-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font: 800 15px/1 var(--head);
  opacity: 1;
}
body .process-card h3 { color: var(--navy); font-size: 18px; }
body .process-card p { color: #56668f; }
/* dotted connector between steps (desktop) */
@media (min-width: 1001px) {
  body .process-card:before {
    display: block;
    content: "";
    position: absolute;
    inset: auto;
    top: 47px;
    left: 78px;
    right: -20px;
    height: 2px;
    transform: none;
    transition: none;
    z-index: 0;
    background: repeating-linear-gradient(90deg, #aab6f0 0 6px, transparent 6px 12px);
  }
  body .process-card:last-child:before { display: none; }
}
@media (max-width: 1000px) {
  body .process-card:before { display: none; }
  body .who { grid-template-columns: 1fr; }
}
/* ---------- FAQ ---------- */
body .faq-wrap { max-width: 880px; }
body .faq { gap: 12px; }
body .faq-item {
  padding: 0 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
body .faq-item:hover { border-color: #c5cffa; }
body .faq-item[open] {
  background: #f5f7ff;
  border-color: #c5cffa;
  box-shadow: var(--sh-1);
}
body .faq-item summary {
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 16px 48px 16px 0;
  color: var(--navy);
}
body .faq-item summary::after {
  content: "+";
  right: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tint);
  color: var(--brand);
  font: 600 20px/1 var(--head);
  transition: background .25s, color .25s, transform .25s var(--ease);
}
body .faq-item[open] summary::after {
  content: "+";
  transform: translateY(-50%) rotate(45deg);
  background: var(--brand);
  color: #fff;
}
body .faq-toggle {
  min-height: 48px;
  border-width: 1.5px;
  border-color: #c5cffa;
  color: var(--brand);
  transition: background .25s, border-color .25s;
}
body .faq-toggle:hover { background: var(--tint); border-color: var(--brand); }

/* ---------- contact + form ---------- */
body .contact-section { background: linear-gradient(180deg, #f5f7ff 0%, #eaeeff 100%); }
body .contact-grid { gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (min-width: 1001px) {
  body .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
  body .contact-intro { position: relative; align-self: center; }
}
@media (max-width: 1000px) {
  body .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
body .contact-intro p:first-of-type { font-size: 19px; line-height: 1.6; color: var(--ink); }
body .lead-form {
  padding: clamp(22px, 3vw, 36px);
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
body .lead-form h3 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 20px; color: var(--navy); }
body .field label { color: var(--ink); }
body .field input,
body .field select {
  min-height: 48px;
  border: 1.5px solid #8893c0; /* ≥ 3:1 к белому — граница поля различима (WCAG 1.4.11) */
  border-radius: var(--r-sm);
  background-color: #fff;
  transition: border-color .2s, box-shadow .2s;
}
body .field input:hover,
body .field select:hover { border-color: #b6c2f2; }
body .field input:focus,
body .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(74, 91, 232, .16);
  outline: none;
}
body .field input::placeholder { color: #66729e; } /* 4.7:1 */
body .compliance-checks {
  padding: 16px;
  border-radius: var(--r-md);
  background: #f5f7ff;
  border: 1px solid var(--line);
}
body .compliance-check input { accent-color: var(--brand); width: 20px; height: 20px; }
body .cm > span { min-height: 44px; }
body .cm input:checked + span { background: var(--tint); }
body .reply-time { font-weight: 600; }
body .chip { min-height: 44px; }

/* ---------- footer + cookie ---------- */
body .footer-legal p { font-size: 13px !important; color: #c3cdf3; }
body .footer-bottom { color: #b4c0ee; }
body .cookie-banner { border-radius: 20px; box-shadow: var(--sh-2); }
body #cookieBanner .cookie-accept {
  background: var(--grad-brand) !important;
  color: #fff !important;
}
body #cookieBanner .cookie-accept:hover { background: var(--grad-brand-hover) !important; }
body #cookieBanner .cookie-reject {
  background: #fff !important;
  border: 1.5px solid #c5cffa !important;
  color: var(--brand) !important;
}
body #cookieBanner .cookie-reject:hover { background: var(--tint) !important; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body .service-card:hover,
  body .process-card:hover,
  body .btn:hover { transform: none !important; }
}

/* ---------- redesign v2 (merged) ---------- */
/* v2 tweaks: sticky intro beside the form, matching eyebrow rules */
@media (min-width: 1001px) {
  body .contact-grid { align-items: start; }
  body .contact-intro { position: sticky; top: 120px; align-self: start; }
}
body .contact-intro .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8a4bc4, #4a5be8);
}

/* centre the section title block (eyebrow only) like other sections */
body .contact-intro .eyebrow { display: flex; justify-content: center; }

/* ---- service cards: equal size, no buttons, brand-gradient fill on hover ---- */
body .services-detailed { grid-auto-rows: 1fr; align-items: stretch; }
body .service-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background-color .3s, color .3s, transform .3s, box-shadow .3s, border-color .3s;
}
body .service-card .price-line,
body .service-card .price-rows { margin-top: auto; min-height: 0; }
body .service-card .teaser { margin-bottom: 18px; }
body .service-card:hover,
body .service-card:active,
body .service-card.hold,
body .service-card:focus-visible {
  background: var(--grad-brand);
  border-color: transparent;
  outline: none;
}
body .service-card:hover h3,
body .service-card:active h3,
body .service-card.hold h3,
body .service-card:focus-visible h3,
body .service-card:hover .price-big,
body .service-card:active .price-big,
body .service-card.hold .price-big,
body .service-card:focus-visible .price-big,
body .service-card:hover .price-rows dd,
body .service-card:active .price-rows dd,
body .service-card.hold .price-rows dd,
body .service-card:focus-visible .price-rows dd { color: #fff; -webkit-text-fill-color: #fff; }
body .service-card:hover .teaser,
body .service-card:hover .price-sub,
body .service-card:hover .price-rows dt,
body .service-card:active .teaser,
body .service-card.hold .teaser,
body .service-card:active .price-sub,
body .service-card.hold .price-sub,
body .service-card:active .price-rows dt,
body .service-card.hold .price-rows dt,
body .service-card:focus-visible .teaser,
body .service-card:focus-visible .price-sub,
body .service-card:focus-visible .price-rows dt { color: rgba(255,255,255,.92); }
body .service-card:hover .num,
body .service-card:active .num,
body .service-card.hold .num,
body .service-card:focus-visible .num { color: rgba(255,255,255,.85); }
body .service-card:hover .icon,
body .service-card:active .icon,
body .service-card.hold .icon,
body .service-card:focus-visible .icon { background: rgba(255,255,255,.12); box-shadow: none; }
body .service-card:hover .icon img,
body .service-card:active .icon img,
body .service-card.hold .icon img,
body .service-card:focus-visible .icon img { filter: brightness(0) invert(1); }
body .service-card:hover .price-rows div,
body .service-card:active .price-rows div,
body .service-card.hold .price-rows div,
body .service-card:focus-visible .price-rows div { border-color: rgba(255,255,255,.18); }

/* mobile: title block centred (it was pinned to the left of a shrunk flex box) */
@media (max-width: 650px) {
  body .title-row { align-items: stretch; }
  body .title-row > div { width: 100%; text-align: center; }
  body .section-heading-center { text-align: center; }
}

/* contact heading (RU and EN): centred under the centred eyebrow */
body .contact-intro h2 { text-align: center; }

/* согласия: подсветка, если не отмечено при отправке */
body .compliance-check.invalid { color: #b3261e; }
body .compliance-check.invalid input { outline: 2px solid #b3261e; outline-offset: 2px; }

/* ссылка «к содержимому» для клавиатуры: видна только в фокусе */
.skip-link { position: absolute; top: -100px; inset-inline-start: 16px; z-index: 200; padding: 12px 18px; border-radius: 12px; background: #fff; color: var(--navy); font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(10, 29, 92, .25); }
.skip-link:focus { top: 12px; }
