/* ============================================================
   GDIS — GD Instruments Services
   Shared design system  ·  NABL CC-2043 · ISO/IEC 17025:2017
   ============================================================ */

:root {
  --navy:        #0A1628;
  --navy-mid:    #112240;
  --navy-light:  #1E3A5F;
  --steel:       #2D4A6E;
  --accent:      #C8A96E;
  --accent-light:#E4C99A;
  --accent-pale: #F7F0E3;
  --white:       #FFFFFF;
  --off-white:   #F8F6F2;
  --gray-100:    #F0EDE8;
  --gray-200:    #E2DDD6;
  --gray-400:    #A8A098;
  --gray-600:    #6B6560;
  --gray-800:    #2E2B27;
  --text-primary:  #0A1628;
  --text-secondary:#4A5568;
  --text-muted:    #718096;
  --border:        rgba(10,22,40,0.10);
  --border-light:  rgba(10,22,40,0.06);
  --nabl-blue:   #003087;
  --nabl-red:    #C41E3A;
  --green:       #22c55e;
  --radius:    4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-sm: 0 1px 3px rgba(10,22,40,0.06);
  --shadow-md: 0 8px 30px rgba(10,22,40,0.08);
  --shadow-lg: 0 24px 60px rgba(10,22,40,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
.serif { font-family: 'DM Serif Display', Georgia, serif; }
.mono  { font-family: 'JetBrains Mono', monospace; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-family: 'DM Serif Display', serif; font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 400; }
h2 { font-family: 'DM Serif Display', serif; font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 400; }
h3 { font-family: 'DM Sans', sans-serif; font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.75; }
a  { color: inherit; }

::selection { background: var(--accent); color: var(--navy); }

/* ── LAYOUT ── */
.container      { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.section-eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--navy); text-decoration: none;
  padding: 0.85rem 2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
  transition: all 0.2s var(--transition); position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transition: left 0.6s var(--transition);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200,169,110,0.3); }
.btn-primary:hover::after { left: 130%; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  font-weight: 400; font-size: 0.95rem; border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s; cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.55); color: var(--white); transform: translateY(-1px); }

