/* ==========================================================================
   Nexcraft — design system
   Navy-charcoal + crimson accent, premium BPO/call-center agency site
   ========================================================================== */

:root {
  /* Core surfaces */
  --bg: #0a0e14;
  --bg-elevated: #0f141c;
  --surface: #131a24;
  --surface-2: #1a2230;
  --border: #232c3a;
  --border-strong: #33404f;

  /* Text */
  --fg: #f5f6f8;
  --fg-muted: #9aa5b1;
  --fg-faint: #626d7a;

  /* Accent: crimson */
  --accent: #e63950;
  --accent-strong: #ff5c71;
  --accent-dim: #a82a3d;
  --accent-gradient: linear-gradient(135deg, #ff6b7f 0%, #e63950 55%, #a82a3d 100%);
  --accent-soft: rgba(230, 57, 80, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 0 1px rgba(230, 57, 80, 0.15), 0 30px 80px -30px rgba(230, 57, 80, 0.35);

  --container-w: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) {
  body { cursor: auto; }
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--fg-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 96px 0; }

@media (max-width: 720px) { section { padding: 64px 0; } }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(700px circle at 10% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(500px circle at 90% 15%, rgba(230, 57, 80, 0.06), transparent 60%);
  pointer-events: none;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.logo .accent { color: var(--accent-strong); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.92rem; color: var(--fg-muted); transition: color 0.2s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }

.nav-cta-group { display: flex; align-items: center; gap: 14px; }

.nav-phone {
  font-size: 0.85rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-phone strong { color: var(--fg); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  color: var(--fg);
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav-links {
    position: fixed; inset: 76px 0 0 0;
    flex-direction: column; background: var(--bg);
    padding: 32px 24px; gap: 24px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: all 0.25s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-cta-group .btn, .nav-phone { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-gradient); color: #fff; }
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); background: var(--surface); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ==========================================================================
   Pills
   ========================================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--fg-muted); font-size: 0.82rem; background: var(--surface);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding-top: 120px; padding-bottom: 80px; text-align: center; }
.hero-badge { display: flex; justify-content: center; margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); max-width: 900px; margin: 0 auto 24px; color: var(--fg); }
.hero .lead { max-width: 640px; margin: 0 auto 36px; font-size: 1.08rem; color: var(--fg-muted); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Stats bar / counters
   ========================================================================== */

.stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); max-width: 760px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
}
.stats-bar .stat { padding: 28px 16px; text-align: center; border-right: 1px solid var(--border); }
.stats-bar .stat:last-child { border-right: none; }
.stats-bar .num { font-family: "Space Grotesk", sans-serif; font-size: 1.9rem; font-weight: 700; color: var(--accent-strong); }
.stats-bar .label { font-size: 0.82rem; color: var(--fg-faint); margin-top: 4px; }

@media (max-width: 640px) {
  .stats-bar { grid-template-columns: 1fr; }
  .stats-bar .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stats-bar .stat:last-child { border-bottom: none; }
}

.ring-stat { display: flex; align-items: center; gap: 20px; }
.ring-stat svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring-stat .ring-bg { fill: none; stroke: var(--border-strong); stroke-width: 8; }
.ring-stat .ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.ring-stat .ring-value {
  position: relative;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
}
.ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-wrap .ring-value { position: absolute; }

/* ==========================================================================
   Section heading
   ========================================================================== */

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head.left { text-align: left; margin: 0 0 32px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }

/* ==========================================================================
   Grid + cards
   ========================================================================== */

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

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); }

.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  color: var(--accent-strong); margin-bottom: 18px; font-size: 1.1rem;
}
.card h3 { font-size: 1.05rem; color: var(--fg); }
.card p { font-size: 0.92rem; margin: 0; }

/* Service card with visual header */
.service-card { overflow: hidden; padding: 0; }
.service-card .visual-abstract { border-radius: 0; border: none; min-height: 180px; }
.service-card .service-body { padding: 24px 24px 28px; }
.service-card .service-body p { margin-bottom: 14px; }
.service-card .read-more { color: var(--accent-strong); font-size: 0.85rem; font-weight: 600; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--fg-faint); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }
td.highlight, th.highlight { color: var(--accent-strong); font-weight: 700; }
.row-featured { background: var(--surface-2); }

/* ==========================================================================
   Pricing tiers
   ========================================================================== */

.tier { position: relative; display: flex; flex-direction: column; }
.tier.featured { border-color: var(--accent-dim); box-shadow: var(--shadow-glow); }
.tier .badge-recommended {
  position: absolute; top: -12px; right: 20px; background: var(--accent-gradient); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tier .price { font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--fg); margin: 12px 0 16px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.tier li { font-size: 0.88rem; color: var(--fg-muted); padding: 8px 0; border-top: 1px solid var(--border); }
.tier li:first-child { border-top: none; }

/* ==========================================================================
   Process / steps
   ========================================================================== */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }

.step .step-num {
  font-family: "Space Grotesk", sans-serif; color: var(--accent-strong); font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--border-strong); border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

/* ==========================================================================
   Calculator
   ========================================================================== */

.calculator {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
@media (max-width: 820px) { .calculator { grid-template-columns: 1fr; } }

.field { margin-bottom: 24px; }
.field label { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--fg-muted); margin-bottom: 10px; }
.field label .value { color: var(--accent-strong); font-weight: 700; }

input[type="range"] { width: 100%; accent-color: var(--accent); background: transparent; }

