/* ============ SM ENGINEERING — Base / Design Tokens ============ */
:root {
  --crimson: #A81720;
  --crimson-dark: #8B1518;
  --navy: #0D1626;
  --accent-blue: #1E3A8A;
  --white: #FFFFFF;
  --gray-50: #F5F6F8;
  --gray-100: #E5E7EB;
  --gray-300: #9CA3AF;
  --gray-400: #6B7280;
  --body: #333333;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --container: 100%; /* full screen */
  --px: 0.75rem;
  --radius: 0.5rem; /* rounded-lg */
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

/* ============ Reset / Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.03em; line-height: 1.2; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============ Utilities ============ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--px); }
@media (min-width: 768px) { :root { --px: 2rem; } }

.d-flex { display: flex; }
.a-center { align-items: center; }
.j-between { justify-content: space-between; }
.gap { gap: 1rem; }
.text-center { text-align: center; }
.ico { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }
.ico-lg { width: 1.5rem; height: 1.5rem; }

/* ============ Sections ============ */
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
.gray { background: var(--white); }

.eyebrow { color: var(--crimson); font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 0.75rem; }
.title { font-size: 1.875rem; text-transform: uppercase; color: var(--body); }
@media (min-width: 768px) { .title { font-size: 2.25rem; } }

.section-head { text-align: center; margin-bottom: 3rem; }
.section-head .title { margin-bottom: 1rem; }
.underline { display: block; width: 4rem; height: 0.25rem; background: var(--crimson); margin: 0 auto 1rem; }
.subtitle { color: var(--gray-400); max-width: 42rem; margin: 0 auto; }
.divider-img { display: block; }
.divider-right { margin-left: auto; margin-right: calc(-1 * var(--px)); width: calc(60% + 2 * var(--px)); height: auto; }
.divider-left { margin-left: calc(-1 * var(--px)); width: calc(60% + 2 * var(--px)); height: auto; margin-top: 2.5rem; }

/* ============ 1. Top Utility Bar ============ */
.top-bar { background: var(--crimson); color: #fff; font-size: 0.8rem; height: 3.5rem; position: relative; z-index: 60; }
.top-bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; }
.top-bar-left { justify-self: start; display: flex; align-items: center; gap: 1.25rem; }
.top-bar-left .top-contact + .top-contact::before { content: ""; width: 1px; height: 18px; background: rgba(255,255,255,0.35); margin-right: 0.9rem; display: inline-block; vertical-align: middle; }
.top-bar-center { justify-self: center; }
.top-bar-right { justify-self: end; gap: 1rem; }
.top-bar-tagline { color: #fff; }
.follow-label { color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.top-contact { display: inline-flex; align-items: center; gap: 0.4rem; color: #fff; transition: color 0.2s; }
.top-contact:hover { color: rgba(255,255,255,0.8); }
.top-socials { display: flex; gap: 0.75rem; }
.top-socials a { color: #fff; transition: color 0.2s, transform 0.2s; display: inline-flex; }
.top-socials a:hover { color: #292929; transform: translateY(-1px); }
.top-bar-logo { display: block; height: 40px; width: auto; max-width: 90px; object-fit: contain; }
@media (max-width: 767px) {
  .top-bar { height: auto; min-height: 3rem; padding: 0.4rem 0; }
  .top-bar-inner { grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center; }
  .top-bar-center { display: none; }
  .top-bar-logo { height: 32px; }
  .follow-label { display: none; }
  .top-bar-left { min-width: 0; flex-wrap: wrap; row-gap: 0.25rem; gap: 0.25rem 0.75rem; }
  .top-bar-left .top-contact + .top-contact::before { display: none; }
  .top-contact { font-size: 0.72rem; white-space: nowrap; }
}
.btn-quote { background: var(--crimson); color: #fff; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.25rem 0.75rem; border-radius: 9999px; transition: background 0.2s; }
.btn-quote:hover { background: var(--crimson-dark); }

/* ============ 2. Navigation ============ */
.navbar { position: sticky; top: 0; z-index: 50; background: var(--white); transition: background 0.3s, box-shadow 0.3s; height: 4rem; }
.navbar.scrolled { background: var(--white); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.logo-chip { display: inline-flex; align-items: center; border-radius: var(--radius); padding: 0.35rem 0.75rem; background: none; border: none; transition: none; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.logo-mark { width: 2rem; height: 2rem; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { color: #fff; font-family: var(--font-heading); font-size: 1.1rem; letter-spacing: 0.05em; }
.logo-text small { color: rgba(255,255,255,0.85); font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; }
.logo-img { display: block; height: 48px; width: auto; max-width: 170px; object-fit: contain; }

.nav-menu { display: none; }
@media (min-width: 1024px) {
  .nav-menu { display: flex; align-items: center; gap: 0.25rem; }
  .nav-menu a { display: block; color: var(--body); text-transform: uppercase; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; padding: 0.5rem 0.75rem; border-radius: 0.25rem; position: relative; transition: background 0.2s; }
  .nav-menu a:hover { background: rgba(0,0,0,0.05); }
  .nav-menu a::after { content: ''; position: absolute; left: 50%; bottom: 0.2rem; transform: translateX(-50%); width: 0; height: 2px; background: var(--crimson); transition: width 0.3s; }
  .nav-menu a:hover::after { width: 70%; }
}

.hamburger { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger span { display: block; width: 1.5rem; height: 2px; background: var(--body); border-radius: 1px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 1024px) { .hamburger { display: none; } }

.mobile-menu { display: none; }
.mobile-menu.open { display: block; background: var(--white); box-shadow: 0 12px 24px rgba(0,0,0,0.12); border-top: 1px solid var(--gray-100); }
.mobile-menu a { display: block; color: var(--body); text-transform: uppercase; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-100); transition: background 0.2s; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: rgba(0,0,0,0.05); }

/* ============ 3. Hero Slider ============ */
.hero { position: relative; width: 100%; height: 85vh; min-height: 500px; overflow: hidden; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; }
.slide.active { opacity: 1; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.4), transparent); }
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-eyebrow { color: var(--crimson); font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.25em; margin-bottom: 1rem; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.hero-title { color: #fff; font-size: 2.25rem; text-transform: uppercase; margin-bottom: 1.5rem; line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.hero-sub { color: var(--gray-100); font-size: 1.1rem; max-width: 30rem; margin-bottom: 2rem; line-height: 1.6; }
@media (min-width: 768px) { .hero-title { font-size: 3.25rem; } .hero-sub { font-size: 1.15rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4rem; } }

.hero-cta { flex-wrap: wrap; }
.btn { display: inline-block; font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; font-size: 0.875rem; letter-spacing: 0.06em; padding: 0.9rem 2rem; border-radius: 0.375rem; transition: all 0.25s; }
.btn-solid { background: var(--crimson); color: #fff; }
.btn-solid:hover { background: var(--crimson-dark); }
.btn-outline { border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--body); }
.btn-white { background: #fff; color: var(--crimson); border: 2px solid #fff; }
.btn-white:hover { background: var(--gray-50); border-color: var(--gray-50); }

.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; background: rgba(0,0,0,0.3); color: #fff; border: none; cursor: pointer; width: 2.75rem; height: 2.75rem; border-radius: 9999px; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.slide-arrow:hover { background: rgba(0,0,0,0.55); }
.prev { left: 1rem; }
.next { right: 1rem; }
.hero-dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; gap: 0.5rem; }
.hero-dots button { width: 0.75rem; height: 0.75rem; border-radius: 9999px; border: none; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.hero-dots button.active { background: var(--crimson); width: 2rem; }

/* ============ 4. Why Choose Us ============ */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; margin-top: 2rem; }
@media (min-width: 1024px) { .why-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.why-img { overflow: hidden; }
.why-photo { display: block; width: 100%; height: auto; }
.lead { color: var(--gray-400); margin: 1.25rem 0; }
.highlight { color: var(--crimson); font-size: 1.15rem; margin-bottom: 2rem; border-left: 4px solid var(--crimson); padding-left: 1rem; }
.why-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .why-cards { grid-template-columns: 1fr 1fr; } }
.feature-card { display: flex; flex-direction: column; gap: 1rem; background: var(--gray-50); border-radius: var(--radius); padding: 1.5rem; text-align: center; transition: box-shadow 0.3s; }
.feature-card:hover { box-shadow: var(--shadow); }
.feature-card h3 { font-size: 0.875rem; text-transform: uppercase; color: var(--body); margin-bottom: 0.25rem; }
.feature-card p { color: var(--gray-400); font-size: 0.875rem; }
.fc-icon { width: 3.5rem; height: 3.5rem; background: rgba(168,23,32,0.1); border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: var(--crimson); margin: 0 auto; }

/* ============ Grids ============ */
.grid { display: grid; gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ============ 5. Services ============ */
.service-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column; transition: box-shadow 0.3s, transform 0.3s; height: 100%; }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.sc-icon { width: 3.5rem; height: 3.5rem; background: var(--crimson); border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 1.25rem; transition: transform 0.3s; }
.service-card:hover .sc-icon { transform: scale(1.1); }
.service-card h3 { font-size: 0.9375rem; text-transform: uppercase; margin-bottom: 0.75rem; }
.service-card p { color: var(--gray-400); font-size: 0.875rem; margin-bottom: 1rem; flex: 1; }
.read-more { color: var(--crimson); font-weight: 600; font-size: 0.875rem; transition: color 0.2s; }
.read-more:hover { color: var(--crimson-dark); }
.svc-img-grid { display: grid; grid-template-columns: 1fr; gap: 3rem 0; margin-top: 2.25rem; }
.svc-img-card { overflow: hidden; position: relative; transition: transform 0.4s; cursor: pointer; z-index: 1; }
.svc-img-card img { display: block; transition: transform 0.4s ease; }
.svc-img-card:hover img { transform: scale(1.1); }
@media (min-width: 768px) {
  .svc-img-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 0; }
  .svc-img-card { overflow: visible; }
  .svc-img-card img { width: 112%; max-width: none; }
  .svc-img-card:nth-child(odd) img { transform-origin: left center; }
  .svc-img-card:nth-child(even) img { transform-origin: right center; margin-left: -12%; }
  .svc-img-card:nth-child(odd) { z-index: 1; }
  .svc-img-card:nth-child(even) { z-index: 2; }
  .svc-img-card:hover img { transform: scale(1.1); z-index: 10; }
}

/* ============ 6. Projects ============ */
.proj-marquee { margin-top: 2rem; overflow: hidden; }
.proj-track { display: flex; gap: 1.5rem; width: max-content; animation: projScroll 30s linear infinite; }
.proj-btn { margin-top: 1.5rem; }
.prod-btn { margin-top: 1.5rem; }
.proj-marquee:hover .proj-track { animation-play-state: paused; }
@keyframes projScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.project-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3/4; width: 16rem; flex: 0 0 auto; cursor: pointer; transition: box-shadow 0.3s; }
.project-card:hover { box-shadow: var(--shadow-lg); }
.proj-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.5s; }
.project-card:hover .proj-img { transform: scale(1.05); }
.proj-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.2), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem; opacity: 0.95; transition: opacity 0.3s; }
.proj-overlay .tag { align-self: flex-start; background: var(--crimson); color: #fff; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.25rem 0.75rem; border-radius: 0.25rem; margin-bottom: 0.5rem; }
.proj-overlay h3 { color: #fff; text-transform: uppercase; font-size: 1rem; }

/* ============ 7. Products ============ */
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border-bottom: 2px solid transparent; text-align: center; transition: box-shadow 0.3s, border-color 0.3s; display: block; color: inherit; text-decoration: none; }
.product-card:hover { box-shadow: var(--shadow-lg); border-bottom-color: var(--crimson); }
.prod-img { aspect-ratio: 1.14/1; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--gray-50); transition: transform 0.3s; }
.product-card:hover .prod-img { transform: scale(1.05); }
.product-card h3 { font-size: 0.8125rem; text-transform: uppercase; padding: 1rem 0.75rem; }

/* ============ 8. Clients Marquee ============ */
.marquee { overflow: hidden; padding: 0.5rem 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 1rem; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.client { flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-width: 340px; padding: 0.75rem 1.5rem; background: var(--white); border-radius: var(--radius); height: auto; }
.client img { max-width: 520px; max-height: 17rem; width: auto; height: auto; object-fit: contain; }
.client:hover { }

/* ============ 9. CTA Band ============ */
.cta-band { background: var(--crimson); padding: 4rem 0; text-align: center; }
@media (min-width: 768px) { .cta-band { padding: 5rem 0; } }
.cta-title { color: #fff; font-size: 2rem; text-transform: uppercase; margin-bottom: 1rem; }
@media (min-width: 768px) { .cta-title { font-size: 3rem; } }
.cta-sub { color: rgba(255,255,255,0.85); font-size: 1.125rem; margin-bottom: 2rem; }

/* ============ 10. Footer ============ */
.footer { background: linear-gradient(rgba(13,22,38,0.94), rgba(13,22,38,0.94)), url('../images/footer-bg.jpg') center / cover no-repeat; color: var(--gray-300); }
.footer .container:first-child { padding-top: 4rem; padding-bottom: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; } }
.f-about p { font-size: 0.875rem; margin: 1.25rem 0; }
.logo-dark { margin-bottom: 1.25rem; }
.f-addr { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--gray-400); }
.f-addr .ico { color: var(--crimson); margin-top: 0.3rem; }
.f-col h4 { color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.25rem; }
.f-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.f-col ul a { font-size: 0.875rem; display: inline-flex; align-items: center; gap: 0.375rem; transition: color 0.2s; }
.f-col ul a::before { content: ''; width: 1px; height: 1px; background: rgba(168,23,32,0.5); }
.f-col ul a:hover { color: var(--crimson); }
.f-col ul a:hover::before { background: var(--crimson); }
.f-contact { gap: 1rem !important; }
.f-contact li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; }
.f-contact .ico { color: var(--crimson); margin-top: 0.3rem; }
.f-follow { color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.f-socials { display: flex; gap: 0.75rem; }
.f-socials a { width: 2.25rem; height: 2.25rem; background: rgba(255,255,255,0.1); border-radius: 9999px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.f-socials a:hover { background: var(--crimson); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 0; font-size: 0.75rem; color: var(--gray-400); }
.footer-bottom .container { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.dev-link { color: #3B82F6; font-weight: 600; }
.dev-link:hover { text-decoration: underline; }
@media (min-width: 768px) { .footer-bottom .container { flex-direction: row; justify-content: space-between; } }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ============ Responsive helpers ============ */
@media (min-width: 1024px) { .d-none-lg { display: flex; } }
.d-none-lg { display: none; }
@media (min-width: 768px) { .d-none-md { display: flex; } }
.d-none-md { display: none; }

/* ============ Mobile refinements ============ */
@media (max-width: 767px) {
  .navbar { height: 3.5rem; }
  .logo-img { height: 40px; }
  .hero { height: 70vh; min-height: 420px; }
  .hero-title { font-size: 1.85rem; }
  .hero-sub { font-size: 0.95rem; }
  .btn { padding: 0.8rem 1.4rem; font-size: 0.8125rem; }
  .project-card { width: 13rem; }
  .proj-track { gap: 1rem; }
  .why-grid { gap: 2rem; }
  .title { font-size: 1.6rem; }
  .subtitle { font-size: 0.95rem; }
  .cta-title { font-size: 1.6rem; }
  .footer .container:first-child { padding-top: 3rem; padding-bottom: 3rem; }
  .hamburger { padding: 0.4rem; }
  .hamburger span { width: 1.35rem; height: 2.5px; }
}