.btn-dark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--navy); color: var(--white); text-decoration: none;
  padding: 0.85rem 2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
  transition: all 0.2s var(--transition);
}
.btn-dark:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   NAVBAR  (injected by components.js)
   ============================================================ */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 2rem; height: 68px; display: flex; align-items: center;
  background: rgba(10,22,40,0.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,169,110,0.15);
  transition: height 0.3s var(--transition), background 0.3s var(--transition);
}
nav.site-nav.scrolled { height: 58px; background: rgba(10,22,40,0.99); box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
.nav-inner { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; flex-shrink: 0; }
.logo-mark {
  height: 42px; width: auto; display: block; flex-shrink: 0;
  transition: transform 0.3s var(--transition);
}
nav.site-nav.scrolled .logo-mark { height: 36px; }
.nav-logo:hover .logo-mark { transform: scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-weight: 600; font-size: 0.9rem; color: var(--white); letter-spacing: 0.01em; }
.logo-sub  { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a {
  display: block; padding: 0.5rem 0.85rem; color: rgba(255,255,255,0.75);
  text-decoration: none; font-size: 0.875rem; border-radius: var(--radius);
  transition: color 0.2s, background 0.2s; white-space: nowrap; position: relative;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 2px;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}
.nav-cta {
  background: var(--accent); color: var(--navy) !important; font-weight: 600 !important;
  padding: 0.5rem 1.25rem !important; border-radius: var(--radius) !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--accent-light) !important; transform: translateY(-1px); }
.nav-cta.active::after { display: none; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 6px; z-index: 110;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s var(--transition); }
.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); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 320px);
    flex-direction: column; align-items: stretch; gap: 0.25rem;
    background: var(--navy-mid); padding: 5.5rem 1.5rem 2rem;
    transform: translateX(105%); transition: transform 0.35s var(--transition);
    box-shadow: -20px 0 60px rgba(0,0,0,0.4); border-left: 1px solid rgba(200,169,110,0.15);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 0.85rem 1rem; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero {
  background: var(--navy); position: relative; overflow: hidden;
  padding: 9rem 0 4.5rem; color: var(--white);
}
.page-hero .hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(200,169,110,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,0.045) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero .hero-glow {
  position: absolute; width: 600px; height: 600px; pointer-events: none;
  background: radial-gradient(circle, rgba(200,169,110,0.10) 0%, transparent 70%);
  top: -180px; right: -120px;
}
.page-hero .hero-glow-2 {
  position: absolute; width: 480px; height: 480px; pointer-events: none;
  background: radial-gradient(circle, rgba(29,82,160,0.18) 0%, transparent 70%);
  bottom: -200px; left: -120px;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.breadcrumb { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 { color: var(--white); max-width: 780px; }
.page-hero h1 em { color: var(--accent); font-style: italic; }
.page-hero-sub { color: rgba(255,255,255,0.62); font-size: 1.12rem; max-width: 620px; margin-top: 1.25rem; }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--transition), transform 0.7s var(--transition); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ── TRUST BAR ── */
.trust-bar { background: var(--off-white); border-bottom: 1px solid var(--border-light); padding: 1rem 0; }
.trust-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.trust-icon { width: 28px; height: 28px; background: var(--navy); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-icon svg { width: 14px; height: 14px; }
.trust-label { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.3; }
.trust-label strong { display: block; color: var(--text-primary); font-weight: 600; font-size: 0.85rem; }
.trust-divider { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }

/* ── CARD GRID (services / disciplines) ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-light); border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; }
.disc-card {
  background: var(--white); padding: 2rem 1.75rem; text-decoration: none;
  display: flex; flex-direction: column; transition: background 0.25s; position: relative; overflow: hidden;
}
.disc-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--transition); }
.disc-card:hover { background: var(--off-white); }
.disc-card:hover::after { transform: scaleX(1); }
.disc-icon { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--accent-pale); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; color: var(--navy); transition: transform 0.3s var(--transition); }
.disc-card:hover .disc-icon { transform: translateY(-3px) scale(1.05); }
.disc-icon svg { width: 22px; height: 22px; }
.disc-card h3 { color: var(--text-primary); margin-bottom: 0.5rem; }
.disc-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; flex-grow: 1; }
.disc-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.04em; display: flex; align-items: center; gap: 0.4rem; }
.disc-arrow { margin-left: auto; color: var(--text-muted); transition: transform 0.3s var(--transition), color 0.3s; }
.disc-card:hover .disc-arrow { transform: translateX(4px); color: var(--accent); }

/* ── STATS STRIP ── */
.stats { background: var(--navy); color: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(200,169,110,0.12); border: 1px solid rgba(200,169,110,0.12); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 2.25rem 1.75rem; background: var(--navy-mid); }
.stat-num { font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 0.6rem; }

/* ── FOOTER (injected by components.js) ── */
footer.site-footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 4rem 0 0; }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .logo-name { font-size: 1rem; }
.footer-about { font-size: 0.88rem; line-height: 1.7; margin: 1rem 0 1.25rem; max-width: 320px; color: rgba(255,255,255,0.55); }
.footer-badge { display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.05em; color: var(--accent); border: 1px solid rgba(200,169,110,0.25); padding: 0.4rem 0.75rem; border-radius: var(--radius); }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1.1rem; font-weight: 600; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.88rem; padding: 0.3rem 0; transition: color 0.2s, padding-left 0.2s; }
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom { max-width: 1200px; margin: 3rem auto 0; padding: 1.5rem 2rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.footer-bottom a { color: var(--accent); text-decoration: none; }

/* ── WHATSAPP FLOAT (injected) ── */
.whatsapp-float { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90; }
.whatsapp-btn {
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4); transition: transform 0.25s var(--transition);
}
.whatsapp-btn:hover { transform: scale(1.1) translateY(-2px); }
.whatsapp-btn svg { width: 28px; height: 28px; }
.whatsapp-btn::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: ring 2.2s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }

