/* ===========================================================
   Impex.ai — styles.css
   Brand Concept 2: у-вэй / emerald + graphite + pale jade
   =========================================================== */

:root {
  --color-white: #FFFFFF;
  --color-jade: #EAF5EF;
  --color-graphite: #2D2D2D;
  --color-gray: #6B6B6B;
  --color-emerald: #1E4A3A;
  --color-emerald-dark: #14362A;
  --color-emerald-light: #E6F0EC;
  --color-divider: #E5E5E0;
  --color-frame-bg: #1B211E;

  --font-heading: 'Cormorant', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-w: 1200px;
  --header-h: 76px;
  --frame-gutter: 22px;
  --frame-radius: 28px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 2px 24px rgba(45, 45, 45, 0.06);
  --shadow-frame: 0 30px 80px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--frame-gutter) + 16px); }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  background: var(--color-frame-bg);
  padding: var(--frame-gutter);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-emerald);
  line-height: 1.2;
}

h3 { color: var(--color-graphite); }

h1 { font-weight: 600; font-size: clamp(34px, 5vw, 58px); }
h2 { font-weight: 600; font-size: clamp(28px, 4vw, 42px); }
h3 { font-weight: 500; font-size: clamp(22px, 2.5vw, 28px); }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 820px; }

/* ---------- Site frame ---------- */
.site-frame {
  position: relative;
  max-width: 1560px;
  margin: 0 auto;
  background: var(--color-white);
  box-shadow: var(--shadow-frame);
}

/* ---------- Intro loader ---------- */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.intro-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-loader__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  transform: scale(0.85);
  animation: introMarkIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
.intro-loader__text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.02em;
  color: var(--color-emerald);
}
@keyframes introMarkIn {
  to { opacity: 1; transform: scale(1); }
}

body.intro-lock { overflow: hidden; height: 100vh; }

/* Hero entrance, gated by intro loader finishing */
.hero__content, .hero__visual { opacity: 0; transform: translateY(18px); }
body.is-loaded .hero__content { opacity: 1; transform: none; transition: opacity 0.8s ease 0.1s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s; }
body.is-loaded .hero__visual { opacity: 1; transform: none; transition: opacity 0.9s ease 0.25s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .intro-loader__mark { animation: none; opacity: 1; transform: none; }
  .hero__content, .hero__visual { opacity: 1; transform: none; transition: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--muted { background: var(--color-jade); }

.section__title { margin-bottom: 16px; }
.section__lead {
  font-size: 18px;
  color: var(--color-gray);
  max-width: 640px;
  margin-bottom: 56px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-emerald);
  color: var(--color-white);
}
.btn--primary:hover, .btn--primary:focus-visible { background: var(--color-emerald-dark); }

.btn--outline {
  background: transparent;
  border-color: var(--color-emerald);
  color: var(--color-emerald);
}
.btn--outline:hover, .btn--outline:focus-visible {
  background: var(--color-emerald-light);
}

.btn--ghost {
  background: transparent;
  color: var(--color-graphite);
  border-color: var(--color-divider);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--color-emerald);
  color: var(--color-emerald);
}

.btn--sm { padding: 9px 20px; font-size: 14px; }
.btn--lg { padding: 16px 36px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: var(--frame-gutter);
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-divider);
  border-radius: var(--frame-radius) var(--frame-radius) 0 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo__mark { flex-shrink: 0; }
.logo__text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  color: var(--color-graphite);
  letter-spacing: 0.2px;
}
.logo__text--light { color: var(--color-white); }

.nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__list a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-graphite);
  transition: color var(--transition);
}
.nav__list a:hover { color: var(--color-emerald); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-graphite);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  background: radial-gradient(circle at 15% 0%, rgba(30, 74, 58, 0.05), transparent 55%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-emerald);
  margin-bottom: 20px;
}

.hero__subtitle {
  margin-top: 20px;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--color-gray);
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero__visual {
  position: relative;
}
.hero__photo {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  border-radius: var(--radius-xl);
}
.hero__badge {
  position: absolute;
  left: -20px;
  bottom: -20px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__badge-num {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--color-emerald);
}
.hero__badge-caption {
  font-size: 13px;
  color: var(--color-gray);
}

/* ---------- Flow divider / strip ---------- */
.flow-divider { line-height: 0; color: var(--color-jade); }
.flow-divider svg { width: 100%; height: 60px; display: block; fill: currentColor; }
.flow-divider--flip { transform: scaleY(-1); color: var(--color-white); }
.flow-divider--footer { color: var(--color-emerald); }

