/* ==========================================================================
   CodeHeven Solutions — Theme Stylesheet
   Modern dark tech/SaaS design system
   ========================================================================== */

:root {
  --bg: #07090f;
  --bg-soft: #0c0f1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #eef1f8;
  --text-muted: #9aa4bf;
  --text-faint: #6b7690;

  --accent-1: #6d5bff;   /* indigo/violet */
  --accent-2: #22d3ee;   /* cyan */
  --accent-3: #ec4899;   /* pink */
  --accent-gradient: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --accent-gradient-2: linear-gradient(120deg, var(--accent-3), var(--accent-1));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-glow: 0 0 60px rgba(109, 91, 255, 0.18);
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.55);

  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
}

p { margin: 0 0 16px; color: var(--text-muted); }

a { color: inherit; text-decoration: none; transition: color .2s ease; }

ul { margin: 0; padding: 0; }
li { list-style: none; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; padding: 100px 0; }

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

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

/* ---------- Background decoration ---------- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.glow-orb.orb-1 { width: 420px; height: 420px; background: var(--accent-1); top: -120px; left: -100px; }
.glow-orb.orb-2 { width: 380px; height: 380px; background: var(--accent-2); top: 40px; right: -120px; }
.glow-orb.orb-3 { width: 320px; height: 320px; background: var(--accent-3); bottom: -140px; left: 30%; opacity: 0.22; }

/* ---------- Section heading ---------- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-tag i { font-size: 14px; }

.section-head { max-width: 640px; margin-bottom: 56px; position: relative; z-index: 1; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #0a0a0f;
  box-shadow: 0 10px 30px -8px rgba(109, 91, 255, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(109, 91, 255, 0.7); }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-2px); }

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(7, 9, 15, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border-soft);
  padding: 12px 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px; color: var(--text); }
.brand .brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0f; font-size: 17px; font-weight: 800;
  box-shadow: 0 6px 20px -4px rgba(109,91,255,0.6);
}

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--text-muted); position: relative; padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--accent-gradient); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
}

@media (max-width: 920px) {
  .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: min(320px, 85vw);
    background: var(--bg-soft); border-left: 1px solid var(--border); flex-direction: column;
    justify-content: center; gap: 28px; transition: right .35s ease; z-index: 1001; }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-outline { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 180px 0 120px; overflow: hidden; position: relative; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero .container > div { min-width: 0; }
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; } .hero { padding: 150px 0 72px; } }

.hero h1 { font-size: clamp(36px, 5.2vw, 58px); letter-spacing: -0.01em; margin-bottom: 22px; }
.hero .lede { font-size: 18px; max-width: 520px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.hero-pill i { color: var(--accent-2); font-size: 13px; }

/* Code window mock */
.code-window {
  background: linear-gradient(180deg, #11141f, #0a0c14);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
}
.code-window .cw-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.cw-dot { width: 11px; height: 11px; border-radius: 50%; }
.cw-dot.r { background: #ff5f56; } .cw-dot.y { background: #ffbd2e; } .cw-dot.g { background: #27c93f; }
.cw-title { margin-left: 8px; font-size: 12px; color: var(--text-faint); font-family: monospace; }
.code-window pre {
  margin: 0; padding: 22px 24px; font-family: 'Fira Code', Consolas, monospace;
  font-size: 13.5px; line-height: 1.9; overflow: hidden; color: #cdd6f4;
}
.code-window .c-key { color: #ec4899; }
.code-window .c-fn { color: #22d3ee; }
.code-window .c-str { color: #a6e3a1; }
.code-window .c-com { color: #6b7690; }
.code-window .c-var { color: #f9e2af; }

/* ---------- Stats strip ---------- */
.stats-strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--border-soft); overflow: hidden;
}
.stat-cell {
  background: var(--bg-soft); padding: 32px 20px; text-align: center;
}
.stat-cell .num { font-family: 'Sora', sans-serif; font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.stat-cell .label { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 768px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / Glass ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(6px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(109,91,255,0.4); background: var(--surface-strong); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-gradient); color: #0a0a0f; font-size: 22px;
  margin-bottom: 20px;
}

.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.about-grid > * { min-width: 0; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr !important; } .grid[style*="1fr 1.4fr"], .grid[style*=".9fr 1.4fr"] { grid-template-columns: 1fr !important; } }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { font-size: 14.5px; margin-bottom: 18px; }
.service-card .learn { font-size: 14px; font-weight: 600; color: var(--accent-2); display: inline-flex; align-items: center; gap: 6px; }
.service-card .learn i { transition: transform .2s ease; }
.service-card:hover .learn i { transform: translateX(4px); }

/* ---------- Process timeline ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 1; }
@media (max-width: 960px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }
.process-step { position: relative; }
.process-num {
  font-family: 'Sora', sans-serif; font-size: 44px; font-weight: 800;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .5; margin-bottom: 8px;
}
.process-step h3 { font-size: 18px; }
.process-step p { font-size: 14px; }

/* ---------- Project cards ---------- */
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface);
  display: flex; flex-direction: column;
}
.project-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .thumb img { transform: scale(1.06); }
.project-card .thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7,9,15,0.9) 100%);
}
.project-card .thumb .tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(7,9,15,0.75); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--accent-2);
}
.project-card .body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.project-card h3 { font-size: 21px; margin-bottom: 8px; }
.project-card .tagline { color: var(--accent-2); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.project-card p.desc { font-size: 14.5px; flex: 1; }
.tech-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tech-pill { font-size: 12px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-strong); border: 1px solid var(--border); color: var(--text-muted); }

