/* ============================================================
   McCARTHYLABS.IE — Global Stylesheet
   Design: Dark Navy / Circuit Aesthetic
   Fonts: Oxanium (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0:        #070b14;
  --bg-1:        #0b1120;
  --bg-2:        #0f1729;
  --bg-card:     #111827;
  --bg-card-h:   #162035;
  --border:      #1e2d4a;
  --border-h:    #2563eb;
  --blue:        #2563eb;
  --blue-light:  #3b82f6;
  --blue-glow:   #1d4ed8;
  --cyan:        #06b6d4;
  --text-1:      #f1f5f9;
  --text-2:      #94a3b8;
  --text-3:      #64748b;
  --accent:      #2563eb;
  --font-head:   'Oxanium', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --radius:      10px;
  --radius-lg:   16px;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Circuit grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

/* Glowing orb top-right */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #2563eb22 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--text-2); margin-bottom: 1rem; }
a { color: var(--blue-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  display: block;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ── Navigation ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

.nav-logo-text span { color: var(--blue-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-1);
  background: var(--border);
}

.nav-links a.active { color: var(--blue-light); }

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  padding: 0.4rem 1.1rem !important;
  border-radius: 6px !important;
}

.nav-cta:hover { background: var(--blue-light) !important; transform: translateY(-1px); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text-2);
  font-size: 1.2rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 24px #2563eb44;
}

.btn-primary:hover {
  background: var(--blue-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 32px #2563eb66;
}

.btn-outline {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-h);
}

.btn-outline:hover {
  background: var(--border);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px #0005;
}

.card:hover::before { opacity: 1; }

/* ── Badges / Tags ────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  border: 1px solid;
}

.badge-blue  { background: #2563eb18; border-color: #2563eb66; color: var(--blue-light); }
.badge-cyan  { background: #06b6d418; border-color: #06b6d466; color: var(--cyan); }
.badge-green { background: #10b98118; border-color: #10b98166; color: #34d399; }
.badge-amber { background: #f59e0b18; border-color: #f59e0b66; color: #fbbf24; }
.badge-red   { background: #ef444418; border-color: #ef444466; color: #f87171; }

/* ── Section Divider ──────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Page Hero (inner pages) ──────────────────────────────── */
.page-hero {
  padding: 7rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-1);
}

.footer-logo img { width: 32px; border-radius: 4px; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-3);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-1); }

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: all var(--transition);
}

.social-icon:hover {
  border-color: var(--blue-light);
  color: var(--blue-light);
  background: #2563eb14;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ── Prose (blog content) ─────────────────────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-1);
}

.prose h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-1);
}

.prose p {
  color: var(--text-2);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.prose ul, .prose ol {
  color: var(--text-2);
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li { margin-bottom: 0.4rem; }

.prose blockquote {
  border-left: 3px solid var(--blue);
  padding: 0.5rem 1.25rem;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  color: var(--text-2);
  font-style: italic;
}

.prose strong { color: var(--text-1); font-weight: 600; }

.prose a { color: var(--blue-light); }
.prose a:hover { text-decoration: underline; }

.prose code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  color: var(--cyan);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px #2563eb44; }
  50%       { box-shadow: 0 0 24px #2563eb88; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.fade-up { animation: fadeUp 0.7s ease forwards; }
.fade-up-1 { animation: fadeUp 0.7s 0.1s ease both; }
.fade-up-2 { animation: fadeUp 0.7s 0.2s ease both; }
.fade-up-3 { animation: fadeUp 0.7s 0.3s ease both; }
.fade-up-4 { animation: fadeUp 0.7s 0.4s ease both; }
.fade-up-5 { animation: fadeUp 0.7s 0.5s ease both; }

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-3); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ── Scroll to top ────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--blue-light); transform: translateY(-2px); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-1); border-bottom: 1px solid var(--border); padding: 1rem; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .page-hero { padding: 5.5rem 0 2.5rem; }
}
