/* ==========================================================================
   OEM Engine Solutions Ltd — shared stylesheet
   ========================================================================== */

:root {
  --color-bg: oklch(0.98 0.004 70);
  --color-text: oklch(0.22 0.01 250);
  --color-text-muted: oklch(0.4 0.01 250);
  --color-text-soft: oklch(0.35 0.01 250);
  --color-border: oklch(0.9 0.005 70);
  --color-border-strong: oklch(0.85 0.005 70);

  --color-navy: #1a2733;
  --color-navy-dark: #141d26;
  --color-navy-mid: #22303e;
  --color-panel-light: #e9e9e9;
  --color-panel-cream: #f3efe9;

  --color-yellow: #ffb71a;

  --color-white: #ffffff;
  --color-ink-on-yellow: #0e1113;
  --color-fog: #d8dee3;
  --color-fog-soft: #c3cbd2;
  --color-fog-muted: #8a97a1;

  --font-heading: 'Barlow Semi Condensed', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', Helvetica, Arial, sans-serif;

  --header-height: 78px;
  --mobile-header-height: 45px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --max-width: 1280px;
}

/* ---- Reset & base ---------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.1;
}

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

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

/* Visible focus outline everywhere for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 100;
  background: var(--color-white);
  color: var(--color-navy);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  overflow: visible;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- Header ------------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px 0px;
  background-color: rgba(20, 26, 31, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  max-width: var(--max-width);
  padding: 0 25px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--color-white);
}

.brand__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-white);
  letter-spacing: -0.5px;
}

.brand__tagline {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #c9c9c9;
  font-weight: 600;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav__link {
  font-weight: 600;
  font-size: 14px;
  color: #d0d0d0;
}

.nav__link:hover {
  color: var(--color-white);
}

.nav__link[aria-current='page'] {
  color: var(--color-white);
  font-weight: 700;
}
.nav__link[aria-current='page'].contact {
  color: var(--color-ink-on-yellow);
  font-weight: 700;
}
.nav__link[aria-current='page'].contact:hover {
  color: var(--color-white);
}

.nav__link--cta {
  color: var(--color-ink-on-yellow);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  background-color: var(--color-yellow);
}

.nav__link--cta:hover {
  background-color: var(--color-ink-on-yellow);
  color: var(--color-white);
}

/* ---- Mobile nav toggle -------------------------------------------------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile nav panel ---------------------------------------------------- */

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background-color: var(--color-navy-dark);
  padding: 8px 5vw 20px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.mobile-nav__link {
  padding: 14px 0;
  text-align: center;
  font-weight: 400;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav__link:last-child {
  border-bottom: 0;
}

.mobile-nav__link:hover {
  color: var(--color-white);
}

.mobile-nav__link[aria-current='page'] {
  color: var(--color-white);
  font-weight: 700;
}

@keyframes mobile-nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll-triggered fade-up ------------------------------------------ */

.card-grid,
.contact-grid,
.section--muted {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card-grid.is-visible,
.contact-grid.is-visible,
.section--muted.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-grid.is-visible .card {
  opacity: 1;
  transform: translateY(0);
}

.card-grid.is-visible .card:nth-child(1) { transition-delay: 0.10s; }
.card-grid.is-visible .card:nth-child(2) { transition-delay: 0.20s; }
.card-grid.is-visible .card:nth-child(3) { transition-delay: 0.30s; }
.card-grid.is-visible .card:nth-child(4) { transition-delay: 0.20s; }
.card-grid.is-visible .card:nth-child(5) { transition-delay: 0.30s; }
.card-grid.is-visible .card:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .card-grid,
  .contact-grid,
  .section--muted,
  .card-grid .card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--color-yellow);
  color: var(--color-ink-on-yellow);
}

.btn--primary:hover {
  background-color: var(--color-ink-on-yellow);
  color: var(--color-white);
}

.btn--outline {
  border-color: var(--color-white);
  color: var(--color-white);
  background: transparent;
}

.btn--outline:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.btn--accent {
  background-color: var(--color-yellow);
  color: var(--color-ink-on-yellow);
}

.btn--accent:hover {
  background-color: var(--color-ink-on-yellow);
  color: var(--color-white);
}

.btn--block {
  display: block;
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Sections ------------------------------------------------------------ */

.section {
  padding: 45px 5vw;
}

.section--home-services {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 25px;
  padding-right: 25px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.section--dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section--muted {
  background: var(--color-panel-light);
}

.section--cta {
  background: var(--color-navy-mid);
  text-align: center;
}

.section__tag {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 13px;
  margin: 0 0 5px;
}

.section__tag--dark {
  color: var(--color-yellow);
}

.section__tag--light {
  color: #16212a;
}

.section__title {
  font-size: clamp(28px, 3.5vw, 38px);
  margin: 0 0 35px;
}

.section__title--on-dark {
  color: var(--color-white);
}

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

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding-top: var(--header-height);
  background: var(--color-navy);
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15, 22, 29, 0.88) 0%, rgba(15, 22, 29, 0.6) 55%, rgba(15, 22, 29, 0.35) 100%);
}

