:root {
  --navy: #0d1b2a;
  --navy-2: #1b2b3f;
  --accent: #e2611b;
  --accent-dark: #c04f12;
  --text: #1f2933;
  --muted: #5b6876;
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --border: #dde3ea;
  --radius: 10px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .5em; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: .8em 1.5em; border-radius: 999px; font-weight: 600; border: 2px solid var(--accent);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-small { padding: .45em 1.1em; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost-dark:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Header */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.brand img { width: 180px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > a, .dropdown > a { color: #e6ecf2; text-decoration: none; font-weight: 500; padding: 8px 0; }
.site-nav > a:hover, .dropdown > a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav > a[aria-current="page"]:not(.btn), .dropdown > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .btn { color: #fff; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: -20px; list-style: none; margin: 0; padding: 14px 0;
  background: #fff; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(13,27,42,.2);
  width: 340px; max-height: 75vh; overflow-y: auto;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 5px 20px; color: var(--text); text-decoration: none; font-size: .93rem; }
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--accent-dark); }
.nav-group { padding: 10px 20px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.menu-toggle { display: none; background: none; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 6px 14px; font: inherit; cursor: pointer; }

/* Hero */
.hero, .page-hero {
  background: linear-gradient(100deg, rgba(13,27,42,.92) 0%, rgba(13,27,42,.7) 55%, rgba(13,27,42,.35) 100%), var(--hero-img) center / cover no-repeat, var(--navy);
  color: #fff;
}
.hero { padding: 120px 0 130px; }
.page-hero { padding: 70px 0 60px; }
.hero h1, .page-hero h1 { color: #fff; max-width: 820px; }
.hero .lead, .page-hero .lead { color: #d3dce6; max-width: 700px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Stats */
.stats { background: var(--navy-2); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.stats strong { display: block; font-size: 1.7rem; color: #fff; }
.stats span { color: #b8c4d1; font-size: .95rem; }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head a { font-weight: 600; text-decoration: none; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-grid > img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(13,27,42,.15); }
.product-img { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; }
.product-img img { margin: 0 auto; max-height: 460px; width: auto; }
.partner-logo { max-height: 70px; width: auto; margin: 8px 0 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 9px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(13,27,42,.12); }
.card-img { aspect-ratio: 16 / 10.5; background: var(--bg-alt); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 24px; }
.card-body p:last-child { color: var(--muted); font-size: .94rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gallery img { border-radius: var(--radius); background: #fff; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figure { margin: 0; }
.gallery figcaption, .video-grid figcaption { font-size: .9rem; color: var(--muted); padding-top: 8px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.video-grid figure { margin: 0; }
.video-grid video { width: 100%; border-radius: var(--radius); background: #000; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.contact-card { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; }
.contact-card p { margin: 0; font-size: 1.05rem; }
.map { width: 100%; height: 400px; border: 0; border-radius: var(--radius); }

/* CTA + footer */
.cta { background: var(--accent); color: #fff; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 44px; padding-bottom: 44px; }
.cta h2 { color: #fff; margin-bottom: .2em; }
.cta p { margin: 0; color: #ffe6d8; }
.cta .btn { background: var(--navy); border-color: var(--navy); }
.cta .btn:hover { background: #000; border-color: #000; }
.site-footer { background: var(--navy); color: #b8c4d1; padding-top: 56px; font-size: .95rem; }
.site-footer h3 { color: #fff; }
.site-footer a { color: #e6ecf2; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid img { margin-bottom: 14px; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: .85rem; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy); padding: 8px 20px 20px; max-height: calc(100vh - 76px); overflow-y: auto; }
  .site-nav.open { display: flex; }
  .site-nav > a, .dropdown > a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .btn { margin-top: 14px; text-align: center; }
  .dropdown-menu { display: none !important; }
  .split-grid, .footer-grid, .contact-grid, .stats-grid { grid-template-columns: 1fr; }
  .split-grid { gap: 32px; }
  .split-grid.reverse > img { order: -1; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 80px 0 90px; }
  .section { padding: 52px 0; }
}

/* Listings, line card and enquiry forms (rendered by the Worker) */
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 28px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.filters select { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; min-width: 200px; }
.card-placeholder { width: 100%; height: 100%; min-height: 180px; display: grid; place-items: center; color: var(--muted); background: var(--bg-alt); font-size: .9rem; }
.card-placeholder.tall { min-height: 320px; border-radius: var(--radius); }
.card .price { font-weight: 700; color: var(--navy); margin-top: 8px; -webkit-line-clamp: unset; display: block; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #fff3e0; color: #9a6a00; text-transform: capitalize; vertical-align: middle; }
.split-grid.top { align-items: start; }
.listing-photos { display: grid; gap: 12px; }
.listing-photos img { width: 100%; border-radius: var(--radius); object-fit: cover; background: var(--bg-alt); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 20px; padding: 18px; background: var(--bg-alt); border-radius: var(--radius); }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; text-transform: capitalize; }
.specs { border-collapse: collapse; width: 100%; font-size: .95rem; }
.specs th, .specs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs th { width: 40%; color: var(--muted); font-weight: 600; }
.principal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.principal { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.principal img { max-height: 60px; width: auto; margin-bottom: 12px; }
.inquiry-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.inquiry-form .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.inquiry-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.inquiry-form .form-grid label { margin-bottom: 0; }
.inquiry-form input, .inquiry-form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); width: 100%; }
.inquiry-form input:focus, .inquiry-form textarea:focus, .filters select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.inquiry-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 6px; font-size: .95rem; }
.notice.success { background: #e3f4ea; color: #1f7a4d; }
.notice.error { background: #fdecea; color: #b42318; }

/* Power generation page */
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-pair figure, .gallery.captioned figure { margin: 0; }
.photo-pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.photo-pair figcaption, .gallery figcaption { font-size: .85rem; color: var(--muted); padding-top: 6px; }
.capability-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.capability-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.capability-group h3 { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 14px; }
.capability-group dt { font-weight: 700; color: var(--navy); margin-top: 12px; }
.capability-group dt:first-child { margin-top: 0; }
.capability-group dd { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.power-teaser .split-grid > img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.case-history { padding: 28px 0; border-bottom: 1px solid var(--border); }
.case-history:last-child { border-bottom: 0; }
.case-history > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.site-nav > a.btn { padding: .45em 1.1em; white-space: nowrap; }
.case-history .facts dd { text-transform: none; }
.spec-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.product-img img[src$="-datasheet.jpg"] { border: 1px solid var(--border); }
