/* ============================================================
   Unigroup Engineering — hand-written static clone
   Design tokens live in :root so a full retheme is one edit
   ============================================================ */
:root {
  --color-brand:        #ED1C24;
  --color-brand-hover:  #c81820;
  --color-ink:          #242424;
  --color-ink-muted:    #333333;
  --color-body:         #777777;
  --color-bg:           #ffffff;
  --color-bg-alt:       #f4f4f4;
  --color-dark:         #000000;
  --color-white:        #ffffff;
  --color-white-80:     rgba(255, 255, 255, 0.8);
  --color-line:         #e6e6e6;
  --color-social:       #69727d;

  --font-heading: "Poppins", Arial, Helvetica, sans-serif;
  --font-body:    "Lato", Arial, Helvetica, sans-serif;

  --container:   1200px;
  --gutter:      1.25rem;

  --topbar-h:    102px;
  --header-h:    102px;

  --shadow-sm:   0 2px 6px rgba(0, 0, 0, 0.08);
  --radius-btn:  2px;
  --transition:  180ms ease;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--color-ink); margin: 0; }
p { margin: 0 0 1em; }

/* ---------- utilities ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================
   HEADER (fixed at top on every page — dark on all pages)
   ============================================================ */
.site-header {
  position: sticky; top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-dark);
  color: var(--color-white);
  height: var(--header-h);
  transition: background-color 220ms ease;
}
/* Home page: header overlays the hero image (fixed + transparent), and
   darkens to #212121 once the user scrolls past the top. Other pages
   keep the default solid-black sticky chrome. */
body[data-page="home"] .site-header {
  position: fixed;
  background: transparent;
}
body[data-page="home"] .site-header.is-scrolled { background: #212121; }
/* Hero starts at y=0 on the home page so the header overlays the image */
body[data-page="home"] main { margin-top: 0; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 70px; width: auto; }
/* Home page renders the big UNIGROUP logo inside the hero, so remove the
   header logo entirely (both desktop and mobile). */
body[data-page="home"] .site-header__logo { display: none; }

/* ---- primary nav ---- */
.primary-nav { display: flex; align-items: center; }
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav__link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0;
}
.primary-nav__link:hover,
.primary-nav__link.is-active {
  color: var(--color-brand);
}
.primary-nav__caret {
  width: 10px; height: 10px;
  fill: currentColor;
  transition: transform var(--transition);
}
.primary-nav__item--has-children { position: relative; }
.primary-nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-dark);
  border-top: 2px solid var(--color-brand);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 110;
}
.primary-nav__submenu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.primary-nav__submenu a:hover { color: var(--color-brand); }
.primary-nav__item--has-children:hover > .primary-nav__submenu,
.primary-nav__item--has-children:focus-within > .primary-nav__submenu,
.primary-nav__item--has-children[aria-expanded="true"] > .primary-nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav__item--has-children[aria-expanded="true"] .primary-nav__caret {
  transform: rotate(180deg);
}

/* ---- mobile hamburger ---- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  color: var(--color-white);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; top: -7px; left: 0; }
.nav-toggle__bar::after  { position: absolute; top:  7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { top: 0; transform: rotate(-45deg); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-dark);
  color: var(--color-white-80);
  text-align: center;
  padding: 2.25rem 1rem 2rem;
}
.site-footer__copy {
  font-size: 14px;
  color: var(--color-white-80);
  margin: 0 0 1.25rem;
}
.site-footer__social {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: color var(--transition), transform var(--transition);
}
.site-footer__social a:hover {
  color: var(--color-brand);
  transform: translateY(-2px);
}
.site-footer__social svg { width: 25px; height: 25px; fill: currentColor; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.75rem;
  border: 2px solid var(--color-white);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { background: var(--color-white); color: var(--color-dark); }
.btn--primary {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  color: var(--color-white);
}
.btn--ghost-dark {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--ghost-dark:hover {
  background: var(--color-white);
  color: var(--color-dark);
  border-color: var(--color-white);
}
.btn__icon { width: 1em; height: 1em; fill: currentColor; }

/* ============================================================
   SECTION HEADING (red underline accent)
   ============================================================ */