.flow-strip { background: var(--color-jade); padding: 48px 0; }
.flow-strip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.avatar-cluster {
  display: flex;
}
.avatar-cluster img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-jade);
  margin-left: -16px;
}
.avatar-cluster img:first-child { margin-left: 0; }
.flow-strip__text {
  max-width: 620px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-graphite);
  line-height: 1.5;
}

/* ---------- About / People ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.person {
  background: var(--color-jade);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.person__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
}
.person__photo--founder { background: var(--color-graphite); }
.person__photo--exec { background: var(--color-emerald); }

.person__name { margin-bottom: 4px; color: var(--color-graphite); }
.person__role {
  font-size: 14px;
  color: var(--color-emerald);
  font-weight: 500;
  margin-bottom: 20px;
}
.person__quote {
  color: var(--color-gray);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- Solutions ---------- */
.solutions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.solution-card {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.solution-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.solution-card__photo { aspect-ratio: 16 / 9; }
.solution-card__photo img { width: 100%; height: 100%; object-fit: cover; }

.solution-card__body { padding: 40px; }
.solution-card__title { margin-bottom: 24px; }

.solution-card__list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.solution-card__list li { font-size: 15px; color: var(--color-gray); }
.solution-card__list strong { color: var(--color-graphite); font-weight: 500; }

.solution-card__more {
  font-size: 14px;
  color: var(--color-gray);
  margin-bottom: 20px;
}

.usecase {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-divider);
}
.usecase__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-emerald);
  font-weight: 600;
  margin-bottom: 8px;
}
.usecase__title {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-graphite);
}
.usecase__text {
  font-size: 14px;
  color: var(--color-gray);
}

.solutions__personal {
  margin-top: 48px;
  text-align: center;
  font-size: 16px;
  color: var(--color-gray);
}
.link-arrow {
  color: var(--color-emerald);
  font-weight: 500;
  margin-left: 8px;
  transition: color var(--transition);
}
.link-arrow:hover { color: var(--color-emerald-dark); }

/* ---------- Services banner ---------- */
.services-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 64px;
  aspect-ratio: 21 / 8;
}
.services-banner img { width: 100%; height: 100%; object-fit: cover; }
.services-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(30, 74, 58, 0.88) 0%, rgba(30, 74, 58, 0.35) 55%, rgba(30, 74, 58, 0.05) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 56px;
  color: var(--color-white);
}
.services-banner__stat {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1;
}
.services-banner__caption {
  font-size: 15px;
  max-width: 260px;
  opacity: 0.9;
}

/* ---------- Services / Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.filter {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  color: var(--color-gray);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.filter:hover { border-color: var(--color-emerald); color: var(--color-graphite); }
.filter.is-active {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
  color: var(--color-white);
}

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

.agent-card {
  background: var(--color-jade);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
}
.agent-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); background: var(--color-white); border-color: var(--color-divider); }

.agent-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-card__name { font-size: 22px; color: var(--color-emerald); }

.status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.status-badge--live {
  background: var(--color-emerald);
  color: var(--color-white);
}
.status-badge--soon {
  background: var(--color-white);
  color: var(--color-gray);
}

.agent-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--color-gray);
}
.agent-card__meta span strong { color: var(--color-graphite); font-weight: 500; }

.agent-card__desc {
  font-size: 14px;
  color: var(--color-gray);
  line-height: 1.65;
  flex-grow: 1;
}

.agent-card__cta { margin-top: 8px; align-self: flex-start; }

.services__fallback {
  margin-top: 48px;
  text-align: center;
  color: var(--color-gray);
}
.services__fallback a { color: var(--color-emerald); font-weight: 500; }
.services__fallback a:hover { color: var(--color-emerald-dark); }

/* ---------- Pricing ---------- */
.pricing-card {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 760px;
}
.pricing-card p {
  font-size: 17px;
  color: var(--color-gray);
  margin-bottom: 32px;
}
.pricing-card__bonus {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--color-divider);
}
.pricing-card__number {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--color-emerald);
}
.pricing-card__caption {
  font-size: 14px;
  color: var(--color-gray);
}

/* ---------- Advantages ---------- */
.advantages-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: stretch;
}
.advantages-grid__photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 100%;
}
.advantages-grid__photo img { width: 100%; height: 100%; object-fit: cover; }

