/* ============================================================
   GLOBAL.CSS — CloudSecureTech Brand Styles
   Crimson #7e072e | Dark #141414 | Manrope + Questrial
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Questrial&display=swap');

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Questrial', sans-serif; background: #141414; color: #e5e5e5; line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Content protection: block text selection (deterrent only) ─────
   Removes the selection highlight site-wide. Form fields and anything
   contenteditable stay selectable so lead-capture/typing still works.
   This is cosmetic deterrence — page source stays readable via the
   address-bar "view-source:" prefix, DevTools, or "Save page as". */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable]:not([contenteditable="false"]) {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --crimson:       #7e072e;
  --crimson-dark:  #5e0522;
  --crimson-light: #a00d3b;   /* use for backgrounds/borders only */
  --crimson-text:  #e0698a;   /* AA-accessible crimson for text on dark bg (5.75:1 on #141414) */
  --dark:          #141414;
  --dark-2:        #1c1c1c;
  --dark-3:        #242424;
  --dark-4:        #2e2e2e;
  --border:        #333333;
  --border-light:  #404040;
  --text:          #e5e5e5;
  --text-muted:    #999999;
  --text-dim:      #cccccc;
  --white:         #ffffff;
  --gold:          #f5b301;
  --green:         #22c55e;
  --blue:          #3b82f6;
  --radius-sm:     4px;
  --radius:        8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --shadow:        0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.6);
  --transition:    0.2s ease;
  --nav-height:    88px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; color: var(--text); }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 900px; }
.section { padding: 72px 0; }
.section--sm { padding: 48px 0; }
.section--lg { padding: 96px 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Section Labels ─────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--crimson-text);
  background: rgba(126,7,46,0.12);
  border: 1px solid rgba(126,7,46,0.3);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 12px;
  color: var(--white);
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.btn-primary {
  background: var(--crimson);
  color: var(--white);
  border: 2px solid var(--crimson);
}
.btn-primary:hover {
  background: var(--crimson-light);
  border-color: var(--crimson-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(126,7,46,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--border-light);
}
.btn-outline:hover {
  background: var(--dark-3);
  border-color: var(--crimson);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid transparent;
  padding: 11px 16px;
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--border);
}
.btn-sm { font-size: 0.8rem; padding: 8px 16px; }
.btn-lg { font-size: 1rem; padding: 14px 28px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(14,14,14,0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
  /* Ensure SVG renders crisply at any DPI */
  image-rendering: -webkit-optimize-contrast;
}
/* Fallback text logo — shown only if img fails to load */
.nav-logo-text {
  font-family: 'Manrope', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  display: none; /* hidden by default; JS in global.js shows if img errors */
}
.nav-logo-text span { color: var(--crimson-text); }
.nav-logo img.logo-failed + .nav-logo-text { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--dark-3);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  z-index: 899;
  padding: 20px 16px 32px;
  overflow-y: auto;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--dark-2);
  transition: all var(--transition);
  /* touch target */
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-mobile a:hover,
.nav-mobile a:focus {
  background: var(--dark-3);
  border-color: rgba(126,7,46,0.5);
  color: var(--white);
}
.nav-mobile .nav-mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.nav-mobile .btn {
  margin-top: 10px;
  min-height: 48px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #1a0610 0%, #141414 40%, #0e1a14 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(126,7,46,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label { margin-bottom: 20px; }
.hero h1 { margin-bottom: 20px; }
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.hero-stat-val {
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--crimson-text);
  display: block;
  line-height: 1.1;
}
.hero-stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--crimson-text); }
.breadcrumb span { color: var(--border-light); }
.breadcrumb .current { color: var(--text-dim); }

