/* ==========================================================================
   JOCENX — Corporate Website
   Sections: 1. Tokens  2. Base  3. Buttons  4. Header  5. Hero
             6. About  7. Scale  8. Culture  9. Products  10. CTA
             11. Contact  12. Footer  13. Animation  14. Responsive
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0d0f12;
  --ink-soft: #14171c;
  --ink-card: #191d23;
  --cream: #f5f2ec;
  --cream-deep: #ebe6dc;
  --white: #ffffff;
  --gold: #c8a45c;
  --gold-light: #e3c98f;
  --gold-dark: #a88645;
  --text: #24262a;
  --text-muted: #6b6e73;
  --text-on-dark: #d8d5cf;
  --text-on-dark-muted: #8c8f93;
  --line: rgba(13, 15, 18, 0.14);
  --line-light: rgba(255, 255, 255, 0.12);
  --container: 1240px;
  --pad-section: 130px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[lang="zh"] {
  --font-display: "Songti SC", "SimSun", Georgia, serif;
}

/* Cormorant Garamond and Inter both ship Cyrillic glyphs, so Russian uses the
   same families as English; only the CJK fallback changes. */
html[lang="ru"] {
  --font-display: "Cormorant Garamond", Georgia, serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open, body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p, figure { margin: 0; }

.container {
  width: min(calc(100% - 80px), var(--container));
  margin-inline: auto;
}

.section-pad { padding-block: var(--pad-section); }
.dark { background: var(--ink); color: var(--text-on-dark); }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 26px;
}

.kicker-line {
  display: block;
  width: 34px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.kicker-light { color: var(--gold); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-title.light { color: var(--white); }

html[lang="zh"] .section-title {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
}

.section-sub {
  max-width: 510px;
  font-size: 16px;
  color: var(--text-muted);
}

.dark .section-sub { color: var(--text-on-dark-muted); }

.lead {
  font-size: 18px;
  line-height: 1.9;
  color: #404348;
}

.section-head { margin-bottom: 64px; }
.section-head .section-sub { margin-top: 24px; }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
}

.section-head-row .section-sub { margin-top: 0; padding-bottom: 10px; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, transform .35s var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--white);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

.btn-outline {
  border-color: var(--line-light);
  color: var(--white);
  min-height: 42px;
  padding: 0 20px;
  font-size: 10px;
}

.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-dark:hover { background: #2a2e35; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: gap .3s var(--ease), color .3s ease;
}

.text-link:hover { gap: 20px; color: var(--gold-dark); }

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}

.site-header.is-scrolled {
  background: rgba(13, 15, 18, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-light);
}

.header-inner {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand { display: inline-flex; align-items: center; flex: none; }

/* Reversed (white lettering) JOCENX lockup on transparent background —
   generated by tools/build_logo.py for the dark header/footer. */
.brand-logo {
  display: block;
  width: 172px;
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.footer-brand .brand-logo { width: 190px; filter: none; }

.main-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }

.main-nav a {
  position: relative;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.78);
  transition: color .3s ease;
  padding-block: 8px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .35s var(--ease);
}

.main-nav a:hover, .main-nav a.is-active { color: var(--white); }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; flex: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  transition: color .3s ease;
}

.lang-btn:hover { color: var(--white); }
.lang-btn.is-active { color: var(--gold); }

.lang-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  background: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--white);
  transition: transform .35s var(--ease), opacity .3s ease;
}

.nav-toggle.is-open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle.is-open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}

.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: center 45%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 14, 0.92) 0%, rgba(9, 11, 14, 0.72) 38%, rgba(9, 11, 14, 0.28) 72%, rgba(9, 11, 14, 0.45) 100%),
    linear-gradient(0deg, rgba(9, 11, 14, 0.7) 0%, transparent 40%);
}

.hero-content { position: relative; z-index: 2; padding-top: 70px; padding-bottom: 90px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold-light);
  margin-bottom: 34px;
}

.eyebrow-line { width: 42px; height: 1px; background: var(--gold); flex: none; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8.4vw, 8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--white);
  max-width: 900px;
}

