/* ==========================================================================
   CIPHER KNIGHTS — DELOITTE DIGITAL-INSPIRED DESIGN SYSTEM
   Deep dark premium theme with white text, clean typography, and subtle
   cyan/green accents. Mirrors Deloitte Digital's editorial layout precision.
   ========================================================================== */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS CUSTOM PROPERTIES ---- */
:root {
  /* Brand Colors */
  --brand-black:    #0a0a0a;
  --brand-near-black: #111111;
  --brand-dark:     #161616;
  --brand-panel:    #1a1a1a;
  --brand-card:     #1e1e1e;
  --brand-border:   #2a2a2a;
  --brand-border-light: #333333;

  /* Accent Colors */
  --accent-green:   #005DAA;   /* Cipher Knights brand blue (fills, borders) */
  --accent-brand:   #005DAA;   /* semantic alias for the brand blue */
  --accent-hover:   #0072CE;   /* lighter blue for hover states */
  --accent-on-dark: #4DA3E8;   /* legible accent TEXT on near-black backgrounds */
  --on-accent:      #FFFFFF;   /* text colour placed ON a brand-blue fill */
  --accent-cyan:    #00C2C7;   /* Cipher cyan */
  --accent-blue:    #0076A8;   /* Deep blue */
  --accent-white:   #FFFFFF;
  --accent-light:   #F0F0F0;

  /* Text Colors */
  --text-primary:   #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted:     #707070;
  --text-accent:    #4DA3E8;

  /* Typography */
  --font-sans:   'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-inter:  'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', 'Courier New', monospace;

  /* Spacing & Layout */
  --nav-height:     104px;
  --utility-height: 38px;
  --container-max:  1400px;
  --container-pad:  clamp(20px, 5vw, 80px);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;

  /* Shadows */
  --shadow-card:    0 4px 24px rgba(0,0,0,0.5);
  --shadow-hover:   0 8px 40px rgba(0,0,0,0.7);
  --shadow-green:   0 0 20px rgba(0, 93, 170, 0.45);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--brand-black);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-on-dark); }

img, video { max-width: 100%; display: block; }

ul, ol { list-style: none; }

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
}

/* ---- CONTAINER ---- */
.ck-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 300; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 400; }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; }

p { color: var(--text-secondary); line-height: 1.7; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-green);
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 32px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-green);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: 1.5px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}
.btn-outline:hover {
  border-color: var(--accent-green);
  color: var(--accent-on-dark);
  background: rgba(0, 93, 170, 0.06);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-on-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.btn-text:hover { gap: 10px; color: var(--accent-hover); }
.btn-text::after { content: '→'; }

.btn-emergency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #FF4D4D;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1.5px solid rgba(255, 77, 77, 0.5);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}
.btn-emergency:hover {
  background: rgba(255, 77, 77, 0.1);
  border-color: #FF4D4D;
  color: #FF4D4D;
}

/* ---- BADGES / TAGS ---- */
.ck-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
  padding: 4px 12px;
  border: 1px solid rgba(0, 93, 170, 0.4);
  background: rgba(0, 93, 170, 0.08);
}

.ck-tag-cyan {
  color: var(--accent-cyan);
  border-color: rgba(0, 194, 199, 0.4);
  background: rgba(0, 194, 199, 0.08);
}

.ck-tag-muted {
  color: var(--text-muted);
  border-color: var(--brand-border);
  background: transparent;
  font-size: 10px;
}

/* ---- DIVIDERS ---- */
.ck-divider {
  width: 100%;
  height: 1px;
  background: var(--brand-border);
}

/* ---- SECTION SPACERS ---- */
.section-lg  { padding: 100px 0; }
.section-md  { padding: 70px 0; }
.section-sm  { padding: 50px 0; }

/* ---- CARD STYLES ---- */
.ck-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  padding: 32px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.ck-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-green);
  transform: translateY(-2px);
}

/* Service card with image */
.service-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  border-color: rgba(0, 93, 170, 0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transform: translateY(-3px);
}
.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85) saturate(0.9);
  transition: filter var(--transition-base), transform var(--transition-slow);
}
.service-card:hover .service-card-img {
  filter: brightness(0.95) saturate(1.1);
  transform: scale(1.03);
}
.service-card-img-wrap {
  overflow: hidden;
  position: relative;
}
.service-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}
.service-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}
.service-card-bullets {
  margin-bottom: 20px;
}
.service-card-bullets li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}
.service-card-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-on-dark);
  font-weight: 700;
}

