/* ============================================
   COGNIX — Global Styles · Navy & Gold
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --accent:      #D4AF37;
  --accent-mid:  #C9A227;
  --accent-soft: rgba(212, 175, 55, 0.12);
  --secondary:   #E8C84A;
  --sec-soft:    rgba(232, 200, 74, 0.1);
  --teal:        #E8C84A;
  --teal-soft:   rgba(232, 200, 74, 0.1);

  /* Light */
  --bg:          #FDFAF0;
  --bg-card:     #FFFFFF;
  --bg-glass:    rgba(253,250,240,0.78);
  --text:        #0D1B2E;
  --text-muted:  #4A5568;
  --border:      rgba(13,27,46,0.1);
  --shadow:      0 4px 32px rgba(13,27,46,0.08);
  --nav-bg:      rgba(253,250,240,0.9);
  --noise-opacity: 0.025;
}

[data-theme="dark"] {
  --bg:          #0D1B2E;
  --bg-card:     #152032;
  --bg-glass:    rgba(13,27,46,0.82);
  --text:        #FDFAF0;
  --text-muted:  #8A9BB0;
  --border:      rgba(212,175,55,0.1);
  --shadow:      0 4px 56px rgba(0,0,0,0.7);
  --nav-bg:      rgba(13,27,46,0.94);
  --noise-opacity: 0.045;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden; min-height: 100vh;
}

body::before {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none; z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 700; }

p { font-size: 1rem; font-weight: 400; }
a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { position: relative; z-index: 1; }

.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.25rem;
}

.section-label::before {
  content: ''; display: block; width: 24px; height: 1px;
  background: var(--accent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 2rem; border-radius: 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s ease;
  border: none; position: relative; overflow: hidden;
}

.btn-primary { background: var(--accent); color: #0D1B2E; }
.btn-primary:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.4);
}

.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-teal { background: var(--secondary); color: #0D1B2E; }
.btn-teal:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,175,55,0.35);
}

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(212,175,55,0.3);
}

.glass-card {
  background: var(--bg-glass); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 12px;
}

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; padding: 1rem 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); transition: all 0.3s ease;
}

nav.scrolled { padding: 0.75rem 0; box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a {
  padding: 0.5rem 1rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); border-radius: 4px; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 1rem; }

.theme-toggle {
  width: 44px; height: 26px; background: var(--border);
  border-radius: 100px; border: 1px solid var(--border);
  cursor: pointer; position: relative;
  transition: background 0.3s ease; flex-shrink: 0;
}
.theme-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); transition: transform 0.3s ease, background 0.3s ease;
}
[data-theme="dark"] .theme-toggle::after { transform: translateX(18px); background: var(--accent); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 1.5px; background: var(--text); transition: all 0.3s ease; }

.nav-mobile {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem 2rem; flex-direction: column; gap: 0.5rem; z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 0.75rem 1rem; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem; font-weight: 500; color: var(--text-muted);
  border-radius: 4px; transition: all 0.2s;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--accent); background: var(--accent-soft); }

/* ── Footer ── */
footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 4rem 0 2rem; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo { font-size: 1.7rem; margin-bottom: 1rem; display: block; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { font-size: 0.9rem; color: var(--text-muted); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; font-family: 'IBM Plex Sans', sans-serif; transition: all 0.2s; }
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── Orbs ── */
.orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
.orb-purple { background: rgba(212,175,55,0.1); }
.orb-teal   { background: rgba(232,200,74,0.07); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Tag ── */
.tag { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 3px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; font-family: 'IBM Plex Sans', sans-serif; background: var(--accent-soft); color: var(--accent); }
.tag-teal { background: var(--sec-soft); color: #B8960C; }

/* ── Icon Box ── */
.icon-box { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-family: 'IBM Plex Sans', sans-serif; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 1.25rem; flex-shrink: 0; }
.icon-box.teal { background: var(--sec-soft); color: var(--accent-mid); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
