/* ==========================================================================
   NN LOBOS LTD — Design System
   ========================================================================== */

:root {
  /* Brand colours */
  --navy: #0B132B;
  --navy-soft: #121B3D;
  --blue: #2563EB;
  --blue-light: #3B82F6;
  --cyan: #06B6D4;
  --emerald: #10B981;
  --white: #FFFFFF;
  --grey-50: #F8FAFC;
  --grey-100: #F1F5F9;
  --grey-200: #E2E8F0;
  --grey-400: #94A3B8;
  --grey-600: #475569;
  --charcoal: #1E293B;

  /* Semantic (light mode default) */
  --bg: var(--white);
  --bg-alt: var(--grey-50);
  --bg-elevated: var(--white);
  --text: var(--navy);
  --text-muted: var(--grey-600);
  --border: var(--grey-200);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.75);
  --shadow: 0 1px 2px rgba(11,19,43,0.04), 0 8px 24px rgba(11,19,43,0.06);
  --shadow-lg: 0 20px 60px rgba(11,19,43,0.12);
  --gradient-primary: linear-gradient(135deg, var(--navy) 0%, var(--blue) 55%, var(--cyan) 100%);
  --gradient-accent: linear-gradient(135deg, var(--blue) 0%, var(--emerald) 100%);
  --focus-ring: 0 0 0 3px rgba(37,99,235,0.45);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --container: 1200px;
  --header-h: 76px;
}

[data-theme="dark"] {
  --bg: #070B1A;
  --bg-alt: #0B132B;
  --bg-elevated: #101A3A;
  --text: #F1F5F9;
  --text-muted: #A9B4CC;
  --border: rgba(255,255,255,0.09);
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --nav-bg: rgba(7,11,26,0.7);
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

/* Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 16px;
  transition: background-color .35s ease, color .35s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
button { font-family: inherit; cursor: pointer; }

/* Skip link / a11y ----------------------------------------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff;
  padding: 12px 20px; z-index: 10000; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

/* Layout helpers --------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 64px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
  background: rgba(37,99,235,0.1); padding: 6px 14px; border-radius: var(--radius-full);
  margin-bottom: 18px;
}
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { font-size: 18px; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-full); font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gradient-accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(16px) saturate(160%);
  background: var(--nav-bg); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow);
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 10px 14px; border-radius: var(--radius-full); font-size: 14.5px; font-weight: 600; color: var(--text-muted);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; color: var(--text); transition: transform .2s ease;
}
.theme-toggle:hover { transform: rotate(20deg); }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elevated); }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ''; display: block; width: 18px; height: 2px; background: var(--text); margin: 4px auto; transition: .25s; }

@media (max-width: 980px) {
  .nav-links { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 20px; gap: 4px; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 14px 16px; font-size: 17px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
}

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; background: var(--gradient-primary); color: #fff; padding: 120px 0 100px;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); color: #fff; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,0.85); max-width: 640px; margin: 20px auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); font-size: 13px; font-weight: 600;
  margin-bottom: 24px; backdrop-filter: blur(6px);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(16,185,129,0.25); }

/* Page hero (inner pages) ------------------------------------------------ */
.page-hero { background: var(--gradient-primary); color: #fff; padding: 84px 0 72px; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 680px; margin: 14px auto 0; font-size: 18px; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.85); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* Trust bar --------------------------------------------------------------- */
.trust-bar { padding: 40px 0; border-bottom: 1px solid var(--border); }
.trust-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.trust-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-alt); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--radius-full);
}
.trust-chip svg { width: 16px; height: 16px; color: var(--emerald); flex-shrink: 0; }

/* Cards -------------------------------------------------------------- */
.card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 32px; backdrop-filter: blur(10px); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--gradient-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; flex-shrink: 0;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { margin: 0; font-size: 15px; }
.card ul.check-list { margin-top: 14px; }

.check-list li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 14.5px; color: var(--text-muted); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(16,185,129,0.15);
}
.check-list li::after {
  content: ''; position: absolute; left: 4px; top: 9.5px; width: 8px; height: 5px; border-left: 2px solid var(--emerald);
  border-bottom: 2px solid var(--emerald); transform: rotate(-45deg);
}