html[lang="zh"] .hero-title {
  font-size: clamp(3.2rem, 6.6vw, 6rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.hero-desc {
  max-width: 520px;
  margin-top: 34px;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.75);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  letter-spacing: 0.3em;
}

.hero-scroll i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- 6. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: start;
}

.about-right .lead { margin-bottom: 26px; }
.about-right > p:not(.lead) { color: var(--text-muted); margin-bottom: 34px; }

/* ---------- 7. Scale ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 70px;
}

.stat { padding: 46px 24px 40px; border-right: 1px solid var(--line-light); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--gold-light);
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-num em {
  font-style: normal;
  font-size: 0.42em;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.stat-label {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.scale-visual { position: relative; overflow: hidden; }
.scale-visual img { width: 100%; height: 540px; object-fit: cover; }
.scale-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
  background: linear-gradient(to top, rgba(9, 11, 14, 0.85), transparent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--white);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.timeline-item { position: relative; padding-top: 24px; border-top: 1px solid var(--line-light); }
.timeline-item::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline-year {
  display: block;
  font-family: var(--font-display);
  font-size: 27px;
  color: var(--gold-light);
  line-height: 1.2;
}

.timeline-item p { margin-top: 6px; font-size: 13px; color: var(--text-on-dark-muted); }

/* ---------- 8. Culture ---------- */
.culture-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 90px;
  align-items: center;
}

.culture-media { position: relative; }
.culture-media img { width: 100%; height: 620px; object-fit: cover; }

.culture-media-badge {
  position: absolute;
  right: -24px;
  bottom: -24px;
  background: var(--ink);
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.culture-media-badge strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--gold-light);
}

.culture-media-badge span { font-size: 11px; color: var(--text-on-dark-muted); }

.culture-content .lead { margin: 26px 0 34px; }

.values-list { display: grid; gap: 0; border-top: 1px solid var(--line); }

.value-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.value-no { font-family: var(--font-display); font-size: 17px; color: var(--gold-dark); padding-top: 3px; }
.value-item h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.value-item p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 100px;
  border: 1px solid var(--line);
}

.mv-card { padding: 48px 52px; }
.mv-card + .mv-card { border-left: 1px solid var(--line); }

.mv-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--gold-dark);
  margin-bottom: 18px;
}

.mv-card p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 9. Products (catalog) ---------- */
.products { background: var(--cream-deep); }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.catalog-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-tabs::-webkit-scrollbar { display: none; }

.catalog-tab {
  flex: none;
  position: relative;
  padding: 14px 13px 16px;
  border: 0;
  background: none;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .3s ease;
}

.catalog-tab::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -1px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .35s var(--ease);
}

.catalog-tab:hover { color: var(--ink); }
.catalog-tab.is-active { color: var(--ink); }
.catalog-tab.is-active::after { transform: scaleX(1); }

.catalog-count {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.catalog-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  color: inherit;
  transition: transform .45s var(--ease), border-color .45s ease, box-shadow .45s ease;
}

.catalog-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 22px 48px rgba(13, 15, 18, 0.10);
}

.catalog-img {
  position: relative;
  height: 258px;
  background: #fff;
  overflow: hidden;
  transition: background .45s ease;
}

.catalog-card:hover .catalog-img { background: #faf9f6; }

/* The box has an explicit height, so an absolutely positioned image resolves
   percentage max-height against a definite containing block. The previous
   grid layout used an auto-sized track, which made max-height:100% circular:
   the browser ignored it and overflow:hidden cut off the top/bottom of
   square and portrait product photos. */
.catalog-img img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 32px);
  max-height: calc(100% - 20px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.catalog-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }

.catalog-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.catalog-model {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 6px;
}

.catalog-name { font-size: 13px; font-weight: 500; color: #4a4d52; }

.catalog-summary {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  transition: gap .3s var(--ease);
}

.catalog-card:hover .catalog-more { gap: 16px; }

.catalog-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
}

.catalog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.catalog-foot p { font-size: 15px; color: var(--text-muted); }

/* ---------- Product detail modal ---------- */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-modal.is-open { display: flex; }

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 13, 0.78);
  backdrop-filter: blur(4px);
  animation: fadeIn .3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.product-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 940px);
  max-height: min(88vh, 860px);
  overflow-y: auto;
  background: var(--white);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  animation: modalIn .4s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  transition: background .3s ease, color .3s ease;
}

