/* ========================================
   TRIVO MOTORS — Premium Factory-Direct
   ======================================== */

:root {
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --surface: #141619;
  --surface-2: #181b21;
  --border: #25282e;
  --border-light: #2f333a;
  --text: #f0f1f3;
  --text-muted: #9ca3af;
  --accent: #c79b4f;
  --accent-2: #e8b86d;
  --accent-dark: #8f6d35;
  --light-bg: #f4f5f7;
  --light-card: #ffffff;
  --light-text: #111316;
  --light-muted: #5b626a;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 92%; max-width: var(--maxw); margin: 0 auto; }

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .3s, padding .3s, border .3s, box-shadow .3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 11, 13, .94);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
  padding: 10px 0;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: block; height: 42px; }
.logo img, .logo svg { height: 100%; width: auto; }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  position: relative;
  transition: color .25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s var(--ease);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: rgba(255,255,255,.75);
  padding: 7px 15px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle {
  display: none;
  width: 32px; height: 24px;
  background: transparent; border: none;
  flex-direction: column; justify-content: space-between;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; width: 100%; background: #fff; transition: .3s; border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #111;
  box-shadow: 0 8px 24px rgba(199,155,79,.25);
}
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 12px 32px rgba(199,155,79,.35); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: var(--border-light);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,.25);
}
.btn-whatsapp:hover { background: #1ebe5b; box-shadow: 0 12px 32px rgba(37,211,102,.35); }
.btn-whatsapp-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.btn-whatsapp-outline:hover { border-color: #25d366; color: #25d366; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,11,13,.95) 0%, rgba(10,11,13,.75) 50%, rgba(10,11,13,.45) 100%),
    url('assets/img/factory/factory-line.jpg') center/cover no-repeat;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(199,155,79,.08), transparent 50%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero-content { max-width: 620px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(199,155,79,.35);
  border-radius: 6px;
  background: rgba(199,155,79,.08);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -.02em;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255,255,255,.75);
  margin: 0 0 34px;
  max-width: 560px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}
.badge svg { stroke: var(--accent); }

/* Stats */
.stats { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 38px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: center; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .85rem; color: var(--text-muted); }

/* Sections */
.section { padding: 90px 0; }
.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; margin: 0 0 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

/* Products — light section */
.products { background: var(--light-bg); color: var(--light-text); }
.products .section-tag { color: var(--accent-dark); }
.products .section-head h2 { color: var(--light-text); }
.products .section-head p { color: var(--light-muted); }
.filter-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 42px; }
.filter-tabs button {
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid #d7dbe0;
  background: #fff;
  color: var(--light-muted);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s;
}
.filter-tabs button.active, .filter-tabs button:hover {
  background: var(--light-text);
  color: #fff;
  border-color: var(--light-text);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--light-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  border: 1px solid #e8eaed;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 18px 44px rgba(0,0,0,.12); }
.product-img {
  aspect-ratio: 4/3;
  background: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-bottom: 1px solid #f0f0f0;
}
.product-info { padding: 22px; }
.product-cat { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 8px; }
.product-name { font-size: 1.15rem; font-weight: 700; color: var(--light-text); margin-bottom: 6px; }
.product-code { font-size: .85rem; color: var(--light-muted); }
.products-foot { text-align: center; margin-top: 46px; }
.products-foot .btn-outline { color: var(--light-text); border-color: #c5c9cf; }
.products-foot .btn-outline:hover { border-color: var(--light-text); color: #000; }

/* Why */
.why { background: var(--bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .3s, border-color .3s;
}
.why-card:hover { transform: translateY(-5px); border-color: var(--border-light); }
.why-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(199,155,79,.1);
  color: var(--accent);
  margin-bottom: 20px;
}
.why-icon svg { width: 26px; height: 26px; }
.why-card h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.why-card p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* Factory */
.factory { background: var(--bg-2); }
.factory-head { max-width: 760px; margin-bottom: 34px; }
.factory-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; margin: 0 0 16px; }
.factory-lead { color: var(--text-muted); margin: 0; font-size: 1.05rem; }
.factory-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 44px;
}
.fstat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg);
}
.fstat-num {
  display: block;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.15;
}
.fstat-label { color: var(--text-muted); font-size: .88rem; }
.factory-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: stretch; }
.factory-list { list-style: none; padding: 0; margin: 0 0 26px; }
.factory-list li { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.factory-list span {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-size: .8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.factory-list p { margin: 0; color: var(--text); font-weight: 500; }
.factory-fig {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--bg);
}
.factory-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.factory-fig.main { min-height: 380px; }
.factory-fig figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  font-size: .85rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10,11,13,.72));
}
.factory-fig figcaption b { color: var(--accent); margin-right: 6px; }
.factory-loading { margin-top: 44px; }
.loading-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.loading-strip .factory-fig { aspect-ratio: 3 / 4; }
.loading-note { color: var(--text-muted); margin: 14px 0 0; font-size: .95rem; }
.factory-visit {
  margin-top: 44px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 34px;
  align-items: center;
}
.factory-visit .factory-fig { aspect-ratio: 4 / 5; max-height: 460px; }
.visit-cta h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; margin: 0 0 12px; }
.visit-cta p { color: var(--text-muted); margin: 0 0 20px; }