/* ── Star Rating ────────────────────────────────────────────── */
.stars { color: var(--gold); font-size: 0.95rem; letter-spacing: 0.02em; }
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rating-val {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}
.review-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Badges / Tags ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-crimson {
  background: rgba(126,7,46,0.18);
  color: #e87fa8;
  border: 1px solid rgba(126,7,46,0.35);
}
.badge-green {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
}
.badge-blue {
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.25);
}
.badge-gold {
  background: rgba(245,179,1,0.12);
  color: #fcd34d;
  border: 1px solid rgba(245,179,1,0.25);
}
.badge-neutral {
  background: var(--dark-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--dark-4);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--crimson);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── Stat Boxes ─────────────────────────────────────────────── */
.stat-box {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
}
.stat-box-val {
  font-family: 'Manrope', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--crimson-text);
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-box-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Info Grid ──────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.info-item {
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.info-label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.info-value {
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
}
.footer-col h4, .footer-col h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--crimson-text); }
.footer-col a.footer-all-cities {
  margin-top: 8px;
  font-weight: 600;
  color: var(--text);
}
.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--crimson-text); }
.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Contact Modal ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--white);
}
.modal-box h3 { margin-bottom: 6px; font-size: 1.3rem; }
.modal-box .modal-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.modal-company-name {
  color: var(--crimson-text);
  font-weight: 700;
}

/* ── Form Styles ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color var(--transition);
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--crimson);
  background: var(--dark-4);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--border-light);
}
.form-group textarea { resize: vertical; min-height: 88px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-success {
  display: none;
  text-align: center;
  padding: 24px 0;
}
.form-success .success-icon {
  width: 48px; height: 48px;
  background: rgba(34,197,94,0.15);
  border: 2px solid rgba(34,197,94,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}
.form-success h4 { margin-bottom: 6px; }
.form-success p { font-size: 0.875rem; color: var(--text-muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 1024px) {
  .nav-links a { font-size: 0.82rem; padding: 8px 10px; }
}
@media (max-width: 768px) {
  :root { --nav-height: 72px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 48px 0 40px; }
  .hero-stats { gap: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .form-row { grid-template-columns: 1fr; }
  .modal-box {
    padding: 20px 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
  /* modal fullscreen on very small screens */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
  }
}
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .btn-lg { padding: 12px 20px; font-size: 0.9rem; }
  .nav-logo img { height: 52px; }
}

/* ── Footer logo ────────────────────────────────────────────── */
.footer-logo {
  display: block;
  height: 36px;
  width: auto;
  margin-bottom: 14px;
  /* desaturate slightly so it reads on dark bg without the site's own background */
  filter: brightness(1.1);
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0;
  max-width: 280px;
  line-height: 1.6;
}

/* ── AI-SEO: extractable quick-answer + profile FAQ ─────────── */
/* Light-safe (dark text on a pale panel) so it reads on the light-mode pages. */
.ai-answer {
  background: #f8fafc;
  border-left: 3px solid var(--crimson, #C8102E);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 22px;
  color: #374151;
  font-size: 0.97rem;
  line-height: 1.65;
}
.ai-answer p { margin: 0; }
.ai-answer strong { color: #141414; }
.ai-answer-meta { margin: 8px 0 0 !important; font-size: 0.8rem; color: #6b7280; }
.profile-faq { margin-top: 4px; }
.profile-faq-item { padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.profile-faq-item:last-child { padding-bottom: 0; border-bottom: none; }
.profile-faq-item .faq-q { font-weight: 700; color: #141414; margin: 0 0 4px; }
.profile-faq-item .faq-a { color: #374151; margin: 0; line-height: 1.6; }

/* ── Touch / Accessibility ──────────────────────────────────── */
/* Ensure all interactive elements meet 44×44px minimum touch target */
.btn { min-height: 44px; }
.btn-sm { min-height: 36px; } /* small buttons intentionally smaller but still accessible */
input, textarea, select { min-height: 44px; line-height: 1.4; }
textarea { min-height: 88px; }

/* Focus visible ring */
:focus-visible {
  outline: 2px solid var(--crimson-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--crimson);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .modal-box { animation: none; }
  .skip-link { transition: none; }
}
