/* ============================================
   GS M&E Engineering Pte Ltd — Site Stylesheet
   ============================================ */

:root {
  --cyan: #29b6d8;
  --cyan-dark: #1a92b0;
  --navy: #0f2436;
  --navy-2: #16324a;
  --gray-900: #1c242c;
  --gray-700: #4a5661;
  --gray-500: #7b8894;
  --gray-300: #d6dde2;
  --gray-100: #f2f5f7;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 36, 54, 0.09);
  --shadow-lg: 0 20px 50px rgba(15, 36, 54, 0.16);
  --container: 1180px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .6em;
}
p { margin: 0 0 1em; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--cyan); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

section { padding: 88px 0; }
@media (max-width: 768px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan-dark);
  background: rgba(41,182,216,.1);
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 16px;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); }
.section-head p { color: var(--gray-700); font-size: 17px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 14px 28px; border-radius: 100px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--cyan); color: #fff; box-shadow: 0 8px 20px rgba(41,182,216,.35); }
.btn-primary:hover { background: var(--cyan-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--gray-300); color: var(--navy); background: #fff; }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan-dark); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-whatsapp { background: #25D366; color: #fff; margin-top: 18px; width: 100%; }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-300);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 18px; color: var(--navy); letter-spacing: .01em; }
.brand-text small { font-size: 10px; letter-spacing: .12em; color: var(--gray-500); font-weight: 600; }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 10px 16px; border-radius: 100px;
  font-weight: 600; font-size: 15px; color: var(--gray-700);
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--gray-100); color: var(--navy); }
.main-nav a.is-active { background: var(--navy); color: #fff; }

.header-cta { display: flex; align-items: center; gap: 18px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); font-size: 15px; }
.header-phone svg { color: var(--cyan-dark); flex-shrink: 0; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: none; border: 1px solid var(--gray-300); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy); margin: 0 auto; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .header-phone span, .header-phone { display: none; }
  .main-nav {
    position: fixed; inset: 72px 16px auto 16px;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 12px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 13px 16px; }
  .nav-toggle { display: flex; }
  .header-cta .btn { padding: 12px 18px; font-size: 14px; }
}
@media (max-width: 560px) {
  .header-cta .header-phone { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  padding: 100px 0 80px;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(41,182,216,.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #0a1826 100%);
}
.hero > .hero-bg { display: none; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero-copy { max-width: 620px; }
.hero .eyebrow { background: rgba(255,255,255,.12); color: #bdeeff; }
.hero h1 { color: #fff; font-size: clamp(32px, 3.6vw, 52px); margin-bottom: .4em; }
.hero h1 span { color: var(--cyan); }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,.85); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 20px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,.18);
}
.hero-stats .stat b { display: block; font-family: var(--font-head); font-size: 30px; color: var(--cyan); }
.hero-stats .stat span { font-size: 13px; color: rgba(255,255,255,.75); }

.hero-visual { position: relative; }
.hero-visual .frame {
  position: relative; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.14);
  aspect-ratio: 4 / 4.6;
}
.hero-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,26,39,.55), transparent 45%);
}
.hero-visual .floating-card {
  position: absolute; left: -28px; bottom: 28px; z-index: 2;
  background: #fff; color: var(--navy); border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 14px; max-width: 250px;
}
.hero-visual .floating-card .ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: rgba(41,182,216,.12);
  color: var(--cyan-dark); display: flex; align-items: center; justify-content: center;
}
.hero-visual .floating-card b { display: block; font-family: var(--font-head); font-size: 15px; }
.hero-visual .floating-card span { font-size: 12.5px; color: var(--gray-700); }
.hero-visual .chip-tag {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  background: rgba(10,26,39,.55); backdrop-filter: blur(6px);
  color: #fff; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,.2);
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-visual .floating-card { left: 16px; bottom: 16px; }
  .hero-copy { max-width: none; }
}
@media (max-width: 560px) {
  .hero-visual .floating-card { display: none; }
}
@media (max-width: 768px) {
  .hero { padding: 90px 0 60px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Page header banner (inner pages) */
.page-hero {
  position: relative; color: #fff; padding: 76px 0 64px; overflow: hidden;
  background: linear-gradient(180deg, rgba(10,26,39,.82), rgba(10,26,39,.92)), var(--navy);
}
.page-hero .hero-bg { opacity: .35; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 46px); margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.8); max-width: 620px; font-size: 17px; margin: 0; }
.breadcrumb { font-size: 13px; color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 14px; }

/* ===== Cards / Grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.bg-alt { background: var(--gray-100); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }

/* Service cards */
.service-card {
  background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius);
  padding: 32px 28px; height: 100%; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.service-icon {
  width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(41,182,216,.1); color: var(--cyan-dark); margin-bottom: 20px;
}
.service-card h3 { font-size: 20px; }
.service-card p { color: var(--gray-700); font-size: 15px; margin-bottom: 14px; }
.service-card ul { margin-top: 10px; }
.service-card ul li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--gray-700); margin-bottom: 8px; }
.service-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan-dark); font-weight: 700; }
.service-card a.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--cyan-dark); margin-top: 8px; font-size: 14.5px; }