.hero__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 25px;
  padding-bottom: 25px;
}

.hero__content {
  max-width: 640px;
}

.hero__tag {
  color: var(--color-yellow);
  font-weight: 600;
  letter-spacing: 0.4px;
  font-size: 16px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(36px, 5vw, 60px);
  color: var(--color-white);
  margin: 0 0 20px;
}

.hero__text {
  color: var(--color-fog);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 32px;
}

/* ---- Page header banner (About / Services / Contact) ------------------ */

.page-header {
  background: var(--color-navy);
  padding: calc(var(--header-height) + 40px) 0 60px;
}

.page-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 25px;
}

.page-header__tag {
  color: var(--color-yellow);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 13px;
  margin: 0 0 10px;
}

.page-header__title {
  color: var(--color-white);
  font-size: clamp(30px, 4vw, 44px);
  margin: 0;
  max-width: 760px;
}

/* ---- Card grids (services) --------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 20px;
}

.card-grid + .card-grid {
  margin-top: 20px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card__media {
  height: 220px;
  position: relative;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 39, 51, 0.1);
  pointer-events: none;
}

.card__body {
  padding: 25px;
}

.card__title {
  font-size: 20px;
  margin: 0 0 10px;
}

.card__text {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  font-size: 15px;
}

.card__text ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* ---- About page -------------------------------------------------------- */

.split {
  padding: 25px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.split__text p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text-soft);
  margin: 0 0 20px;
}

.split__text p:last-child {
  margin-bottom: 0;
}

.split__media {
  height: 340px;
}

.image-placeholder {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-panel-light);
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 600;
}

.info-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.info-card__title {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--color-navy);
}

.info-card__text {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  font-size: 15px;
}

/* ---- Contact / find-us section ------------------------------------------ */

.contact-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 320px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.contact-list {
  margin: 0;
}

.contact-list__item + .contact-list__item {
  margin-top: 18px;
}

.contact-list__label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-yellow);
}

.contact-list__value {
  margin: 0;
  font-size: 16px;
  color: var(--color-fog-soft);
}

.contact-list__value--name {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-white);
}

.contact-list__value a {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-white);
}

.contact-list__value a:hover {
  color: var(--color-yellow);
}

/* ---- Quick enquiry form -------------------------------------------------- */

.form-shell {
  max-width: 640px;
  margin: 0 auto;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__group {
  display: flex;
  flex-direction: column;
}

.form__label {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-text-soft);
}

.form__control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text);
}

textarea.form__control {
  resize: vertical;
}

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

.site-footer {
  margin-top: auto;
  background: var(--color-navy-dark);
  padding: 48px 5vw 28px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 17px;
  color: var(--color-white);
  line-height: 1.2;
}

.footer__meta {
  margin: 0;
  color: var(--color-fog-muted);
  font-size: 13px;
}

.footer__heading {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-yellow);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  color: var(--color-fog-soft);
  font-size: 14px;
  font-weight: 500;
}

.footer__links a:hover {
  color: var(--color-white);
}

.footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__contact span {
  color: var(--color-fog-soft);
  font-size: 14px;
}

.footer__contact a {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  text-decoration-line: underline;
}

.site-footer__bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__bottom span {
  color: var(--color-fog-muted);
  font-size: 13px;
}

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 860px) {

  .hero {
    min-height: 500px;
  }

  .brand__name {
    font-size: 18px;
  }
  .brand__tagline {
    font-size: 10px;
  }

  .page-header {
    padding: calc(var(--mobile-header-height) + 40px) 0 60px;
    padding-bottom:35px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split__media {
    height: 260px;
    order: -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Hide the inline links but keep the CTA visible in the header */
  .nav__link:not(.nav__link--cta) {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-nav:not([hidden]) {
    display: flex;
    animation: mobile-nav-in 0.2s ease;
  }
}

@media (max-width: 640px) {
  .brand__name {
    font-size:16px;
  }
  .site-header {
    padding: 14px 0px;
  }

  .brand__tagline {
    font-size: 9px;
  }

  .nav__link--cta {
    font-size:12px;
  }

  .nav {
    gap: 12px;
  }

  .nav__link.nav__link--cta {
    display:none;
  }

  .btn {
    padding: 14px 18px;
    font-size: 14px;
  }
}
