/* ═════════════════════════════════════════════════════════════════
   PRAJNA ANALYTICS LTD — EXECUTIVE AGENCY STYLESHEET
   UK Software Engineering & Quantitative Analytics Consultancy
   ═════════════════════════════════════════════════════════════════ */

/* ─── RESET & DESIGN TOKENS ────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand Color System */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark: #090d16;
  --bg-dark-card: #111726;

  /* Brand Cobalt Gradient */
  --primary-blue: #0052ff;
  --primary-cyan: #00d2ff;
  --primary-gradient: linear-gradient(135deg, #0052ff 0%, #00d2ff 100%);
  --primary-hover: #0043d4;

  --accent-emerald: #059669;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-cobalt: rgba(0, 82, 255, 0.25);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 20px 48px rgba(0, 82, 255, 0.12);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry */
  --max-width: 1280px;
  --nav-height: 84px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --tr: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Accessible Focus States */
:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 3px;
}

/* ─── TYPOGRAPHY & LAYOUT ──────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 90px 0;
  position: relative;
}

.section-white {
  background-color: var(--bg-surface);
}

.section-slate {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.badge-kobault {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  color: var(--primary-blue);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  box-shadow: 0 0 8px var(--primary-blue);
}

.heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.heading-lg {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.heading-md {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
}

.text-cobalt-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subheading {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── BUTTONS ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  transition: all var(--tr);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 82, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 82, 255, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}

/* ─── NAVBAR & ACCESSIBLE MOBILE DRAWER ────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--tr);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--tr);
}

.nav-link:hover {
  color: var(--primary-blue);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Mobile Navigation Toggle Button */
.nav-mobile-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--tr);
}

.nav-mobile-toggle:hover {
  background: var(--border-subtle);
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  display: none;
}

/* RESPONSIVE NAVBAR: HIDE RIGHT ACTIONS ON < 900px TO PREVENT OVERFLOW */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  /* Hide badge and proposal button in top row on mobile to prevent clipping */
  .nav-right-actions .badge-kobault,
  .nav-right-actions .desktop-proposal-btn {
    display: none !important;
  }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    padding: 20px 24px 28px;
    gap: 16px;
    z-index: 999;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .mobile-nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-drawer a {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
  }
}

/* ─── HERO SECTION ─────────────────────────────────────────────── */
.hero-section {
  padding-top: calc(var(--nav-height) + 50px);
  padding-bottom: 80px;
  background: radial-gradient(circle at 80% 20%, rgba(0, 210, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(0, 82, 255, 0.06) 0%, transparent 50%),
              var(--bg-surface);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 48px;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 32px;
}

.bullet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-main);
  font-weight: 600;
}

.bullet-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 82, 255, 0.1);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Interactive Sandbox Widget Card */
.sandbox-card {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 48px rgba(9, 13, 22, 0.2);
  overflow: hidden;
  color: var(--text-inverse);
}

.sandbox-header {
  background: #0f172a;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sandbox-tabs {
  display: flex;
  gap: 6px;
}

.sandbox-tab {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--tr);
}

.sandbox-tab.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.4);
  color: #00d2ff;
  font-weight: 700;
}

.sandbox-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  max-height: 360px;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.code-keyword { color: #38bdf8; }
.code-fn { color: #4ade80; }
.code-str { color: #fde047; }
.code-comment { color: #64748b; }

.sandbox-metrics {
  background: #0f172a;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sandbox-metric-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #00d2ff;
}

.sandbox-metric-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── UK TRUST & CREDENTIALS STRIP ───────────────────────────── */
.trust-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 0;
}

.trust-flex {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon-svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.trust-icon-svg svg {
  width: 20px;
  height: 20px;
}

.trust-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.trust-sub {
  font-size: 12px;
  color: var(--text-light);
}

/* ─── BENTO-GRID SERVICE PILLARS ───────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.bento-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 34px;
  box-shadow: var(--shadow-md);
  transition: all var(--tr);
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--tr);
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-cobalt);
}

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

.bento-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.bento-icon svg {
  width: 24px;
  height: 24px;
}

.bento-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.bento-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tag {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ─── FEATURED WORK ────────────────────────────────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.kobault-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--tr);
}

.kobault-card:hover, .kobault-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-cobalt);
}

.kobault-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #090d16;
  overflow: hidden;
}

.kobault-media video, .kobault-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.kobault-card:hover .kobault-media video,
.kobault-card:hover .kobault-media img {
  transform: scale(1.04);
}

.kobault-sector-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.kobault-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kobault-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.kobault-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.kobault-metrics {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.metric-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--primary-blue);
}

.metric-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kobault-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-blue);
}

/* ─── FULL PORTFOLIO EXPANDABLE DRAWER ──────────────────────────── */
.full-portfolio-wrapper {
  display: none;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
}

.full-portfolio-wrapper.active {
  display: block;
}

.case-filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.case-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--tr);
}

.case-filter-btn.active, .case-filter-btn[aria-selected="true"] {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─── ACCESSIBLE MODAL DIALOG ──────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform var(--tr);
}

.modal-backdrop.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  border: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  line-height: 1;
}

.modal-media-box {
  width: 100%;
  max-height: 440px;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-media-box video, .modal-media-box img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.modal-details {
  padding: 32px;
}

/* ─── CONTACT FORM & FOOTER ────────────────────────────────────── */
.contact-split-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.contact-svg-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 82, 255, 0.08);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 82, 255, 0.15);
}

.contact-svg-icon svg {
  width: 20px;
  height: 20px;
}

.form-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-size: 14px;
  margin-top: 6px;
}

.form-field:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 44px 0;
  font-size: 14px;
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── PREFERS-REDUCED-MOTION (ACCESSIBILITY) ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .kobault-card:hover, .kobault-card:hover .kobault-media video,
  .bento-card:hover, .btn:hover {
    transform: none !important;
    transition: none !important;
  }
}

/* ─── RESPONSIVE BREAKPOINTS (375px, 768px, 900px, 1440px) ─────── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-split-card { grid-template-columns: 1fr; }
  .trust-flex { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .case-grid { grid-template-columns: 1fr; }
  .trust-flex { grid-template-columns: 1fr; gap: 16px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .contact-split-card { padding: 24px; }
  .logo-title { font-size: 16px; }
}

@media (max-width: 385px) {
  .container { padding: 0 16px; }
  .heading-xl { font-size: 32px; }
  .badge-kobault { font-size: 11px; padding: 5px 12px; }
}