.modal-close:hover { background: var(--ink); color: var(--white); }

.modal-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; }

.modal-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 34px 54px;
  background: #faf9f6;
  border-right: 1px solid var(--line);
  min-height: 460px;
}

.modal-media img { max-width: 100%; max-height: 420px; object-fit: contain; }

.modal-zoom {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: border-color .3s ease, color .3s ease;
}

.modal-zoom:hover { border-color: var(--gold-dark); color: var(--gold-dark); }

.modal-info { padding: 46px 44px 42px; }

.modal-tag {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.modal-info h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 8px;
}

.modal-info .modal-sub { font-size: 14px; font-weight: 500; color: #4a4d52; }
.modal-info .modal-summary { margin-top: 14px; font-size: 14px; line-height: 1.75; color: var(--text-muted); }

.modal-spec-title {
  margin: 30px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.modal-specs { list-style: none; margin: 0; padding: 0; }

.modal-specs li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(13, 15, 18, 0.07);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.modal-specs li::before {
  content: "";
  flex: none;
  width: 4px;
  height: 4px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.modal-actions .btn { min-height: 46px; padding: 0 22px; font-size: 11px; }
.modal-actions .btn-secondary { border-color: var(--line); color: var(--ink); }
.modal-actions .btn-secondary:hover { border-color: var(--gold-dark); color: var(--gold-dark); }

.modal-note {
  margin-top: 20px;
  font-size: 11px;
  line-height: 1.6;
  color: #92959a;
}

/* ---------- 10. CTA band ---------- */
.cta-band { background: var(--gold); color: var(--ink); }

.cta-inner {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-block: 50px;
}

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 500;
  line-height: 1.2;
}

.cta-inner .btn { background: var(--ink); border-color: var(--ink); color: var(--white); }
.cta-inner .btn:hover { background: #26292f; }

/* ---------- 11. Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 280px;
  padding: 40px 36px;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform .45s var(--ease), border-color .45s ease, box-shadow .45s ease;
}

article.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 22px 48px rgba(13, 15, 18, 0.09);
}

.contact-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  margin-bottom: 30px;
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.contact-card strong {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-word;
}

.contact-desc { padding-top: 20px; font-size: 13px; color: var(--text-muted); }

/* Copy-first contact actions: reliable on desktop browsers that have no
   registered mail client or cannot reach wa.me. */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 24px;
}

.contact-copy {
  padding: 10px 18px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background .3s ease, border-color .3s ease;
}

.contact-copy:hover { background: var(--gold-light); border-color: var(--gold-light); }

.contact-open {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .3s ease, border-color .3s ease;
}

.contact-open:hover { color: var(--gold-dark); border-color: var(--gold-dark); }

/* The webmail chooser trigger is a <button>: reset native button chrome. */
button.contact-open {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 2px;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

button.contact-open.is-open { color: var(--gold-dark); border-color: var(--gold-dark); }

/* Webmail compose chooser - plain HTTPS links, so it works even on a desktop
   with no mailto handler registered. */
.mail-menu {
  position: absolute;
  left: 24px;
  right: 24px;
  top: calc(100% - 8px);
  z-index: 60;
  padding: 20px 22px 18px;
  background: var(--ink);
  border: 1px solid var(--gold);
  color: var(--cream);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.mail-menu[hidden] { display: none; }

.mail-menu-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.mail-menu-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  word-break: break-all;
}

.mail-menu-copy {
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}

.mail-menu-copy:hover { background: var(--gold); color: var(--ink); }

.mail-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cream);
  font-size: 13px;
  text-decoration: none;
  transition: color .25s ease;
}

.mail-menu-item:hover { color: var(--gold); }
.mail-menu-item span { color: var(--gold-dark); }

.mail-menu-hint {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 18px);
  max-width: min(600px, calc(100vw - 40px));
  padding: 14px 24px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--gold);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