/* ---- STAT COUNTER ---- */
.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}
.stat-sublabel {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---- PULSE DOTS ---- */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pulse-dot-green { background: var(--accent-green); animation: pulse-green 2s infinite; }
.pulse-dot-red   { background: #FF4D4D; animation: pulse-red 1.5s infinite; }
.pulse-dot-cyan  { background: var(--accent-cyan); animation: pulse-cyan 2s infinite; }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 93, 170, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0, 93, 170, 0); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); }
}
@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 194, 199, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0, 194, 199, 0); }
}

/* ---- FLASH MESSAGES ---- */
.flash-messages-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}
.flash-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-green);
  background: var(--brand-panel);
  font-size: 14px;
  color: var(--text-primary);
  animation: slideInRight 0.3s ease;
}
.flash-alert.error { border-color: #FF4D4D; }
.flash-alert.info  { border-color: var(--accent-cyan); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- COMPLIANCE BADGE GRID ---- */
.compliance-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  text-align: center;
  transition: border-color var(--transition-base), transform var(--transition-base);
}
.compliance-badge:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}
.compliance-badge-icon {
  font-size: 28px;
  line-height: 1;
}
.compliance-badge-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.compliance-badge-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- BLOG CARD ---- */
.blog-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}
.blog-card:hover {
  border-color: rgba(0, 93, 170, 0.4);
  transform: translateY(-3px);
}
.blog-card-body { padding: 24px; }
.blog-card-date {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.blog-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 12px;
  transition: color var(--transition-fast);
}
.blog-card:hover .blog-card-title { color: var(--accent-on-dark); }
.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- SECTION HEADER ---- */
.section-header {
  margin-bottom: 56px;
}
.section-header-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
  margin-bottom: 16px;
}
.section-header h2 {
  max-width: 700px;
}
.section-header p {
  max-width: 640px;
  margin-top: 16px;
  font-size: 16px;
}

/* ---- MARQUEE / TICKER ---- */
.ck-ticker {
  overflow: hidden;
  background: var(--brand-near-black);
  border-top: 1px solid var(--brand-border);
  border-bottom: 1px solid var(--brand-border);
  padding: 14px 0;
}
.ck-ticker-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
.ck-ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ck-ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  flex-shrink: 0;
}
.ck-ticker-item strong { color: var(--text-primary); }
.ck-ticker-item .sep { color: var(--brand-border-light); }

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--brand-panel);
  border-top: 1px solid var(--brand-border);
  padding: 20px var(--container-pad);
  z-index: 8888;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 800px;
}
.cookie-banner a { color: var(--accent-on-dark); text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.cookie-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.cookie-btn-accept {
  background: var(--accent-green);
  color: var(--on-accent);
  border: none;
}
.cookie-btn-accept:hover { background: var(--accent-hover); }
.cookie-btn-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--brand-border);
}
.cookie-btn-decline:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.cookie-btn-customize {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  text-decoration: underline;
}

/* ---- RESPONSIVE GRID HELPERS ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.grid-auto-md { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-24  { gap: 24px; }
.gap-32  { gap: 32px; }
.mt-8    { margin-top: 8px; }
.mt-16   { margin-top: 16px; }
.mt-24   { margin-top: 24px; }
.mt-32   { margin-top: 32px; }
.mt-48   { margin-top: 48px; }
.mb-8    { margin-bottom: 8px; }
.mb-16   { margin-bottom: 16px; }
.mb-24   { margin-bottom: 24px; }
.mb-32   { margin-bottom: 32px; }
.mb-48   { margin-bottom: 48px; }
.w-full  { width: 100%; }
.hidden  { display: none !important; }

/* ---- INCIDENT MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--brand-panel);
  border: 1px solid var(--brand-border-light);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition-base);
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--brand-border);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-close {
  width: 36px;
  height: 36px;
  background: var(--brand-border);
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.modal-close:hover { background: var(--brand-border-light); }
.modal-body { padding: 28px; }
.modal-form-row { margin-bottom: 18px; }
.modal-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.modal-form-input,
.modal-form-select,
.modal-form-textarea {
  width: 100%;
  background: var(--brand-dark);
  border: 1px solid var(--brand-border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.modal-form-input:focus,
.modal-form-select:focus,
.modal-form-textarea:focus {
  border-color: var(--accent-green);
}
.modal-form-textarea { resize: vertical; min-height: 90px; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 500px) { .modal-form-grid { grid-template-columns: 1fr; } }