/* Terms */
.terms { background: var(--bg); }
.terms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.term-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.term-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; color: var(--accent); }
.term-card p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* FAQ — light */
.faq { background: #fff; color: var(--light-text); }
.faq .section-tag { color: var(--accent-dark); }
.faq .section-head h2 { color: var(--light-text); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #e5e7eb; }
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0;
  background: none; border: none;
  font-size: 1.05rem; font-weight: 600;
  color: var(--light-text);
  text-align: left;
  cursor: pointer;
}
.faq-icon {
  width: 22px; height: 22px;
  position: relative;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; background: var(--accent-dark); transition: transform .25s;
}
.faq-icon::before { width: 14px; height: 2px; top: 10px; left: 4px; }
.faq-icon::after { width: 2px; height: 14px; top: 4px; left: 10px; }
.faq-item.open .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-a-inner { padding: 0 0 24px; color: var(--light-muted); line-height: 1.65; }

/* CTA */
.cta { background: var(--bg-2); }
.cta-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(199,155,79,.12), transparent 70%);
}
.cta-inner h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; margin: 0 0 14px; position: relative; }
.cta-inner p { color: var(--text-muted); margin: 0 0 32px; font-size: 1.1rem; position: relative; }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }

/* Footer */
.footer { background: #050608; border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-logo { height: 46px; margin-bottom: 16px; }
.footer-tag { color: var(--text-muted); font-size: .95rem; max-width: 320px; }
.footer-col h4 { font-size: .9rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 18px; color: #fff; }
.footer-col p { color: var(--text-muted); font-size: .92rem; margin: 0 0 10px; line-height: 1.5; }

/* WhatsApp float */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.35);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 980px;
  max-height: 90vh;
  overflow: auto;
  transform: translateY(20px);
  transition: transform .3s var(--ease);
}
.modal.active .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: grid; place-items: center;
}
.modal-layout { display: grid; grid-template-columns: 1.1fr .9fr; }
.modal-gallery { background: #fff; padding: 28px; }
.modal-main-img {
  aspect-ratio: 4/3;
  background: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid #eee;
}
.modal-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-thumb {
  width: 70px; height: 70px;
  background: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: border-color .2s;
}
.modal-thumb.active, .modal-thumb:hover { border-color: var(--accent); }
.modal-info { padding: 36px; }
.modal-cat { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.modal-info h2 { font-size: 1.7rem; font-weight: 800; margin: 10px 0 18px; }
.modal-desc { color: var(--text-muted); margin-bottom: 28px; line-height: 1.65; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero::before { background-position: 60% center; }
  .factory-grid, .factory-visit, .modal-layout { grid-template-columns: 1fr; }
  .factory-stats { grid-template-columns: repeat(2, 1fr); }
  .factory-fig.main { min-height: 260px; }
  .why-grid, .terms-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 0; top: 0;
    background: rgba(10,11,13,.98);
    flex-direction: column; justify-content: center; gap: 26px;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.2rem; }
  .menu-toggle { display: flex; }
  .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 8px); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -8px); }
  .hero { padding-top: 100px; }
  .hero h1 { font-size: 2.4rem; }
  .hero-btns .btn { width: 100%; }
  .why-grid, .terms-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .factory-stats { grid-template-columns: repeat(2, 1fr); }
  .loading-strip { grid-template-columns: 1fr; }
  .loading-strip .factory-fig { aspect-ratio: auto; }
  .section { padding: 64px 0; }
  .cta-inner { padding: 42px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .modal-info { padding: 24px; }
}

/* Certifications — white section */
.certs { background: #fff; color: var(--light-text); }
.certs .section-tag { color: var(--accent-dark); }
.certs .section-head h2 { color: var(--light-text); }
.certs .section-head p { color: var(--light-muted); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.cert-card {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .09);
  border-color: var(--accent);
}
.cert-icon {
  width: 62px; height: 62px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(184, 145, 47, .10);
  color: var(--accent-dark);
  border: 1px solid rgba(184, 145, 47, .28);
}
.cert-icon svg { width: 28px; height: 28px; }
.cert-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--light-text); margin: 0 0 10px; }
.cert-card p { font-size: .95rem; line-height: 1.65; color: var(--light-muted); margin: 0; }
.cert-note { text-align: center; margin: 34px 0 0; font-size: .9rem; color: var(--light-muted); }
@media (max-width: 900px) {
  .cert-grid { grid-template-columns: 1fr; }
}
