/* Energas Experts — site stylesheet */
:root {
  --ink: #141414;
  --ink-2: #3a3a3a;
  --muted: #6b6b6b;
  --paper: #ffffff;
  --paper-2: #f5f5f3;
  --line: #e4e4e1;
  --orange: #c8501e;
  --orange-2: #e8702e;
  --dark: #0b0b0b;
  --dark-2: #171717;
  --max: 1140px;
  --gutter: 16px;
  --font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
  font-weight: 600;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.95rem; }
.brand:hover { text-decoration: none; }
.brand .brand-logo { width: 38px; height: 44px; object-fit: contain; flex: none; }
.brand .sub { font-weight: 400; color: #9a9a9a; letter-spacing: 0.08em; }
.nav { display: flex; gap: 1.6rem; }
.nav a { color: #d8d8d8; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid #444; color: #fff; padding: 6px 10px; border-radius: 4px; font: inherit; }

/* Navigation menu (Software): opens on hover or keyboard focus, lists the applications */
.menu { position: relative; }
.menu-toggle { position: relative; padding-right: 1.1em; }
.menu-toggle::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 0.38em; height: 0.38em;
  border: solid #9a9a9a; border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg);
}
.menu-list {
  display: none; position: absolute; left: -1rem; top: calc(100% + 0.55rem); min-width: 13rem; z-index: 20;
  background: var(--dark); border: 1px solid #333; border-radius: 6px; padding: 0.4rem 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.menu-list::before { content: ""; position: absolute; left: 0; right: 0; top: -0.7rem; height: 0.7rem; }
.menu:hover .menu-list, .menu:focus-within .menu-list { display: block; }
.menu-list a { display: block; padding: 0.55rem 1rem; white-space: nowrap; }
.menu-list a:hover, .menu-list a[aria-current="page"] { background: #1f1f1f; color: #fff; text-decoration: none; }
.menu:has(a[aria-current="page"]) .menu-toggle { color: #fff; }

/* Rise-in: assets/js/reveal.js marks the elements, then adds .in when they scroll into view.
   A keyframe animation rather than a transition, so that once it has played the element's
   own transform is free again for the hover lift of the cards below. */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(2.5rem); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { opacity: 1; animation: none; } }

/* Hero */
.hero {
  position: relative; color: #fff; background: var(--dark) url("assets/img/bg-mesh.jpg") center / cover no-repeat;
  padding: clamp(4rem, 10vw, 8rem) 0;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.25) 100%); }
.hero .wrap { position: relative; }
.hero h1 { max-width: 15ch; }
.hero .lead { color: #d6d6d6; }
.hero .logo { width: min(360px, 70vw); margin-bottom: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.btn {
  display: inline-block; padding: 0.75rem 1.3rem; border-radius: 4px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-dark:hover { background: var(--ink); color: #fff; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--dark-2); color: #e9e9e9; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .lead { color: #c9c9c9; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
#services .card { border: 2px solid var(--orange); }
/* Hover: the card lifts and casts a deeper shadow, the services' orange frame brightens.
   Only on devices with a real pointer (no sticky hover on touch screens), and not for
   visitors who ask for reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-8px); box-shadow: 0 18px 38px rgba(0, 0, 0, 0.13); border-color: var(--orange); }
  #services .card:hover { border-color: var(--orange-2); box-shadow: 0 18px 38px rgba(200, 80, 30, 0.28); }
  .card .num { display: inline-block; transition: transform 0.3s ease; }
  .card:hover .num { transform: translateX(6px); }
}
.card .num { font-family: var(--mono); color: var(--orange); font-size: 0.85rem; margin-bottom: 0.6rem; display: block; }
.card ul { padding-left: 1.1rem; margin: 0.6rem 0 0; color: var(--ink-2); }
#about ul { padding-left: 1.1rem; margin: 0.6rem 0 0; color: var(--ink-2); }
.card li { margin-bottom: 0.3rem; }

/* Feature rows (image + text) */
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip .shot { order: 2; }
.feature .shot { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.feature ul { padding-left: 1.1rem; margin: 0; color: var(--ink-2); }
.feature li { margin-bottom: 0.45rem; }
.feature li strong { color: var(--ink); }
.caption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }

/* Product highlight */
.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.product .shot { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(0,0,0,0.12); }
.product .logo { width: 240px; margin-bottom: 1rem; }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.7em; height: 0.7em; background: var(--orange); transform: rotate(45deg); }

/* Tables and code */
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
pre {
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.45; overflow-x: auto;
  background: var(--dark-2); color: #e6e6e6; padding: 1.2rem; border-radius: 8px; margin: 0;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.stat { border-left: 3px solid var(--orange); padding-left: 1rem; }
.stat .value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat .label { color: var(--muted); font-size: 0.9rem; }

/* Portrait in the About block */
.portrait { margin: 1.8rem 0 0; max-width: 205px; }
.portrait img { border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.portrait figcaption { margin-top: 0.8rem; font-weight: 600; line-height: 1.3; }
.portrait figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.contact-list .k { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Footer */
.site-footer { background: var(--dark); color: #9a9a9a; padding: 2.5rem 0; font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.site-footer a { color: #cfcfcf; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 1.2rem; }
  .feature.flip .shot { order: 0; }
  .product { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 0; background: var(--dark); border-bottom: 1px solid #333; }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem var(--gutter); border-top: 1px solid #222; }
  .menu-toggle::after { display: none; }
  .menu-list { display: block; position: static; min-width: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .menu-list::before { display: none; }
  .nav .menu-list a { padding-left: calc(var(--gutter) + 1.4rem); }
  .nav-toggle { display: inline-block; }
  .brand .sub { display: none; }
}

/* Home page, Software: each application in a white box, like the rectangles of the
   Services without their frame; one above the other, KUSOR-3D first. */
.product-box { background: var(--paper); border-radius: 8px; padding: 2rem; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06); }
.product-box + .product-box { margin-top: 2rem; }
@media (max-width: 720px) { .product-box { padding: 1.2rem; } }

/* A product video (KUSOR-3D page): as wide as the page, 16:9, framed like the screenshots.
   The poster fills the frame until the visitor presses play; nothing is downloaded before. */
.product-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border-radius: 8px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18); }
.video-note { margin-top: 0.9rem; }
.section.dark .video-note { color: #a9a9a9; }