.advantages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-content: center;
}
.advantage__num {
  display: block;
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--color-emerald-light);
  -webkit-text-stroke: 1px var(--color-emerald);
  margin-bottom: 16px;
}
.advantage__title { margin-bottom: 12px; }
.advantage__text { font-size: 14px; color: var(--color-gray); }

/* ---------- FAQ / Accordion ---------- */
.accordion__item {
  border-bottom: 1px solid var(--color-divider);
}
.accordion__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-graphite);
}
.accordion__question::after {
  content: '+';
  font-size: 22px;
  color: var(--color-emerald);
  font-weight: 300;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}
.accordion__question[aria-expanded="true"]::after { transform: rotate(45deg); }

.accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition), padding var(--transition);
}
.accordion__answer p {
  padding-bottom: 24px;
  color: var(--color-gray);
  font-size: 15px;
  max-width: 680px;
}

/* ---------- Contacts / Forms ---------- */
.contacts-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
.contacts-intro .section__title,
.contacts-intro .section__lead { margin-bottom: 0; }
.contacts-intro__text { display: flex; flex-direction: column; gap: 16px; }
.contacts-intro__photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.contacts-intro__photo img { width: 100%; height: 100%; object-fit: cover; }

.contacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.contact-block__title { margin-bottom: 12px; color: var(--color-graphite); }
.contact-block__hint {
  font-size: 14px;
  color: var(--color-gray);
  margin-bottom: 28px;
}
.contact-block__hint a { color: var(--color-emerald); font-weight: 500; }
.contact-block__hint a:hover { color: var(--color-emerald-dark); }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; flex-direction: column; gap: 6px; }
.form__row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-graphite);
}
.form__row input,
.form__row select,
.form__row textarea {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--color-graphite);
  background: var(--color-white);
  transition: border-color var(--transition);
  resize: vertical;
}
.form__row input:focus,
.form__row select:focus,
.form__row textarea:focus {
  outline: none;
  border-color: var(--color-emerald);
}
.form__row input:invalid:not(:placeholder-shown) {
  border-color: var(--color-emerald-dark);
}

.form__status {
  min-height: 20px;
  font-size: 14px;
  color: var(--color-emerald-dark);
}
.form__status.is-success { color: var(--color-emerald); }

/* ---------- Footer ---------- */
.footer {
  background: var(--color-emerald);
  color: var(--color-emerald-light);
  padding: 64px 0 32px;
  border-radius: 0 0 var(--frame-radius) var(--frame-radius);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}
.footer__desc {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(230, 240, 236, 0.75);
  max-width: 280px;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__nav a {
  font-size: 14px;
  color: rgba(230, 240, 236, 0.9);
  transition: color var(--transition);
}
.footer__nav a:hover { color: var(--color-white); }

.footer__legal {
  font-size: 13px;
  color: rgba(230, 240, 236, 0.75);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__legal a { color: rgba(230, 240, 236, 0.75); }
.footer__legal a:hover { color: var(--color-white); }

/* ===========================================================
   Responsive
   =========================================================== */

@media (max-width: 1024px) {
  .agents { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; margin: 0 auto; }
  .advantages-grid { grid-template-columns: 1fr; }
  .advantages-grid__photo { aspect-ratio: 21 / 9; }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .contacts-intro { grid-template-columns: 1fr; }
  .contacts-intro__photo { aspect-ratio: 21 / 9; order: -1; }
}

@media (max-width: 860px) {
  :root { --frame-gutter: 0px; --frame-radius: 0px; }
  .site-frame { box-shadow: none; }
  body { background: var(--color-white); padding: 0; }

  .nav { display: none; }
  .nav-toggle { display: flex; }

  .nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-divider);
    padding: 8px 24px 24px;
  }
  .nav.is-open .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .nav.is-open .nav__list a {
    display: block;
    padding: 12px 0;
    width: 100%;
  }

  .people,
  .solutions,
  .contacts { grid-template-columns: 1fr; }

  .agents { grid-template-columns: 1fr; }
  .advantages { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }

  .section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }

  .hero__badge { left: 12px; bottom: -16px; }

  .avatar-cluster img { width: 44px; height: 44px; margin-left: -14px; }
}

@media (max-width: 480px) {
  .pricing-card { padding: 32px 24px; }
  .solution-card__body, .person { padding: 28px 24px; }
  .services-banner { aspect-ratio: 4 / 5; }
  .services-banner__overlay { padding: 0 28px; }
}