/* Detailed service block (services.php) */
.service-detail { padding: 70px 0; border-bottom: 1px solid var(--gray-300); }
.service-detail:last-child { border-bottom: none; }
.service-detail .tag { color: var(--cyan-dark); font-weight: 700; font-family: var(--font-head); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.service-detail img { border-radius: var(--radius); box-shadow: var(--shadow); }
.service-detail .grid-2.reverse > *:first-child { order: 2; }
.service-detail ul.checklist { margin-top: 18px; }
.service-detail ul.checklist li { display: flex; gap: 12px; margin-bottom: 12px; font-size: 15.5px; color: var(--gray-700); }
.service-detail ul.checklist li svg { flex-shrink: 0; color: var(--cyan-dark); margin-top: 3px; }
@media (max-width: 960px) {
  .service-detail .grid-2.reverse > *:first-child { order: 0; }
}

/* Feature list (about page) */
.feature-list li { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.feature-list .num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 14px;
}
.feature-list h4 { margin-bottom: 4px; font-size: 16.5px; }
.feature-list p { margin: 0; color: var(--gray-700); font-size: 15px; }

/* Mission / vision */
.mv-card { background: #fff; border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); border-top: 4px solid var(--cyan); height: 100%; }
.mv-card h3 { display: flex; align-items: center; gap: 10px; }
.mv-card p { color: var(--gray-700); }

/* Team */
.team-card { text-align: center; background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 28px 20px; }
.team-photo {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; display: block;
  object-fit: cover; border: 3px solid var(--gray-100); box-shadow: 0 0 0 3px var(--cyan);
}
.team-card h4 { margin-bottom: 2px; font-size: 17px; }
.team-card span { color: var(--cyan-dark); font-size: 13.5px; font-weight: 600; }

/* Clients */
.client-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.client-chip {
  display: flex; flex-shrink: 0; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--gray-300); border-radius: 14px;
  padding: 18px 26px; height: 92px; width: 190px;
}
.client-chip.is-dark { background: var(--navy); border-color: var(--navy); }
.client-chip img { max-height: 48px; max-width: 140px; object-fit: contain; }
.client-chip .client-text {
  font-family: var(--font-head); font-weight: 700; font-size: 17px; text-align: center;
  line-height: 1.25; color: var(--navy); letter-spacing: .01em;
}

/* Client logo marquee (auto-scrolling) */
.client-marquee {
  overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.client-track {
  display: flex; align-items: center; gap: 20px; width: max-content;
  animation: client-scroll 32s linear infinite;
}
.client-marquee:hover .client-track { animation-play-state: paused; }
@keyframes client-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .client-track { animation: none; }
}

/* Gallery */
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-caption {
  position: absolute; inset: auto 0 0 0; padding: 20px 18px 16px;
  background: linear-gradient(0deg, rgba(10,26,39,.92), rgba(10,26,39,0));
  color: #fff;
}
.gallery-caption .tag { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); font-weight: 700; margin-bottom: 4px; }
.gallery-caption h4 { color: #fff; margin: 0; font-size: 16px; }

/* Ongoing projects list */
.project-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: flex-start;
  padding: 26px 0; border-bottom: 1px solid var(--gray-300);
}
.project-row:last-child { border-bottom: none; }
.project-row .idx { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--gray-300); }
.project-row h4 { margin-bottom: 6px; }
.project-row p { color: var(--gray-700); margin: 0; font-size: 15px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  color: #1a8f4c; background: #e7f8ee; padding: 4px 12px; border-radius: 100px; margin-bottom: 8px;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1a8f4c; }

/* Accreditation badge block */
.accred-card {
  display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.accred-icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: #e7f8ee; color: #1a8f4c;
  display: flex; align-items: center; justify-content: center;
}
.accred-card h4 { margin-bottom: 2px; }
.accred-card p { margin: 0; color: var(--gray-700); font-size: 14.5px; }

/* Badge pill (footer) */
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: #7be3a8; background: rgba(123,227,168,.12); padding: 6px 14px; border-radius: 100px;
}

/* Testimonial */
.testimonial {
  text-align: center; max-width: 780px; margin: 0 auto; position: relative;
}
.testimonial .quote-mark { font-family: var(--font-head); font-size: 90px; color: var(--cyan); opacity: .3; line-height: 1; }
.testimonial p.quote { font-size: clamp(20px, 2.6vw, 28px); font-family: var(--font-head); font-weight: 600; color: var(--navy); margin-top: -30px; }
.testimonial .who { color: var(--gray-700); font-weight: 600; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: #fff; border-radius: 24px; padding: 56px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 560px; }
.cta-band .hero-actions { justify-content: center; }

/* Contact page */
.contact-card {
  display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.contact-card .ic {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: rgba(41,182,216,.1); color: var(--cyan-dark);
  display: flex; align-items: center; justify-content: center;
}
.contact-card h4 { margin-bottom: 4px; font-size: 15.5px; }
.contact-card p, .contact-card a { color: var(--gray-700); font-size: 14.5px; margin: 0; }

.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--gray-300); border-radius: 10px;
  font-family: var(--font-body); font-size: 15px; background: var(--gray-100); transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--gray-500); margin-top: 14px; }
.alert { padding: 16px 20px; border-radius: 12px; margin-bottom: 22px; font-size: 14.5px; font-weight: 500; }
.alert-success { background: #e7f8ee; color: #146c37; border: 1px solid #b7ecc9; }
.alert-error { background: #fdecec; color: #a51c1c; border: 1px solid #f5c2c2; }

.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-300); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* Back to top */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: #fff; border: none; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-col h3 { color: #fff; font-size: 15px; margin-bottom: 18px; }
.footer-brand p { font-size: 14.5px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14.5px; transition: color .15s ease; }
.footer-links a:hover { color: var(--cyan); }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.footer-contact svg { flex-shrink: 0; margin-top: 2px; color: var(--cyan); }
.footer-contact a:hover { color: var(--cyan); }
.footer-bottom { padding: 22px 24px; text-align: center; font-size: 13px; }
.site-footer .brand-text small { color: rgba(255,255,255,.55); }
.site-footer .brand-text strong { color: #fff; }

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

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
