/* ============================================================
   TAIFENG / ТАЙФЭН / 泰丰
   Энергоэффективные фасады и системные окна
   Multilingual B2B (RU / EN / ZH) — рынок Центральной Азии и СНГ
   ============================================================ */

:root {
  --blue:        #0e3a66;   /* основной архитектурный синий */
  --blue-dark:   #08274a;
  --blue-light:  #2e6bb0;
  --glass:       #2bb6c4;   /* «стеклянный» бирюзовый акцент */
  --glass-d:     #1d8e9a;
  --green:       #2aa775;   /* энергоэффективность / эко */
  --green-d:     #1c8059;
  --accent-warm: #f5a623;   /* тёплый акцент (золото) для CTA */
  --accent-warm-d:#e08e0b;

  --gray-900:    #1b2430;
  --gray-700:    #3a4452;
  --gray-500:    #6b7585;
  --gray-300:    #c5cdd8;
  --gray-100:    #eef1f5;
  --gray-50:     #f7f9fb;
  --white:       #ffffff;
  --ok:          #1a8f5a;
  --max:         1200px;
  --max-read:    820px;
  --radius:      8px;
  --shadow:      0 2px 14px rgba(14,58,102,.08);
  --shadow-lg:   0 8px 30px rgba(14,58,102,.16);
  --font: "Inter", "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  font-family: var(--font);
  color: var(--gray-900);
  line-height: 1.65;
  background: var(--white);
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--blue-dark); line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.8rem; margin-bottom: .6em; }
h3 { font-size: 1.25rem; margin-bottom: .4em; }
p { margin-bottom: 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 66px 0; }
.section-title { text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--gray-500); max-width: 680px; margin: 0 auto 40px; }
.bg-gray { background: var(--gray-50); }
.bg-blue {
  background:
    radial-gradient(circle at 12% 0%, rgba(43,182,196,.30), transparent 42%),
    radial-gradient(circle at 88% 100%, rgba(42,167,117,.26), transparent 44%),
    var(--blue-dark);
  color: var(--white);
}
.bg-blue h2, .bg-blue h3 { color: var(--white); }
.muted { color: var(--gray-500); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--gray-700); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: .98rem; cursor: pointer; border: 2px solid transparent;
  transition: all .18s ease; text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--glass); color: #fff; }