.section-heading {
  text-align: center;
  margin: 0 auto 2rem;
}
.section-heading__title {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 0.75rem;
}
.section-heading--sm .section-heading__title { font-size: 22px; }
.section-heading--md .section-heading__title { font-size: 36px; line-height: 1.15; }
.section-heading--lg .section-heading__title { font-size: 44px; line-height: 1.1; }
.section-heading__rule {
  display: inline-block;
  width: 42px;
  height: 3px;
  background: var(--color-brand);
  border-radius: 2px;
}
.section-heading--on-dark .section-heading__title { color: var(--color-white); }

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 620px;
  /* Top padding accounts for the fixed transparent header on home. */
  padding: calc(var(--header-h) + 2rem) 1rem 3rem;
  color: var(--color-white);
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("/assets/images/hero-workshop.png") center/cover no-repeat #101010;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 900px;
}
.hero__logo {
  max-width: 560px;
  width: 100%;
  height: auto;
  margin: 0 auto 0.5rem;
}
.hero__tagline {
  font-family: var(--font-heading);
  font-size: 50px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-white);
  margin: 0.5rem 0 0.75rem;
}
.hero__est {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand);
  letter-spacing: 0.02em;
  margin: 0.5rem 0 1rem;
}
.hero__cta { margin-top: 0.5rem; }

/* ============================================================
   HOME — SERVICES GRID
   ============================================================ */
.services {
  padding: 4rem 1rem 5rem;
  background: var(--color-white);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
  max-width: var(--container);
  margin: 0 auto;
}
.service-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.service-card__tile {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 268 / 300;
  object-fit: contain;
  transition: transform var(--transition);
}
.service-card:hover .service-card__tile { transform: translateY(-4px); }
.service-card__copy {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-body);
  margin: 0 auto;
  max-width: 260px;
  padding: 0 0.25rem;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about {
  padding: 4rem 1rem 5rem;
  background: var(--color-white);
}
.about__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.about__body p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-body);
  margin: 0 auto 1.5rem;
  max-width: 900px;
}
.about__closing {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-body);
  font-style: italic;
  margin: 1rem 0 2rem;
}
.about__cta { margin: 1rem 0 3rem; }
.about__cars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
  max-width: 900px;
  margin: 2rem auto 0;
}
.about__cars img { width: 100%; height: auto; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("/assets/images/contact-bg.jpg") center/cover no-repeat #0a0a0a;
  color: var(--color-white);
  padding: 3.5rem 1rem 4rem;
}
.contact-hero__title {
  text-align: center;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.contact-hero__rule {
  display: block;
  width: 42px;
  height: 3px;
  background: var(--color-brand);
  margin: 0 auto 2.5rem;
}
.contact-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.contact-block {
  background: rgba(0, 0, 0, 0.55);
  padding: 2rem 2rem 2.25rem;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.contact-block__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-white);
  margin: 0 0 1.5rem;
}
.contact-map {
  width: 100%;
  aspect-ratio: 500 / 400;
  border: 0;
  background: #333;
  margin-bottom: 1.5rem;
}
.contact-info { font-family: var(--font-body); font-size: 14px; color: var(--color-white); line-height: 1.75; }
.contact-info__line { margin: 0 0 0.35rem; }
.contact-info__line strong { font-weight: 600; }
.contact-info__note { color: var(--color-white); font-size: 14px; margin: 0.75rem 0; }
.contact-info__email { color: var(--color-white); font-weight: 600; }
.contact-info__email:hover { color: var(--color-brand); }

/* ---- contact form ---- */
.contact-form { display: grid; gap: 1rem; }
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form label { display: block; }
.contact-form span {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 0.35rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-btn);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--color-brand); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form__submit {
  justify-self: start;
  margin-top: 0.5rem;
}

