/* ===================================================================
   EuroPerformanceTrade — premium B2B landing (v1)
   Style: Apple-like minimalism, soft glassmorphism, lots of whitespace
   =================================================================== */

:root {
  --text:        #2F363F;   /* основной темный текст */
  --text-muted:  #6C757D;   /* вторичный текст */
  --accent:      #FF6B00;   /* основной акцент */
  --accent-soft: rgba(255, 107, 0, 0.10);
  --bg:          #FFFFFF;
  --bg-light:    #F1F3F5;   /* светлый фон */
  --card:        rgba(211, 218, 224, 0.40); /* фон карточек */
  --border:      rgba(47, 54, 63, 0.10);
  --white-glass: rgba(255, 255, 255, 0.65);

  --radius:      22px;
  --radius-sm:   14px;
  --shadow-sm:   0 2px 10px rgba(47, 54, 63, 0.06);
  --shadow-md:   0 18px 50px rgba(47, 54, 63, 0.10);
  --shadow-lg:   0 30px 80px rgba(47, 54, 63, 0.14);

  --maxw:        1200px;
  --gutter:      24px;

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: clamp(72px, 11vw, 150px) 0; }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 48px); }
.section-sub {
  color: var(--text-muted);
  font-size: clamp(17px, 1.9vw, 22px); /* как hero-sub */
  margin: 20px 0 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm); /* 14px — в одной системе с полями формы */
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(255,107,0,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,107,0,0.30); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-light); transform: translateY(-2px); }
/* Светло-оранжевый — для второстепенного CTA в шапке */
.btn-soft { background: #E88368; color: #fff; box-shadow: 0 6px 18px rgba(232, 131, 104, 0.28); }
.btn-soft:hover { background: #D9704F; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217, 112, 79, 0.34); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; }
.brand-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 14px;
  left: 0; right: 0;
  z-index: 100;
  transition: top .4s var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  border-radius: 18px;
  background: var(--white-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled .nav-inner { box-shadow: var(--shadow-md); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: 8px; }

/* Language switcher RU / EN */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 12px; font-size: 14px; font-weight: 600; }
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.lang-link:hover { color: var(--text); background: var(--bg-light); }
.lang-active { color: var(--text); background: rgba(47, 54, 63, 0.06); cursor: default; }
.lang-active:hover { background: rgba(47, 54, 63, 0.06); }
.lang-sep { color: var(--border); }

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: auto;
  padding: 10px;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 100px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.blob-1 { width: 520px; height: 520px; top: -120px; right: -80px; background: radial-gradient(circle, rgba(255,107,0,0.28), transparent 70%); animation: float 16s var(--ease) infinite; }
.blob-2 { width: 460px; height: 460px; bottom: -140px; left: -100px; background: radial-gradient(circle, rgba(120,150,200,0.30), transparent 70%); animation: float 20s var(--ease) infinite reverse; }
.blob-3 { width: 380px; height: 380px; top: 30%; left: 40%; background: radial-gradient(circle, rgba(211,218,224,0.55), transparent 70%); animation: float 24s var(--ease) infinite; }

.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(40px, 6.8vw, 92px);
  letter-spacing: -0.03em;
  margin: 0 0 28px;
}
.hero-sub {
  font-size: clamp(17px, 1.9vw, 22px);
  color: var(--text-muted);
  margin: 0 0 44px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.mouse {
  display: block;
  width: 26px; height: 42px;
  border: 2px solid rgba(47,54,63,0.30);
  border-radius: 16px;
  position: relative;
}
.wheel {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: wheel 1.8s var(--ease) infinite;
}

/* ---------- Cards (shared) ---------- */
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  padding: 34px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* ---------- Workflow ---------- */
.workflow-section { background: var(--bg); }
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.workflow-card h3 { font-size: 20px; margin: 18px 0 12px; }
.workflow-card p { color: var(--text-muted); font-size: 15.5px; margin: 0; }
.step-num {
  display: inline-block;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

/* Eco callout под workflow — иконка с листиком + текст об экоподходе */
.eco-callout {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  max-width: 880px;
  margin: clamp(40px, 6vw, 64px) auto 0;
  padding: clamp(22px, 3vw, 32px) clamp(24px, 3.5vw, 40px);
  background: rgba(146, 200, 95, 0.06);
  border: 1px solid rgba(146, 200, 95, 0.18);
  border-radius: var(--radius);
}
.eco-icon {
  width: 78px; height: 78px;
  flex-shrink: 0;
  border-radius: 16px;
  object-fit: cover;
}
.eco-text {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text);
  line-height: 1.5;
}

/* ---------- Philosophy / Partners ---------- */
.partners-section { background: var(--bg-light); }
.partners-trust { margin-top: clamp(56px, 8vw, 96px); }
.logos-subtitle { text-align: center; font-size: clamp(18px, 2.2vw, 24px); color: var(--text-muted); font-weight: 600; }

/* Logos grid — 3 в первом ряду, 2 центрированных во втором (6-col span). */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin: clamp(40px, 6vw, 64px) 0 0;
  align-items: center;
}
.logos-grid .logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .45s var(--ease);
}
.logos-grid .logo-cell:hover {
  transform: translateY(-4px);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.logos-grid .logo-cell:nth-child(1) { grid-column: 1 / span 2; }
.logos-grid .logo-cell:nth-child(2) { grid-column: 3 / span 2; }
.logos-grid .logo-cell:nth-child(3) { grid-column: 5 / span 2; }
.logos-grid .logo-cell:nth-child(4) { grid-column: 2 / span 2; }
.logos-grid .logo-cell:nth-child(5) { grid-column: 4 / span 2; }

.logos-grid img {
  max-height: 130px;
  max-width: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter .5s var(--ease), opacity .5s var(--ease);
}
.logos-grid .logo-cell:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- Metrics ---------- */
.metrics-section { background: var(--bg-light); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.metric { text-align: center; }
.metric-value {
  display: block;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.metric-label { font-size: 19px; margin: 14px 0 10px; }
.metric-desc { color: var(--text-muted); font-size: 15.5px; margin: 0; max-width: 320px; margin-inline: auto; }
.marketplaces { display: flex; justify-content: center; gap: 18px; margin-top: 22px; }
.marketplaces img { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; box-shadow: 0 4px 12px rgba(47,54,63,0.10); }

/* ---------- О компании (цитата) ---------- */
.infrastructure-section { background: var(--bg); }
.company-block { max-width: 900px; margin: 0 auto; text-align: center; }
.company-block h2 { font-size: clamp(28px, 4.4vw, 48px); margin-bottom: 32px; }
.company-quote {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact-section { background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%); }
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  background: var(--white-glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 30px;
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
}
.contact-info h2 { font-size: clamp(28px, 4vw, 44px); }
.contact-company { margin: 18px 0 0; font-weight: 700; font-size: 18px; color: var(--text); }
.contact-list { margin-top: 28px; display: grid; gap: 26px; }
.contact-list li { display: grid; gap: 4px; }
.contact-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.contact-list a { font-size: 18px; font-weight: 600; transition: color .25s var(--ease); }
.contact-list a:hover { color: var(--accent); }

/* Form */
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.85);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa1a9; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input:invalid:not(:placeholder-shown) { border-color: #e0573e; }
.form-success {
  margin: 6px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(34, 160, 90, 0.10);
  color: #1f8a52;
  font-weight: 600;
  font-size: 15px;
}
.form-error {
  margin: 6px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(224, 87, 62, 0.10);
  color: #c43e1f;
  font-weight: 600;
  font-size: 15px;
}
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { background: var(--text); color: #fff; padding: 48px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand--footer .brand-logo { background: transparent; padding: 0; }
.copyright { color: rgba(255,255,255,0.6); font-size: 14px; margin: 0; }

/* ===================================================================
   Reveal animation (IntersectionObserver adds .is-visible)
   =================================================================== */
/* Контент по умолчанию видим. Скрываем только когда JS активен (класс .js),
   чтобы при сбое/отключении JS страница не оставалась пустой. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* stagger cards within a grid */
.workflow-grid .reveal:nth-child(2) { transition-delay: .08s; }
.workflow-grid .reveal:nth-child(3) { transition-delay: .16s; }
.workflow-grid .reveal:nth-child(4) { transition-delay: .24s; }
.metrics-grid .reveal:nth-child(2) { transition-delay: .1s; }
.metrics-grid .reveal:nth-child(3) { transition-delay: .2s; }

/* ===================================================================
   Keyframes
   =================================================================== */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.05); }
}
@keyframes wheel {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1024px) {
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { width: 100%; padding: 10px 12px; border-radius: 10px; }
  .nav-links a:hover { background: var(--bg-light); }
  .burger { display: flex; }

  .metrics-grid { grid-template-columns: 1fr; }
  .metric-desc { max-width: 460px; }
  .contact-panel { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  .eco-callout { flex-direction: column; text-align: center; }
  .eco-icon { width: 64px; height: 64px; }

  /* 2 logos per row, 5th centered across both columns */
  .logos-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .logos-grid .logo-cell:nth-child(n) { grid-column: auto; }
  .logos-grid .logo-cell:nth-child(5) { grid-column: 1 / -1; }
  .logos-grid .logo-cell { min-height: 170px; padding: 26px; }
  .logos-grid img { max-height: 110px; max-width: 220px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .logos-grid { grid-template-columns: 1fr; }
  .logos-grid .logo-cell { min-height: 150px; padding: 22px; }
  .logos-grid img { max-height: 96px; max-width: 200px; }
  .nav-links .nav-cta,
  .nav-links a { font-size: 16px; }
  .hero { padding-top: 120px; }
  .card { padding: 26px; }
}

/* ===================================================================
   Reduced motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
