/* =========================================================
   SG Tec Engineering — Theme / Design System
   Premium, modern, light. Engineering-blue accent.
   ========================================================= */

:root {
  /* Color tokens */
  --bg:           #ffffff;
  --bg-soft:      #f8fafc;
  --bg-softer:    #f1f5f9;
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-subtle:  #64748b;
  --accent:       #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft:  #eff6ff;
  --border:       #e2e8f0;
  --white:        #ffffff;
  --navy:         #0b1b3a;

  /* Typography */
  --font-head: "Poppins", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Radii & shadows */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow:    0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .25);
  --shadow-accent: 0 14px 30px -12px rgba(37, 99, 235, .5);

  /* Layout */
  --container: 1180px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.12;
  margin: 0 0 .4em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.section-head p { font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow--pill {
  background: var(--accent-soft);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
}

.text-muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.btn-light {
  background: #fff;
  color: var(--accent);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-lg { padding: 16px 32px; font-size: 1.02rem; }

.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================
   Navbar
   ========================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, .7);
  /* Raised 3D effect: inner top highlight + hairline edge + drop shadow */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    0 1px 0 rgba(15, 23, 42, .06),
    0 10px 28px -14px rgba(15, 23, 42, .35);
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-nav.is-scrolled {
  border-color: var(--border);
  background: rgba(255, 255, 255, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 1px 0 rgba(15, 23, 42, .08),
    0 16px 36px -16px rgba(15, 23, 42, .45);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), #4f8bff);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand small { display: block; font-size: .62rem; font-weight: 500; letter-spacing: .18em; color: var(--text-subtle); text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .96rem;
  color: var(--text-muted);
  position: relative;
  transition: color .18s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width .2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-dropdown-toggle .chevron { transition: transform .2s ease; }
.nav-dropdown:hover .nav-dropdown-toggle .chevron,
.nav-dropdown:focus-within .nav-dropdown-toggle .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  transform: translateX(-50%) translateY(6px);
  min-width: 230px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 16px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-links .nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .92rem;
  white-space: nowrap;
}
.nav-links .nav-dropdown-menu a::after { display: none; }
.nav-links .nav-dropdown-menu a:hover { background: var(--accent-soft); color: var(--accent); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.site-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.site-footer h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.site-footer p { color: #94a3b8; font-size: .96rem; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #cbd5e1; font-size: .96rem; transition: color .18s ease; }
.footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 14px; color: #cbd5e1; font-size: .95rem; }
.footer-contact svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; }
.footer-bottom {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .88rem;
  color: #94a3b8;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  transition: background .18s ease, transform .18s ease;
}
.footer-social a:hover { background: var(--accent); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; color: #fff; }

/* ---------- Responsive: nav + footer ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links,
  .nav-cta .btn { display: none; }
  .site-nav .nav-links {
    position: absolute;
    left: 0; right: 0; top: 76px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: #fff;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open .nav-links { display: flex; }
  .site-nav .nav-links a { width: 100%; padding: 12px 0; font-size: 1.05rem; }
  .site-nav .nav-links a::after { display: none; }

  /* Dropdown becomes an always-visible sub-list inside the mobile menu */
  .nav-dropdown { width: 100%; }
  .nav-dropdown::before { display: none; }
  .nav-dropdown-toggle { justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0 0 4px 16px;
  }
  .site-nav .nav-links .nav-dropdown-menu a { padding: 9px 0; font-size: .98rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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