:root{
  --bg:#f7f4ec;
  --panel:#fff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:rgba(17,24,39,.10);

  --accent:#b09245; /* gold */
  --dark:#4a3a1d;   /* brown */

  --radius:18px;
  --max:980px;

  --gap:14px;
  --pad:18px;
  --line:1px solid var(--border);
}


*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{ color:inherit; text-decoration:none; }
.container{ width:min(var(--max),calc(100% - 32px)); margin:0 auto; }

.spacer{
  height: 12px;
}

/* ---------- TOPBAR ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(247,244,236,.85);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:650;
  letter-spacing:.2px;
  text-decoration:none;
}

.brand-logo{
  height: 48px;
  width:auto;
  display:block;
}

.brand-name{
  font-size:16px;
  letter-spacing:.2px;
  white-space:nowrap;
}

/* Desktop nav */
.nav-desktop{
  display:flex;
  align-items:center;
  gap:18px;
  white-space:nowrap;
}

.nav-link{
  padding:6px 2px;
}

.nav-link.active{
  border-bottom:1px solid currentColor;
  padding-bottom:2px;
}

/* Mobile toggle (tier-1: icon only) */
.nav-toggle{
  display:none;
  background:transparent;
  border:none;
  padding:6px;
  margin-right:-6px; /* keeps it aligned with container edge */
  color:var(--text);
  cursor:pointer;
  line-height:1;
}

.nav-toggle svg{
  width:22px;
  height:22px;
  display:block;
}

/* Mobile drawer: hidden by default */
.nav-mobile{
  border-top:1px solid rgba(17,24,39,.10);
  background:rgba(247,244,236,.92);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  padding:10px 16px 14px;

  display:none;      /* ✅ default closed */
  gap:6px;
}

/* Open state */
.nav-mobile.is-open{
  display:grid;      /* ✅ opens */
}


/* ---------- RESPONSIVE ---------- */
@media (max-width:820px){
  .topbar-inner{ padding:10px 0; }

  .brand{ gap:8px; }
  .brand-logo{ height:22px; }
  .brand-name{ font-size:15px; }

  .nav-desktop{ display:none; }
  .nav-toggle{ display:grid; }

  .topbar{
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
  }
}

/* ---------- HERO ---------- */
.hero.hero-split{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:64px;
  align-items:center;

  padding:30px 0 15px;   /* ✅ less top gap, still strong */
}

.hero-left{ max-width:600px; }

.hero-title{
  font-size:clamp(36px,4.6vw,56px);
  line-height:1.08;
  margin:0 0 18px;
  letter-spacing:-.6px;
}

.hero-title .accent{ color:var(--accent); }

.hero-sub{
  margin:0 0 26px;
  max-width:60ch;
  color:var(--muted);
  line-height:1.65;
  font-size:16px;
}

.hero-actions .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 64px;
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: #f7f4ec;
  background: #b09245;
  border-radius: 5px;
}

.hero-media{
  width:100%;
  max-height:460px;      /* ✅ image not too tall */
  overflow:hidden;
}

.hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ---------- RESPONSIVE HERO ---------- */
@media (max-width:900px){
  .hero.hero-split{
    grid-template-columns:1fr;
    gap:36px;
    padding:44px 0 64px;
  }
  .hero-media{ max-height:320px; }
}

/* ------ PRODUCTS (LIGHT + IMAGES) ------ */

.products{
  background: transparent;
  padding: 0;
}


/* RTU – tall cabinet */
.product[data-type="rtu"] .product-media{ height:250px; }
.product[data-type="rtu"] .product-media img{ object-position:center; }

/* FTU – medium enclosure */
.product[data-type="ftu"] .product-media{ height:160px; }
.product[data-type="ftu"] .product-media img{ object-position:center; }

/* PLC – compact DIN module */
.product[data-type="plc"] .product-media{ height:350px; }
.product[data-type="plc"] .product-media img{ object-position:center 45%; }

.products-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:16px;
}

/* Card */
.product{
  background:var(--panel);
  border: 1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 30px rgba(0,0,0,.12);
  border-color:rgba(176,146,69,.35);
}

/* Image base */
.product-media{
  overflow:hidden;
  background:#f3f3f3;
}

.product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Text */
.product-code{
  padding:14px 16px 4px;
  font-size:20px;
  font-weight:750;
  letter-spacing:.04em;
  color:var(--accent);
}

.product-name{
  padding:0 16px 16px;
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
}

/* Foot text (now dark text, not white) */
.products-foot{
  font-size:14px;
  color:var(--muted);
  max-width:760px;
  line-height:1.65;
}

.products-link{
  display:inline-block;
  margin-top:12px;
  font-weight:650;
  color:var(--accent);
  border-bottom:1px solid transparent;
  transition:border-color .2s ease, opacity .2s ease;
}

.products-link:hover{
  border-bottom-color:var(--accent);
  opacity:.9;
}

/* Responsive */
@media (max-width:900px){
  .products-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:520px){
  .products-grid{ grid-template-columns:1fr; }
  .product-media{ height:160px; }
}

/* ---------- SECTION ---------- */
.section{ padding:15px 0; }

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:var(--gap);
  margin-bottom:var(--gap);
}

.section-title{
  margin:0;
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(31,41,55,.70);
}

/* =========================
   PARTNER LOGO WALL (WITH LABEL)
========================= */