/* ── FORMS ── */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.field label .req { color: var(--nabl-red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.95rem; font-family: inherit; font-size: 0.92rem;
  color: var(--text-primary); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,169,110,0.15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.75rem; }
.form-msg { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.88rem; display: none; }
.form-msg.success { display: block; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #15803d; }
.form-msg.error   { display: block; background: rgba(196,30,58,0.08); border: 1px solid rgba(196,30,58,0.25); color: var(--nabl-red); }

/* ── CTA BANNER ── */
.cta-banner { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.cta-banner .hero-glow { position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(200,169,110,0.12) 0%, transparent 70%); top: -150px; right: -80px; pointer-events: none; }
.cta-inner { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto; }
.cta-inner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-inner h2 em { color: var(--accent); font-style: italic; }
.cta-inner p { color: rgba(255,255,255,0.65); margin-bottom: 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .card-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
  .card-grid > .disc-card:nth-last-child(2) { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-inner { justify-content: flex-start; gap: 1.25rem 1.5rem; }
  .trust-divider { display: none; }
  .trust-item { flex: 1 1 calc(50% - 1.5rem); min-width: 0; }
}
@media (max-width: 600px) {
  .container, .container-wide, .page-hero-inner, .trust-inner { padding: 0 1.25rem; }
  .trust-item { flex: 1 1 100%; }
  section { padding: 3.5rem 0; }
  .card-grid, .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .page-hero { padding: 7.5rem 0 3.5rem; }
}

/* ============================================================
   MOTION ENHANCEMENTS  (added)
   Refined, on-brand micro-animations applied site-wide.
   Every new animation is disabled under prefers-reduced-motion
   in the dedicated block at the very bottom of this file.
   ============================================================ */

/* ── Richer scroll reveal: subtle blur-in + extra stagger steps ── */
.reveal {
  filter: blur(8px);
  transition: opacity 0.8s var(--transition),
              transform 0.8s var(--transition),
              filter 0.8s var(--transition);
}
.reveal.visible { filter: blur(0); }
.reveal.d5 { transition-delay: 0.40s; }
.reveal.d6 { transition-delay: 0.48s; }

/* ── Page hero: slow drifting light wash + breathing glows ── */
.page-hero::before {
  content: ''; position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 28% 22%, rgba(200,169,110,0.07), transparent 42%);
  animation: heroDrift 22s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(5%, 3%, 0); }
}
.page-hero .hero-glow,
.page-hero .hero-glow-2,
.cta-banner .hero-glow { animation: glowBreath 9s ease-in-out infinite; }
.page-hero .hero-glow-2 { animation-delay: -4.5s; }
@keyframes glowBreath { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

/* ── Navbar drops in gently on load ── */
nav.site-nav { animation: navDrop 0.6s var(--transition) backwards; }
@keyframes navDrop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
/* On mobile the nav contains the fixed slide-in menu panel; a transform on the
   nav would re-root that fixed panel to the navbar instead of the viewport,
   collapsing its background. So the drop-in entrance is desktop-only. */
@media (max-width: 900px) {
  nav.site-nav { animation: none; }
  /* The navbar's backdrop-filter (and any transform/filter) makes it a
     containing block for the fixed menu panel, so top:0/bottom:0 would size
     the panel to the navbar, not the screen. Pin an explicit viewport height
     so the panel + its solid background always cover the full screen. */
  .nav-links {
    height: 100vh;            /* fallback */
    height: 100dvh;
    overflow-y: auto;         /* scroll if the menu is taller than the screen */
    background: var(--navy-mid);
  }
}

/* ── Section eyebrow: the accent rule draws itself in on reveal ── */
.reveal .section-eyebrow::before { width: 0; transition: width 0.6s 0.25s var(--transition); }
.reveal.visible .section-eyebrow::before { width: 20px; }

/* ── Dark button gets the same light-sweep as the primary button ── */
.btn-dark { position: relative; overflow: hidden; }
.btn-dark::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.6s var(--transition);
}
.btn-dark:hover::after { left: 130%; }

/* ── Slim scroll-progress indicator (injected by main.js) ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101;
  transform: scaleX(0); transform-origin: left; pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  box-shadow: 0 0 10px rgba(200,169,110,0.45);
}

/* ── Reduced-motion: neutralise everything added above ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none !important; }
  .page-hero::before,
  .page-hero .hero-glow,
  .page-hero .hero-glow-2,
  .cta-banner .hero-glow,
  nav.site-nav { animation: none !important; }
  .reveal .section-eyebrow::before { width: 20px !important; transition: none !important; }
}
