/* ============================================================
   ECOTECH INNOVATIONS — Black & Deep Red Theme
   ============================================================ */
:root {
  --black: #0b0b0d;
  --black-2: #131316;
  --black-3: #1c1c21;
  --red: #8e1111;
  --red-bright: #b91c1c;
  --red-deep: #6b0f0f;
  --white: #f5f5f4;
  --grey: #a8a8ad;
  --grey-dark: #55555c;
  --border: #2a2a30;
  --max: 1140px;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
.section { padding: 72px 0; }
.section-alt { background: var(--black-2); }
.section-title { margin-bottom: 8px; }
.section-title .accent { color: var(--red-bright); }
.section-sub { color: var(--grey); max-width: 720px; margin-bottom: 40px; }
.kicker {
  display: inline-block; color: var(--red-bright); font-size: .8rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,11,13,.94); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--red);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); font-weight: 800; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--red-deep), var(--red-bright));
  display: grid; place-items: center; font-size: 1.2rem; color: #fff; overflow: hidden;
}
.brand-mark img { width: 30px; height: 30px;
}
.brand-mark:empty { display: none; }
.brand small { display: block; font-size: .62rem; font-weight: 600; color: var(--grey); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--white); font-weight: 600; font-size: .92rem;
  padding: 9px 14px; border-radius: 6px; display: block;
}
.nav-links a:hover { background: var(--black-3); text-decoration: none; }
.nav-links a.active { color: var(--red-bright); }
.nav-links a.nav-cta {
  background: var(--red); color: #fff; margin-left: 8px;
}
.nav-links a.nav-cta:hover { background: var(--red-bright); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--white);
  font-size: 1.4rem; padding: 4px 12px; border-radius: 6px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(142,17,17,.35), transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(107,15,15,.25), transparent 60%),
    var(--black);
  border-bottom: 1px solid var(--border);
  padding: 90px 0;
}
.hero-inner { max-width: 780px; }
.hero h1 .accent { color: var(--red-bright); }
.hero p.lead { color: var(--grey); font-size: 1.12rem; margin: 20px 0 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.badge {
  border: 1px solid var(--red); color: var(--white); font-size: .82rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; background: rgba(142,17,17,.12);
}
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 8px; font-weight: 700;
  font-size: .95rem; transition: .2s; border: 2px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); }
.btn-outline { border-color: var(--red); color: var(--white); }
.btn-outline:hover { background: rgba(142,17,17,.15); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.stat {
  background: var(--black-2); border: 1px solid var(--border); border-top: 3px solid var(--red);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
}
.stat .num { font-size: 2.3rem; font-weight: 800; color: var(--red-bright); }
.stat .label { color: var(--grey); font-size: .9rem; margin-top: 4px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: var(--black-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; transition: .2s;
}
.card:hover { border-color: var(--red); transform: translateY(-3px); }
.card .icon {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-deep), var(--red)); font-size: 1.4rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--grey); font-size: .94rem; }
.card ul { color: var(--grey); font-size: .94rem; padding-left: 18px; margin-top: 8px; }
.card ul li { margin-bottom: 5px; }
.card .card-link { display: inline-block; margin-top: 14px; font-weight: 700; font-size: .9rem; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; counter-reset: step; }
.step {
  background: var(--black-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 2rem; font-weight: 800; color: var(--red); display: block; margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--grey); font-size: .9rem; }

/* ---------- Industry chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: var(--black-3); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 20px; font-weight: 600; font-size: .95rem;
}
.chip:hover { border-color: var(--red); }

/* ---------- Project gallery ---------- */
.project-card { overflow: hidden; padding: 0; }
.project-thumb {
  height: 190px; display: grid; place-items: center; font-size: 2.6rem;
  background: linear-gradient(135deg, var(--black-3) 0%, var(--red-deep) 140%);
  border-bottom: 2px solid var(--red); overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-photo {
  height: 210px; background: #fff; border-radius: 8px; margin-bottom: 16px;
  display: grid; place-items: center; overflow: hidden;
}
.product-photo img { width: 100%; height: 210px; object-fit: cover; }
.project-body { padding: 22px; }
.project-body .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--red-bright); margin-bottom: 8px;
}
.project-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.project-body p { color: var(--grey); font-size: .88rem; }