.segmented { display: flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.segmented button { flex: 1; padding: 10px; background: transparent; border: none; color: var(--fg-muted); font-size: 0.85rem; cursor: pointer; transition: all 0.2s var(--ease); }
.segmented button.active { background: var(--accent-gradient); color: #fff; font-weight: 600; }

.calc-result { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 28px; text-align: center; }
.calc-result .range { font-family: "Space Grotesk", sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--accent-strong); margin: 10px 0; }
.calc-result .sub { font-size: 0.82rem; color: var(--fg-faint); }
.calc-breakdown { text-align: left; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.calc-breakdown div { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--fg-muted); padding: 6px 0; }
.calc-breakdown div span:last-child { color: var(--fg); font-weight: 600; }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; position: relative;
}
.testimonial-card .quote-mark { font-family: "Space Grotesk", serif; font-size: 2.4rem; color: var(--accent); line-height: 1; opacity: 0.7; }
.testimonial-card p { font-size: 0.94rem; color: var(--fg-muted); margin: 12px 0 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.9rem;
}
.testimonial-author .name { color: var(--fg); font-weight: 600; font-size: 0.9rem; }
.testimonial-author .role { color: var(--fg-faint); font-size: 0.8rem; }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--fg); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; transition: transform 0.2s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 14px; font-size: 0.92rem; }

/* ==========================================================================
   Case study / blog cards
   ========================================================================== */

.case-card, .blog-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.case-card:hover, .blog-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.case-card .visual-abstract, .blog-card .visual-abstract { border-radius: 0; border: none; min-height: 160px; }
.case-card .body, .blog-card .body { padding: 24px; }
.case-card .tag, .blog-card .tag { color: var(--accent-strong); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.case-card h3, .blog-card h3 { margin: 10px 0; font-size: 1.15rem; }
.case-card .metric { font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--accent-strong); }
.case-card .metric-label { font-size: 0.78rem; color: var(--fg-faint); }
.blog-card .meta { font-size: 0.78rem; color: var(--fg-faint); margin-top: 12px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label.form-label { display: block; font-size: 0.85rem; color: var(--fg-muted); margin-bottom: 8px; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 13px 16px; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--fg); font-family: inherit; font-size: 0.92rem;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
@media (max-width: 780px) { .cta-band { grid-template-columns: 1fr; padding: 32px; } }

.cta-band.dark {
  background: linear-gradient(135deg, #150a0d 0%, var(--surface) 60%);
  border-color: var(--accent-dim);
}

.cta-checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.cta-checklist li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--fg-muted); padding: 6px 0; }
.cta-checklist li::before { content: "✓"; color: var(--accent-strong); font-weight: 700; }

/* ==========================================================================
   Newsletter
   ========================================================================== */

.newsletter {
  display: flex; gap: 12px; max-width: 480px; margin: 0 auto;
}
.newsletter input { flex: 1; }
@media (max-width: 520px) { .newsletter { flex-direction: column; } }

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 0.85rem; color: var(--fg); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--fg-muted); font-size: 0.88rem; transition: color 0.2s var(--ease); }
.footer-grid a:hover { color: var(--fg); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border);
  padding-top: 24px; font-size: 0.8rem; color: var(--fg-faint); flex-wrap: wrap; gap: 12px;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--fg-faint); margin-bottom: 24px; }
.breadcrumb a { color: var(--fg-muted); }
.breadcrumb a:hover { color: var(--fg); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Abstract visual (stand-in for photography/video until real assets arrive)
   ========================================================================== */

.visual-abstract {
  position: relative; min-height: 260px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 25% 20%, rgba(230, 57, 80, 0.22), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(230, 57, 80, 0.12), transparent 50%),
    linear-gradient(160deg, #10141c 0%, #1a2230 100%);
}
.visual-abstract::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 75%);
}
.visual-abstract svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.visual-abstract .node { fill: var(--accent-strong); opacity: 0.9; }
.visual-abstract .link { stroke: var(--accent-strong); stroke-width: 1; opacity: 0.35; fill: none; }
.visual-abstract .label {
  position: absolute; bottom: 14px; left: 16px; font-size: 0.72rem; color: var(--fg-faint);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Waveform motif for "call/voice" sections */
.waveform { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.waveform span {
  width: 4px; background: var(--accent-gradient); border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
.waveform span:nth-child(2) { animation-delay: 0.1s; }
.waveform span:nth-child(3) { animation-delay: 0.2s; }
.waveform span:nth-child(4) { animation-delay: 0.3s; }
.waveform span:nth-child(5) { animation-delay: 0.4s; }
.waveform span:nth-child(6) { animation-delay: 0.5s; }
.waveform span:nth-child(7) { animation-delay: 0.6s; }
@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 36px; opacity: 1; }
}

/* ==========================================================================
   Custom cursor (magnetic + contextual)
   ========================================================================== */

.cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-strong); pointer-events: none; z-index: 210;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.15s ease;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--accent-strong); pointer-events: none; z-index: 209;
  transform: translate(-9999px, -9999px);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), opacity 0.15s ease, background 0.2s ease;
}
.cursor-ring.active {
  width: 84px; height: 84px;
  background: rgba(230, 57, 80, 0.12);
}
.cursor-label {
  position: fixed; top: 0; left: 0;
  background: var(--accent-gradient); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; pointer-events: none; z-index: 211;
  white-space: nowrap; opacity: 0; transition: opacity 0.15s ease;
  transform: translate(-9999px, -9999px);
}
.cursor-label.visible { opacity: 1; }

@media (hover: none) {
  .cursor-dot, .cursor-ring, .cursor-label { display: none; }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center { text-align: center; }
.max-w-prose { max-width: 640px; margin-left: auto; margin-right: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