.site-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Last-resort fallback: let visitors select the address shown in a failed toast. */
.site-toast.is-selectable {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.contact-arrow {
  position: absolute;
  top: 38px;
  right: 36px;
  color: var(--gold-dark);
  font-size: 19px;
  transition: transform .35s var(--ease);
}

article.contact-card:hover .contact-arrow { transform: translate(3px, -3px); }

.contact-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.contact-bottom p { color: var(--text-muted); font-size: 15px; }

/* ---------- 12. Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-on-dark); }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 60px;
  padding-block: 80px 70px;
}

.footer-brand p { margin-top: 22px; font-size: 14px; color: var(--text-on-dark-muted); max-width: 260px; }

.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.footer-col h4 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-bottom: 10px;
}

.footer-col a { font-size: 14px; color: var(--text-on-dark-muted); transition: color .3s ease; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
  border-top: 1px solid var(--line-light);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #6e7175;
}

/* ---------- 13. Animation ---------- */
/* When JS is disabled, content stays visible; only hide it once the .js class is set. */
.js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

.stats-grid .stat:nth-child(2), .catalog-grid .catalog-card:nth-child(2), .contact-grid .contact-card:nth-child(2) { transition-delay: .1s; }
.stats-grid .stat:nth-child(3), .catalog-grid .catalog-card:nth-child(3), .contact-grid .contact-card:nth-child(3) { transition-delay: .2s; }
.stats-grid .stat:nth-child(4) { transition-delay: .3s; }

.hero-content .reveal:nth-child(1) { transition-delay: .1s; }
.hero-content .reveal:nth-child(2) { transition-delay: .25s; }
.hero-content .reveal:nth-child(3) { transition-delay: .4s; }
.hero-content .reveal:nth-child(4) { transition-delay: .55s; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 1100px) {
  :root { --pad-section: 100px; }
  .main-nav { gap: 22px; }
  .header-cta { display: none; }
  .about-grid, .culture-grid { gap: 50px; }
  .culture-media img { height: 540px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .catalog-body { padding: 20px 20px 24px; }
  .catalog-img { height: 230px; }
  .modal-info { padding: 38px 32px 34px; }
  .modal-media { padding: 36px 26px 50px; min-height: 400px; }
  .contact-card { padding: 34px 28px; }
}

@media (max-width: 900px) {
  .container { width: min(calc(100% - 48px), var(--container)); }
  :root { --pad-section: 84px; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 24px 28px;
    background: rgba(13, 15, 18, 0.98);
    border-top: 1px solid var(--line-light);
    transform: translateY(-140%);
    opacity: 0;
    visibility: hidden;
    transition: transform .45s var(--ease), opacity .35s ease, visibility .35s;
  }

  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 15px 0; border-bottom: 1px solid var(--line-light); font-size: 14px; }
  .main-nav a::after { display: none; }

  .about-grid, .culture-grid { grid-template-columns: 1fr; gap: 46px; }
  .culture-media { max-width: 620px; }
  .culture-media-badge { right: 0; bottom: -20px; }

  .section-head-row { flex-direction: column; align-items: flex-start; gap: 24px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line-light); }
  .stat:nth-child(4) { border-top: 1px solid var(--line-light); }

  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .catalog-tabs { width: 100%; }
  .catalog-tab { padding: 12px 14px 14px; }
  .catalog-foot { flex-direction: column; align-items: flex-start; gap: 20px; }
  .modal-layout { grid-template-columns: 1fr; }
  .modal-media { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-media img { max-height: 240px; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 210px; }
  .contact-icon { margin-bottom: 20px; }

  .mission-vision { grid-template-columns: 1fr; margin-top: 70px; }
  .mv-card + .mv-card { border-left: 0; border-top: 1px solid var(--line); }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 44px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 36px), var(--container)); }
  :root { --pad-section: 70px; }

  .header-inner { height: 74px; }
  .main-nav { top: 74px; }
  .brand-logo { width: 138px; }
  .footer-brand .brand-logo { width: 156px; }
  .header-actions { gap: 14px; }

  .hero-title { font-size: clamp(3.2rem, 14vw, 4.6rem); }
  html[lang="zh"] .hero-title { font-size: clamp(2.6rem, 11vw, 3.8rem); }
  .hero-desc { font-size: 14px; margin-top: 24px; }
  .hero-actions { margin-top: 32px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-scroll { display: none; }

  .section-title { font-size: 2.35rem; }
  html[lang="zh"] .section-title { font-size: 2rem; }
  .lead { font-size: 16px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 30px 14px; }
  .stat-num { font-size: 2.7rem; }
  .stat-label { font-size: 10px; letter-spacing: 0.08em; }

  .scale-visual img { height: 320px; }
  .scale-visual figcaption { flex-direction: column; gap: 4px; padding: 20px; font-size: 9px; }

  .timeline { grid-template-columns: 1fr; gap: 26px; }

  .culture-media img { height: 380px; }
  .culture-media-badge { padding: 18px 22px; }
  .culture-media-badge strong { font-size: 16px; }

  .value-item { grid-template-columns: 34px 1fr; gap: 10px; }
  .mv-card { padding: 34px 28px; }

  .catalog-grid { grid-template-columns: 1fr; gap: 18px; }
  .catalog-img { height: 246px; }
  .catalog-count { display: none; }

  .product-modal { padding: 0; }
  .product-modal-panel { max-height: 100vh; height: 100vh; width: 100%; }
  .modal-info { padding: 28px 24px 40px; }
  .modal-info h2 { font-size: 30px; }
  .modal-media {
    display: block;
    text-align: center;
    min-height: 0;
    padding: 24px 20px 18px;
  }
  .modal-media img { display: block; margin: 0 auto; max-height: 210px; }
  .modal-zoom {
    position: static;
    transform: none;
    margin-top: 14px;
  }

  .cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }

  .contact-bottom { flex-direction: column; align-items: flex-start; }

  .footer-top { grid-template-columns: 1fr; gap: 34px; padding-block: 60px 50px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* Three language buttons need a little more room on small screens. */
@media (max-width: 560px) {
  .lang-switch { gap: 6px; }
  .lang-btn { font-size: 10px; letter-spacing: 0.02em; }
  .header-actions { gap: 10px; }
  .contact-actions { gap: 8px 12px; }
  .contact-copy { padding: 9px 13px; }
  .mail-menu { left: 14px; right: 14px; padding: 16px; }
  .site-toast { bottom: 16px; padding: 12px 16px; font-size: 12px; }
}

/* Russian strings are longer than English ones. */
html[lang="ru"] .catalog-tab { letter-spacing: 0; }
html[lang="ru"] .hero-desc { max-width: 760px; }

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

/* The old "all models" link list was removed from the homepage; crawlers now
   reach every model through the static category pages and sitemap.xml. */

/* ---------- OEM / ODM capability band ---------- */
.hero-oem {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 34px;
  padding: 11px 18px; border: 1px solid rgba(200,164,92,.5); border-radius: 999px;
  background: rgba(13,15,18,.5); color: var(--cream); text-decoration: none;
  font-size: 12px; letter-spacing: .05em; transition: border-color .3s var(--ease), background .3s var(--ease);
}
.hero-oem strong { color: var(--gold-light); font-weight: 600; letter-spacing: .13em; }
.hero-oem > span:not(.hero-oem-dot) { color: var(--text-on-dark); }
.hero-oem i { font-style: normal; color: var(--gold-light); transition: transform .3s var(--ease); }
.hero-oem:hover { border-color: var(--gold); background: rgba(13,15,18,.75); }
.hero-oem:hover i { transform: translateX(5px); }
.hero-oem-dot {
  width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(200,164,92,.18);
}

.oem { background: var(--ink-soft); }
.oem-head { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: 54px; }
.oem-lead { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text-on-dark); }
.oem-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.oem-flag {
  display: flex; align-items: baseline; gap: 20px; padding: 24px 30px;
  border: 1px solid var(--line-light); background: rgba(255,255,255,.025);
}
.oem-flag strong {
  font-family: var(--font-display); font-size: 40px; font-weight: 500;
  color: var(--gold-light); letter-spacing: .04em; line-height: 1;
}
.oem-flag span { font-size: 14px; color: var(--text-on-dark); }
.oem-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line-light); border: 1px solid var(--line-light);
}
.oem-card { background: var(--ink-soft); padding: 34px 32px 30px; }
.oem-no { display: block; margin-bottom: 22px; font-size: 11px; letter-spacing: .2em; color: var(--gold); }
.oem-card h3 {
  margin: 0 0 12px; font-family: var(--font-display); font-size: 22px;
  font-weight: 500; color: var(--cream);
}
.oem-card p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--text-on-dark-muted); }
.oem-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 34px;
  margin-top: 46px; padding-top: 34px; border-top: 1px solid var(--line-light);
}
.oem-cta p { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.8; color: var(--text-on-dark-muted); }
.oem-cta-actions { display: flex; gap: 14px; flex: none; }