/* Stats --------------------------------------------------------------- */
.stats { background: var(--navy); color: #fff; padding: 72px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-num { font-size: clamp(32px, 4vw, 46px); font-weight: 800; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: rgba(255,255,255,0.7); font-size: 14px; margin-top: 6px; }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* Services detail blocks ------------------------------------------------ */
.service-block { padding: 72px 0; border-bottom: 1px solid var(--border); }
.service-block:last-child { border-bottom: none; }
.service-block-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .service-block-grid { grid-template-columns: 1fr; } }
.service-tag { display: inline-block; padding: 5px 12px; border-radius: var(--radius-full); background: rgba(6,182,212,0.12); color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--text); }

/* Tech stack ----------------------------------------------------------- */
.tech-category h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 18px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.tech-tag { background: var(--bg-elevated); border: 1px solid var(--border); padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }

/* Process timeline -------------------------------------------------------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding: 0 0 40px 76px; }
.timeline-num {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-accent);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; box-shadow: var(--shadow);
}
.timeline-item h3 { font-size: 18px; margin-bottom: 6px; }

/* Testimonials ----------------------------------------------------------- */
.quote-card { padding: 32px; }
.quote-stars { color: var(--emerald); font-size: 15px; margin-bottom: 14px; letter-spacing: 2px; }
.quote-text { font-size: 15.5px; font-style: italic; color: var(--text); margin-bottom: 20px; }
.quote-author { display: flex; align-items: center; gap: 12px; }
.quote-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.quote-name { font-weight: 700; font-size: 14.5px; }
.quote-role { font-size: 13px; color: var(--text-muted); }

/* FAQ --------------------------------------------------------------------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; overflow: hidden; background: var(--bg-elevated); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; padding: 20px 24px; display: flex; justify-content: space-between;
  align-items: center; font-weight: 700; font-size: 15.5px; color: var(--text); gap: 16px;
}
.faq-q .icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: transform .25s ease; font-size: 14px; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); background: var(--blue); color: #fff; border-color: var(--blue); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 24px 20px; color: var(--text-muted); font-size: 14.5px; }
.faq-search { width: 100%; padding: 16px 20px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); font-size: 15px; margin-bottom: 32px; }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-family: inherit; font-size: 14.5px;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-alt); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.map-embed { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-top: 24px; }
.map-embed iframe { width: 100%; height: 300px; border: 0; display: block; }
.form-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }
.form-success { display: none; background: rgba(16,185,129,0.1); border: 1px solid var(--emerald); color: var(--emerald); padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; margin-bottom: 20px; }

/* CTA band ------------------------------------------------------------ */
.cta-band { background: var(--gradient-primary); color: #fff; padding: 80px 0; text-align: center; border-radius: var(--radius-lg); margin: 0 24px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 32px; }
.cta-band-wrap { padding: 0; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 18px; letter-spacing: .04em; text-transform: uppercase; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a { font-size: 14px; color: rgba(255,255,255,0.65); transition: color .2s ease; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--blue); }
.footer-newsletter input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: #fff; margin-bottom: 10px; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.55); }
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: #fff; }

/* Legal pages ------------------------------------------------------------- */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { font-size: 24px; margin-top: 40px; }
.legal-content h3 { font-size: 18px; margin-top: 28px; }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: 15.5px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.legal-content ul li { margin-bottom: 6px; }
.legal-updated { font-size: 13.5px; color: var(--text-muted); margin-bottom: 40px; }
.legal-toc { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px 28px; margin-bottom: 40px; }
.legal-toc a { font-size: 14.5px; color: var(--blue); display: block; padding: 4px 0; font-weight: 600; }

/* Case studies ------------------------------------------------------------ */
.case-card { display: grid; grid-template-columns: 1fr; gap: 0; }
.case-tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.case-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; padding: 20px; background: var(--bg-alt); border-radius: var(--radius-md); }
.case-meta strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); margin-bottom: 4px; }
.case-meta span { font-size: 14px; color: var(--text-muted); }

/* Industries -------------------------------------------------------------- */
.industry-card { text-align: center; padding: 28px 20px; }
.industry-card .card-icon { margin: 0 auto 16px; }

/* Reveal animation --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Back to top --------------------------------------------------------------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--gradient-accent);
  color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 900; border: none;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); }

/* Utility ------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.gradient-text { background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.badge-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