/* ---- Stay in touch ---- */
.stay-in-touch {
  position: relative;
  color: var(--color-white);
  padding: 4rem 1rem 4.5rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
    url("/assets/images/stay-in-touch-bg.jpg") center/cover no-repeat #0a0a0a;
  text-align: center;
}
.stay-in-touch__title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  color: var(--color-white);
  margin: 0 0 0.6rem;
}
.stay-in-touch__rule {
  display: block;
  width: 42px;
  height: 3px;
  background: var(--color-brand);
  margin: 0 auto 1rem;
}
.stay-in-touch__lead {
  font-size: 14px;
  color: var(--color-white-80);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.social-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.social-card { text-align: center; text-decoration: none; color: var(--color-white); padding: 0.5rem; }
.social-card__icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.social-card__icon { width: 38px; height: 38px; fill: currentColor; display: block; }
.social-card__title { font-family: var(--font-heading); font-size: 22px; font-weight: 600; color: var(--color-white); letter-spacing: 0.02em; margin: 0 0 0.35rem; text-transform: uppercase; }
.social-card__sub { font-family: var(--font-body); font-size: 14px; color: var(--color-white); margin: 0; text-transform: uppercase; letter-spacing: 0.03em; }

/* ============================================================
   SOCIAL LANDING PAGES (Instagram / Facebook / Youtube)
   ============================================================ */
.social-landing {
  padding: 4rem 1rem 5rem;
  background: var(--color-white);
  text-align: center;
}
.social-landing__inner { max-width: 900px; margin: 0 auto; }
.social-landing__lead {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-body);
  margin: 1.5rem auto 2.5rem;
  max-width: 720px;
}
.social-landing__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.youtube-panel {
  padding: 4rem 1rem 5rem;
  background: var(--color-bg-alt);
}
.youtube-panel__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.youtube-panel__image img { width: 100%; height: auto; }
.youtube-panel__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 0.75rem;
}
.youtube-panel__rule {
  display: block;
  width: 42px;
  height: 3px;
  background: var(--color-brand);
  margin: 0 0 1.5rem;
}
.youtube-panel__body p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-body);
  margin: 0 0 1em;
  line-height: 1.7;
}
.youtube-panel__body a { color: var(--color-brand); font-weight: 600; }
.youtube-panel__body a:hover { text-decoration: underline; }

/* ============================================================
   THANKS PAGE
   ============================================================ */
.thanks-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
  background: var(--color-white);
}
.thanks-page h1 { font-size: 36px; margin: 0 0 1rem; color: var(--color-ink); }
.thanks-page p { font-size: 16px; color: var(--color-body); margin: 0 0 1.5rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-cards { grid-template-columns: repeat(2, 1fr); }
  .hero__tagline { font-size: 40px; }
}

@media (max-width: 768px) {
  :root { --header-h: 72px; }
  /* Mobile inner-page layout: hamburger left, small logo right */
  .site-header__logo { order: 2; }
  .site-header__logo img { height: auto; max-height: 34px; max-width: 170px; width: auto; }
  .nav-toggle { order: 1; margin-right: auto; }

  .nav-toggle { display: inline-flex; }

  /* Mobile nav = fixed left sidebar, slides in from the left with white bg */
  .primary-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82vw;
    max-width: 320px;
    background: #ffffff;
    color: var(--color-ink);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 300ms ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    z-index: 300;
    padding-top: 1rem;
    align-items: stretch;
  }
  body.menu-open .primary-nav,
  .primary-nav.open { transform: translateX(0); }

  /* Backdrop for tap-to-close */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
    z-index: 190;
    pointer-events: none;
  }
  body.menu-open::after {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  body.menu-open { overflow: hidden; }
  /* When drawer is open, hide the header's own chrome (bg + logo) so it
     doesn't render above the menu — but keep the nav visible (the drawer
     itself lives inside .site-header in the DOM). */
  body.menu-open .site-header { background: transparent; }
  body.menu-open .site-header__logo,
  body.menu-open .nav-toggle { visibility: hidden; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }
  .primary-nav__link {
    color: var(--color-ink);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    justify-content: space-between;
    width: 100%;
  }
  .primary-nav__link:hover,
  .primary-nav__link.is-active { color: var(--color-brand); }
  .primary-nav__submenu {
    position: static;
    background: rgba(0, 0, 0, 0.04);
    border-top: 0;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
  }
  .primary-nav__item--has-children[aria-expanded="true"] > .primary-nav__submenu {
    max-height: 400px;
  }
  .primary-nav__submenu a {
    color: var(--color-ink);
    padding: 0.85rem 2.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .primary-nav__submenu a:hover { color: var(--color-brand); }

  .hero {
    min-height: 600px;
    height: 600px;
    padding: var(--header-h) 1rem 1rem;
    align-items: center;
    justify-content: center;
  }
  .hero__inner { justify-content: center; }
  .hero__logo { max-width: 320px; }
  .hero__tagline { font-size: 26px; }

  .section-heading--md .section-heading__title { font-size: 28px; }

  .services__grid { grid-template-columns: 1fr; gap: 2rem; }
  .services { padding-top: 3rem; padding-bottom: 3.5rem; }

  .about__cars { grid-template-columns: 1fr; gap: 1.5rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-form__row { grid-template-columns: 1fr; }

  .social-cards { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .youtube-panel__grid { grid-template-columns: 1fr; }
  .youtube-panel__title { font-size: 28px; }
}