.feature-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 14.5px; color: var(--text-muted); }
.feature-check i { color: var(--accent-2); margin-top: 3px; flex-shrink: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; z-index: 1; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(109,91,255,0.18), rgba(34,211,238,0.12));
  border: 1px solid var(--border);
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 14px; }
.cta-band p { max-width: 520px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page title banner (inner pages) ---------- */
.page-banner { padding: 160px 0 72px; position: relative; overflow: hidden; }
.page-banner .breadcrumb { font-size: 14px; color: var(--text-faint); margin-bottom: 14px; }
.page-banner .breadcrumb a { color: var(--text-muted); }
.page-banner .breadcrumb a:hover { color: var(--accent-2); }
.page-banner h1 { font-size: clamp(32px, 4.5vw, 46px); }
.page-banner p { font-size: 16px; max-width: 560px; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 15.5px;
}
.faq-q i { color: var(--accent-2); transition: transform .25s ease; flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 24px 20px; font-size: 14.5px; color: var(--text-muted); }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { grid-column: span 1; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.form-field input, .form-field textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text);
  font-family: inherit; font-size: 14.5px; resize: vertical;
  transition: border-color .2s ease, background .2s ease;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent-2); background: rgba(255,255,255,0.05);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-faint); }

.alert { padding: 16px 20px; border-radius: var(--radius-sm); font-size: 14.5px; margin-bottom: 24px; border: 1px solid; }
.alert-success { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); color: #7ee8fa; }
.alert-error { background: rgba(236,72,153,0.08); border-color: rgba(236,72,153,0.3); color: #f7a6cc; }

/* ---------- Contact info list ---------- */
.contact-info-item { display: flex; gap: 16px; margin-bottom: 28px; }
.contact-info-item .icon-badge { width: 46px; height: 46px; border-radius: 12px; font-size: 18px; margin-bottom: 0; flex-shrink: 0; }
.contact-info-item h4 { font-size: 15.5px; margin-bottom: 4px; }
.contact-info-item p { font-size: 14.5px; margin-bottom: 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); padding: 72px 0 0; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 15px; margin-bottom: 20px; }
.footer-grid ul li { margin-bottom: 12px; }
.footer-grid ul li a { font-size: 14.5px; color: var(--text-muted); }
.footer-grid ul li a:hover { color: var(--accent-2); }
.footer-about p { font-size: 14.5px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border-soft); padding: 22px 0; text-align: center;
  font-size: 13.5px; color: var(--text-faint);
}
.footer-bottom a { color: var(--text-muted); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Scroll top button ---------- */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-gradient); color: #0a0a0f;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 10px 30px -8px rgba(109,91,255,0.6);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); }

/* ---------- Misc ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