@media (max-width: 1000px) {
  .oem-head { grid-template-columns: 1fr; gap: 28px; }
  .oem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oem-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .hero-oem { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; border-radius: 14px; font-size: 11px; }
  .oem-flags { grid-template-columns: 1fr; }
  .oem-flag { padding: 20px 22px; }
  .oem-flag strong { font-size: 32px; }
  .oem-grid { grid-template-columns: 1fr; }
  .oem-card { padding: 26px 22px; }
  .oem-cta-actions { flex-direction: column; width: 100%; }
  .oem-cta-actions .btn { width: 100%; text-align: center; }
}

/* Category quick-link tiles: every card has one fixed size, whatever the
   category name or model count. Tiles are deliberately large so visitors do
   not scroll past a family. Injected once by build_seo_pages.py. */
.cat-tiles-wrap { margin: 0 0 56px; }
.cat-tiles-head { display: flex; align-items: baseline; justify-content: space-between;
                  gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tiles-head h3 { font-family: var(--font-display, Georgia, serif); font-weight: 500;
                     font-size: 25px; margin: 0; color: var(--ink); }
.cat-tiles-head p { margin: 0; font-size: 11.5px; letter-spacing: .14em;
                    text-transform: uppercase; color: var(--text-muted); }
.cat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
             justify-content: start; gap: 18px; }