/* ---------- Two-column ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .visual {
  background: linear-gradient(145deg, var(--black-3), var(--red-deep));
  border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 320px; display: grid; place-items: center; font-size: 4rem;
}
.checklist { list-style: none; margin-top: 18px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 12px; color: var(--grey); }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--red-bright); font-weight: 800; }
.checklist li strong { color: var(--white); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--red-deep), var(--red));
  border-radius: var(--radius); padding: 48px 40px; text-align: center;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: #f0d9d9; margin-bottom: 26px; max-width: 640px; margin-inline: auto; }
.cta-band .btn-primary { background: var(--black); }
.cta-band .btn-primary:hover { background: var(--black-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--black-3); color: var(--red-bright); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
table.data td { color: var(--grey); }
table.data td:first-child { color: var(--white); font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-item .ci-icon {
  width: 44px; height: 44px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-deep), var(--red)); font-size: 1.15rem;
}
.contact-item h3 { font-size: .95rem; margin-bottom: 3px; }
.contact-item p, .contact-item a { color: var(--grey); font-size: .95rem; }
.form { background: var(--black-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form label { display: block; font-size: .85rem; font-weight: 600; margin: 16px 0 6px; }
.form input, .form select, .form textarea {
  width: 100%; background: var(--black); border: 1px solid var(--border); border-radius: 7px;
  color: var(--white); padding: 12px 14px; font-size: .95rem; font-family: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form button { margin-top: 22px; width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.form .note { font-size: .8rem; color: var(--grey-dark); margin-top: 12px; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--black-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 18px 22px; margin-bottom: 12px;
}
details.faq[open] { border-color: var(--red); }
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 30px; }
details.faq summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--red-bright); font-size: 1.3rem; font-weight: 800; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--grey); margin-top: 12px; font-size: .94rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(ellipse 50% 90% at 90% 10%, rgba(142,17,17,.3), transparent 60%),
    var(--black-2);
  border-bottom: 1px solid var(--border); padding: 64px 0;
}
.page-hero .crumbs { font-size: .85rem; color: var(--grey-dark); margin-bottom: 14px; }
.page-hero .crumbs a { color: var(--grey); }
.page-hero p { color: var(--grey); max-width: 720px; margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-2); border-top: 2px solid var(--red); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--red-bright); margin-bottom: 16px; }
.site-footer p, .site-footer a, .site-footer li { color: var(--grey); font-size: .9rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0; text-align: center;
  font-size: .82rem; color: var(--grey-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--black-2); flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; border-bottom: 2px solid var(--red); gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a.nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 64px 0; }
}

/* Photo panels & product image slots */
.visual { overflow: hidden; padding: 0; }
.visual img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.product-photo.empty {
  background: transparent; border: 2px dashed var(--border);
  color: var(--grey-dark); text-align: center; font-size: .85rem; line-height: 1.5;
}
.product-photo.empty span { padding: 10px; }
.product-photo.empty small { color: var(--red-bright); word-break: break-all; font-size: .75rem; }

