/* Efficus Software — site styles (Webflow-free rebuild) */

:root {
  --accent: #006aff;
  --accent-hover: #3d8eff;
  --dark: #030303;
  --light: #ffffff;
  --light-secondary: #f4f4f4;
  --text: #030303;
  --text-secondary: rgba(3, 3, 3, 0.65);
  --text-on-dark: #ffffff;
  --text-on-dark-secondary: rgba(255, 255, 255, 0.7);
  --link-on-dark: #5695ff;
  --radius: 0.75rem;
  --container: 75rem;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 991px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

.subheading {
  font-size: 1.125rem;
  color: inherit;
  opacity: 0.85;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.section-header {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.button.on-inverse {
  background: #fff;
  color: var(--dark);
}

.button.on-inverse:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--dark);
}

/* ---------- Navigation ---------- */

.nav {
  background: var(--dark);
  color: var(--text-on-dark);
  position: relative;
  z-index: 100;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo img {
  width: 197px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  color: var(--text-on-dark);
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.5rem;
}

.nav-link:hover {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.feature-button {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

.nav-caret {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg) translateY(-2px);
}

/* Mega dropdown */

.nav-dropdown {
  position: static;
}

.mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.25rem);
  /* Align with the page content edges (container width minus its padding) */
  left: 1.5rem;
  right: 1.5rem;
  max-width: calc(var(--container) - 3rem);
  margin: 0 auto;
  background: #fff;
  color: var(--text);
  border-radius: 1.25rem;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
}

.nav-dropdown.open .mega-menu {
  display: block;
}

.mega-menu-inner {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 3fr 1.3fr;
  gap: 2.5rem;
}

.mega-menu-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.mega-menu .eyebrow {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.mega-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu li + li {
  margin-top: 1rem;
}

.mega-link {
  display: block;
  padding: 0.6rem 0.75rem;
  margin: -0.6rem -0.75rem;
  border-radius: 0.5rem;
  color: var(--text);
}

.mega-link:hover {
  background: var(--light-secondary);
  color: var(--text);
}

.mega-link strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
}

.mega-link small {
  display: block;
  max-width: 16.5rem;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(3, 3, 3, 0.7);
}

.mega-menu-card {
  background: var(--dark);
  color: var(--text-on-dark);
  border-radius: 1rem;
  padding: 2.5rem;
}

.mega-menu-card h3 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.mega-menu-card p {
  color: var(--text-on-dark-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0;
}

/* Mobile nav */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 991px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--dark);
    padding: 1rem 1.5rem 1.5rem;
    z-index: 99;
  }

  .nav.open .nav-menu {
    display: flex;
  }

  .mega-menu {
    position: static;
    max-width: none;
    box-shadow: none;
    border-radius: var(--radius);
    margin-top: 0.5rem;
  }

  .mega-menu-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .mega-menu-card {
    padding: 2rem;
  }

  .mega-menu-card h3 {
    font-size: 1.75rem;
  }

  .mega-menu-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
  color: var(--text-on-dark);
  /* Shrinks on short screens so the next section peeks into view */
  padding: clamp(3rem, 8vh, 5rem) 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Faint engineering grid, fading out from behind the image */
.hero::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 3rem 3rem;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 70% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 80% at 70% 50%, #000 0%, transparent 100%);
}

/* Accent glow behind the image */
.hero::after {
  background: radial-gradient(circle at 75% 50%, rgba(0, 106, 255, 0.22) 0%, transparent 40%);
}

.hero .subheading {
  color: var(--text-on-dark-secondary);
}

.hero a:not(.button) {
  color: var(--link-on-dark);
}

/* Set --hero-img-width (display width) and, for non-square images, --hero-img-ratio (width / height)
   on the img. Height is capped at 55vh so the next section peeks into view. */
.hero-image img {
  width: min(100%, var(--hero-img-width, 500px), 55vh * var(--hero-img-ratio, 1));
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto;
}

.hero .button-group {
  margin-top: 2rem;
}

/* For heroes without an image: centre the grid and glow */
.hero-centered::before {
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000 0%, transparent 100%);
}

.hero-centered::after {
  background: radial-gradient(circle at 50% 50%, rgba(0, 106, 255, 0.22) 0%, transparent 40%);
}

@media (max-width: 767px) {
  .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 75%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 60% at 50% 75%, #000 0%, transparent 100%);
  }
  .hero::after {
    background: radial-gradient(circle at 50% 75%, rgba(0, 106, 255, 0.22) 0%, transparent 55%);
  }
  .hero-centered::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 50%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 60% at 50% 50%, #000 0%, transparent 100%);
  }
  .hero-centered::after {
    background: radial-gradient(circle at 50% 50%, rgba(0, 106, 255, 0.22) 0%, transparent 55%);
  }
}

/* ---------- Cards ---------- */

.card {
  background: var(--light-secondary);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-body {
  padding: 2rem;
}

.card-body-small {
  padding: 1.5rem;
}

.card-image {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-image img {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: calc(var(--radius) - 0.25rem);
}

.gallery-image img {
  border-radius: var(--radius);
  width: 100%;
}

/* Feature grid (image + text card pairs) */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.feature-grid .card {
  display: flex;
  align-items: center;
}

@media (max-width: 767px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Product tiles (home) ---------- */

.product-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-tile > img {
  width: 200px;
  margin-bottom: 1.5rem;
}

.product-tile .tile-copy {
  flex: 1;
}

.product-tile .button {
  margin-top: auto;
}

/* ---------- Client logos ---------- */

.clients-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem 3.5rem;
  margin-top: 2.5rem;
}

.clients-wrapper img {
  height: 50px;
  width: auto;
}

/* ---------- Video embeds ---------- */

.video-container {
  max-width: 58rem;
  margin: 0 auto 2rem;
}

.video-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Feature list ---------- */

.feature-list {
  max-width: 56rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  font-size: 1.125rem;
}

.feature-list li {
  margin-bottom: 0.6rem;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid .input-full,
.form-grid .cf-turnstile,
.form-grid .button {
  grid-column: 1 / -1;
}

@media (max-width: 479px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.input-field {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font);
  font-size: 1rem;
  border: 1px solid rgba(3, 3, 3, 0.2);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--text);
}

.input-field:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

textarea.input-field {
  min-height: 8rem;
  resize: vertical;
}

.form-success,
.form-error {
  display: none;
  padding: 1.25rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.form-success {
  background: rgba(5, 170, 83, 0.12);
  color: #05713a;
}

.form-error {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--light-secondary);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-links {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.footer-links a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--text);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-logo img {
  width: 200px;
}

.subscribe-form {
  display: flex;
  gap: 0.75rem;
}

.subscribe-form .input-wrap {
  flex: 1;
}

@media (max-width: 479px) {
  .subscribe-form {
    flex-direction: column;
  }
}

.footer .divider {
  border-top: 1px solid rgba(3, 3, 3, 0.12);
  margin: 2.5rem 0 1.5rem;
}

.footer-bottom {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.privacy-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}
