/* ============================================================
   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: 150px; background: #fff; border-radius: 8px; margin-bottom: 16px;
  display: grid; place-items: center; overflow: hidden;
}
.product-photo img { max-width: 100%; max-height: 140px; object-fit: contain; }
.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; }

/* ---------- Premium visual layer ---------- */
.hero { isolation: isolate; }
.ember-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero .hero-inner { position: relative; z-index: 2; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; z-index: 1;
  background: url("../assets/site/skyline.svg") bottom center / cover no-repeat;
  opacity: .5; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 70% at 80% 25%, rgba(185,28,28,.18), transparent 65%);
  animation: heroGlow 7s ease-in-out infinite alternate;
}
@keyframes heroGlow { from { opacity: .5; transform: scale(1); } to { opacity: 1; transform: scale(1.06); } }
.hero .kicker, .hero h1, .hero p, .hero .hero-badges, .hero .btn-row {
  animation: riseIn .8s cubic-bezier(.2,.7,.3,1) both;
}
.hero h1 { animation-delay: .08s; }
.hero p { animation-delay: .16s; }
.hero .hero-badges { animation-delay: .26s; }
.hero .btn-row { animation-delay: .36s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 80% at 88% 15%, rgba(185,28,28,.16), transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
.page-hero .container { position: relative; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.revealed { opacity: 1; transform: none; }

/* Card & image micro-interactions */
.card { position: relative; overflow: hidden; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(185,28,28,.10), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::after { opacity: 1; }
.card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 1px rgba(185,28,28,.35); }
.project-thumb img, .visual img { transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.project-card:hover .project-thumb img { transform: scale(1.07); }
.split .visual { overflow: hidden; }
.split:hover .visual img { transform: scale(1.04); }

/* Button shine sweep */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
}
.btn-primary:hover::after { left: 130%; }

/* Stat pulse */
.stat { transition: transform .25s ease, border-color .25s ease; }
.stat:hover { transform: translateY(-4px); border-top-color: var(--red-bright); }

/* Back-to-top */
.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; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .page-hero::before { animation: none; }
  .hero .kicker, .hero h1, .hero p, .hero .hero-badges, .hero .btn-row { animation: none; }
}

/* Logo chip: white backing for the navy Ecotech mark */
.brand-mark { background: #ffffff; }
.brand-mark img { width: 32px; height: 32px; object-fit: contain; }