.btn-primary:hover { background: var(--glass-d); color: #fff; }
.btn-warm { background: var(--accent-warm); color: #3a2b00; }
.btn-warm:hover { background: var(--accent-warm-d); color: #3a2b00; box-shadow: 0 6px 18px rgba(245,166,35,.4); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { background: var(--white); color: var(--blue); border-color: var(--gray-300); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Хедер ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: var(--shadow); border-bottom: 1px solid var(--gray-100); }
.topbar { background: var(--blue-dark); color: var(--gray-300); font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding: 6px 24px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: var(--gray-300); }
.topbar a:hover { color: #fff; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-weight: 800; font-size: 1.5rem; color: var(--blue); letter-spacing: 2px; }
.brand .logo span { color: var(--glass); }
.brand .tag { font-size: .72rem; color: var(--gray-500); border-left: 2px solid var(--gray-300); padding-left: 10px; line-height: 1.2; max-width: 220px; }
.nav-links { display: flex; gap: 22px; list-style: none; align-items: center; }
.nav-links > li > a { color: var(--gray-900); font-weight: 600; font-size: .95rem; padding: 8px 0; display: block; }
.nav-links > li > a:hover { color: var(--blue); text-decoration: none; }
.nav-links .lang { display: inline-flex; border: 1.5px solid var(--gray-300); border-radius: 7px; overflow: hidden; }
.nav-links .lang a { display: flex; align-items: center; padding: 6px 11px; font-size: .8rem; font-weight: 700; color: var(--gray-700); background: #fff; border-right: 1px solid var(--gray-300); line-height: 1; }
.nav-links .lang a:last-child { border-right: none; }
.nav-links .lang a:hover { background: var(--gray-100); color: var(--blue); text-decoration: none; }
.nav-links .lang a.active { background: var(--blue); color: #fff; }
.nav-cta { margin-left: 8px; }
.burger { display: none; font-size: 1.6rem; background: none; border: none; cursor: pointer; color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 18% 120%, rgba(42,167,117,.40), transparent 46%),
    radial-gradient(circle at 95% -10%, rgba(43,182,196,.42), transparent 44%),
    linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 58%, var(--blue-light) 100%);
  color: #fff; padding: 84px 0; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -120px; top: -60px; width: 540px; height: 540px; background: radial-gradient(circle, rgba(43,182,196,.38), transparent 70%); border-radius: 50%; }
.hero::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--glass), var(--green), var(--accent-warm)); }
.hero .container { position: relative; z-index: 2; }
.hero .kicker { display:inline-block; font-size:.82rem; letter-spacing:2px; text-transform:uppercase; color:#bfe9ef; font-weight:700; margin-bottom:14px; border:1px solid rgba(255,255,255,.3); padding:5px 14px; border-radius:20px; }
.hero h1 { color: #fff; font-size: 2.7rem; max-width: 820px; }
.hero .sub { font-size: 1.2rem; color: #d7e5f3; max-width: 700px; margin: 18px 0 26px; }
.trust-row { display: flex; gap: 30px; flex-wrap: wrap; margin: 28px 0 32px; }
.trust-row .item { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #eaf3fb; }
.trust-row .item .ic { color: var(--accent-warm); font-size: 1.3rem; }

/* ---------- Полоса показателей ---------- */
.kpi-band { background: var(--white); margin-top: -40px; position: relative; z-index: 5; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background:#fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.kpi { padding: 26px 18px; text-align: center; border-right: 1px solid var(--gray-100); }
.kpi:last-child { border-right: none; }
.kpi .num { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1; }
.kpi .num span { color: var(--glass); }
.kpi .lab { font-size: .85rem; color: var(--gray-500); margin-top: 8px; }

/* ---------- Сетки / карточки ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: all .18s; position: relative; overflow: hidden; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card h3 { color: var(--blue); }
.card .kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--glass-d); font-weight: 700; }
.card .ic-lg { font-size: 2rem; margin-bottom: 10px; }
.card--glass { border-top: 4px solid var(--glass); }
.card--green { border-top: 4px solid var(--green); }
.card--blue  { border-top: 4px solid var(--blue); }
.card--warm  { border-top: 4px solid var(--accent-warm); }
.card .specs { list-style: none; margin: 12px 0 0; font-size: .92rem; color: var(--gray-700); }
.card .specs li { padding: 6px 0; border-bottom: 1px dashed var(--gray-100); }
.card .specs li::before { content: "✓ "; color: var(--green); font-weight: 800; }

/* Цветные статистические карточки */
.stat-card { color: #fff; border: none; }
.stat-card h3, .stat-card p { color: #fff; }
.stat-card p { opacity: .92; margin: 0; }
.stat-card .big { font-size: 2.4rem; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.stat-blue  { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.stat-glass { background: linear-gradient(135deg, var(--glass-d), var(--glass)); }
.stat-green { background: linear-gradient(135deg, var(--green-d), var(--green)); }
.stat-warm  { background: linear-gradient(135deg, var(--accent-warm-d), var(--accent-warm)); color: #3a2b00; }
.stat-warm .big, .stat-warm h3, .stat-warm p { color: #3a2b00; }

/* ---------- Преимущества «вопрос-ответ» ---------- */
.pain { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pain .q, .pain .a { padding: 18px 22px; border-bottom: 1px solid var(--gray-100); }
.pain .q { background: var(--gray-50); font-weight: 600; color: var(--gray-900); }
.pain .a { background: #fff; color: var(--gray-700); }
.pain .a::before { content: "✓ "; color: var(--ok); font-weight: 800; }

/* ---------- Промисы ---------- */
.promise { display: flex; gap: 16px; align-items: flex-start; }
.promise .num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.promise h3 { font-size: 1.08rem; margin-bottom: 3px; }
.promise p { font-size: .94rem; color: var(--gray-700); margin: 0; }

/* ---------- Лого-стена / награды ---------- */
.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.logos .logo-cell { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 18px; text-align: center; font-weight: 600; color: var(--gray-700); font-size: .95rem; display: flex; align-items: center; justify-content: center; min-height: 92px; border-bottom: 3px solid var(--gray-300); transition: all .18s; }
.logos .logo-cell:nth-child(4n+1) { border-bottom-color: var(--blue); }
.logos .logo-cell:nth-child(4n+2) { border-bottom-color: var(--glass); }
.logos .logo-cell:nth-child(4n+3) { border-bottom-color: var(--green); }
.logos .logo-cell:nth-child(4n+4) { border-bottom-color: var(--accent-warm); }
.logos .logo-cell:hover { color: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.logos .logo-cell b { display:block; color: var(--blue); font-size: 1.5rem; line-height:1; margin-bottom:4px; }

/* ---------- Награды (медали) ---------- */
.awards { display:grid; grid-template-columns: repeat(3,1fr); gap:18px; }
.award { background:#fff; border:1px solid var(--gray-100); border-left:5px solid var(--accent-warm); border-radius:var(--radius); padding:20px 22px; box-shadow:var(--shadow); }
.award .medal { font-size:1.8rem; }
.award h4 { color:var(--blue-dark); margin:6px 0 4px; font-size:1.05rem; }
.award p { margin:0; font-size:.9rem; color:var(--gray-500); }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; box-shadow: var(--shadow); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gray-100); }
table.data thead th { background: var(--blue-dark); color: #fff; font-weight: 600; }
table.data tbody tr:nth-child(even) { background: var(--gray-50); }
table.data tbody tr:hover { background: #eaf6f7; }
table.data td b { color: var(--blue); font-weight: 700; }

/* ---------- Применения / отрасли ---------- */
.apps { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.app { background:#fff; border:1px solid var(--gray-100); border-radius:var(--radius); padding:22px; text-align:center; box-shadow:var(--shadow); transition:all .18s; }
.app:hover { transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.app .ic { font-size:2rem; }
.app h4 { margin:8px 0 0; color:var(--blue-dark); font-size:1rem; }

/* ---------- Формы ---------- */
.form-card { background:#fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; color: var(--gray-700); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-family: inherit; font-size: .95rem; color: var(--gray-900); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--glass); box-shadow: 0 0 0 3px rgba(43,182,196,.15); }
.field textarea { min-height: 100px; resize: vertical; }
.field .req { color: #c0392b; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.consent { font-size: .8rem; color: var(--gray-500); }

/* ---------- Заголовок страницы ---------- */
.page-head { background: linear-gradient(120deg, var(--gray-50), #eaf6f7); padding: 34px 0; border-bottom: 1px solid var(--gray-100); border-left: 5px solid var(--glass); }
.breadcrumb { font-size: .85rem; color: var(--gray-500); margin-bottom: 8px; }

/* ---------- CTA-полоса ---------- */
.cta-band { background: radial-gradient(circle at 100% 0%, rgba(245,166,35,.30), transparent 40%), radial-gradient(circle at 0% 100%, rgba(42,167,117,.30), transparent 42%), linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-900); color: var(--gray-300); padding: 54px 0 24px; font-size: .9rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #2c3744; margin-top: 34px; padding-top: 18px; font-size: .8rem; color: var(--gray-500); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.contact-line { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }

/* ---------- Плавающие контакты ---------- */
.float-contacts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.float-contacts a { width: 54px; height: 54px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); font-size: .68rem; font-weight: 700; text-align: center; line-height: 1.05; }
.float-contacts a:hover { background: var(--glass); text-decoration: none; }
.float-contacts a.wa { background: #25d366; }
.float-contacts a.tg { background: #2aabee; }

/* ---------- Фотогалерея / снимки ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 38px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--gray-100); }
.photo img { width: 100%; height: 232px; object-fit: cover; display: block; transition: transform .45s ease; }
.photo:hover img { transform: scale(1.06); }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 11px; color: #fff; font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(8,39,74,.85)); }
.feature-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 920px) { .photo-grid, .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .photo-grid, .gallery { grid-template-columns: 1fr; } .photo img { height: 210px; } }

/* ---------- Утилиты ---------- */
.tag-pill { display: inline-block; background: var(--gray-100); color: var(--blue); font-size: .75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin: 3px; }
.mt { margin-top: 24px; } .mt-lg { margin-top: 40px; }
.mb { margin-bottom: 24px; }
.note-build { background:#fff7e6; border:1px dashed #e0a800; color:#8a6d00; font-size:.85rem; padding:10px 16px; border-radius:6px; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px 0; box-shadow: var(--shadow-lg); align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 12px 24px; }
  .nav-links .lang { margin: 12px 24px; align-self: flex-start; }
  .nav-cta { margin: 0 24px 12px; }
  .burger { display: block; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(4), .kpi:nth-child(5) { border-bottom: none; }
  .grid-3, .grid-4, .awards, .apps, .logos { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .form-grid, .footer-grid, .awards, .apps, .kpi-grid { grid-template-columns: 1fr; }
  .pain { grid-template-columns: 1fr; }
  .logos { grid-template-columns: 1fr 1fr; }
  section { padding: 44px 0; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 1.7rem; }
  .kpi-band { margin-top: 0; }
  .brand .tag { display: none; }
}

/* ============================================================
   COMMERCIAL UPGRADE — v2 (layout unchanged, polish only)
   ============================================================ */

/* Phone floating button */
.float-contacts a.tel { background: var(--green); font-size: 1.4rem; }
.float-contacts a.tel:hover { background: var(--green-d); }
.float-contacts a { transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.float-contacts a:hover { transform: translateY(-3px) scale(1.05); }

/* Accessible focus states (keyboard users) */
a:focus-visible, button:focus-visible,
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--glass);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle button shine on warm CTA */
.btn-warm { position: relative; overflow: hidden; }
.btn-warm::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-warm:hover::after { left: 140%; }

/* Scroll-reveal — progressive enhancement, content always visible without JS */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* Card top-accent grows on hover for tactility */
.card { border-top-width: 1px; }
.card--blue, .card--glass, .card--green, .card--warm { transition: transform .18s ease, box-shadow .18s ease, border-top-width .18s ease; }

/* Image placeholder shimmer while lazy-loading */
.photo { background: linear-gradient(100deg, var(--gray-100) 30%, #e3e9f0 50%, var(--gray-100) 70%); }

/* Back-to-top button */
.to-top {
  position: fixed; left: 18px; bottom: 18px; z-index: 200;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 1.3rem; line-height: 1;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .18s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--glass); transform: translateY(-3px); }

/* Header subtle elevation on scroll */
.site-header.scrolled { box-shadow: 0 4px 20px rgba(14,58,102,.14); }

/* Form button loading-safe + nicer submit feedback */
.form-ok { font-weight: 600; }

/* Sharper rendering for KPI numbers + tabular figures */
.kpi .num, .stat-card .big, .award .medal { font-variant-numeric: tabular-nums; }

/* Print: hide floats and CTAs */
@media print {
  .float-contacts, .to-top, .nav-cta, .cta-band, .burger { display: none !important; }
  .site-header { position: static; box-shadow: none; }
  body { font-size: 12px; }
}