.partner-wall{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px 48px;
  align-items: start;
  padding: 24px 0;
}

.partner-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.partner-item img{
  height: 48px;
  width: auto;
  object-fit: contain;
}

.partner-item:hover img{
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
}

.partner-item p{
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Mobile tuning */
@media (max-width: 640px){
  .partner-item img{
    height: 40px;
  }
}


/* on hover: become full color, slight lift */
.partner-wall img:hover{
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
}

/* responsive tuning */
@media (max-width: 900px){
  .partner-wall{
    justify-content: center;       /* better on mobile */
    gap: 26px 34px;
  }
  .partner-wall img{
    height: 40px;
  }
}


/* ---------- STATS ---------- */
.stats{
  border:var(--line);
  background:var(--dark);
  color:rgba(255, 255, 255, 0.88);
  border-radius:var(--radius);
  padding:22px;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--gap);
}

.stat{
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:14px;
  background:rgba(0,0,0,.08);
}

.stat .num{
  font-size:28px;
  font-weight:760;
  color: #deb757; /* gold */
  letter-spacing:-.4px;
}

.stat .lbl{
  margin-top:6px;
  font-size:12px;
  color:rgb(255, 255, 255);
}

.stats-foot{
  margin-top:var(--gap);
  font-size:13px;
  color:rgb(255, 255, 255);
  line-height:1.6;
}

.stats-link{
  display:inline-block;
  margin-top:10px;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgb(255, 255, 255);
  border-bottom:1px solid rgba(255,255,255,.35);
}

/* =========================
   CERTIFICATIONS GRID
========================= */

.cert-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.cert-card{
  text-decoration: none;
  color: inherit;
  background: #f3f4f6;                 /* light gray outer */
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(17,24,39,.10);
  transition: transform .15s ease, box-shadow .15s ease;
}

.cert-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
}

.cert-media{
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  height: 280px;                       /* controls preview size */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cert-media img{
  width: 100%;
  height: 100%;
  object-fit: contain;                 /* show full document */
  display: block;
}

.cert-name{
  font-size: 18px;
  line-height: 1.35;
  color: rgba(17,24,39,.55);
  font-weight: 600;
  padding: 6px 4px 2px;
}

.cert-link{
  display:block;
  margin:24px auto 0;
  text-align:center;
  margin:10px auto 0;     /* ✅ THIS centers it */
  font-size:20px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(31,41,55,.70);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1100px){
  .cert-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .cert-grid{ grid-template-columns: 1fr; }
  .cert-media{ height: 240px; }
}

/* =========================
   CERTIFICATIONS – HORIZONTAL SCROLL
========================= */

.cert-scroll{
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 18px 4px 26px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* hide ugly scrollbar (still scrollable) */
.cert-scroll::-webkit-scrollbar{
  height: 8px;
}
.cert-scroll::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.15);
  border-radius: 8px;
}
.cert-scroll::-webkit-scrollbar-track{
  background: transparent;
}

/* each card behaves like a slide */
.cert-scroll .cert-card{
  flex: 0 0 300px;        /* card width */
  scroll-snap-align: start;
}

/* mobile optimisation */
@media (max-width: 640px){
  .cert-scroll .cert-card{
    flex: 0 0 85%;
  }
}

/* =========================
   FOOTER
========================= */

.site-footer{
  background: #2f2614;
  color: rgba(255,255,255,.75);
  margin-top: 72px;
}

.footer-inner{
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr; /* 3 columns only */
  gap: 42px;
  padding: 56px 0 36px;
  align-items: start;
  justify-content: space-between; 
}

.footer-brand{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #b09245;
  margin-bottom: 10px;
}

.footer-desc{
  font-size: 14px;
  line-height: 1.7;
  max-width: 420px;
}

.footer-title{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: #b09245;
}

.footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-links a{
  color: rgba(255,255,255,.75);
  text-decoration: none;
}

.footer-links a:hover{
  color: #fff;
  text-decoration: underline;
}

/* Put Quick Links + Contact on the right */
.footer-inner .footer-col:nth-child(2),
.footer-inner .footer-col:nth-child(3){
  justify-self: end;
  text-align: left;
  min-width: 220px; /* optional, keeps them neat */
}

.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* Responsive */
@media (max-width: 980px){
  .footer-inner{
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner .footer-col:nth-child(2),
  .footer-inner .footer-col:nth-child(3){
    justify-self: start;
    min-width: unset;
  }
}

@media (max-width: 520px){
  .footer-inner{
    grid-template-columns: 1fr;
  }
}


/* ---------- CARDS ---------- */
.cards{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gap);
}

.card{
  background:var(--panel);
  border:var(--line);
  border-radius:var(--radius);
  padding:var(--pad);
}

.card-top{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.icon{
  width:40px;
  height:40px;
  border-radius:8px;

  border:1px solid rgba(176,146,69,.25); /* softer than --line */
  background:transparent;

  display:grid;
  place-items:center;

  color:var(--accent);
  font-size:14px;
  font-weight:700;
}

.icon img{
  width:36px;
  height:36px;
  object-fit:contain;
  display:block;
}

.card h3{
  margin:0;
  font-size:16px;
  letter-spacing:-.2px;
}

.card p{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.7;
  font-size:13.8px;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width:780px){
  .stats-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
  .cards{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