.cat-tile { box-sizing: border-box; display: flex; align-items: center; gap: 14px;
            width: 100%; height: 168px; min-height: 168px; max-height: 168px;
            padding: 22px 24px; overflow: hidden; background: var(--white);
            border: 1px solid var(--line); color: var(--ink);
            transition: transform .35s var(--ease, ease),
                    border-color .35s ease, box-shadow .35s ease; }
.cat-tile:hover { transform: translateY(-4px); border-color: var(--gold);
                  box-shadow: 0 18px 38px rgba(13,15,18,.10); }
.cat-tile-no { align-self: flex-start; flex: none; font-size: 11px; letter-spacing: .12em;
               color: var(--gold-dark); padding-top: 4px; }
.cat-tile-thumb { width: 108px; height: 108px; flex: none; display: flex;
                  align-items: center; justify-content: center; background: #fff; }
.cat-tile-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto;
                      object-fit: contain; }
.cat-tile-info { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.cat-tile-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
                 overflow: hidden; font-family: var(--font-display, Georgia, serif);
                 font-size: 19px; line-height: 1.3; }
.cat-tile-count { font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
                  color: var(--gold-dark); white-space: nowrap; }
.cat-tile-arrow { flex: none; font-size: 20px; color: var(--gold-dark);
                  transition: transform .3s ease; }
.cat-tile:hover .cat-tile-arrow { transform: translate(3px, -3px); }
/* Left-aligned rows: a trailing single tile starts in column 1 instead of
   being centred, so every row begins at the same left edge. Explicitly set so
   it also overrides any cached older stylesheet. */
@media (min-width: 1001px) {
  .cat-tile:last-child:nth-child(3n + 1) { grid-column: 1; }
}
@media (max-width: 1000px) {
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cat-tile { gap: 14px; padding: 20px; height: 148px; min-height: 148px;
              max-height: 148px; }
  .cat-tile-thumb { width: 94px; height: 94px; }
  .cat-tile-name { font-size: 17px; }
}
@media (max-width: 620px) {
  .cat-tiles { grid-template-columns: 1fr; gap: 14px; }
  .cat-tile { gap: 12px; padding: 18px; height: 128px; min-height: 128px;
              max-height: 128px; }
  .cat-tile-thumb { width: 82px; height: 82px; }
  .cat-tile-name { font-size: 17px; }
}
