/* ============================================================
   Enterprixe Software — site stylesheet
   Brand red sampled from images/EPX_Red_3015.png: #93282C
   ============================================================ */

:root {
  --brand: #93282c;
  --brand-bright: #b53338;
  --brand-dark: #6e1e21;
  --bg: #141416;
  --bg-alt: #1c1c1f;
  --surface: #232327;
  --surface-2: #2b2b30;
  --border: #3a3a40;
  --text: #e8e6e3;
  --text-muted: #a8a5a0;
  --heading: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-bright);
  text-decoration: none;
}

a:hover {
  color: #d4474d;
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.site-logo img {
  height: 22px;
  width: auto;
}

.nav-toggle,
.nav-toggle-label {
  display: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: #fff;
  border-bottom-color: var(--brand-bright);
  text-decoration: none;
}

.site-nav .lang-switch a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  color: var(--text-muted);
}

.site-nav .lang-switch a:hover {
  border-color: var(--brand-bright);
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  --hero-image: url("../images/optimized/rack1-1200.jpg");
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(20, 20, 22, 0.88) 0%, rgba(147, 40, 44, 0.45) 60%, rgba(20, 20, 22, 0.9) 100%),
    var(--hero-image) center / cover no-repeat;
}

@media (min-width: 1200px) {
  .hero {
    --hero-image: url("../images/optimized/rack1-2000.jpg");
  }
}

.hero-content {
  padding: 6rem 0;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}

.hero h1 .accent {
  color: var(--brand-bright);
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text);
  max-width: 620px;
  margin: 0 0 2.2rem;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--brand-bright);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.btn.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Sections ---------- */

section {
  padding: 5.5rem 0;
  scroll-margin-top: 80px;
}

section.alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-head .kicker {
  display: inline-block;
  color: var(--brand-bright);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

/* ---------- Cards & grids ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.2rem;
}

.card p {
  color: var(--text-muted);
  margin: 0;
}

.card ul {
  color: var(--text-muted);
  margin: 0;
  padding-left: 1.2rem;
}

.card ul li {
  margin-bottom: 0.35rem;
}

/* ---------- Split layout (image + text) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split .media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Stats ---------- */

.systems-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.systems {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.systems .chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

.stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.stat .label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.member {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.member:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark));
  box-shadow: 0 6px 18px rgba(147, 40, 44, 0.4);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.member h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2em;
}

.member .role {
  color: var(--brand-bright);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}

.member .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
}

.member a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.service {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s, border-color 0.2s;
}

.service:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.service .icon {
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark));
  box-shadow: 0 6px 16px rgba(147, 40, 44, 0.35);
}

.service .icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.service p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0;
}

.service.cta {
  background: linear-gradient(150deg, var(--brand-dark), var(--brand));
  border-color: var(--brand-bright);
}

.service.cta p {
  color: rgba(255, 255, 255, 0.85);
}

.service.cta a {
  color: #fff;
  font-weight: 700;
}

.tech-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.6rem;
}

.tech-note .lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0.6rem 0 0;
}

.tech-note .chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- IPR highlight ---------- */

.ipr-banner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.6rem 2rem;
}

.ipr-banner .icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(147, 40, 44, 0.18);
}

.ipr-banner .icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--brand-bright);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ipr-banner h3 {
  margin: 0 0 0.25em;
  font-size: 1.15rem;
}

.ipr-banner p {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .ipr-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Products ---------- */

.product {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product .product-logo {
  height: 40px;
  display: flex;
  align-items: center;
}

.product .product-logo img {
  max-height: 40px;
  width: auto;
}

.product .media img {
  border-radius: 10px;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product .more {
  margin-top: auto;
  font-weight: 700;
}

/* ---------- References ---------- */

.reference {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.reference + .reference {
  margin-top: 2rem;
}

.reference .media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
}

.reference .body {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.reference .body p {
  color: var(--text-muted);
}

.reference .badge {
  display: inline-block;
  background: rgba(147, 40, 44, 0.18);
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand-bright);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  margin-bottom: 0.9rem;
}

.reference .ref-logo {
  height: 34px;
  width: auto;
  margin-bottom: 1rem;
}

.reference .ref-logo.wide {
  height: auto;
  width: 130px;
}

.reference .ref-logo.invert {
  filter: brightness(0) invert(1);
}

.reference blockquote {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--brand);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.ref-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 1.6rem;
  margin: 0.4rem 0 1.2rem;
}

.ref-facts .fact .num {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}

.ref-facts .fact .label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.reference .more {
  margin-top: auto;
  font-weight: 700;
}

.reference.flip .media {
  order: 2;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.contact-grid iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
}

.contact-card h3 {
  font-size: 1.05rem;
  color: var(--brand-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.4rem 0 0.3rem;
}

.contact-card h3:first-child {
  margin-top: 0;
}

.contact-card p {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.5rem 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer img {
  height: 16px;
  width: auto;
  opacity: 0.8;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .reference, .contact-grid { grid-template-columns: 1fr; }
  .reference.flip .media { order: 0; }
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }

  /* Mobile nav (CSS only) */
  .nav-toggle-label {
    display: block;
    cursor: pointer;
    width: 28px;
    height: 22px;
    position: relative;
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s;
  }

  .nav-toggle-label span { top: 9px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 4%;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0;
    font-size: 1.05rem;
  }
}