/* ---------- Dynamic behaviours ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--red); background: var(--black-2); color: var(--red-bright);
  font-size: 1.2rem; font-weight: 800; cursor: pointer; opacity: 0; pointer-events: none;
  transition: .25s; box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--red); color: #fff; }
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 18px 0; }
.marquee-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: marquee 32s linear infinite; will-change: transform; }
.marquee-track span { color: var(--grey); font-weight: 700; font-size: 1.02rem; letter-spacing: .04em; }
.marquee-track span::after { content: "◆"; color: var(--red); margin-left: 48px; font-size: .7rem; vertical-align: 2px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
.badge-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.cred {
  border: 1px solid var(--border); background: var(--black-2); border-radius: 8px;
  padding: 10px 18px; font-size: .88rem; color: var(--grey); font-weight: 600;
}
.cred strong { color: var(--red-bright); }

/* ---------- 3D visual layer ---------- */
.hero, .page-hero { position: relative; overflow: hidden; }
.panes3d {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  width: 320px; height: 360px; perspective: 1100px; pointer-events: none; z-index: 1;
  transition: transform .2s ease-out;
}
.pane {
  position: absolute; width: 240px; height: 150px; border-radius: 12px;
  border: 1px solid rgba(185,28,28,.5); overflow: hidden;
  background: linear-gradient(rgba(12,12,14,.30), rgba(12,12,14,.10)), var(--pane-img, linear-gradient(135deg, rgba(185,28,28,.18), rgba(255,255,255,.06) 60%, rgba(185,28,28,.08))) center/cover no-repeat;
  box-shadow: 0 22px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
  font-weight: 700; letter-spacing: .12em;
  font-size: .78rem; color: #fff; text-transform: uppercase;
  transform-style: preserve-3d;
}
.pane span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; text-align: center;
  background: linear-gradient(transparent, rgba(8,8,10,.85));
}
.pane:nth-child(1) { top: 0;    left: 40px; transform: rotateX(56deg) rotateZ(-14deg); animation: paneFloat 7s ease-in-out infinite alternate; }
.pane:nth-child(2) { top: 105px; left: 12px; transform: rotateX(56deg) rotateZ(-14deg); animation: paneFloat 7s 1.1s ease-in-out infinite alternate; }
.pane:nth-child(3) { top: 210px; left: -16px; transform: rotateX(56deg) rotateZ(-14deg); animation: paneFloat 7s 2.2s ease-in-out infinite alternate; }
@keyframes paneFloat {
  from { transform: rotateX(56deg) rotateZ(-14deg) translateZ(0); }
  to   { transform: rotateX(56deg) rotateZ(-14deg) translateZ(26px); }
}
.scene3d {
  position: absolute; right: 7%; top: 50%; transform: translateY(-50%);
  width: 200px; height: 200px; perspective: 900px; pointer-events: none; z-index: 1;
}
.cube3d { width: 100%; height: 100%; position: relative; transform-style: preserve-3d;
  animation: cubeSpin 20s linear infinite; }
.cube3d .face {
  position: absolute; inset: 0; border-radius: 14px;
  border: 1px solid rgba(185,28,28,.55);
  background: linear-gradient(150deg, rgba(19,19,22,.92), rgba(142,17,17,.28));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  display: grid; place-items: center; text-align: center; padding: 14px;
}
.cube3d .face .fnum { font-size: 1.9rem; font-weight: 800; color: var(--red-bright); display: block; }
.cube3d .face .flab { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--grey); text-transform: uppercase; margin-top: 4px; display: block; }
.cube3d .f1 { transform: rotateY(0deg)   translateZ(100px); }
.cube3d .f2 { transform: rotateY(90deg)  translateZ(100px); }
.cube3d .f3 { transform: rotateY(180deg) translateZ(100px); }
.cube3d .f4 { transform: rotateY(270deg) translateZ(100px); }
@keyframes cubeSpin {
  from { transform: rotateX(-14deg) rotateY(0deg); }
  to   { transform: rotateX(-14deg) rotateY(360deg); }
}
/* Inline photo cube (landing "Why Us") */
.visual-cube { display: grid; place-items: center; min-height: 320px; perspective: 950px; }
.visual-cube .cube3d { width: 230px; height: 230px; }
.cube3d.big .f1 { transform: rotateY(0deg)   translateZ(115px); }
.cube3d.big .f2 { transform: rotateY(90deg)  translateZ(115px); }
.cube3d.big .f3 { transform: rotateY(180deg) translateZ(115px); }
.cube3d.big .f4 { transform: rotateY(270deg) translateZ(115px); }
.cube3d .face.photo { padding: 0; overflow: hidden; }
.cube3d .face.photo img { width: 100%; height: 100%; object-fit: cover; opacity: .94; display: block; }
.cube3d .face.photo em {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px; font-style: normal;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: linear-gradient(transparent, rgba(8,8,10,.88)); text-align: center;
}
/* About story collage */
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: center; }
.collage img {
  width: 100%; height: 170px; object-fit: cover; border-radius: 12px;
  border: 1px solid rgba(185,28,28,.35); box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
.collage img:nth-child(2), .collage img:nth-child(3) { transform: translateY(14px); }

@media (max-width: 1000px) { .panes3d, .scene3d { display: none; } .visual-cube { min-height: 260px; } }
@media (prefers-reduced-motion: reduce) {
  .pane, .cube3d { animation: none; }
  .panes3d { transition: none; }
}
