/* ==========================================================================
   RM2O Engineering Consultancy — Stylesheet
   ========================================================================== */

:root {
  --navy: #0a1e33;
  --navy-deep: #061421;
  --blue-800: #123258;
  --blue-700: #1a4a80;
  --blue-600: #2563a6;
  --blue-500: #2f7fc4;
  --cyan-500: #29abe2;
  --cyan-400: #4fc3f0;
  --cyan-300: #8adcf7;
  --ink: #16232f;
  --ink-soft: #4a5a68;
  --muted: #8496a3;
  --line: #e3e9ee;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-soft-2: #eef3f8;
  --white: #ffffff;
  --success: #2fa86c;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(10, 30, 51, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 30, 51, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 30, 51, 0.16);
  --shadow-glow: 0 0 0 1px rgba(41, 171, 226, 0.15), 0 20px 50px rgba(41, 171, 226, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --container: 1180px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.15;
  color: var(--navy);
  font-weight: 700;
}
p { margin: 0; line-height: 1.7; color: var(--ink-soft); }
button { font-family: inherit; cursor: pointer; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { position: relative; }

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-500);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--cyan-500);
  display: inline-block;
}
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head h2 .accent { color: var(--cyan-500); }
.section-head p { margin-top: 16px; font-size: 1.05rem; }
.section-pad { padding: 100px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.72); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn i, .btn svg { font-size: 0.85em; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  color: #fff;
  box-shadow: 0 12px 30px rgba(41, 171, 226, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(41, 171, 226, 0.45); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; transform: translateY(-3px); }
.btn-outline-dark {
  background: transparent;
  border-color: var(--line);
  color: var(--navy);
}
.btn-outline-dark:hover { border-color: var(--cyan-500); color: var(--cyan-500); transform: translateY(-3px); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 10px 20px; font-size: 0.82rem; }

/* Hexagon badge (page-number motif from the profile) */
.hex-badge {
  --s: 46px;
  width: var(--s);
  height: calc(var(--s) * 1.05);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.hex-deco { position: absolute; pointer-events: none; z-index: 0; }
.hex-outline {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 2px solid rgba(41, 171, 226, 0.35);
}
.hex-outline.solid-light { background: rgba(41, 171, 226, 0.06); border: none; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

.tag-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-head);
}
.tag-status.done { background: rgba(47, 168, 108, 0.12); color: var(--success); }
.tag-status.progress { background: rgba(41, 171, 226, 0.12); color: var(--cyan-500); }

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
#preloader.hide { opacity: 0; visibility: hidden; }
.loader-hex {
  width: 56px; height: 62px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-600));
  animation: pulseHex 1.1s ease-in-out infinite;
}
@keyframes pulseHex { 0%, 100% { transform: scale(0.85); opacity: .6; } 50% { transform: scale(1.05); opacity: 1; } }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 22px 0;
  transition: padding .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header.scrolled {
  padding: 12px 0;
  background: rgba(10, 22, 38, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 24px rgba(6, 20, 33, 0.25);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 46px;
  position: relative;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { font-family: var(--font-head); line-height: 1.05; }
.brand-text .rm { font-weight: 700; font-size: 1.28rem; color: #fff; letter-spacing: .01em; }
.brand-text .rm sub { font-size: 0.6em; }
.brand-text .sub { font-size: 0.62rem; letter-spacing: 0.16em; color: var(--cyan-400); text-transform: uppercase; font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: color .3s, background .3s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.09); }
.nav-links a.active { color: var(--cyan-400); background: rgba(41, 171, 226, 0.14); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: radial-gradient(circle at 15% 20%, #123a63 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: #fff;
  padding: 170px 0 90px;
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); color: #fff; }
.page-hero .crumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan-400); margin-bottom: 18px;
}
.page-hero .crumb .sep { color: rgba(255,255,255,0.35); }
.page-hero .crumb .cur { color: rgba(255,255,255,0.55); }
.page-hero p.lead { margin-top: 18px; max-width: 620px; font-size: 1.08rem; color: rgba(255,255,255,0.72); }
.page-hero .hex-deco { opacity: .5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.6); padding: 80px 0 0; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; position: relative; z-index: 1; }
.footer-brand p { color: rgba(255,255,255,0.55); margin-top: 16px; font-size: 0.92rem; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 20px; letter-spacing: .02em; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.55); transition: color .25s, padding-left .25s; display: inline-block; }
.footer-col ul li a:hover { color: var(--cyan-400); padding-left: 4px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: rgba(255,255,255,0.55); }
.footer-contact li i { color: var(--cyan-400); margin-top: 3px; width: 16px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center; transition: background .3s, border-color .3s, transform .3s;
}
.footer-social a:hover { background: var(--cyan-500); border-color: var(--cyan-500); transform: translateY(-3px); }
.footer-bottom {
  margin-top: 60px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; position: relative; z-index: 1;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--cyan-400); }

.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .35s, visibility .35s, transform .35s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-outline.desktop-only { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .section-pad { padding: 70px 0; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 82vw);
  background: var(--navy); z-index: 1100; padding: 100px 30px 40px;
  transform: translateX(100%); transition: transform .45s var(--ease);
  box-shadow: -20px 0 60px rgba(0,0,0,0.35);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  display: block; padding: 14px 0; font-family: var(--font-head); font-weight: 500;
  color: rgba(255,255,255,0.85); font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav a.active { color: var(--cyan-400); }
.mobile-nav-close {
  position: absolute; top: 26px; right: 26px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none; color: #fff; font-size: 1.1rem;
}
.nav-overlay {
  position: fixed; inset: 0; background: rgba(6,20,33,0.55); z-index: 1050;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.nav-overlay.show { opacity: 1; visibility: visible; }
